Graphify-Labs /
graphify
Maps a codebase and its docs into a knowledge graph your AI assistant can query
- 133.1k stars
- 9.9k stars since 3 Oct
- Python
- Updated today
- Some experience
- Memory, RAG & data
When you ask an AI assistant about a large project, it often reads many files or greps blindly. Graphify builds a map first. You type /graphify in your assistant, and it writes a graph of the concepts in your code, docs, PDFs, images and video.
Code is parsed with tree-sitter into an abstract syntax tree. That step is deterministic, uses no LLM and keeps everything on your machine. Docs, PDFs, images and video get a semantic pass from your assistant's model or an API key you configure. The graph is split into communities with the Leiden algorithm.
Unlike RAG tools built on embeddings, it uses no vector store. It is a real graph you walk. Every edge is tagged EXTRACTED (stated in the source) or INFERRED (resolved by graphify), so you can see what was read and what was derived. The README reports benchmarks against mem0 and supermemory on LOCOMO. Those are the authors' own numbers.
What it does
Three output files
A run writes graph.html to explore in a browser, GRAPH_REPORT.md with key concepts and suggested questions, and graph.json with the full graph for later queries.
Query, path and explain
graphify query answers a plain-language question with a small subgraph. graphify path A B traces how two things connect. graphify explain describes one concept and its links.
Local code parsing
Calls, imports and inheritance are resolved across files in about 40 languages with tree-sitter. No LLM is involved and no code leaves your machine.
Confidence-tagged edges
Each link is marked EXTRACTED or INFERRED, so you can judge how far to trust it.
Rationale and doc references
Comments like NOTE and WHY, plus ADR and RFC citations, become nodes linked to the code they explain.
What you could build
- Map an unfamiliar codebase to find its most connected concepts and subsystems before reading any files.
- Trace the shortest path between two classes or functions to see how they depend on each other.
- Give an AI coding assistant a graph to query so it reads fewer raw files.
- Combine code, design docs and PDFs into one graph to see how specs relate to implementation.
- Install the skill per project and commit it so a team shares the same setup.
Get started
Install the CLI (the PyPI package name is graphifyy, with two y's), then run graphify install to register the skill with your assistant. Open the assistant in your project and type /graphify . to build the graph. Use graph.html and GRAPH_REPORT.md to explore.
uv tool install graphifyygraphify install/graphify .Commands are copied from the project's README. Read it on GitHub for the full setup.
Anything better than graphify?
Graphify is the strongest pick when you want one graph covering code plus docs, PDFs and media, with confidence-tagged edges. For code-only structural lookups through MCP, or a visual onboarding dashboard, look at the alternatives below.
-
codegraphAlternative Your agent mostly needs fast symbol, call and dependency lookups on code, served through MCP in a single call, with no docs or media in scope. Trade-off: Code only: no PDFs, docs, media or rationale references, and it has roughly half of Graphify's stars.
-
codebase-memory-mcpAlternative You want a persistent code graph with many MCP tools (17), covering call chains and HTTP routes, for any MCP-capable agent. Trade-off: Focused on code structure only; it doesn't ingest docs or media, and it is less widely adopted.
-
Understand-AnythingAlternative You're onboarding to an unfamiliar codebase or wiki and want to browse the graph visually in a browser dashboard. Trade-off: Runs multiple agents to build the graph, so it is likely heavier and slower than local tree-sitter parsing; geared to orientation more than tracing queries.
-
archifyUse alongside After mapping a codebase with Graphify, use it to turn the architecture into a shareable interactive HTML diagram for people. Trade-off: It makes diagrams from descriptions, not a queryable graph, so it is an extra step and not a replacement.
More in Memory, RAG & data
vectorize-io/hindsight
Memory server that lets AI agents store, search and learn from past interactions