CodeGraph is a local code-knowledge layer and CLI that connects supported coding agents to a pre-indexed view of a repository so they can answer questions with fewer tokens, fewer tool calls, and less file scanning.
CodeGraph is a TypeScript project that ships a command-line installer and project initializer for integrating with agents such as Claude Code, Cursor, Codex CLI, OpenCode, Hermes Agent, Gemini CLI, Antigravity IDE, and Kiro. The README presents it as a local, pre-indexed code knowledge graph that gives these agents semantic information about a codebase before they start exploring it.
The problem it targets is that agentic code assistants often discover code by repeatedly reading files and running search-like tools, which consumes tokens, tool calls, and time. CodeGraph is meant to reduce that discovery overhead by letting agents query a prepared graph of code structure instead of spending so much effort on file-by-file exploration.
Conceptually, the workflow is: install the CLI, connect it to supported agents, then initialize each project so a local .codegraph index exists and can be populated. Once that index is present, the agent can consult the code graph for relationships like symbols, call graphs, and code structure, and the README says this lets it answer with near-zero file reads and less repeated searching.
It is gaining attention because the README pairs a broad multi-agent integration story with strong benchmark claims: lower token use, fewer tool calls, faster answers, and local-only operation. The repository also reports a large month-over-month star increase, and the current pitch of “pre-indexed code knowledge for agents” fits a common pain point for AI coding workflows.
From the README alone, the closest comparators are the agent workflows that use grep, glob, and Read to explore code without CodeGraph. It also implicitly contrasts with standard agent setups where the model discovers repository structure on demand rather than through a prebuilt local code graph; no other named competing project is documented in the provided material.
AI-explained · grounded in each repo's README