CodeGraph is a pre-indexed code knowledge graph system designed to enhance AI agents' ability to understand and navigate codebases with surgical precision. The repository, maintained primarily by colbymchenry with contributions from inth3shadows and andreinknv, provides integration with multiple AI coding platforms including Claude Code, Cursor, Codex, OpenCode, Hermes Agent, Gemini, Antigravity, and Kiro. The tool operates entirely locally, eliminating the need for external services while reducing token consumption and tool calls during code analysis tasks.
The core functionality centers on building a semantic knowledge graph of a codebase that captures every symbol, call edge, and dependency relationship. Rather than requiring AI agents to discover code structure through repeated file reads and grep operations, CodeGraph delivers the exact relevant source code, call paths including dynamic-dispatch hops, and change blast radius in a single query. This approach fundamentally changes how agents interact with codebases by replacing time-consuming file-by-file crawling with direct, targeted queries against the pre-built graph.
Installation and setup follow a streamlined three-step process. The CLI installs without requiring Node.js, bundling its own runtime for cross-platform compatibility. Users then wire CodeGraph into their agents through an installer that auto-detects and configures supported platforms, followed by project initialization via the codegraph init command. The system features automatic synchronization by default, watching for file changes and updating the graph in real-time as code is modified, added, or deleted, ensuring the index never becomes stale.
Benchmark testing across seven real-world open-source codebases spanning TypeScript, Python, Rust, Java, Go, and Swift demonstrates consistent performance gains. The median results show 58% fewer tool calls, 22% faster query resolution, and file reads reduced to near-zero across all tested repositories. Individual results vary by codebase size and complexity, with larger codebases like VS Code showing 81% fewer tool calls and 64% fewer tokens consumed, while smaller projects like Gin show 44% fewer tool calls and 23% fewer tokens. The cost savings are scale-dependent, becoming material primarily in large monorepos with high-volume team usage.
The repository is classified across multiple domains including code analysis, graph database, code indexing, semantic search, code navigation, query language, developer tools, code relationships, project visualization, and language support. GitGenius activity tracking shows a median issue and pull request response latency of 12.9 hours with a mean of 75.9 hours across 446 tracked items. The most active issue labels include language-request, agent-target, and enhancement requests, indicating ongoing development and community interest in expanding language support and agent compatibility.
CodeGraph version 1.0 has been released, with users able to upgrade via the codegraph upgrade command. The project maintains a hosted platform in beta, with a waitlist available at getcodegraph.com for early access. The tool addresses a fundamental inefficiency in how AI agents currently interact with code by providing pre-computed structural knowledge, enabling faster, more accurate responses while reducing computational overhead across all codebase sizes.