← All Guides

Skill Guide

OpenClaw + Graphify

Graphify is an open-source tool that builds a queryable knowledge graph from a codebase. Wire it up to your OpenClaw agent and a question like “where does billing deduct credits?” is answered from a small part of the graph instead of by reading file after file. The commands below were checked against the Graphify 0.9.118 source and documentation in November 2026. Running Hermes Agent instead? See Hermes Agent + Graphify.

What Is Graphify?

Graphify is an open-source (Apache-2.0) tool that turns a repository — code, docs, papers, images and video — into a queryable knowledge graph. Graphify parses supported code locally with Tree-sitter or built-in parsers. It can use a model to extract relationships from documents, PDFs and images. The assistant skill can also transcribe audio and video locally and use a model on the transcripts; the graphify extract command skips audio and video. Nodes are functions, files, and concepts, and edges are the calls, imports, and other relationships between them, grouped into communities.

On Graphify's own 52-file benchmark of code, documentation, papers and images, the returned subgraph averaged about 1.7k tokens against about 123k for the full corpus, a 71.5x reduction. On the 29-file code-only subset it was about 1.9k against 17k, or 8.8x. Its other benchmarks report 5.4x on four files and about 1x on six, so the saving depends on how much there is to read.

Why Pair It with OpenClaw?

OpenClaw agents are great at chat-first coding help — “explain this bug”, “write a migration for X”, “review this diff”. They can read files their tools have access to, but loading a large service into the model's context can take many tokens, especially when the answer spans several files.

Graphify handles the retrieval side. Your OpenClaw agent gets tools for querying the graph, the graph returns the nodes and relations that match, and the agent reasons over those. Three concrete wins:

  • Smaller graph queries — the agent can start with matching symbols and their relationships
  • Reusable code context — the graph stays on disk and can be queried across turns and sessions
  • Code is parsed locally — a code-only extraction uses no model; what the agent reads from the graph, or from a file, still goes to the model it uses

How the Integration Works

Graphify comes with both an OpenClaw skill and a local MCP server. The flow is:

  • Install Graphify on the machine where your OpenClaw agent runs.
  • Build the graph for your repo.
  • Add the skill, or register the MCP server. Pick one as the main route.
  • Ask a repo question in a chat where the Graphify skill or MCP tools are enabled.

Setup

Step 1: Install Graphify

The package is graphifyy, with two y's, and the command it installs is graphify. It needs Python 3.11.5 to 3.14. The mcp extra adds what the MCP server needs.

uv tool install "graphifyy[mcp]"
graphify --version

Step 2: Build the graph

Run these from your repository root to extract code and cluster the graph offline:

graphify extract . --code-only
graphify cluster-only . --no-label

The first command writes graphify-out/graph.json. The second writes graphify-out/GRAPH_REPORT.md, plus graph.html when visualisation is available.

Use a checkout without an existing graphify-out/graph.json if you need a graph with code only: an existing graph can keep document, paper and image nodes from an earlier build.

Without --code-only, documents, PDFs and images can be sent to a model provider, and Graphify can pick the provider from API keys already in your environment. For graphify extract, set GRAPHIFY_BACKEND=none and omit --backend to skip model-based extraction.

Step 3: Connect it to OpenClaw

As a skill, which lets the agent run graphify query, graphify path and graphify explain itself:

graphify install --platform claw

This copies the skill to ~/.openclaw/skills/graphify/.

Or as an MCP server. With the Gateway running, add it in the Control UI under Settings, then MCP: command graphify-mcp, with the absolute path of your graph.json as the argument. With the Gateway stopped, the CLI does the same:

openclaw mcp add graphify --command graphify-mcp --arg /absolute/path/to/repo/graphify-out/graph.json
openclaw mcp doctor graphify --probe

OpenClaw starts the server itself over stdio, so there is no port to open. The tools include query_graph, get_node, get_neighbors and shortest_path. The general steps are in Best MCP servers.

If the agent runs on a different machine from the code, either build the graph beside the agent, or serve it over HTTP: on the graph host, set GRAPHIFY_API_KEY and run graphify-mcp --transport http /absolute/path/to/repo/graphify-out/graph.json. It is plain HTTP and listens on 127.0.0.1:8080/mcp by default. Forward that port through a private tunnel, or pass --host with the machine's private IP address. Set the MCP entry's transport to streamable-http and its URL to the reachable /mcp endpoint, and send the same key in the X-API-Key header.

For Graphify's hosted option, connect a repository in Graphify and wait for it to be indexed; Graphify reads the repository to do this. Add https://api.graphify.com/mcp as a Streamable HTTP server named graphify with auth set to oauth, then choose Sign in for it under Settings, then MCP. If that option is missing, stop the Gateway, run openclaw mcp login graphify on the same installation, and start the Gateway again. We have not tested Graphify on OpenClaw Launch instances.

Step 4: Ask repo questions

In a chat with Graphify enabled, try:

  • “Where do we deduct credits when a subscription renews?”
  • “Which files implement the warm pool, and how are they connected?”
  • “Show me every place we call the OpenRouter API.”
  • “Walk me through the auth flow from login to session cookie.”

The agent queries the graph, gets back the matching nodes and relations, and answers.

Keeping the Graph Fresh

The graph is a snapshot. Refresh it when the code changes:

  • After edits or a git pull: graphify update . refreshes the code graph without a model.
  • Automatically: run graphify hook install in the Git repository to refresh the code graph after commits, branch switches, merges and rebases once a graph exists.
  • Documents and images: rerun the model-based extraction. For graphs built with documents enabled, graphify update . can also refresh basic Markdown headings in files without model-derived nodes.

Some guides, including an earlier version of this one, print pip install graphify, a build subcommand or an mcp serve subcommand. The package is graphifyy, and Graphify 0.9.118 has none of those subcommands.

When Graphify Is Overkill

Not every OpenClaw use case needs a knowledge graph:

  • Single-file or tiny-repo work — just paste the file. A graph adds latency without much payoff.
  • Chat-first assistants (personal bots, customer support) — unrelated to repos.
  • Docs search — Firecrawl + a vector store is usually simpler.

Reach for Graphify when the question is “how does this codebase work?” and the codebase is big enough that the answer lives across many files.

Bottom Line

Graphify and OpenClaw compose well: Graphify does the retrieval, OpenClaw does the conversation. For teams running a coding-oriented agent in Slack, Discord, or Telegram, this is a practical way to make it more useful on a large codebase — smaller reads per question, with code parsed on your own machine.

FAQ

What is Graphify?

Graphify is an open-source (Apache-2.0) tool that turns a codebase, plus docs, papers, images and video, into a queryable knowledge graph. Supported code is parsed locally. Graphify reports a 71.5x token reduction on one 52-file mixed corpus, 8.8x on its 29-file code-only subset and about 1x on six files.

Does Graphify send my code anywhere?

graphify extract . --code-only extracts code locally without a model. Documents, PDFs and images can go to a cloud model provider if you include them. What the agent reads from the graph or from files goes to the model it uses, and the hosted Graphify server reads the repository you connect.

How does Graphify connect to OpenClaw?

Either run graphify install --platform claw to add the OpenClaw skill, or register the graphify-mcp command as an MCP server in the Control UI or with openclaw mcp add, giving it the absolute path of graphify-out/graph.json.

When should I not use Graphify?

Skip Graphify for single-file tasks, small repos, or agents that are not about code at all (personal assistants, customer support bots). It shines when the agent needs to reason about a codebase big enough that answers live across many files.

Next Steps

Turn Your Repo Into Agent Context

Spin up an OpenClaw agent, plug in Graphify, and ask real repo questions from chat.

Deploy Now