AIToday

ForkMind: Git-style branching for LLM debugging, all local

Hacker News3h ago
ForkMind: Git-style branching for LLM debugging, all local

Key takeaway

ForkMind is an open-source debugging tool that records LLM API calls locally in a Git-like branching structure, letting developers re-run and compare prompts from any point in the conversation tree. It works with any OpenAI-compatible provider (Ollama, Groq, OpenRouter, Anthropic, etc.), including free models, and integrates with LangChain and Vercel AI SDK without requiring a database or cloud telemetry.

Summaries like this, in your inbox every morning.

Sign up free →

3 Key Points

  • What happened

    ForkMind, a new open-source tool, captures every LLM API call into a local directory, visualizing conversations as a branching tree (Directed Acyclic Graph) so developers can re-run prompts from any historical point with different parameters or models—all without cloud storage or accounts.

  • Why it matters

    Debugging AI agents and tool-calling flows currently requires re-running the same prompt repeatedly and scrolling through terminal logs. ForkMind records each call as a node, lets developers branch from any turn to compare outcomes visually, and works with any OpenAI-compatible API (Ollama, Groq, OpenRouter, Together, Anthropic), including free local models, lowering the barrier to iterate and test.

  • What to watch

    ForkMind includes a Claude Code plugin that teaches Claude when to invoke the debugger, an MCP server for agents to query their own history for self-correction, and thin adapters for LangChain.js and Vercel AI SDK—all routed through the same local proxy, meaning capture and branching work regardless of language (Python, JavaScript, Go, Ruby, Rust, Java, curl).

Context & Analysis

ForkMind addresses a practical pain point in LLM development: the iterative debugging loop. When building agentic or tool-calling workflows, developers typically run the same prompt multiple times with small tweaks to model parameters or instructions, then sift through logs to compare outputs. ForkMind eliminates that friction by treating the conversation history as a version-controlled structure—each call becomes a node with its request, response, and token usage recorded as plain JSON on disk, and any node can become a branch point for an alternative prompt or model.

The tool's design philosophy emphasizes locality and transparency. There is no external database, no account, and no telemetry; the `.forkmind/` directory lives in the project folder as a portable, inspectable archive. This makes it suitable for teams that need to keep LLM interaction logs private or for developers working offline. The deterministic node IDs (derived from request content and parent ID via SHA-256) ensure that identical prompts under the same parent collapse to a single node, reducing clutter.

Integration breadth extends ForkMind's reach. Beyond the CLI and dashboard, it ships as a Claude Code plugin (so Claude can autonomously decide when to branch or compare), an MCP server (allowing agents to query their own history for self-correction), and adapters for the two dominant JavaScript LLM frameworks (LangChain and Vercel AI SDK). Because everything routes through the same local proxy, features like branching, visualization, and regression testing work regardless of the source language or framework—a Python script, a curl request, and a LangChain.js application can all feed the same tree.

FAQ

Do I need to pay or set up a cloud account to use ForkMind?
No. ForkMind runs entirely on your machine with no database or cloud telemetry, and it defaults to free, open-source models via Ollama. You can run it with `npx github:medhovarsh/forkmind init` and `npx github:medhovarsh/forkmind start` without installing npm packages globally.
What LLM providers does ForkMind support?
ForkMind works with any OpenAI-compatible API, including Ollama (local), LM Studio (local), Groq (free tier), OpenRouter, Together, vLLM, LM Studio, and OpenAI itself. It also supports Anthropic (Claude) via a dedicated wrapper.
Can I use ForkMind with my existing code without rewriting it?
Yes. ForkMind's proxy speaks the OpenAI-compatible wire protocol, so you can point your existing client (in any language) to `http://localhost:4500/v1` and it will be recorded. Alternatively, there are thin adapters for LangChain.js and Vercel AI SDK that automate chaining.

Discussion

No comments yet. Be the first to share your thoughts!

Log in to join the discussion

Related Articles

Stay ahead with AI news

Get curated AI news from 200+ sources delivered daily to your inbox. Free to use.

Get Started Free

Free · takes 30 seconds · unsubscribe anytime

1 minute a day. The AI essentials.

200+ sources · Email / LINE / Slack

Get it free →