NanoNets团队推出了Graft,一款开源工具,旨在优化Claude Code、Cursor等AI编程助手的代码理解能力[1]。该工具通过构建代码库的知识图谱,为AI提供更精准的上下文信息,从而提升编程任务的解决效率。
在SWE-bench Verified基准测试中,Graft帮助Claude Sonnet 5的问题解决率从54%提升至66%[1]。同时,该工具显著降低了资源消耗:减少23%的token用量、减少32%的执行时间,工具调用也减少了25%[1]。在PocketBase等流行开源项目的实际测试中,使用成本从2.19美元降至0.84美元,降幅达到约62%[1]。
Graft的核心优势在于一次性构建可重用的代码图谱,避免AI代理在每次任务中重复探索代码库[1]。该工具支持20种编程语言[1],以MIT开源许可证发布[1],用户可通过运行npm install -g @nanonets/graft命令安装使用[1]。
A new open-source tool called Graft has been introduced to optimize context delivery for AI programming assistants like Claude Code and Cursor.[1] The tool constructs a knowledge graph of codebases, enabling more efficient context provision without requiring repeated code exploration for each task.[1]
In benchmarking on SWE-bench Verified, Graft improved Claude Sonnet 5's problem-solving rate from 54% to 66%, while simultaneously reducing token usage by 23% and execution time by 32%.[1] Testing on popular open-source projects such as PocketBase demonstrated substantial cost savings, lowering expenses to approximately 38% of their original level—from $2.19 to $0.84 per task.[1] The tool also reduced tool calls by 25%.[1]
Graft supports 20 programming languages and is released under the MIT open-source license.[1] Users can install it via npm with the command npm install -g @nanonets/graft.[1]