Graft

•
4.8k
•

Accelerates coding agents by providing deep, contextual understanding of codebases, leading to faster, cheaper, and more accurate development.

Graft functions as an open-source context layer, building a persistent, human-readable knowledge graph directly within your codebase. This graph, composed of linked markdown files explaining system parts, APIs, and concepts, enables coding agents like Claude Code, Cursor, Codex, and Gemini to rapidly understand complex repositories. By eliminating repeated code exploration, Graft significantly reduces token usage, tool calls, and latency, leading to substantial cost and time savings, while also improving correctness as verified by industry benchmarks like SWE-bench.

主要功能

01Git-Friendly Workflow: Integrates seamlessly with Git by storing the graph as files in a `graft/` directory, which can be `gitignore`d as a cache or committed for team sharing of wiring.
02Contextual Code Graph: Builds a local, regenerable knowledge graph of your codebase as linked markdown files, explaining system components and their connections.
03Performance Optimization: Achieves up to 4x cheaper and 3x faster agent operations with improved correctness, as demonstrated by controlled benchmarks and SWE-bench Verified results.
041,949 GitHub stars
05Human-Readable Nodes: Each node provides a plain-English summary, a 'crux' excerpt of key logic, source file references, and typed links to other nodes, aiding both agents and human developers.
06Flexible LLM Integration: Supports various LLM providers (OpenAI, Anthropic, OpenRouter, Groq, LiteLLM proxy, local models) for generating node summaries using your own API keys.

使用案例

01Enhancing the efficiency and accuracy of AI coding agents in large and complex codebases.
02Rapidly onboarding new coding agents (and human developers) to a project by providing a pre-built understanding of the system architecture.
03Reducing operational costs and execution time for AI-powered development tasks by minimizing redundant code exploration.