ForkMind – Git for LLM context: branch, offload, and restore it ForkMind, a new open-source tool that treats LLM context windows like Git repositories, launched to help developers branch, debug, and compare AI conversations locally. The tool captures every LLM call into a local directory, visualizes conversation trees as DAGs, and supports any OpenAI-compatible API including free local models via Ollama. ForkMind aims to simplify debugging of agentic and tool-calling flows by allowing users to branch from any historical turn and compare outcomes visually. Local-first LLM state branching & debugging. ForkMind treats AI context windows like a Git repository: it captures every LLM call into a local .forkmind/ directory, visualizes the conversation as a Directed Acyclic Graph DAG , and lets you branch alternative prompts or model params from any point in the history — all on your machine, no cloud, no account. Works with any OpenAI-compatible API , defaulting to free, open-source models via Ollama https://ollama.com . Also supports Anthropic and any hosted free tier Groq, OpenRouter, Together, vLLM, LM Studio . Live demo: a conversation tree with a branch off the root, the node inspector request/response, tokens, provenance , and the Fork from heredialog. Debugging agentic / tool-calling flows means re-running the same prompt with tiny tweaks over and over. ForkMind records each run as a node, so you can: See the whole conversation tree, including tool calls and token usage. Branch from any historical turn — edit the prompt, swap the model, re-run. Compare outcomes visually instead of scrolling through terminal logs. Everything is plain JSON on disk. No database. No telemetry. Run without installing published on npm npx forkmind init npx forkmind start …or install the CLI globally npm install -g forkmind forkmind start No npm registry needed either — ForkMind runs straight from the git link, and the dashboard builds automatically on install: Run without installing, from GitHub npx github:medhovarsh/forkmind init npx github:medhovarsh/forkmind start …or clone to hack on it git clone https://github.com/medhovarsh/forkmind cd forkmind && npm install ForkMind ships a Claude Code plugin skill + /forkmind command so Claude knows when and how to drive it — same install flow as any marketplace plugin: /plugin marketplace add Medhovarsh/forkmind /plugin install forkmind The plugin bundles: — Claude reaches for ForkMind whenever you ask it to debug a prompt, compare models, branch from a past turn, or regression-test a call. forkmind skill— start / branch / test / mcp on demand. /forkmind command— runs model/prompt comparisons in an isolated context and returns a compact verdict instead of dumping transcripts. forkmind-debugger agent MCP server, auto-wired — agents query their own .forkmind/ history recall attempts, trace lineage, self-correct with zero manual config. The CLI is still what runs the proxy + dashboard; the plugin is the glue that teaches Claude to use it. 1. Install a free local model install Ollama from https://ollama.com first ollama pull llama3 2. Init + start ForkMind npx github:medhovarsh/forkmind init create .forkmind/ in your project npx github:medhovarsh/forkmind start proxy on http://localhost:4500 + dashboard 3. Point your code at the proxy see SDK below , make some calls 4. Open the dashboard open http://localhost:4500 npm i openai the wrapper extends the official SDK js const { ForkMindOpenAI } = require 'forkmind' ; const client = new ForkMindOpenAI { apiKey: 'ollama', // ignored by Ollama; required by SDK upstream: 'http://localhost:11434', // free local open-source models } ; // Each call is recorded; sequential calls auto-chain into a conversation tree. const res = await client.chat.completions.create { model: 'llama3', messages: { role: 'user', content: 'Explain backpropagation simply.' } , } ; Run the full example: node examples/chain.js The SDK wrapper is convenience, not a requirement. ForkMind's proxy speaks the OpenAI-compatible wire protocol , so capture works from any language: set your client's base URL to http://localhost:4500/v1 and you're recorded. Chain turns into a tree by passing back the x-forkmind-node-id from the previous response as the next request's x-forkmind-parent header the JS wrapper just automates this . python Python — official openai client, zero ForkMind code from openai import OpenAI client = OpenAI base url="http://localhost:4500/v1", api key="ollama" res = client.chat.completions.create model="llama3", messages= {"role": "user", "content": "Explain backpropagation simply."} , extra headers={"x-forkmind-upstream": "http://localhost:11434"}, read res via .with raw response to grab x-forkmind-node-id and chain the next call curl — anything that can POST JSON curl http://localhost:4500/v1/chat/completions \ -H 'content-type: application/json' \ -H 'x-forkmind-upstream: http://localhost:11434' \ -d '{"model":"llama3","messages": {"role":"user","content":"hi"} }' -i response header x-forkmind-node-id: