What is Microsandbox?
Microsandbox is an open-source, high-performance virtualization runtime and developer SDK created by Super Rad Company (backed by Y Combinator F26) and licensed under Apache 2.0. Engineered specifically to tackle the security risks of untrusted AI-generated code, dynamic code execution, scrapers, and automated agents, Microsandbox delivers genuine hardware-level microVM isolation with a dedicated Linux kernel per sandbox. Unlike traditional heavyweight virtual machines that require minutes to boot, or standard Docker containers that share the host kernel, Microsandbox launches independent microVMs in under 100 milliseconds with zero setup daemons, zero background servers, and no root privileges required.
Key Features & Architectural Highlights
- Hardware-Grade Isolation: Every sandbox runs inside its own isolated microVM powered by native hypervisor backends (KVM on Linux, Apple Silicon Hypervisor Framework on macOS, and WHP on Windows), preventing container escapes and kernel privilege escalation.
- Sub-100ms Instant Startup: Optimized minimal kernels and fast boot paths allow microVMs to start in tens of milliseconds, matching the responsiveness of containerized processes while preserving complete VM security boundaries.
- Universal OCI & Docker Compatibility: Directly pulls and executes standard container images from Docker Hub, GitHub Container Registry (GHCR), or private registries without rewriting Dockerfiles or runtime specifications.
- Live State Branching & Snapshots: Fork active running sandboxes instantaneously (
msb branch) or serialize complete execution state to disk (msb snap create) and restore in milliseconds (msb snap restore) for multi-path agent reasoning and time-travel debugging. - Leak-Proof Secret Isolation: API keys and sensitive credentials never enter the guest microVM filesystem or environment variables. Placeholder tokens are injected and substituted at the host network egress boundary, rendering credential scraping impossible.
- Embeddable Multi-Language SDKs: First-class SDK bindings for TypeScript/Node.js, Python, Rust, and Go enable developers to spawn, manage, and tear down microVMs directly within application code as lightweight objects.
- Agent-Ready via MCP Server: Includes dedicated Model Context Protocol support (
microsandbox-mcp) and Agent Skills, empowering AI coding assistants (Claude Code, Cursor, Windsurf) to spin up isolated execution sandboxes autonomously.
Comparison: Microsandbox vs. Docker vs. Traditional VMs
| Feature / Metric | Microsandbox | Standard Docker Containers | Full Virtual Machines (QEMU/VMware) |
|---|---|---|---|
| Isolation Boundary | Hardware-level (Dedicated guest kernel) | OS-level (Shared host kernel & cgroups) | Hardware-level (Emulated hardware stack) |
| Cold Boot Latency | < 100 ms | 500 ms – 2 s | 15 s – 60+ s |
| Daemon Requirement | None (Self-contained CLI & SDK) | Requires dockerd daemon |
Requires hypervisor hyper-daemon |
| Root / Privileged Access | Unprivileged user execution | Root daemon / rootless mode complexity | Requires hypervisor installation |
| Live Branching & Snapshots | Instant memory & disk forks | Layer commits only (no running RAM state) | Slow snapshotting (multi-gigabyte images) |
| Agent Secret Protection | Zero-leakage placeholder substitution | Environment variables exposed to guest | Stored inside guest OS memory |
| Native MCP Server | Yes (microsandbox-mcp) |
Third-party wrappers required | Manual scripting required |
CLI Quickstart & Commands
Install the standalone CLI tool with a single command:
# macOS & Linux
curl -fsSL https://install.microsandbox.dev | sh
# Windows (PowerShell)
irm https://install.microsandbox.dev/windows | iex
Run untrusted commands, execute scripts, and manage snapshots:
# Run an immediate one-liner inside an isolated Python microVM
msb run python -- python3 -c "print('Hello from a hardware-isolated microVM!')"
# Create a named long-running sandbox
msb create --name devbox ubuntu
# Execute commands within the sandbox
msb exec devbox -- apt update && apt install -y curl
# Fork the live sandbox into an independent branch
msb branch devbox --name experiment-vm
msb exec experiment-vm -- python3 -c "print('Running on an isolated branch!')"
# Save running sandbox state to a portable snapshot file
msb snap create --sandbox devbox --full -o backup.msb
# Restore the snapshot instantly
msb snap restore backup.msb --name restored-box
Programmatic SDK Integration
Instantiate isolated microVMs directly inside your AI backend using the Python or TypeScript SDKs:
# Python SDK (uv add microsandbox)
from microsandbox import Sandbox
# Spawn an isolated microVM with sub-100ms startup
with Sandbox.create(image="python:3.11-slim") as sb:
result = sb.exec("python3", "-c", "import sys; print(sys.version)")
print("Output:", result.stdout)
// TypeScript / Node.js SDK (npm i microsandbox)
import { Sandbox } from "microsandbox";
async function runUntrustedCode(code: string) {
const sb = await Sandbox.create({ image: "node:20-alpine" });
try {
const res = await sb.exec(["node", "-e", code]);
return res.stdout;
} finally {
await sb.destroy();
}
}
Technical Specifications
| Developer & Organization | Super Rad Company (YC F26) |
|---|---|
| License | Open Source (Apache License 2.0) |
| Hypervisor Backends | KVM (Linux), Apple Silicon Hypervisor (macOS), WHP (Windows) |
| Cold Boot Speed | < 100 milliseconds |
| Supported Registries | Docker Hub, GitHub Packages (GHCR), Custom OCI Registries |
| Client SDKs | TypeScript / Node.js, Python, Rust, Go |
| AI Protocols | Model Context Protocol (MCP), Agent Skills |
| Official Repository | github.com/superradcompany/microsandbox |
| Official Website | https://microsandbox.dev |
| Documentation | https://docs.microsandbox.dev |
Frequently Asked Questions
How does Microsandbox differ from traditional Docker containers?
Docker containers share the host operating system kernel using cgroups and namespaces, leaving the host vulnerable to kernel-level zero-day exploits. Microsandbox boots an independent, tiny Linux kernel for every sandbox using native hardware virtualization, establishing an impenetrable security boundary without sacrificing container-like boot speeds.
Can AI agents like Claude Code or Cursor control Microsandbox?
Yes. Microsandbox features an official Model Context Protocol (MCP) server (microsandbox-mcp) and Agent Skills integration. Autonomous agents can create microVMs, run build tools, test generated code, and terminate environments safely without host intervention.
Does Microsandbox require a background daemon or root privileges?
No. Microsandbox operates as a self-contained runtime. There is no long-running background daemon, no socket server, and no requirement for root or sudo privileges during execution.
How does Microsandbox protect API keys and sensitive credentials?
Microsandbox prevents secret leakage by keeping sensitive tokens outside the guest microVM. Injected placeholder secrets are dynamically swapped during outbound HTTP/TLS handshakes through host-managed network policies, ensuring malicious scripts or curious LLMs cannot extract secrets from memory or disk.