Recipes are ready-to-run integration patterns that live in theDocumentation 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/ 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 runningforkd-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.
| Recipe | Driver / Framework | Use case | Key forkd move |
|---|---|---|---|
langgraph-react/ | LangGraph ReAct agent | Branch a thinking agent mid-reasoning; fan out 3 grandchildren with different steering hints | BRANCH mid-thought, grandchildren inherit conversation history + tool results |
crewai-fanout/ | CrewAI | N CrewAI agents each on their own microVM from one parent | spawn_sandboxes(n=N) — one fork call, per-agent KVM isolation, ~24 ms/child |
autogen-branch/ | AutoGen | forkd-backed CodeExecutor + mid-conversation BRANCH | ForkdCommandLineCodeExecutor + branch_sandbox(diff=True) fans out grandchildren |
openai-swarm/ | OpenAI Swarm / Agents SDK | Handoff = BRANCH: agent B inherits agent A’s full VM state | do_handoff() BRANCHes on handoff; child inherits filesystem writes + loaded packages |
mcp-agent/ | Claude Desktop / Cursor / Cline via MCP | End-to-end MCP protocol verification for forkd-mcp | spawn_sandboxes → exec_command → branch_sandbox(diff=true) → spawn_sandboxes over JSON-RPC |
coding-agent/ | Custom agent harness | SWE-bench-style parallel repo checkouts + pytest runs | Fork per task; full git + Python dev toolchain pre-installed |
coding-agent-fork/ | Custom agent harness | Distributing large binary state (50 MiB) across 4 agents | BRANCH propagates byte-identical blobs that can’t fit in a prompt |
postgres-fixture/ | pytest / any test runner | Fork-per-test isolated Postgres databases in ~10 ms | initdb 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. Runbuild.sh once; then forkd snapshot + forkd fork fan out children instantly.
| Recipe | Parent image | Rootfs size | When to pick |
|---|---|---|---|
python-numpy/ | python:3.12-slim + numpy | ~1.5 GB | Reproduce the benchmark; lightest Python + numpy |
e2b-codeinterpreter/ | e2bdev/code-interpreter | ~600 MB | AI code-interpreter agents (E2B SDK-compatible) |
jupyter-kernel/ | quay.io/jupyter/scipy-notebook | ~3 GB | Notebook / SciPy stack pre-imported; ~1 ms per fresh kernel |
coding-agent/ | python:3.12 + git + ruff + black + pytest | ~1.8 GB | SWE-bench / coding agents with git + dev tools |
nodejs/ | node:22-slim | ~250 MB | JavaScript / TypeScript workloads, Playwright fan-out |
playwright-browser/ | mcr.microsoft.com/playwright | ~2.5 GB | Browser-driving agents — fork warmed Chromium at ~10 ms |
agent-workbench/ | agent-infra/sandbox | ~5 GB | Kitchen sink: browser + VSCode + Jupyter + MCP |
postgres-fixture/ | postgres:16 (initdb done, postmaster running) | ~500 MB | Fork-per-test isolated databases; ready-to-query in ~10 ms |
How to use a recipe
Every rootfs recipe follows the same three-step pattern:Build the parent rootfs
parent.ext4 file alongside build.sh.Snapshot the warmed parent
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.