Sub-millisecond KVM virtual machine sandboxes for running AI agent code, created by forking a pre-warmed Firecracker snapshot with copy-on-write memory.
deeplethe/sandstorm
Fork-style microVM sandboxes for AI agents: children fork copy-on-write from a warmed Firecracker parent, KVM-isolated, with live BRANCH of running VMs.
Open-source alternative to:E2B
- Stars
- 5,125
- Forks
- 403
- Open issues
- 8
- Last commit
- 6 days ago
What is it?
forkd is a microVM sandbox runtime built on Firecracker for workloads where many short-lived AI agent sandboxes need the same warmed environment. A parent VM boots once, imports its runtime and dependencies, and is paused to a snapshot. Each child is a separate Firecracker process that maps the parent's memory image with MAP_PRIVATE, so children share resident memory copy-on-write and spawn in roughly 100 ms rather than cold-booting a kernel.
Each child keeps hardware isolation through KVM and gets its own network namespace and cgroup v2 memory limit. forkd also provides BRANCH, which pauses a running sandbox, snapshots its in-flight state, and resumes it, with a live mode that shortens the source pause window. Snapshots can be stacked into diff chains, packed into portable archives, and pulled from a hub.
The project exposes a daemon with a REST API, a CLI, Python and TypeScript SDKs, and an MCP server for clients such as Claude Desktop and Cursor. It requires an x86_64 Linux host with KVM.
Key features
- 01Creates child microVMs from a warmed parent snapshot via copy-on-write memory sharing.
- 02Runs each child in its own KVM-backed Firecracker process with a separate network namespace.
- 03Supports BRANCH to snapshot and resume a live sandbox, including a live mode with a shorter pause.
- 04Chains diff snapshots and packs or unpacks them as portable archives.
- 05Offers REST API, CLI, Python and TypeScript SDKs, and an MCP server.
- 06Exposes Prometheus metrics and an append-only JSON audit log.
Use cases
- Running code interpreter sessions where each request gets a fresh sandbox with preloaded libraries.
- Running hundreds of parallel repository checkouts or test rollouts for agent evaluation.
- Providing per-user code execution on a self-hosted Linux host with KVM isolation.
- Forking a running agent's sandbox state to try several alternative next steps.
Quick start
- 1
Install forkd following the README install section
- 2
Fork 3 sandboxes from a snapshot tag
forkd fork --tag py-pandas -n 1
Things to know
- Requires Linux with KVM; it is not a macOS or Windows runtime.
- Live BRANCH needs Linux 5.7+, a vendored Firecracker fork, and userfaultfd enabled.
- The project is at v0.x, so interfaces may change between releases.
In collections
Topics
FAQ
- What is sandstorm?
- Fork-style microVM sandboxes for AI agents: children fork copy-on-write from a warmed Firecracker parent, KVM-isolated, with live BRANCH of running VMs. forkd is a microVM sandbox runtime built on Firecracker for workloads where many short-lived AI agent sandboxes need the same warmed environment. A parent VM boots once, imports its runtime and dependencies, and is paused to a snapshot. Each child is a separate Firecracker process that maps the parent's memory image with MAP_PRIVATE, so children share resident memory copy-on-write and spawn in roughly 100 ms rather than cold-booting a kernel.
- Is sandstorm free to use? What license does it have?
- sandstorm is open source under the Apache-2.0 license. Check the license terms before using it in commercial products.
- Is sandstorm still maintained?
- Actively maintained. The last commit to sandstorm was on Nov 1, 2026.
- What can I use sandstorm for?
- Running code interpreter sessions where each request gets a fresh sandbox with preloaded libraries. Running hundreds of parallel repository checkouts or test rollouts for agent evaluation. Providing per-user code execution on a self-hosted Linux host with KVM isolation. Forking a running agent's sandbox state to try several alternative next steps.
- How do I install sandstorm?
- Install forkd following the README install section Fork 3 sandboxes from a snapshot tag: forkd fork --tag py-pandas -n 1
- Where can I get sandstorm?
- The source code and installation instructions are on GitHub: https://github.com/deeplethe/sandstorm
Summary generated by AI from the project's README. GitHub stats refresh daily.
Related projects
A sandbox platform that runs agent and user code in isolated Firecracker microVMs, controlled through an HTTP API.
Open-source sandbox service for AI agents that runs each workload in a hardware-isolated MicroVM, with E2B SDK compatibility and sub-60ms startup.
Self-hosted, E2B-API-compatible sandbox platform that runs each sandbox in a hardware-isolated KVM or HVF microVM.
Open-source container and VM runtime for macOS in Rust, offering a drop-in Docker engine, microVM sandboxes for AI agents, native Kubernetes and Linux VMs.
A Linux-based CLI that runs AI agents in ephemeral microVMs with network allowlisting and host-side secret injection.