On this page
Repository intelligence for coding agents is a prebuilt index of your codebase that an agent queries through tools, usually over MCP, instead of reading files one by one. Good ones know structure (what calls what), history (what changes together, who owns it) and risk. Choose on what the index knows, where your code goes, which agents it supports, and cost.
| Tool | Code graph | Git history | Generated docs | Health / risk | Where code goes | Agents | Price (6 Oct 2026) |
|---|---|---|---|---|---|---|---|
| Augment Context Engine | Semantic index | Recent commits (Context Lineage) | No | No | Augment's cloud, or local mode via CLI | Any MCP agent | From $20/month |
| Sourcegraph | Search, symbols, precise navigation | Commit and diff search | No | No | Your servers or single-tenant cloud | Any MCP agent (Enterprise) | From $16K/year |
| Greptile | Codebase index behind an API | Used in reviews | No | Review comments | Greptile's cloud; self-host on Enterprise | Any MCP agent (official server) and API | Free starter, $30/seat/month |
| CodeGraph | Call graph, tree-sitter, SQLite | No | No | Impact of a change | Local only | Any MCP agent | Free, MIT |
| Serena | Live symbols via language servers | No | No | No | Local only | Any MCP agent | Free; paid JetBrains backend |
| GitNexus | Knowledge graph, call chains, processes | Diff impact | Yes (LLM wiki) | Blast radius | Local; enterprise SaaS or self-host | Any MCP agent | Free non-commercial; commercial licence |
| repowise | Dependency and call graph | Hotspots, co-change, ownership, decisions | Yes | Health score, dead code, change risk | Local (AGPL-3.0) or repowise.dev | Any MCP agent, including Claude.ai and ChatGPT | Free tier; Pro $15/month |
Scroll the table sideways to see every column.
I build repowise, so treat its row with suspicion and check it the same way you'd check the others. The test at the end of this post works on all seven.
We build repowise, so weigh our entry accordingly. The measurements we publish about it, with their methods, are on the benchmarks page.
Repository intelligence in plain terms
An agent like Claude Code or Cursor starts every task knowing nothing about your repo. It finds its way by searching for strings and opening files. On a small project that works fine. On a 300,000-line monorepo, the agent spends most of its budget reading files that turn out not to matter, and it still misses the one file that breaks when the change ships.
A repository intelligence tool does the reading once, ahead of time, and keeps the result as an index. The agent then asks it questions through tools: "where is checkout retry handled", "what calls this function", "what usually changes with this file", "who knows this module". The answer comes back in a few hundred tokens instead of twenty file reads.
MCP (Model Context Protocol) is the plug that makes this work across agents. A tool that speaks MCP can be added to Claude Code, Cursor, Codex, Windsurf and others with a few lines of config. Two years ago each context product came with its own editor. In 2026 almost every serious one is an MCP server, which means you can keep the agent your team likes and swap the context underneath it.
The three shapes of tool
Hosted context engines
Augment's Context Engine, Sourcegraph and Greptile run the index on their infrastructure. You get scale and someone else does the operations. You also send your code to them, which some teams can't do.
Augment opened its Context Engine to any MCP agent in February 2026, with a local mode through its CLI and a remote mode for cross-repo context. Its Context Lineage feature, announced in July 2025, indexes recent commits on the branch and summarizes the diffs so agents can find why something changed. Plans start at $20 a month flat with usage included.
Sourcegraph is the most mature code search platform and now has a generally available MCP server with keyword, natural-language, commit and diff search plus Deep Search. It is Enterprise only, from $16K a year. If you already run it, it is a strong context layer and you probably don't need another.
Greptile is review-first. It indexes your repos and comments on pull requests, and it has an API (/query and /search) that answers natural-language questions with file references. It also ships an official MCP server, documented for Claude Code, Cursor and Codex.
Local code graphs
CodeGraph, Serena and GitNexus run on your machine and keep your code there.
CodeGraph parses 20+ languages with tree-sitter into a graph stored in SQLite with full-text search, and exposes mainly one tool, codegraph_explore, that returns the relevant symbols' source and call paths in one call. It is MIT licensed and fast. In our own benchmark it built its graph 22 times faster than repowise on the same repository.
Serena takes a different route. It doesn't build a persistent graph; it asks language servers (the same engines your editor uses for go-to-definition) for symbols, references and type hierarchies, and adds symbol-level editing tools. It supports over 40 languages. The default backend is free; a paid JetBrains plugin backend adds refactorings such as moves and inlining.
GitNexus builds a knowledge graph of dependencies, call chains, clusters and execution flows, and adds blast radius analysis (what else a change can affect), git-diff impact, a coordinated rename tool and an LLM-written wiki. Its licence matters: it is PolyForm Noncommercial, so commercial use needs a licence from AkonLabs, who also sell SaaS and self-hosted enterprise versions.
Broader indexes
repowise is in this group. Besides the graph, it mines git history for hotspots (files that change often and are complex), co-change (files that change together with no import between them), ownership and architectural decisions; it generates docs; and it scores code health and change risk. The cost of doing all that is indexing time: on Django we were 22 times slower than CodeGraph like for like, and 135 times slower with generated docs on. If all you want is a call graph, CodeGraph is the better tool for that.
GitNexus sits partly here too, with its wiki and impact tools.
How to choose
Start with the constraint you can't move, then work through the cases below.
If code can't leave your machines, the hosted engines are out unless you buy their self-hosted enterprise tier. Look at CodeGraph, Serena, GitNexus (check the licence for commercial use) or repowise's open-source version.
If you need the index in browser chat as well as in an IDE, remember that Claude.ai and other browser chats run on someone else's servers and can't reach an MCP server on your laptop. You need a hosted MCP address. Augment remote mode, Sourcegraph, Greptile and hosted repowise give you one.
If your agents keep breaking files they didn't touch, you need git history in the index. The files that break together are often not connected by imports, so a call graph won't show them. Tools that read git co-change (repowise) or diff impact (GitNexus) help here.
If your agents burn tokens finding files, any of the graph tools will help, but measure the saving yourself (see below) before trusting a headline number. We published two token numbers for repowise, 35.6x fewer tokens on one measurement and 15.9% fewer on another, and both are correct because they measure different things; the 35x or 16% write-up explains why every vendor number, ours included, needs that context.
If the budget is tiny, CodeGraph and Serena are free. repowise's open-source engine is free, and hosted Pro is $15 a month.
Benchmarks and their limits
There is no neutral, widely accepted benchmark for this category yet. Vendors publish their own, which means picking the test that flatters them is always an option. Ours is no exception, so below is the full record, including the first run where we lost.
On ContextBench (bug reports from real GitHub issues, graded on whether the tool found the files the real fix touched), we first scored 0.228 and came last, behind CodeGraph at 0.609. We found a query-time bug, fixed it on a development half of the data, then ran a sealed half we had never touched once: repowise's get_answer scored 0.876 and CodeGraph 0.6095. That is retrieval only. It says the right files were found, not that the agent then wrote better code. The full write-up is we benchmarked ourselves and came last.
Augment publishes large improvement numbers for agents using its Context Engine. I haven't rerun them, and I'd treat them the way I'd want you to treat ours: as a reason to run your own test.
A one-hour test on your own repo
The test below is what should decide between these tools, because it uses your code and your questions.
- Pick five questions you actually had last month. Mix them: one "where is X handled", one "what breaks if I change Y", one "why is Z built this way", one cross-module question, one about a file nobody on the team knows well.
- Run each question in your agent with no context tool. Write down the answer, the number of files it opened, and the tokens used if your agent shows them.
- Add one tool. Run the same five questions in fresh sessions.
- Check each answer against what a senior engineer on that code says. Count right, partly right, wrong.
- Repeat for the next tool. Keep the agent and model the same throughout.
While you run it, watch whether the agent calls the tool at all, because many MCP servers sit connected and unused when the tool descriptions don't match how the agent thinks about the task. Also check index freshness by asking a question about code merged yesterday.
If you want to see what an index knows before installing anything, every public repo on repowise.dev has its own page, and you can connect any indexed repo to Claude, Cursor or VS Code with one URL. For background on the idea itself, see giving AI coding agents real codebase context and the best MCP servers for coding agents.
How we compared
Every row in the table was checked against the tool's own pricing page, docs or repository on 6 October 2026. "Git history" means the index reads commit history itself, not that the tool can call git. I did not run the one-hour test on all seven tools for this post; the benchmark numbers quoted are from our published ContextBench run, which compared repowise with CodeGraph, Graphify and code-review-graph, not with Augment, Sourcegraph, Greptile, Serena or GitNexus. Prices and features in this category change monthly.
FAQ
What is a context layer for AI coding agents?
It is a service between the agent and your code that answers questions about the codebase from a pre-built index: where things are, what depends on what, what changed recently, what is risky. The agent calls it through tools, usually over MCP, instead of reading files until it finds the answer.
What are the top AI agent codebase indexing tools in 2026?
The ones most teams evaluate are Augment's Context Engine, Sourcegraph, Greptile, CodeGraph, Serena, GitNexus and repowise. They differ mainly in whether they read git history, whether they generate docs and risk signals, whether your code leaves your machine, and price.
Which code indexing platforms work with Claude Code and Cursor?
All seven in this guide can be used from Claude Code and Cursor. Augment, Sourcegraph, Greptile, CodeGraph, Serena, GitNexus and repowise all ship official MCP servers; Greptile also has an API.
What is the best tool for indexing both code and dev docs?
If "dev docs" means your own docs generated from the code, GitNexus and repowise both generate a wiki from the index. If it means third-party library documentation, that is a different job, and tools like Context7 cover public libraries. Many teams run one of each.
Do I need a context tool if my agent has a large context window?
A large window lets the agent hold more, but it still has to find the right files, and you pay for every token it reads. Context tools cut the reading and add things a file read can't give, such as history and ownership. Test both ways on your own repo before deciding.
Is it safe to send private code to a context engine?
It depends on the vendor's data handling and your rules. Read where the code is processed, what is stored after indexing, and which model providers see excerpts. If code can't leave your network, use a local tool or a self-hosted enterprise tier.