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.

forkd is a microVM sandbox runtime built for AI agent fan-out. Instead of cold-booting each sandbox, forkd boots a parent VM once, warms it up (imports, JIT compilation, model weights), and then forks children via copy-on-write — each child inherits the parent’s memory instantly, just like fork(2) but with full KVM isolation per child.

Quickstart

Zero to forking microVMs in one command — with forkd installed and running in minutes.

How It Works

Understand the copy-on-write snapshot model, BRANCH mechanics, and the controller daemon.

REST API

Full HTTP API reference for snapshots, sandboxes, branching, and metrics.

Python SDK

E2B-compatible Python SDK — spawn, branch, exec, and eval against live microVMs.

Why forkd?

When an AI agent fan-out spawns 100 sandboxes, the bottleneck isn’t compute — it’s the time each sandbox spends re-importing numpy, re-loading a model, or re-warming a JIT. forkd eliminates that cost entirely: the parent VM does it once, and every child inherits the result for free.

100 VMs in 101 ms

Fork 100 KVM-isolated microVMs from one warm snapshot in ~101 ms wall-clock — 10× faster than the next-fastest open-source alternative.

BRANCH in 56 ms

Pause a running agent mid-thought, snapshot its state, and resume in sub-50 ms using UFFD_WP live mode (v0.4).

Real Linux per child

Each child is a full Firecracker microVM: multi-vCPU, real networking, apt install, outbound HTTPS — not a restricted function sandbox.

Diff-snapshot chains

Stack pip-install layers as linked diff snapshots (v0.5) — share the base, pay only for deltas at spawn time.

Get started

1

Install forkd

Download the pre-built binary tarball — no Rust toolchain required.
curl -sSL https://github.com/deeplethe/forkd/releases/download/v0.5.2/forkd-v0.5.2-x86_64-linux.tar.gz \
  | sudo tar -xz -C /usr/local/bin/
2

Run quickstart

Preflight your host, bake a Python snapshot, and fork your first 10 microVMs.
sudo -E forkd quickstart
3

Fork at scale

Once a snapshot is ready, fork 100 children in one command.
sudo -E forkd fork --tag quickstart -n 100 --per-child-netns
4

Drive from Python or TypeScript

Use the SDK to spawn, branch, and execute code inside sandboxes from your agent framework.
from forkd import Controller
c = Controller()
children = c.spawn_sandboxes("pyagent", n=10, per_child_netns=True)

Explore the docs

Host Setup

Configure KVM, tap devices, and network namespaces on your Linux host.

Building Snapshots

Boot a parent VM, warm it up, and create a reusable snapshot tag.

Branching

BRANCH a live running sandbox mid-thought in sub-50 ms.

Snapshot Chains

Stack diff snapshots to share a base across multiple pip-installed layers.

Recipes

Drop-in patterns for LangGraph, CrewAI, AutoGen, OpenAI Swarm, and more.

Operations

Run the controller daemon, set up auth, scrape metrics, and manage audit logs.

Build docs developers (and LLMs) love