> ## Documentation Index
> Fetch the complete documentation index at: https://docs.graphify.com/llms.txt
> Use this file to discover all available pages before exploring further.

> ## Agent Instructions
> The PyPI package is graphifyy, with two y's. The command is graphify.
> /graphify . is typed in an assistant chat, not in a shell.
> Use only commands, flags, and endpoints shown on these pages. Do not invent one.
> Choose the surface before you open a page. Local (Graphify Local) is the graphifyy package on the machine: the skill, the CLI, and the ten-tool MCP. Its pages are the Open Source tab (/open-source/) and the Graphify Local tab on each Integrations page. Graphify is the hosted workspace and https://api.graphify.com/mcp (Streamable HTTP, OAuth, no API key). Its pages are the Graphify tab (/platform/, /concepts/) and the Graphify (hosted) tab on each Integrations page. Prefer Graphify unless the user asks for a local or offline setup. Cookbooks (/cookbooks/) and /mcp/docs-search apply to both. Each page's source frontmatter records this as surface: local, cloud, or both. Buildkite is the CI integration.
> In llms.txt, tell the surface from the page path. Graphify: /platform/ and /concepts/. Local: /open-source/. Most /integrations/ pages cover both, with a Graphify (hosted) tab and a Graphify Local tab. Everything else applies to both.
> graphifyy release notes are published at https://github.com/Graphify-Labs/graphify/releases and https://graphify.com/changelog. The current package version is on PyPI (https://pypi.org/project/graphifyy/).
> The official site is https://graphify.com. These docs are https://docs.graphify.com.
> The local MCP server is the ten tools in the MCP tool reference and reads a graph on the machine. The hosted server is https://api.graphify.com/mcp (Streamable HTTP, OAuth, no API key). The JetBrains, ChatGPT, Codex, and Dots, and Vercel pages use the hosted server, not the ten-tool list. On pages with tabs, the Graphify (hosted) tab uses the hosted server and the Graphify Local tab uses the local skill or the ten-tool server.
> Read https://docs.graphify.com/llms.txt, then open one page's .md link. Use https://docs.graphify.com/llms-full.txt only when one page is not enough.

# Ask better graph questions

> Ask better questions of your code knowledge graph with graphify query, path, and explain, and pick the right command for each kind of question.

Start with a specific subsystem or concept, then narrow your investigation. A compact query is usually more useful to an assistant than the whole architecture report.

## Gather context with query

```bash theme={"theme":{"light":"github-light-default","dark":"github-dark-default"}}
graphify query "authentication and session storage" --budget 1500
```

`query` finds relevant starting nodes and traverses their relationships. Breadth-first traversal gathers a broader neighborhood. `--dfs` follows a deeper chain:

```bash theme={"theme":{"light":"github-light-default","dark":"github-dark-default"}}
graphify query "request validation" --dfs --budget 1500
```

## Inspect one concept with explain

Take a label or node ID from the query results:

```bash theme={"theme":{"light":"github-light-default","dark":"github-dark-default"}}
graphify explain "normalize_email"
```

Look at its source, community, and incoming and outgoing relationships. Inspect the source itself when a precise implementation detail matters.

## Trace a relationship with path

```bash theme={"theme":{"light":"github-light-default","dark":"github-dark-default"}}
graphify path "login" "normalize_email"
```

This uses the [tutorial’s example project](https://docs.graphify.com/open-source/cli-quickstart.md). In your project, replace the labels with real nodes. Stored direction is respected; add `--undirected` when you want connectivity rather than a directional path.

## Ask the assistant to preserve uncertainty

> Use Graphify to trace how a request reaches persistence. Show the path and source references. Flag inferred or ambiguous edges, and tell me if the graph is missing evidence.

The tool supplies context, and the assistant interprets it. Ask for evidence and avoid treating an absent path as proof that two systems are independent.

## Run it on a real repository

These examples come from a code-only graph of the open-source [httpx](https://github.com/encode/httpx) repository, built with Graphify Local 0.9.97. Your counts will differ.

```bash theme={"theme":{"light":"github-light-default","dark":"github-dark-default"}}
git clone --depth 1 https://github.com/encode/httpx && cd httpx
graphify extract . --code-only
graphify query "how does the client send a request" --budget 600
```

```text theme={"theme":{"light":"github-light-default","dark":"github-dark-default"}}
Graph: graphify-out/graph.json (1883 nodes) | Traversal: BFS depth=2 | Start: ['Send', 'send()', 'Client', 'Request'] | 550 nodes found

[!] TRUNCATED: showing 26 of 550 nodes (~600-token budget). ... raise the token budget to 14777 to get all 550 (CLI: --budget 14777, MCP: token_budget=14777) or narrow the query

NODE Client [src=httpx/_client.py loc=L594 community=Community 21]
NODE Request [src=httpx/_models.py loc=L382 community=Community 14]
NODE BaseClient [src=httpx/_client.py loc=L188 community=Community 5]
```

The header tells you where the traversal started and how much it found. When the output is truncated, Graphify prints the exact budget that would return everything. Raise `--budget`, or narrow the question.

To start from a node you already know, pass `--seed`. To follow only one kind of edge, pass `--context`:

```bash theme={"theme":{"light":"github-light-default","dark":"github-dark-default"}}
graphify query "what raises timeouts" --seed "TimeoutException" --budget 300
graphify query "who calls send" --context calls
```

`path` and `explain` show the confidence of each edge:

```text theme={"theme":{"light":"github-light-default","dark":"github-dark-default"}}
$ graphify path "Client" "HTTPTransport"
Shortest path (1 hops):
  Client --uses [INFERRED]--> HTTPTransport
```

## Flags

| Flag | Applies to | What it does |
| - | - | - |
| `--budget N` | `query` | Caps output at N tokens. The default is 2000. |
| `--dfs` | `query` | Uses depth-first traversal instead of breadth-first. |
| `--seed X` | `query` | Starts at node X (an ID, label or file path). You can repeat it. |
| `--context C` | `query` | Filters edges by context. You can repeat it. |
| `--all` | `explain` | Lists every connection, not just the 20 most connected. |
| `--directed` / `--undirected` | `path` | Directed is the default. Undirected ignores edge direction. |
| `--graph PATH` | all three | Reads a different `graph.json`. |

## Exit codes and troubleshooting

`query`, `path` and `explain` exit with `0` when they return an answer, `3` when a name is ambiguous, and `4` when no node matches. Scripts can branch on these codes.

```text theme={"theme":{"light":"github-light-default","dark":"github-dark-default"}}
$ graphify explain send
Ambiguous: 'send' matches 3 nodes in different files.
  httpx/_client.py
    id: httpx_client_asyncclient_send
  ...
Retry with path::symbol using one of the paths above (e.g. <path>::.send()) or the full node id.
```

Retry with one of the listed IDs, or a `path::symbol` form. If you get `No node matching '...' found.` (exit 4), check the spelling or run `graphify god-nodes` to see the main labels.

## FAQ

**Does querying call an LLM?** No. `query`, `path` and `explain` read `graph.json` locally.

**What does INFERRED mean?** The edge came from a resolution step, not a direct syntax match. EXTRACTED edges were read straight from the source. Check INFERRED edges before you rely on them.

## Next steps

> **[Try it in Graphify](https://docs.graphify.com/platform/quickstart.md)**
>
> We build and host the graph for you. Start with a 14-day Pro trial, then keep up to 3 repositories on Free. No card required.

> **[Trace who calls this](https://docs.graphify.com/platform/trace.md)**
>
> Follow calls across repositories in the console.

> **[graphify query](https://docs.graphify.com/open-source/configuration/cli.md#query)**
>
> Flags and output for query.

[PreviousAsk your agent one question](https://docs.graphify.com/open-source/ask-your-agent.md)
[NextKeep the graph current](https://docs.graphify.com/open-source/features/incremental-updates.md)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.