Sverklo + Aider
Aider is a Python-based CLI AI pair programmer that edits code in your local repo. Sverklo is the retrieval layer Aider can call via MCP to ground its edits in real symbol-graph data instead of training-data patterns.
How they fit together
Aider is the agent — it decides what to do, generates code, applies edits. Sverklo is the retrieval layer the agent calls when it needs authoritative answers about your codebase. Without sverklo, the agent generates from training-data patterns and invents function names that don't exist. With sverklo, it looks up real symbols, finds real call sites, measures real blast radius before proposing changes.
The integration is one command:
npm install -g sverklo
cd your-project
sverklo init
sverklo init auto-detects Aider and writes the right MCP config files. The 37 sverklo tools appear in the agent's tool list immediately.
Frequently asked questions
What's the best open source alternative to Aider?
Sverklo isn't an alternative to Aider — they solve different layers. Aider is the agent (it generates and applies edits); sverklo is the retrieval layer (it answers "does this symbol exist?" "who calls it?" "what's the blast radius?"). Run them together: Aider for editing, sverklo (via MCP) for retrieval. If you want a sverklo-only alternative for codebase question-answering without any agent at all, the sverklo CLI exposes the same surface (sverklo search, sverklo refs, sverklo audit).
How do I give Aider a symbol graph of my codebase?
Aider supports MCP servers via its config. Run sverklo init in your project — it generates .mcp.json that Aider's MCP integration picks up, exposing 37 sverklo tools (sverklo_lookup, sverklo_refs, sverklo_impact, sverklo_verify, etc.) to Aider. The agent now reasons about your real symbol graph instead of training-data patterns.
Does Aider need an embeddings index?
Aider has its own repo-map feature (built on tree-sitter), and that's enough for small repos. On large interconnected codebases — where Aider's repo-map exceeds its context budget — sverklo's hybrid retrieval (BM25 + ONNX vector + PageRank) pulls only the chunks that matter, which is the load-bearing axis when the agent is making real edits.
Is sverklo better than Aider's repo-map?
Different jobs. Aider's repo-map is a lightweight static signal that fits in the system prompt. Sverklo's index is a queryable graph the agent calls on demand. On 10-file repos, repo-map is fine. On 1k-file monorepos, sverklo's tools answer questions repo-map can't fit ("who calls this?" "is this dead code?").
Try it
If you're already using Aider and your agent has hallucinated function names, invented imports, or forgotten yesterday's design decision — sverklo is the retrieval layer that fixes the root cause.
npm install -g sverklo
sverklo init
Or read the 60-task retrieval benchmark first — we publish where sverklo wins and where it loses.
See also
- bench:primitives — 60-task retrieval evaluation (where sverklo wins, where it loses)
- All comparisons
- Playground — see real sverklo output on real OSS repos
- GitHub: sverklo/sverklo