
Code Graph Rag
Turns a multi-language monorepo into a knowledge graph you can query and edit.
- Category
- AI
- Website
- github.com
- Language
- English
- Listed
- 14d ago
- Stars
- 4,795
- Forks
- 637
vitali87/code-graph-rag ↗· Python· MIT· Last commit 6h ago
Point Code-Graph-RAG at a repository and it reads every source file, pulls out functions, classes, methods, modules, and the edges between them, and writes the result into a Memgraph knowledge graph. From there you can ask questions in natural language and get answers grounded in the real structure, pull up the source of a function by name or by intent, and let the agent edit code with AST-based surgical patches and a diff preview before anything lands. Walking call and reference edges from entry points turns up dead code, and ast-grep handles structural search and rewrite by AST pattern.
A Tree-sitter parser covers Python, TypeScript, JavaScript, Rust, Go, Java, C, C++, C#, PHP, Lua, and Dart under one language-agnostic schema, and the project is also tagged as an MCP server for coding agents. Teams with large multi-language monorepos are the intended audience, and the package ships on PyPI as cgr under the MIT license. Running the bundled Memgraph stack requires Docker.