The open-source tool Graft turbocharges AI coding agents by making them faster and cheaper, demonstrating a 12-point correctness improvement on the SWE-bench benchmark.
According to its documentation from August 2026, Graft reduces latency by 60% and token usage by 42% by building a contextual graph of a codebase for agents like Claude Code and Codex to use.Correctness is SWE-bench Verified, graded by the official harness — graft resolved 66% of instances tested against Cold Claude Code's 54%.
Graft addresses a core inefficiency in AI-powered development: agents start every task "blind," repeatedly exploring a repository's structure. This rediscovery process consumes the majority of a session's tokens and time. Graft builds this understanding once and stores it locally, creating a persistent knowledge graph that any agent can reference to skip redundant exploration.
This approach is gaining relevance as AI assistants become more integrated into developer workflows. GitHub recently began making agents from Anthropic and OpenAI directly available on its platform, allowing developers to compare their performance.Developers will be able to judge how Copilot, Claude, and Codex perform, and weigh up how each AI coding agent has generated a solution.
How Does Graft Impact Agent Performance?
Graft significantly boosts AI agent performance by reducing costs, latency, and tool calls while simultaneously increasing correctness. By providing agents with a pre-built map of the codebase, it allows them to bypass exploratory steps and proceed directly to solving the task. This results in faster, cheaper, and more accurate outcomes on complex coding problems.The project's maintainers measured its effectiveness using two different methods: a controlled benchmark and the industry-standard SWE-bench. In the controlled test, Graft-assisted agents were up to 60% faster and used 42% fewer tokens with no loss in correctness compared to a "cold" agent starting from scratch.Graft never answered worse than cold, on any corpus.
The results on SWE-bench, which involves fixing real GitHub issues, were even more compelling. The Graft-enabled agent solved more problems than the baseline agent while using fewer resources across the board.
Metric | Cold Claude Code | Claude Code with Graft | Improvement |
|---|---|---|---|
Correctness | 27 / 50 (54%) | 33 / 50 (66%) | +12 pts |
Token Savings | 142.0M | 109.4M | +23% |
Cost Savings | $52.34 | $42.43 | +19% |
Wall-clock Savings | 13,094s | 8,922s | +32% |
The Technology Behind the Graph
Graft operates by building a knowledge graph of a software project in two main passes. The first pass uses tree-sitter to create a structural graph of code symbols and their relationships without needing an LLM. An optional second pass uses an LLM to generate plain-English summaries for files and group them into conceptual nodes.
This process creates a local, readable cache of Markdown files in a `graft/` folder, which is added to the project's `.gitignore`. The graph contains nodes that explain what a part of the system does and how it connects to other parts, complete with typed links like `depends_on`, `uses`, and `implements`.
The tool provides full-fidelity parsing for languages like TypeScript/JavaScript, Python, Go, and Java, with broad support for an additional seventeen languages including Rust, C++, and Swift.Full-fidelity — hand-written extractors with scope-aware, cross-file call and import resolution.
Integration and Developer Workflow
Graft integrates into a developer's workflow with a single command, `graft init`, which automatically detects and configures supported coding agents. It has deep integration with Claude Code, adding a live statusline and auto-syncing the graph in the background after code changes. This ensures the agent's knowledge is always fresh.The tool also registers an MCP (Machine-Conversation Protocol) server, exposing tools like `graft_find_code` and `graft_trace_calls` directly within the agent's environment. This extends the capabilities of agents, similar to how libraries of AI research skills can augment models for specific tasks. For other agents like those from Cursor, it adds instructions to their respective configuration files.








