Skip to main content
Back

NanoNets' Graft Makes AI Coding Agents 3x Faster and 4x Cheaper

NanoNets released Graft, an open-source context layer that turns your codebase into linked markdown nodes so coding agents skip the grep-from-cold problem.

Repo, Full Access
  • NanoNets released Graft, an open-source context layer that maps codebases into linked markdown nodes for coding agents.
  • Benchmarks show 46% fewer tool calls, 42% fewer tokens, and 60% less latency versus cold Claude Code.
  • On SWE-bench Verified, Graft resolved 33/50 instances versus 27/50 for cold Claude Code (+12 points).
  • Uses tree-sitter parsing across 21 languages with no embeddings, no server, and no database.
  • Ships as an npm CLI with MCP server integration for Claude Code, Cursor, Codex, Gemini, and others.
  • MIT licensed, no telemetry, works with any LLM provider (OpenAI, Anthropic, OpenRouter, local models).

Every time you open a Claude Code or Cursor session, your agent starts blind. It greps the repo, opens files, follows imports, backs out, tries again. That rediscovery dominates most runs, and it happens on every task from zero. Graft, a new open-source project from NanoNets, tries to fix that by building the map once and keeping it on disk as plain-English markdown files your agent can read like any other source file.

The repo has already crossed 3.9k stars, and the pitch is concrete: up to 4x cheaper and 3x faster agent runs, with equal or better correctness. It ships as an npm CLI (@nanonets/graft), MIT-licensed, with no telemetry and no vendor lock-in on the model side.

What actually gets built

Graft builds the graph in two passes. Every source file is summarized once into a short description of what it does, and those summaries are then grouped into a curated set of nodes (subsystems, key files, concepts) with typed links between them. The result lives in a graft/ folder as linked markdown, one node per system or concept, with [[wikilinks]] between them.

Each node holds four things the agent actually needs:

  • Summary in plain English of what the code does
  • Crux: the handful of lines that carry the logic, lifted straight from source and stored inline
  • Sources: exact files with content hashes, so staleness is detectable
  • Typed links: depends_on, part_of