Graphify is the most-starred "code knowledge graph" tool on GitHub, doing what amounts to GraphRAG for coding agents: type /graphify in your AI coding assistant and it maps your entire project (code, docs, PDFs, images, videos) into a knowledge graph you query instead of grepping files. As of late July 2026 it sits at 97,207 stars, 9,417 forks, Apache-2.0 license, pure Python, latest v0.9.28, created April 3, 2026-less than three months to near 100k stars, YC S26 batch. The fundamental split from traditional RAG: no embeddings, no vector store-instead it parses code AST via tree-sitter into a real graph where nodes are concepts and edges are calls/imports/inherits relations, and you traverse it rather than computing cosine similarity.
What Pain It Solves
Anyone who's taken over an unfamiliar large codebase has hit these: grep a function and dozens of files match, with no clue which is the entry point or who calls whom; IDE find-references gives a flat list, and cross-module call chains have to be stitched by hand; new hires grind through tens of thousands of lines and two weeks in still don't grasp the architecture boundaries; AI coding assistants read a project by stuffing context, burning tokens without ever figuring out how modules connect; architecture reviews rely on gut feel for module boundaries and coupling hotspots. Graphify fixes all of this in one pass: run /graphify once, it parses all code via tree-sitter into a graph, runs Leiden community detection to slice out subsystems, flags "god nodes" (the most-connected concepts), and promotes # NOTE:/# WHY: comments and ADR/RFC docs into first-class nodes linked to the code. You stop reading files and query the graph directly: ask a question, trace the path between two things, or explain one concept-all against graph.json.
Code Knowledge Graph: tree-sitter Parsing + Leiden Community Detection
This is its core architecture. Code parsing runs through tree-sitter AST, covering 36 grammars across ~40 languages (.py .ts .js .go .rs .java .c .cpp .rb .cs .kt .php .swift .lua .ex .vue .svelte .dart .v .sql .pas .sh .json and more), fully deterministic, no LLM calls, nothing leaves your machine-a code-only corpus needs no API key, and graphify extract runs fully offline. Cross-file relations are parsed out of the AST into four edge types-calls/imports/inherits/mixes_in-bridging all 40 languages. Once the graph is built, Leiden community detection slices nodes into subsystem color blocks (--resolution 1.5 for finer, more granular communities), and auto-names the communities. Every edge carries a confidence tag: EXTRACTED (read directly from source) or INFERRED (resolved by graphify), so you can tell at a glance what's certain vs. inferred. At the node level there are "god nodes"-the highest-degree concepts, telling you what's most central to the project. Docs, PDFs, images, and video take a different path: handed to your AI assistant's model or a configured API key for semantic extraction, with results merged into the same graph.
Query, Path, Explain + MCP Server
A graph built isn't for looking at, it's for querying. Three core commands run against graph.json: graphify query "what connects auth to the database?" returns a scoped subgraph answering your natural-language question; graphify path "UserService" "DatabasePool" traces the shortest path between two things, hop by hop; graphify explain "APIRouter" gives a node's full picture-source file, community, degree, all connecting edges and tags. Every edge is tagged EXTRACTED/INFERRED, and path output carries tags too, so you can see which hop is a hard code relation and which is inferred. To give an agent repeated access, spin up the MCP server: python -m graphify.serve graphify-out/graph.json, exposing query_graph, get_node, get_neighbors, shortest_path, list_prs, get_pr_impact, triage_prs-seven tools. The default stdio serves one local process per developer; add --transport http --host 0.0.0.0 --api-key $SECRET to run a shared HTTP server the whole team's IDEs can point at one URL, with no local graphify install. For PR workflows there's graphify prs to see graph impact, --triage to let AI rank your review queue, and --conflicts to find PRs sharing communities (merge-order risk).
20+ AI Assistant Integrations + Multi-Model Backends
Its integration surface is the thickest part. graphify install registers the skill into your AI assistant in one step, supporting 20+ platforms: Claude Code, Codex, OpenCode, Kilo Code, GitHub Copilot CLI, VS Code Copilot Chat, Aider, OpenClaw, Factory Droid, Trae, Trae CN, Gemini CLI, Hermes, Kimi Code, Amp, Agent Skills (cross-framework), Kiro, Pi, Cursor, Devin CLI, Google Antigravity. Add --project to install into the current repo (writing .claude/skills/graphify/SKILL.md and the like), or --strict (Claude Code only) to make the assistant actually use the graph: the default install only "nudges" it to query the graph before reading files, while strict mode blocks the first raw source read of a session and redirects it to the graph, then reverts to the nudge-firing at most once per session, never getting stuck. The semantic-extraction backend is swappable: --backend accepts gemini/kimi/claude/openai/deepseek/ollama/bedrock/azure/claude-cli, and data-residency-sensitive work goes through --backend ollama fully local, with auto-routing priority Gemini→Kimi→Claude→OpenAI→DeepSeek→Azure→Bedrock→Ollama based on which key is set. The benchmarks are hard: LOCOMO (n=300) recall@10 hits 0.497 (mem0 0.048, supermemory 0.149), LongMemEval-S (n=50) QA accuracy 76% tied for first with dense RAG, and graph-build LLM credits consumed: 0 (code-only runs make zero LLM calls)-double-judge blind scoring, 90.6% agreement, Cohen's kappa 0.81.
Three-Minute Setup
# 1. Install (Python >= 3.10)
uv tool install graphifyy # recommended (or: pipx install graphifyy)
# 2. Register the skill with your AI assistant
graphify install
# 3. In Claude Code / Cursor / Codex / Gemini
/graphify .You get three files: graph.html (open in a browser-click nodes, filter, search), GRAPH_REPORT.md (the highlights: god nodes, surprising connections, suggested questions), and graph.json (the full graph, queryable anytime). A code-only corpus needs no API key and runs fully local; you only configure a key for semantic extraction when you want to pull in docs/PDFs/images/video.
Who It's For + Five Pitfalls
For: people taking over a large unfamiliar codebase who need to grasp architecture fast; people tracing cross-language, cross-module call chains; people doing architecture reviews who need module boundaries and coupling hotspots; people who want their AI coding assistant to query the graph before reading files-saving tokens and being more accurate.
Five pitfalls. One, the package name has a double-y: on PyPI it's graphifyy not graphify, so uvx graphify reports No solution found-write uvx --from graphifyy graphify install instead. Two, command not found after install: uv tool install/pipx install put the command in ~/.local/bin, which a fresh macOS/zsh setup often lacks on PATH-run uv tool update-shell or pipx ensurepath and open a new terminal. Three, don't use /graphify . in PowerShell: the slash is a path separator, use graphify . (no slash). Four, Claude Code's prompt cache gets blown up: graphify writes graph.json and graphify-out/ into the workspace, and without ignoring them every write invalidates the cache and forces a full re-upload on the next turn-add them to .claudeignore. Five, fewer graph nodes after a refactor: deleted files leave stale nodes, so run --force (or GRAPHIFY_FORCE=1) after --update to overwrite.
vs. the Competition
Against RAG/vector search, the essence is "find relevant fragments" vs. "understand structure": RAG computes cosine similarity and hands you a pile of fragments, while graphify hands you a traversable graph and the paths between nodes-former answers "where is this code written," latter answers "which modules relate to this concept and how do they connect," and the two don't conflict and can stack. Against memory layers like mem0/supermemory, its LOCOMO recall@10 of 0.497 vs. mem0's 0.048 and supermemory's 0.149 is an order-of-magnitude win; but QA accuracy of 45.3% trails supermemory's 49.7%, so long-horizon memory QA isn't its forte. Against code-context tools like codebase-memory-mcp and cline memory, its biggest differentiator is a traversable graph (the query/path/explain commands) + Leiden community detection for module boundaries + native 20+ assistant integrations + zero LLM cost on pure code-whereas those are mostly flat "store context for the agent to read" memory. In one line: if you want your agent to understand project structure rather than just read fragments, with a queryable traversable graph and fully local zero-cost code-Graphify.
References
- Graphify GitHub repo (97,207 stars, Apache-2.0, Python): https://github.com/Graphify-Labs/graphify
- Official docs and README (tree-sitter AST + Leiden + MCP + 20+ assistant integrations): https://github.com/Graphify-Labs/graphify#readme
- Benchmarks BENCHMARKS.md (LOCOMO recall@10 0.497, LongMemEval-S 76%, double-judge kappa 0.81): https://github.com/Graphify-Labs/graphify/blob/v8/BENCHMARKS.md
- PyPI package graphifyy (
uv tool install graphifyy): https://pypi.org/project/graphifyy/ - Trendshift repository badge: https://trendshift.io/repositories/25296