ByteCosts
graphify-codebase-knowledge-graph-review.mdx

AI Coding Agents

Graphify Review: A Queryable Knowledge Graph for Your Codebase

Graphify turns code and other project files into a knowledge graph your coding agent can query to cut down on file reads. Tree-sitter code extraction runs locally without LLM calls, and the optional semantic pass over documents and media can use a model. Measure billed usage on your repository to see whether scoped graph queries reduce input.

Graphify turns code, docs, SQL schemas, configs and PDFs into a queryable knowledge graph your coding agent consults instead of grepping files. Tree-sitter code extraction runs locally without LLM calls. The optional semantic pass over documents and media can use a model. The savings come from agents reading scoped subgraphs rather than raw files. The project reports strong benchmark numbers, but they are self-run, and closed issue #580 reports no token-efficiency gain in Claude Code sessions.

At a glance

QuestionAnswer
What is it?A Python tool that builds a queryable knowledge graph from code, documents, and other project files.
What cost does it target?Input and tool calls spent exploring a repository through searches and file reads.
Where does it act?The skill and installed guidance steer agents toward scoped graph queries.
How do you try it?Install the graphifyy package with uv or pipx and set it up for your assistant.
How do you undo it?Use the documented uninstall command. Add the purge option if you also want to delete the generated graph output.
What license is stated?Apache-2.0.
What is its maturity signal?155,185 stars and 1,775 open issues as of November 30, 2026.
When is it a good fit?Repeated orientation or dependency tracing in a large or unfamiliar repository.

What it is and which cost layer it targets

Graphify (Graphify-Labs/graphify) is a Python tool that ships as a /graphify skill for Claude Code, Cursor, Codex, Gemini CLI and more than twenty other assistants. As of November 30, 2026 it had 155,185 stars and 14,947 forks under an Apache-2.0 license, with 1,775 open issues. The README carries a Y Combinator S26 badge and a ROSS Index Q3 2026 badge naming it the number two fastest-growing open-source startup. It was created in April 2026 and is still pre-1.0: releases v0.9.114 through v0.9.123 all landed between November 20 and November 28, 2026.

The cost layer is exploration: the file reads and greps an agent performs to orient itself in a codebase. Instead of the agent spending turns reading files to answer “how does auth connect to the database,” it queries a pre-built graph.json and gets back a scoped subgraph. A secondary layer is behavior: installed hooks and instruction files steer the agent to query the graph before reaching for raw file reads.

How it works

The pipeline is deterministic for code. Tree-sitter AST parsers extract calls, imports, inherits and mixes_in edges across about 40 languages, locally, with no LLM and nothing leaving your machine. Docs, PDFs, images and video go through an optional semantic pass that uses your assistant’s model or a configured API key, and only if you set one up. Every edge is tagged EXTRACTED (explicit in the source) or INFERRED (resolved by Graphify), and a path query reports the confidence of its weakest hop. There is no vector store and no embeddings in the core path; communities (subsystem clusters) use Leiden detection with LLM-free labels.

Running /graphify . inside your assistant produces three files under graphify-out/: graph.html (a clickable force-directed graph), GRAPH_REPORT.md (most-connected components, subsystems, suggested questions) and graph.json (the full graph). You then query with graphify query "<question>", graphify path A B and graphify explain "<symbol>" instead of reading files. The README shows real output: graphify explain "APIRouter" on the FastAPI codebase returns the node’s source location, community and 47 tagged connections.

Two mechanisms make the agent actually use the graph. On hook platforms (Claude Code, Gemini CLI) a PreToolUse hook fires before search-style tool calls and, on Claude Code, before Read/Glob on indexed files, nudging the agent toward graphify query. In Claude Code, strict mode can deny one qualifying Read or dedicated Grep call when a recent graph query is missing. Bash and Glob remain advisory. The default query window is 30 minutes, the soft-nudge cap defaults to five, and compaction resets the limits. Set GRAPHIFY_HOOK_STRICT=1 to enable the policy without reinstalling. On instruction-file platforms (Codex, Cursor, OpenCode and others) the installer writes AGENTS.md or rule files with the same query-first guidance.

The README offers a hosted MCP endpoint at https://api.graphify.com/mcp on its free plan. For local stdio, install the MCP extra:

uv tool install "graphifyy[mcp]"

The server exposes query_graph, affected, shortest_path, get_node, get_community, god_nodes, graph_stats and PR tools (list_prs, get_pr_impact, triage_prs).

Install and first run

You need Python 3.11.5 through 3.14 and uv or pipx:

uv tool install graphifyy      # or: pipx install graphifyy
graphify install               # sets up Claude Code (the default)

The PyPI package is graphifyy with a double y; the README warns that other graphify* packages are not affiliated, and a closed issue about possible name squatting (issue #280) makes this worth checking before you install anything named similarly. Use the install command for your assistant:

graphify install --platform codex
graphify cursor install
graphify install --platform gemini

Codex invokes the skill as $graphify. For a project-scoped installation, run:

graphify install --project

The project-scoped option writes the skill under the repository, for example .claude/skills/graphify/ or .agents/skills/graphify/.

Then, inside the assistant, run /graphify . and open graphify-out/graph.html. Removal is one command: graphify uninstall (add --purge to delete graphify-out/).

What it saves: claims vs independent evidence

The README does not promise a token percentage. Its cost claim is that the graph build uses “0 LLM credits” because code extraction is deterministic, and its quality claims live in a vendor-run BENCHMARKS.md: LOCOMO recall@10 of 0.497 against mem0’s 0.048 and supermemory’s 0.149 (n=300); LongMemEval-S QA accuracy of 76% tied with dense RAG (n=50); and an ERPNext cross-tool test where key-fact coverage hit 82.0% against a 70.8% grep/read baseline (n=6). The project reports the judge was blind-validated against a second judge at 90.6% agreement (Cohen’s kappa 0.81). These are the project’s own numbers on small sample sizes, and none of them measure billed tokens; the ERPNext result measures answer coverage, not cost.

The counter-evidence is thin but real: a closed issue titled “Graphify not improving token efficiency in Claude Code sessions” (issue #580) reports the savings mechanism not paying off for one user. With only titles available, treat it as a warning to measure, not a verdict. The honest position: the build cost is documented (zero LLM calls for code), the query-side savings are plausible but unproven by independent measurement.

Prompt-cache and extra-turn risk

Two cache interactions deserve attention. A closed issue titled “Graphify file writes invalidate prompt cache in Claude Code (Recommended docs update)” (issue #1387) flags that Graphify writing into the project during a session can break the cached prompt prefix and re-bill the accumulated context as fresh input. Build the graph with /graphify . in a setup session, then start a fresh session for the measured task. Second, every nudge the hook injects is a few more input tokens per turn, and in strict mode a denied read becomes an extra turn (the agent retries via the graph), so the enforcement mechanism itself has a small per-turn cost that only pays off if the graph query actually replaces the file reads.

What the GitHub issues show

As of November 30, 2026, Graphify had 1,775 open issues. The snapshot includes extraction and portability reports you can check against your setup.

  • Issue #1689: .r/.R files are listed as code but have no AST extractor and are silently dropped. Open.
  • Issue #2313: a builtin-name list makes Go, Rust, Ruby, PHP, C and C++ lose real call edges. Open.
  • Issue #4281 and #1829: node IDs drop file extensions and paths, so same-named entities collide and one is lost. Open.
  • Issue #1667: non-deterministic community assignments across identical runs. Open.
  • Issue #3129 and #777: machine-absolute paths written into tracked config and graphify-out/ break portability across machines and worktrees. One open, one closed.
  • Issue #3061: graphify watch rejects the --debounce flag its own help documents. Open.
  • Issue #1843: the README troubleshooting recommended .claudeignore, which Claude Code does not support. Open.
  • Issue #1122: extract required an LLM API key even for code-only corpora that make no LLM calls. Closed.

The snapshot lists eight releases from November 20 through November 28, 2026. The issue titles identify extraction gaps worth testing on your own languages.

A cost example (estimate)

Assumptions, stated: six codebase-orientation questions in a session; without the graph each costs about five tool calls that pull 30,000 fresh tokens of file content; with the graph each query returns a 2,500-token subgraph plus a small hook nudge. Priced at claude-sonnet-5-5 input ($2 per million tokens, cache read $0.10 per million; check the AI provider pricing index for current rates), cost = tokens x rate:

  • Exploration path: 6 x 30,000 fresh input = about $0.36, if the client retains all 180,000 tokens and they qualify for cache reads, a later read of that block adds an estimated $0.018.
  • Graph path: graph build = $0 in model tokens for code (local tree-sitter); 6 x 2,500 query results = about $0.03 fresh input, with far less residue in context.

Estimate: roughly $0.03 versus $0.36 for fresh input from the compared tool results. These are estimates built on the stated assumptions; the real ratio depends on your repo size and how many orientation questions a task asks. This estimate covers fresh input from query results. Measure hook messages, cache charges and extra turns separately. If you enable semantic extraction for docs or media, include the model usage it generates.

Who should use it, who should skip it

Use it if you:

  • Onboard agents (or yourself) onto large or unfamiliar repositories repeatedly, where orientation questions recur
  • Run a monorepo or multi-project setup where dependency tracing beats grep
  • Want shared artifacts: GRAPH_REPORT.md and graph.json can be committed and reused across sessions (though absolute-path reports #555 and #777 flag portability problems, so verify paths survive your worktree setup)
  • Prefer deterministic extraction over embedding-based RAG

Skip it if you:

  • Work in a small codebase you and the agent already know, where orientation costs nothing
  • Need one focused edit; building and querying a graph adds ceremony for a two-file change
  • Rely on a language with weak extraction coverage (the open issues show R dropped silently and reduced call-edge coverage in several compiled languages)
  • Cannot tolerate non-deterministic clustering results between runs (issue #1667)

How to trial it safely

  1. Build the graph with /graphify . in a setup session, then start a fresh session for the measured task. Issue #1387 flags cache invalidation from file writes in Claude Code.
  2. Check graph_stats output or GRAPH_REPORT.md for silent coverage gaps in your languages before trusting answers.
  3. Run a week of normal work with the hook in soft mode and record provider-billed input tokens; issue #580 is a reminder that the token win is not guaranteed.
  4. Compare a fixed set of orientation questions answered with and without the graph: billed input, turns, and answer quality.
  5. Only enable --strict after soft-mode data shows the nudges being followed.

The protocol in how to measure coding agent token savings covers the A/B design in detail.

Alternatives and next reads

Sources

How this note was produced

Drafted with AI assistance from committed ByteCosts pricing snapshots and deterministic cost formulas. Figures are grounded in the linked sources (last updated 2026-11-30). Read our editorial & automation policy, inspect the methodology, or report a discrepancy.

Graphify Review: A Queryable Knowledge Graph for Your Codebase. ByteCosts. Updated 2026-11-30. https://bytecosts.com/blog/graphify-codebase-knowledge-graph-review/

Sources