← all work
● live · 2025 – now · Creator · Open source

Axon

Graph-powered code intelligence for AI agents. 700+ stars.
Axon cover
github stars
720+
queried by
Claude Code · Cursor · Copilot
install
pip install axoniq
Python tree-sitter KuzuDB · Cypher MCP server (15 tools) hybrid retrieval · BM25 + vector (RRF) fastembed · ONNX Leiden · igraph FastAPI + React · Sigma.js

Indexes any codebase into a structural knowledge graph (dependency resolution, call-chain tracing, dead-code detection) and exposes it over MCP so AI coding agents can query the graph instead of re-reading files.

Agents work with flat text. Code isn't flat. #

Every coding agent I used burned tokens re-doing the same searches: grepping the same files, re-discovering the same structure, request after request. Worse than the cost was the blind spot. grep finds a string; it does not find the three functions that call the thing that calls this, and it has no idea which module everything secretly depends on. The model was reasoning about a codebase it could only see one file at a time.

grep finds the string. It doesn't find the three functions that call the thing that calls this.

So I made the bet Axon is built on: compute the structure of a codebase once, at index time, and let an agent query it. Ask 'who calls this, what breaks if I change it, what is dead' and get the complete answer in one shot, not a multi-step exploration the model pays for every turn. And do all of it locally, no API keys, no cloud: parsing, the graph, the embeddings, the search.

hover a node · query its neighbourhoodno re-reading, just a graph traversal
main.pyconfig.pyutils.pyapi.pyauth.pyroutes.pydb.pymodels.pycache.py
Fig 1 · a codebase as a graph. Hover any node to see what imports or calls it: one MCP query, not a dozen file reads.

How the graph gets built #

Axon parses Python, TypeScript, and JavaScript with tree-sitter (no language server, no cloud) into a small intermediate representation, then runs a multi-phase ingestion pipeline that turns files into a typed graph: File, Function, Class, Method, Interface nodes joined by CONTAINS, DEFINES, CALLS, IMPORTS, EXTENDS, IMPLEMENTS, and USES_TYPE edges. The graph is built in memory first, then bulk-loaded into an embedded KuzuDB graph database it can query in Cypher.

A codebase is parsed into a knowledge graph of nodes and edges, exposed over an MCP server that agents query.
Fig 1 · parse with tree-sitter, resolve into a typed graph, load into KuzuDB, serve over MCP.

The hard part: resolving calls in a dynamic language #

Here is the problem nobody warns you about: in Python or JavaScript, you cannot know for certain what x.save() calls without running the program. Static call resolution is formally undecidable. Most tools either pretend otherwise (and produce a confident, wrong graph) or give up. Axon does neither. It resolves calls with graded confidence and carries that number through every answer.

call resolution, by confidence
1
2
3
4
5
6
1.0   same-file definition, or an import-resolved target, or self/this method
0.8   receiver-typed  Class.method  match
0.5   global fuzzy match (only if <= 5 candidates; picks the nearest by path)

+ a 138-entry blocklist strips builtins, stdlib methods, and React hooks
  so the call graph stays signal, not noise.

What you can actually ask it #

Because the structure is precomputed, each of these is a single graph query returning full context, not a research task:

  • 360° context for a symbol: callers, callees, type references, heritage, and which files import it, each tagged with confidence.
  • Impact / blast radius: everything upstream that breaks if you change a symbol, grouped by how many hops away it is.
  • Dead code: symbols with no live callers, after multi-pass exemptions for entry points, overrides, and protocol conformance.
  • Cycles: circular dependencies via strongly-connected components, ranked by size.
  • Call path: the shortest chain of calls between any two symbols.
  • Test impact: given a diff, which test files actually reach the changed code.

Finding what static analysis can't #

The part I am most fond of is where Axon leaves pure static analysis behind. It reads six months of git history and builds a change-coupling graph: files that keep changing together but never import each other. Those are the hidden dependencies that burn you, invisible to any AST. On top of the call graph it runs Leiden community detection to find the natural modules of a codebase, and framework-aware process detection to trace request and CLI flows from their real entry points.

Two files that always change together but never import each other are a dependency. Axon is the only view that sees it.

Serving it to agents over MCP #

All of this is exposed as MCP tools (axon_query, axon_context, axon_impact, axon_dead_code, axon_coupling, and more) over both stdio and streamable-HTTP, so Claude Code, Cursor, or any MCP client can call it. The tricky bit is that KuzuDB is single-writer, and multiple agent sessions want the same index at once. Axon solves it with a shared host: one process holds the write lock and watches the repo, while an asyncio lock and a lease directory let every read-only client attach to the same live graph and release cleanly when they leave.

.mcp.json · json
1
2
3
4
5
{
  "mcpServers": {
    "axon": { "command": "axon", "args": ["serve", "--watch"] }
  }
}

Semantic search is hybrid and fully local. Axon fuses BM25 full-text results with vector search (the bge-small-en-v1.5 model running on ONNX via fastembed, so no PyTorch and no download of a giant model) using Reciprocal Rank Fusion, then down-ranks test files and boosts source symbols. There is a watch mode too, backed by a Rust file watcher, that re-indexes only the files that changed and even preserves the inbound edges from other files while it does.

Open-sourced, and people came #

I sat on it for a while, unsure anyone else would want it. When I finally open-sourced it, people did: DMs about how it was saving them tokens, feature requests, and VCs reaching out to connect me with companies that wanted to integrate it. That reaction is the part I am proudest of; it went from a personal itch to something other people build on. 720+ stars and climbing, pip install axoniq, and still adding languages.

NEXT →
Tessera
the thinking behind this
Agentic systems · 16 min read
The Model Thinks. The Harness Remembers.