AGENTCONN
C

// Agent profile

Code Review Graph

Coding Free

About Code Review Graph

Code Review Graph is an open-source tool that parses your codebase with Tree-sitter into an AST-backed knowledge graph of functions, classes, imports, and their relationships. When files change, it computes the blast radius — tracing every caller, dependent, and test that could be affected — and exposes only that minimal context to your AI assistant via 30 MCP tools. The result is dramatically fewer tokens consumed during code reviews (82x median reduction across benchmarks) while maintaining high impact detection accuracy. It supports 20+ languages, auto-configures for Claude Code, Codex, Cursor, Windsurf, Gemini CLI, and others, and re-indexes in under 2 seconds for large projects.

Key Features

  • 82x median token reduction on code reviews — agents read only what matters
  • Blast radius analysis traces callers, dependents, and affected tests when files change
  • Tree-sitter parsing across 20+ languages including Python, TypeScript, Go, Rust, Java, and C++
  • 30 MCP tools for querying the code graph from any compatible AI assistant
  • Incremental re-indexing in under 2 seconds — no full rebuilds needed
  • Auto-configures for Claude Code, Codex, Cursor, Windsurf, Gemini CLI, and GitHub Copilot

Overview

Code Review Graph solves a fundamental problem with AI-assisted code review: context overload. When an AI assistant reviews a pull request, it typically needs to understand far more than just the changed files — it needs to know what calls those functions, what tests cover them, and what downstream code depends on them. Without this structural awareness, assistants either read too much (burning tokens and losing focus) or too little (missing real impacts). Code Review Graph builds a persistent structural map of your codebase and queries it at review time to deliver precisely the context that matters.

Key Capabilities

The tool parses your repository using Tree-sitter into a SQLite-backed knowledge graph where nodes represent code entities (functions, classes, modules, imports) and edges represent relationships (calls, inheritance, test coverage, data flow). When you run a review, it identifies changed files, computes the blast radius through the graph, and serves only the affected subset to your AI assistant via MCP. Benchmarks across six real repositories show a median 82x token reduction (up to 528x on the fastapi codebase) with an average impact detection F1 score of 0.71. Incremental updates re-parse only changed files, completing in under 2 seconds even on large projects. A built-in visualize command renders interactive D3 dependency graphs for manual exploration.

Use Cases

The primary use case is code review — giving AI assistants surgical precision about what to read when reviewing PRs. Beyond reviews, the graph supports change impact analysis (understanding the full blast radius before merging), codebase onboarding (querying relationships to understand unfamiliar code), and refactoring safety analysis (knowing which tests cover the code you are about to change). The GitHub Action integration enables automated PR reviews with risk scoring in CI. Teams working on large monorepos benefit most, where the ratio of relevant-to-irrelevant code is highest.

Considerations

Code Review Graph requires Python 3.8+ and installs via pip. The knowledge graph lives in a .code-review-graph/ directory within your repository. Tree-sitter parsing covers 20+ languages out of the box, but custom or niche languages need configuration via languages.toml. The tool focuses on structural relationships — it does not perform semantic analysis of what code does, only how code connects. Licensed under MIT.

Who It’s For

Code Review Graph is built for development teams that use AI coding assistants and want those assistants to be smarter about context. It particularly benefits teams working on large codebases where AI tools waste tokens reading irrelevant files, teams that want automated PR reviews with real structural awareness, and individual developers using Claude Code or Cursor who want faster, more focused AI assistance without paying for unnecessary token consumption.

Similar Agents