Skip to content

Install & first run

Requirements: Node ≥ 22.13 (GraphMind uses Node’s built-in SQLite — no native modules, no build step). macOS, Linux and Windows all work.

Terminal window
npx graphmind-ai demo

This starts the local server, opens the viewer, and replays a recorded trip-planner agent that contains a planted bug: convertCurrency inverts an exchange rate, so the budget check later throws on an absurd total.

The replay is not a video. It goes through the real ingest pipeline and honours the real control protocol — the planted error genuinely pauses, and continue / retry / inject / abort from the viewer steer the replay onto the matching pre-recorded branch. It is the same code path your own agent will take.

The GraphMind viewer holding a run at a failed tool call, with the pause banner and resume actions visible.

Press Ctrl+C when you are done; the server shuts down with it.

Leave this running in its own terminal:

Terminal window
npx graphmind-ai

With no command, the CLI runs serve: a server on http://127.0.0.1:4747 (always bound to loopback — never expose the port) and the viewer in your browser. --port moves it, --no-open suppresses the browser. See the CLI reference for everything else.

Install the adapter for your framework:

Terminal window
npm i -D @graphmind-ai/sdk

Then wrap the two things a debugger needs handles on — the model and the tools — and name the run:

agent.ts
import { graphmind } from '@graphmind-ai/sdk';
import { streamText } from 'ai';
const gm = graphmind({ app: 'support-agent' });
const model = gm.wrapModel(anthropic('claude-sonnet-4-5'));
const tools = gm.wrapTools({ searchOrders, issueRefund });
// Wait for the debugger handshake so gates are armed from the first event.
await gm.ready();
await gm.run('handle-ticket', () =>
streamText({ model, tools, prompt: userMessage }).consumeStream(),
);
await gm.dispose();

That is the whole integration. Every adapter exposes the same shape — a client/model wrapper (or a callback handler), wrapTools, run and ready — so switching frameworks does not mean relearning GraphMind. Each integration page has the complete, runnable version and the exact gate behaviour for that framework.

  1. Keep graphmind serving in one terminal.

  2. Start your agent normally in another — node agent.js, tsx agent.ts, next dev, whatever you already do. No flags, no wrapper process.

  3. Watch the viewer. Nodes appear as the agent reaches them and light up while they execute.

  4. When something throws, the run stops there. Pause-on-error is armed by default. Open the inspector, read the inputs, and choose continue, retry, inject or abort.

  5. Press K in the viewer for everything else — jump to any node, filter to the error path, open the timeline. See the viewer.

If nothing appears, work through troubleshooting — it is almost always a port mismatch or a process that exited before the handshake.