CodeGraph is a Rust implementation of code graphRAG that turns your codebase into a semantically searchable knowledge graph for AI agents, with 904 stars on GitHub.
CodeGraph transforms an entire codebase into a knowledge graph that AI agents can actually reason about, rather than just grep through. Written 100 percent in Rust, it parses code with fast AST-based parsing and stores the resulting graph in a SurrealDB backend, exposing advanced agentic code analysis through the Model Context Protocol. Coding agents such as Claude Code, Cursor, Codex and Gemini CLI can query the graph for symbols, relationships and context, which makes their answers about a large project faster and far more accurate. The result is efficient context management for code agents: instead of stuffing files into a prompt, the agent pulls precisely the code evidence it needs. A sibling project, CodeGraph Agent Memory, builds on the same graph with persistent memory for architectural decisions and findings, underlining that the graph is meant to be long-lived project infrastructure rather than a one-off index.
CodeGraph is free and open source on GitHub. You run it locally against your own repositories; there is no subscription, and your code never has to leave your machine.
CodeGraph is for developers who use AI coding agents on large or unfamiliar codebases and find the agents wasting tokens on blind file searches. If you want your agent to understand how components connect before it edits them, a queryable code graph is a substantial upgrade.