AI product Open source

Code-Graph-RAG

Code-Graph-RAG is an open-source retrieval-augmented generation system for querying, understanding, and editing multilingual codebases. Its Tree-sitter-based parser extracts functions, classes, methods, modules, and relationships, then stores them in Memgraph under a unified graph schema. An interactive CLI converts natural-language questions into Cypher queries, retrieves source code by name or intent, and supports AI-assisted editing and optimization. It provides AST-based surgical patches with diff previews, structural search and rewriting through ast-grep, dead-code discovery by traversing call and reference edges, and runtime-call overlays from test traces or production eBPF profiles. The project also supports MCP integration and publishes the `cgr` command-line tool to PyPI.

View repository Visit site Mentioned in 2 videos ↓

What Code-Graph-RAG is used for

2 uses taken from transcripts — each links to the moment in the video.

  • An open-source retrieval-augmented generation system that converts multi-language codebases into queryable knowledge graphs. It supports natural-language questions, semantic source retrieval, surgical code patches with diff previews, dead-code discovery, and MCP integration.

  • A tool that parses a multilingual codebase into a knowledge graph so developers can query and edit a repository using natural language. It can retrieve functions, apply patches with previews, find dead code, and run as an MCP server.

Videos mentioning Code-Graph-RAG

2 in the library.