LLM-based coding agents repeatedly read source files to build context, with each tool-call result accumulating in the conversation history and being retransmitted on every subsequent turn. We present Karna, a persistent code knowledge graph that serves structured codebase context to AI agents via the Model Context Protocol (MCP). In a controlled A/B experiment with Claude Sonnet 4 on a 1,125-file codebase, Karna achieves 57.9% input-token savings over a file-reading baseline (p < 0.007, Cohen's d = 2.96). We additionally identify the conversation history tax — O(T²) growth of cumulative input tokens with turn count — as a cost driver applicable to all tool-augmented LLM architectures. Code: https://github.com/shaileshai/karna-ai
Building similarity graph...
Analyzing shared references across papers
Loading...
Shailesh Tripathi
Building similarity graph...
Analyzing shared references across papers
Loading...
Shailesh Tripathi (Sun,) studied this question.
www.synapsesocial.com/papers/69d8958f6c1944d70ce06a08 — DOI: https://doi.org/10.5281/zenodo.19463351