Graphite

Landscape

How Graphite compares to other code-graph tools for AI agents.

The field

ToolStarsLanguageStorageKey approach
Graphify120.9KPythonNetworkXKnowledge graph, Leiden communities, non-code ingestion
CodeGraph71.9KTS + RustSQLite WAL + FTS5Best resolution layer, 20+ framework synthesizers, real-time watcher
GitNexus47.5KTypeScriptKuzuDBExecution flow tracing, embedded graph DB
codebase-memory44.5KCKnowledge graph162 languages, sub-ms queries, single binary
Graft9.1KTypeScriptJSON + markdownLLM semantic tier, pre-query freshness, SWE-bench +12pts
Graphite-RustCozoDB (Datalog)Always-hot daemon, source inline, edge confidence, runner integration

Architecture comparison

AspectGraftCodeGraphGraphifyGraphite
ExtractionTree-sitter + LLMWASM tree-sitter + Rust kernelPython tree-sitterTree-sitter compiled into Rust binary
ResolutionAST-based + optional LSPMulti-layer: imports, names, 20+ frameworks, dynamic dispatchTree-sitter + cross-fileAST-based + confidence rules
StorageFlat JSON + markdownSQLite (WAL + FTS5)NetworkX DiGraphCozoDB (Datalog, RocksDB) + in-memory adjacency
FreshnessPre-query fingerprint (~3ms)Real-time file watcher (~1s)Manual or watchdogEager background watcher, freshness barrier
OutputMarkdown nodes + source excerptsVerbatim line-numbered sourceGraph context (labels, edges only)Verbatim source + graph annotations + confidence

Feature matrix

FeatureGraftCodeGraphGraphifyGraphite
Languages (depth)934+45+3 (Python, Rust, TS)
Non-code supportNoNoPDF, images, videoNo
LLM requiredOptionalNeverOptionalNever
Real-time watchingNo (probe)YesOptionalYes (eager daemon)
Community detectionNoNoYes (Leiden)Yes (background)
Framework resolutionNoYes (20+)PartialPlanned (v3)
Dynamic dispatchNoYesNoPlanned (v3)
Source in resultsYesYes (verbatim)NoYes (verbatim + annotations)
Blast radiusYesYesYesYes (with depth labels + confidence)
Edge confidenceNoNoYesYes (EXTRACTED/INFERRED/AMBIGUOUS)
Transparent interceptionNoNoNoYes (hooks rewrite grep/find/cat)
Runner integrationNoNoNoYes (per-mode context injection)
Agent benchmarksSWE-bench +12pts44% cost, 62% tokensLOCOMO recall 0.49721% fewer turns, 54% fewer file reads

What sets Graphite apart

Always-hot daemon

One daemon per repo indexes eagerly via file watcher. Every agent session queries the same hot graph through a unix socket. No rebuild in the query path; at most a short freshness barrier. Competing tools either probe on each query (Graft), require manual sync (Graphify), or watch but don’t share across sessions (CodeGraph).

Source inline with graph annotations

Every response returns verbatim source code with line numbers, annotated by graph context (callers, confidence tags, depth labels). CodeGraph also returns source; Graft returns excerpts; Graphify returns labels and edges without source. Graphite’s responses also carry epistemic disclosure: whether the result is a lower bound and why.

Edge confidence

Every edge tagged EXTRACTED, INFERRED, or AMBIGUOUS with categorical provenance. The agent knows when to trust the graph and when to verify with a file read. Graphify has a similar concept but exposes it differently; Graft and CodeGraph don’t tag edges at all.

Transparent interception

PreToolUse hooks rewrite the agent’s habitual grep/find/cat commands into enriched graph-aware answers. The agent gets structural context without changing its workflow. No other tool in the landscape does this; Graphify’s strict mode denies Read access to force graph-first, which breaks agent workflows instead of enriching them.

Hybrid engine (benchmarked)

CozoDB (Datalog) for facts, rules, and search. In-memory adjacency for hot traversals (19-80 us on worst real hubs). Community detection and PageRank run in the background. The choice was made after benchmarking CozoDB, LadybugDB (Kuzu fork), and a DIY stack (redb + Ascent) on real and synthetic graphs.

Runner integration

Only tool in the space that integrates with an orchestration layer. Per-mode context injection: EXPLORING gets architecture map, IMPLEMENTING gets blast radius, VALIDATING gets targeted tests.

Gaps in the landscape

Things no tool does well yet:

  1. Incremental edge resolution: all rebuild edges from scratch on change
  2. Type-aware resolution: none use actual type inference for edge resolution
  3. Cross-language interop edges: C FFI, JNI, WASM boundaries remain invisible
  4. Build system integration: Makefile/CMake/Bazel dependencies affect blast radius but aren’t modeled
  5. Git-aware temporal edges: co-change history as graph edges (“these files always change together”)
  6. Diff-aware query mode as first-class: “what changed + what does it affect” in one operation (Graphite’s diff-impact addresses this)
  7. Multi-agent coordination: no shared write-through cache for concurrent agents querying the same graph (Graphite’s daemon model addresses this)

MCP tool philosophy

ToolMCP toolsPhilosophy
Graft6One tool per operation
CodeGraph1 primaryConsolidated (data shows agents under-pick extra tools)
Graphify11One tool per graph operation
GraphiteCLI + hooksAgent uses its existing commands; hooks enrich transparently

CodeGraph’s finding matters: agents under-pick from large toolsets. Graphite’s approach avoids the problem entirely by intercepting commands the agent already uses.