zeroboot-vm-sandbox
zeroboot-vm-sandbox — an installable skill for AI agents.
By reason-machines · 1,271 installs
npx skills add reason-machines/trending-skills --skill zeroboot-vm-sandbox
Source repository · Upstream listing
Zeroboot VM Sandbox
Skill by [ara.so](https://ara.so) — Daily 2026 Skills collection.
Zeroboot provides sub millisecond KVM virtual machine sandboxes for AI agents using copy on write forking. Each sandbox is a real hardware isolated VM (via Firecracker + KVM), not a container. A template VM is snapshotted once, then forked in ~0.8ms per execution using mmap(MAP PRIVATE) CoW semantics.
How It Works
1. Template : Firecracker boots once, pre loads your runtime, snapshots memory + CPU state
2. Fork (~0.8ms) : New KVM VM maps snapshot memory as CoW, restores CPU state
3. Isolation : Each fork is a separate KVM VM with hardware enforced memory isolation
Installation
Python SDK
Node/TypeScript SDK
Authentication
Set your API key as an environment variable:
Never hardcode keys in source files.
Quick Start
REST API (cURL)
Python
TypeScript / Node.js
Common Patterns
AI Agent Code Execution Loop (Python)
Concurrent Sandbox Execution (Python)
TypeScript: Agent Tool Integration
REST API with fetch (TypeScript)
Health Check
API Reference
POST /v1/exec
Execute code in a fresh sandbox fork.
Request:
Headers:
Response:
Performance Characteristics
Metric Value
Spawn latency p50 ~0.79ms
Spawn latency p99 ~1.74ms
Memory per sandbox ~265KB
Fork + exec Python ~8ms
1000 concurrent forks ~815ms
Each sandbox is a real KVM VM — not a container or process jail
Memory isolation is hardware enforced (not software)
CoW means only pages written by your code consume extra RAM
Self Hosting / Deployment
See [docs/DEPLOYMENT.md](docs/DEPLOYMENT.md) in the repo. Requirements:
Linux host with KVM support ( /dev/kvm accessible)
Firecracker binary
Rust 2021 edition toolchain
Architecture Notes
Snapshot layer : Firecracker VM boots once per runtime template, memory + vCPU state saved to disk
Fork layer (Rust): mmap(MAP PRIVATE) on snapshot file → kernel handles CoW page faults per VM
Isolation : Each fork has its own KVM VM file descriptors, vCPU, and page table — fully hardware separated
No shared kernel : Unlike containers, each sandbox runs its own kernel instance
Troubleshooting
/dev/kvm not found (self hosted)
API returns 401 Unauthorized
Verify ZEROBOOT API KEY is set and starts with zb live
Check the key is not expired in your dashboard
Timeout on execution
Default execution timeout is enforced server side
Break large computations into smaller chunks
Avoid infinite loops or blocking I/O in sandbox code
High memory usage (self hosted)
Each VM fork starts at ~265KB CoW overhead
Pages are allocated on write — memory grows with sandbox activity
Tune concurrent fork limits based on available RAM
Resources
[API Reference](https://github.com/adammiribyan/zeroboot/blob/main/docs/API.md)
[Architecture Docs](https://github.com/adammiribyan/zeroboot/blob/main/docs/ARCHITECTURE.md)
[Deployment Guide](https://github.com/adammiribyan/zeroboot/blob/main/docs/DEPLOYMENT.md)
[Homepage](https://zeroboot.dev)
[GitHub](https://github.com/adammiribyan/zeroboot)