Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/deeplethe/forkd/llms.txt

Use this file to discover all available pages before exploring further.

Recipes are ready-to-run integration patterns that live in the recipes/ directory of the forkd repository. Each one is self-contained: pick the recipe that matches your problem, run build.sh (for rootfs recipes) or demo.py (for framework integration recipes), and you have a working forkd-backed sandbox in minutes. You don’t need to understand the others to use one.

All recipes

Framework integration recipes

These are host-side Python scripts (~150–250 lines each) that wire forkd into a specific agent framework. They require a running forkd-controller daemon and at least one snapshot, but no rootfs build. All have a --dry-run mode that exercises the forkd plumbing without an LLM key.
RecipeDriver / FrameworkUse caseKey forkd move
langgraph-react/LangGraph ReAct agentBranch a thinking agent mid-reasoning; fan out 3 grandchildren with different steering hintsBRANCH mid-thought, grandchildren inherit conversation history + tool results
crewai-fanout/CrewAIN CrewAI agents each on their own microVM from one parentspawn_sandboxes(n=N) — one fork call, per-agent KVM isolation, ~24 ms/child
autogen-branch/AutoGenforkd-backed CodeExecutor + mid-conversation BRANCHForkdCommandLineCodeExecutor + branch_sandbox(diff=True) fans out grandchildren
openai-swarm/OpenAI Swarm / Agents SDKHandoff = BRANCH: agent B inherits agent A’s full VM statedo_handoff() BRANCHes on handoff; child inherits filesystem writes + loaded packages
mcp-agent/Claude Desktop / Cursor / Cline via MCPEnd-to-end MCP protocol verification for forkd-mcpspawn_sandboxes → exec_command → branch_sandbox(diff=true) → spawn_sandboxes over JSON-RPC
coding-agent/Custom agent harnessSWE-bench-style parallel repo checkouts + pytest runsFork per task; full git + Python dev toolchain pre-installed
coding-agent-fork/Custom agent harnessDistributing large binary state (50 MiB) across 4 agentsBRANCH propagates byte-identical blobs that can’t fit in a prompt
postgres-fixture/pytest / any test runnerFork-per-test isolated Postgres databases in ~10 msinitdb runs once at parent build; every fork inherits the post-init state

Pre-built rootfs recipes

These recipes build a parent snapshot from a Docker image. Run build.sh once; then forkd snapshot + forkd fork fan out children instantly.
RecipeParent imageRootfs sizeWhen to pick
python-numpy/python:3.12-slim + numpy~1.5 GBReproduce the benchmark; lightest Python + numpy
e2b-codeinterpreter/e2bdev/code-interpreter~600 MBAI code-interpreter agents (E2B SDK-compatible)
jupyter-kernel/quay.io/jupyter/scipy-notebook~3 GBNotebook / SciPy stack pre-imported; ~1 ms per fresh kernel
coding-agent/python:3.12 + git + ruff + black + pytest~1.8 GBSWE-bench / coding agents with git + dev tools
nodejs/node:22-slim~250 MBJavaScript / TypeScript workloads, Playwright fan-out
playwright-browser/mcr.microsoft.com/playwright~2.5 GBBrowser-driving agents — fork warmed Chromium at ~10 ms
agent-workbench/agent-infra/sandbox~5 GBKitchen sink: browser + VSCode + Jupyter + MCP
postgres-fixture/postgres:16 (initdb done, postmaster running)~500 MBFork-per-test isolated databases; ready-to-query in ~10 ms

How to use a recipe

Every rootfs recipe follows the same three-step pattern:
1

Build the parent rootfs

cd recipes/<name>
sudo bash build.sh
The first run takes a few minutes (Docker pull + ext4 conversion). The result is a parent.ext4 file alongside build.sh.
2

Snapshot the warmed parent

sudo -E forkd snapshot --tag <name> \
    --kernel /var/lib/forkd/kernels/vmlinux \
    --rootfs recipes/<name>/parent.ext4 \
    --tap forkd-tap0
This boots the parent VM once, lets it warm up, then pauses and saves it to disk. Takes ~10 s.
3

Fork children and run the demo

sudo bash scripts/netns-setup.sh 10
sudo -E forkd fork --tag <name> -n 10 --per-child-netns

# For framework integration recipes, run the demo script instead:
FORKD_TOKEN=$(sudo cat /etc/forkd/token) python3 recipes/<name>/demo.py
Framework integration recipes (crewai-fanout, autogen-branch, openai-swarm, mcp-agent) skip the build.sh step entirely — they only need a running daemon and any Python-capable snapshot from forkd images.

Detailed recipe pages

LangGraph

Branch a running ReAct agent mid-thought. Three grandchildren each receive a different steering hint and produce divergent itineraries — all inheriting the same prior reasoning state.

Coding Agent

SWE-bench-style parallel repo checkouts. Each child gets an isolated workspace with git, Python, pytest, and ruff pre-installed. Includes the 50 MiB binary BRANCH demo.

Postgres Fixture

Fork-per-test isolated Postgres databases in ~10 ms instead of ~2 s for a fresh initdb. Drop-in replacement for per-test Docker containers.

Framework Integrations

Drop-in forkd patterns for CrewAI fan-out, AutoGen CodeExecutor, OpenAI Swarm handoffs, and Claude Desktop via MCP.

Build docs developers (and LLMs) love