Your codebase as a queryable graph
Built for AI agents. Precomputed answers about symbols, dependencies, and call graphs — no source reading required.
npm install -g @kehl-io/nestweaver The problem
Every AI session starts the same way: your agent reads dozens of files, burns thousands of tokens on boilerplate, and still misses the three functions that matter.
The re-explain tax: you re-describe your codebase structure every session because nothing persists. Your agent has no memory of how things connect.
NestWeaver builds a persistent knowledge graph that gives your agent precomputed answers — not raw files.
How it works
Index
Parse your codebase into a queryable graph. 32 languages via Tree-sitter with cross-file symbol resolution.
Query
Ask structural questions: callers, dependencies, blast radius, type usage. The graph knows how everything connects.
Context
Personalized PageRank extracts only task-relevant symbols within a token budget. Your agent gets exactly what it needs.
Connect
40 MCP tools let any AI agent query the graph directly. Works with Claude Code, Cursor, Aider, and more.
Token efficiency by design
Input tokens are 85-95% of AI coding bills. NestWeaver is designed to minimize every query.
Without NestWeaver
- Agent reads 30 files to find 3 relevant functions
- Re-explains codebase structure every session
- No structural understanding — just text similarity
- Burns tokens on boilerplate, imports, comments
With NestWeaver
- Set a token budget — the graph fills it with the right context
- Persistent graph eliminates the re-explain tax
- PageRank ranks by structural relevance, not just keywords
- Returns symbols and relationships — precomputed answers
Benchmarked Against the Competition
Measured against Graphify and GitNexus across 4 open-source repos on Apple M3 Pro.
| Repository | NestWeaver | Graphify | GitNexus |
|---|---|---|---|
| Tailwind CSS 542 files | 157ms | 185ms | 700ms |
| Deno 14,136 files | 82ms | 1,355ms | 908ms |
| Next.js 29,402 files | 71ms | 2,440ms | 1,116ms |
| Elasticsearch 43,806 files | 617ms | crashed | 1,573ms |
Speed without accuracy is meaningless
NestWeaver — 30 connected symbols per query, ranked by PageRank, with full function signatures and cross-file relationships
Graphify — Returns file-level nodes, but 9-15% are garbage stubs (vitest config, node_path, etc.) with no relevance ranking
GitNexus — Finds symbol definitions but returns 0 callers, 0 callees — locates code without explaining how it connects
Features
Languages
Tree-sitter parsing with cross-file symbol resolution and confidence scoring.
MCP Tools
Plug into Claude Code, Cursor, Aider, Copilot, and any MCP-compatible agent.
PageRank Extraction
Token-budget-aware context selection via Personalized PageRank. Get exactly what matters.
Semantic Search
Natural language queries with local BERT embeddings. Metal-accelerated on Apple Silicon.
Brain Integration
Link Obsidian vaults and architecture docs to code symbols. Query both in one graph.
One-Command Setup
nestweaver setup auto-configures 16 AI tools in one command.
Web UI
GPU-rendered interactive graph visualization. Explore your codebase visually.
Open Source
Single Rust binary. MIT license. Local-first by default. No vendor lock-in.
Works with the agents you already use
NestWeaver isn't a competing agent — it's infrastructure that makes existing agents smarter. Add it as an MCP server and your agent instantly gains structural code understanding.
OpenClaw
Local-first AI assistant
OpenClaw connects to 22+ messaging platforms and routes conversations through configurable LLM backends. It supports MCP natively — add NestWeaver as a server and every conversation gains structural code intelligence.
HermesAgent
Self-improving coding agent
HermesAgent by Nous Research is a model-agnostic coding agent that learns from experience. Its MCP client auto-discovers NestWeaver's 40 tools at startup — giving the agent structural code understanding it can't get from grep and file reads alone.
Zero code changes required
Any MCP-compatible agent can use NestWeaver as a code intelligence backend. Index your codebase once, add NestWeaver as an MCP server, and your agent's next session starts with structural understanding instead of blind file reading.
NestWeaver is compatible with any agent that supports the Model Context Protocol. Project names and logos are trademarks of their respective owners.
Get started
Install
npm (recommended)
Cargo
Or download pre-built binaries for macOS and Linux, including NestWeaver.app for macOS.