whatisgithub

What is forkd?

deeplethe/forkd — explained in plain English

Analysis updated 2026-05-18

282RustAudience · developerComplexity · 4/5LicenseSetup · hard

In one sentence

forkd spins up hundreds of fully isolated virtual machine sandboxes almost instantly by cloning a pre-warmed parent instead of booting each one fresh.

Mindmap

mindmap
  root((forkd))
    What it does
      Forks VMs from warm parent
      Sub-second sandbox spawn
      Copy on write memory
    Tech stack
      Rust
      Firecracker
      KVM
    Use cases
      AI agent code execution
      Evaluation rollouts
      Multi tenant sandboxes
    Audience
      Infra engineers
      AI platform builders
    Setup
      Needs Linux plus KVM
      REST API and CLI
      Apache 2.0 license

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

What do people build with it?

USE CASE 1

Run hundreds of short-lived, isolated code execution sandboxes for an AI agent that writes and tests code.

USE CASE 2

Spin up many parallel evaluation environments for testing AI model outputs without slow cold-boot delays.

USE CASE 3

Host multi-tenant sandboxes that need real hardware isolation instead of shared-kernel containers.

USE CASE 4

Serve fast, disposable Python or JVM environments that already have dependencies and models pre-loaded.

What is it built with?

RustFirecrackerKVMPythonREST APIPrometheussystemd

How does it compare?

deeplethe/forkddavidpdrsn/axum-live-viewevokoa/pggraph
Stars282214210
LanguageRustRustRust
Last pushed2024-03-27
MaintenanceDormant
Setup difficultyhardmoderatemoderate
Complexity4/53/54/5
Audiencedeveloperdeveloperdeveloper

Figures from each repo's GitHub metadata at analysis time.

How do you get it running?

Difficulty · hard Time to first run · 1h+

Requires a Linux host with KVM and Firecracker support, not something that runs on a laptop out of the box.

Use freely for any purpose, including commercial use, as long as you keep the copyright notice, under the Apache 2.0 license.

So what is it?

forkd is a sandbox runtime built for spinning up many isolated virtual machines very quickly. Its main trick is forking new machines from a single warmed up parent instead of booting each one from scratch. The parent VM starts once, loads whatever software you need such as Python with your libraries or a machine learning model, and is then paused and saved to disk as a snapshot. Every new sandbox, called a child, reads from that saved snapshot using a memory sharing technique so it only needs to store the small parts of memory that differ from the parent. According to the README, this lets forkd create 100 sandboxes in about 101 milliseconds, which the project's own benchmarks show is dramatically faster than several other sandboxing tools tested on the same machine. Each child runs as its own Firecracker microVM, a lightweight virtual machine technology, so it gets real hardware level isolation rather than the weaker isolation offered by typical containers. Because each child is a genuine Linux virtual machine, it supports multiple CPU cores, full network access, and the ability to install software, unlike some faster sandbox tools that only support a single core and limited input and output. Children also get their own network namespace and memory limits so many can run side by side safely. The project describes itself as aimed at AI agent workloads, meaning situations where an AI system needs to run many short lived tasks such as executing code, testing tools, or running evaluations. Since the parent already has libraries loaded, each child skips the repeated cost of importing those libraries from scratch. forkd runs as a background service with a REST API, monitoring support through Prometheus, and an audit log of activity, so it is meant to be operated as real infrastructure rather than a one off script. It is open source and released under the Apache 2.0 license, meaning it can be used freely, including commercially, without needing a special vendor account. It is written in Rust and also has a PyPI package for Python users. The README notes that forkd is built on top of the Firecracker microVM technology originally created for running many isolated virtual machines efficiently.

Copy-paste prompts

Prompt 1
Explain how forkd's copy-on-write snapshot forking works compared to a normal cold-booted virtual machine.
Prompt 2
Show me how to set up a forkd parent VM with Python and numpy pre-installed, then fork 10 child sandboxes.
Prompt 3
Help me write a REST client that spawns a batch of forkd sandboxes for running untrusted AI-generated code.
Prompt 4
What hardware and OS requirements do I need on Linux to run forkd with KVM and Firecracker?

Frequently asked questions

What is forkd?

forkd spins up hundreds of fully isolated virtual machine sandboxes almost instantly by cloning a pre-warmed parent instead of booting each one fresh.

What language is forkd written in?

Mainly Rust. The stack also includes Rust, Firecracker, KVM.

What license does forkd use?

Use freely for any purpose, including commercial use, as long as you keep the copyright notice, under the Apache 2.0 license.

How hard is forkd to set up?

Setup difficulty is rated hard, with roughly 1h+ to a first successful run.

Who is forkd for?

Mainly developer.

Open on GitHub → Ask about another repo

This repo across BitVibe Labs

Verify against the repo before relying on details.