Microsandbox AI Agent
š§± easy, fast, programmable and local-first microVM runtime and library
Microsandbox is an open-source ai agent by superradcompany, written mainly in Rust, with 8,892 GitHub stars and the Apache-2.0 license. Its code was last updated Nov 1, 2026.
Microsandbox runs untrusted workloads inside fast, local microVMs: AI agents, user code, plugins, CI jobs, dev environments, scrapers, and automation.
- <img height="14" src="https://octicons-col.vercel.app/shield-lock/A770EF"> Hardware Isolation: Hardware-level isolation with tiny virtual machines.
- <img height="14" src="https://octicons-col.vercel.app/repo-forked/A770EF"> Fork & Snapshot: Fork live sandboxes1. Save running sandbox state and restore later.
- <img height="14" src="https://octicons-col.vercel.app/globe/A770EF"> Cross Platform: Runs on Linux, macOS, and Windows.
- <img height="14" src="https://octicons-col.vercel.app/package/A770EF"> OCI Compatible: Runs standard container images from Docker Hub, GHCR, or any OCI registry.
- <img height="14" src="https://octicons-col.vercel.app/container/A770EF"> Docker-Like Workflows: Familiar image, command, shell, and volume workflows.
- <img height="14" src="https://octicons-col.vercel.app/zap/A770EF"> Instant Startup: Average boot times2 under 100 milliseconds.
- <img height="14" src="https://octicons-col.vercel.app/plug/A770EF"> Embeddable: Spawn VMs right within your code. No setup server. No long-running daemon.
- <img height="14" src="https://octicons-col.vercel.app/lock/A770EF"> Secrets That Can't Leak: Unexploitable secret keys that never enter the VM.
- <img height="14" src="https://octicons-col.vercel.app/database/A770EF"> Long-Running: Sandboxes can run in detached mode. Great for long-lived sessions.
- <img height="14" src="https://octicons-col.vercel.app/terminal/A770EF"> Agent-Ready: Your agents can create their own sandboxes with our Agent Skills and MCP server.
<a href="./#gh-dark-mode-only" target="_blank"><img height="13" src="https://octicons-col.vercel.app/rocket/ffffff" alt="rocket-dark"></a><a href="./#gh-light-mode-only" target="_blank"><img height="13" src="https://octicons-col.vercel.app/rocket/000000" alt="rocket"></a>Ā Ā Getting Started
<img height="14" src="https://octicons-col.vercel.app/download/A770EF">Ā Ā Install the CLI
curl -fsSL https://install.microsandbox.dev | sh # š macOS / š§ Linux<details> <summary><em> We also support other package managers ā</em></summary>irm https://install.microsandbox.dev/windows | iex # šŖ Windowsbrew install superradcompany/tap/microsandboxnpm i -g microsandboxuv tool install microsandbox</details>cargo install microsandboxStart creating sandboxes once installed:
msb run ubuntu
<img height="14" src="https://octicons-col.vercel.app/move-to-bottom/A770EF">Ā Ā Install the SDK
npm i microsandbox # š¦ TypeScriptcargo add microsandbox # š¦ Rustuv add microsandbox # š Pythongo get github.com/superradcompany/microsandbox/sdk/go # š¹ Go
<br />Requirements:
- <img height="14" src="https://api.iconify.design/simple-icons/apple.svg?color=%23A770EF" alt="macOS"> macOS: Apple Silicon.
- <img height="14" src="https://api.iconify.design/simple-icons/linux.svg?color=%23A770EF" alt="Linux"> Linux: KVM enabled.
- <img height="14" src="https://api.iconify.design/simple-icons/windows.svg?color=%23A770EF" alt="Windows"> Windows: WHP enabled.
Warning: Microsandbox is still beta software. Expect breaking changes, missing features, and rough edges.
<a href="./#gh-dark-mode-only" target="_blank"><img height="18" src="https://octicons-col.vercel.app/terminal/ffffff" alt="cli-dark"></a><a href="./#gh-light-mode-only" target="_blank"><img height="18" src="https://octicons-col.vercel.app/terminal/000000" alt="cli"></a>Ā Ā CLI
The msb CLI provides a complete interface for managing sandboxes, snapshots, images, and volumes.
<img height="14" src="https://octicons-col.vercel.app/play/A770EF">Ā Ā Run a Command
msb run python -- python3 -c "print('Hello from a microVM!')"
<img height="14" src="https://octicons-col.vercel.app/stopwatch/A770EF">Ā Ā Named Sandboxes
# Create and start a named sandbox msb create --name app python# Execute commands msb exec app -- python -c "import this" msb exec app -- curl https://example.com# Fork a running sandbox. msb fork app --name app2 msb exec app2 -- python -c "print('An independent copy!')"# Snapshot now, resume later. msb snap create --sandbox app --full -o snapshot.msb msb snap restore snapshot.msb --name app3Forking duplicates live execution. Restoring starts from saved state; add
--cow-memto share unchanged memory from a full snapshot. Snapshot generations describe progression, while branches describe distinct paths through snapshot history. The old--forkedrestore flag remains a deprecated alias. See forking and snapshots.# Lifecycle msb stop app msb start app msb rm app
<img height="14" src="https://octicons-col.vercel.app/cache/A770EF">Ā Ā Image Management
msb pull python # Pull an image msb image ls # List cached images msb image rm python # Remove an image
<img height="14" src="https://octicons-col.vercel.app/file-code/A770EF">Ā Ā Configuration File
msb run --conf sandbox.yaml -- octocat# sandbox.yaml image: python:3.12 memory: 64M network: allow: - api.github.com scripts: octocat: | python - <<'PY' import urllib.request request = urllib.request.Request( "https://api.github.com/octocat", headers={"User-Agent": "microsandbox-example"}, ) with urllib.request.urlopen(request) as response: print(response.read().decode()) PY
<img height="14" src="https://octicons-col.vercel.app/list-unordered/A770EF">Ā Ā Status & Inspection
msb ls # List all sandboxes msb ps app # Show sandbox status msb inspect app # Detailed sandbox info msb metrics app # Live CPU/memory/network stats
<br />[!TIP]
Run:<br /> Ā·
msb --helpfor quick help menu. <br /> Ā·msb --treefor complete command hierarchy and descriptions. <br /> Ā·msb <command> --treefor a specific command tree.
<a href="https://docs.microsandbox.dev/cli/overview"><img src="https://img.shields.io/badge/CLI_Docs-%E2%86%92-A770EF?style=flat-square&labelColor=2b2b2b" alt="CLI Docs"></a>
<br /><a href="./#gh-dark-mode-only" target="_blank"><img height="18" src="https://octicons-col.vercel.app/package-dependencies/ffffff" alt="sdk-dark"></a><a href="./#gh-light-mode-only" target="_blank"><img height="18" src="https://octicons-col.vercel.app/package-dependencies/000000" alt="sdk"></a>Ā Ā SDK
The SDK lets you create and control sandboxes directly from your application. Sandbox.builder("...").create() boots a microVM as a child process. No infrastructure required.
<img height="14" src="https://octicons-col.vercel.app/play/A770EF">Ā Ā Run Code in a Sandbox
<details> <summary><b> Rust Example ā</b></summary>import { Sandbox } from "microsandbox"; await using sandbox = await Sandbox.builder("my-sandbox") .image("python") .cpus(1) .memory(512) .create(); const output = await sandbox.exec("python", [ "-c", "print('Hello from a microVM!')", ]); console.log(output.stdout());</details> <details> <summary><b> Python Example ā</b></summary>use microsandbox::Sandbox; #[tokio::main] async fn main() -> Result<(), Box<dyn std::error::Error>> { let sandbox = Sandbox::builder("my-sandbox") .image("python") .cpus(1) .memory(512) .create() .await?; let output = sandbox .exec("python", ["-c", "print('Hello from a microVM!')"]) .await?; println!("{}", output.stdout()?); sandbox.stop().await?; Ok(()) }</details> <details> <summary><b> Ruby Example ā</b></summary>import asyncio from microsandbox import Sandbox async def main(): sandbox = await Sandbox.create( "my-sandbox", image="python", cpus=1, memory=512, ) output = await sandbox.exec("python", ["-c", "print('Hello from a microVM!')"]) print(output.stdout_text) await sandbox.stop() asyncio.run(main())require "microsandbox" sandbox = Microsandbox::Sandbox.create( "my-sandbox", image: "python", cpus: 1, memory: 512, network: { allowed_hosts: ["api.openai.com"], allowed_ports: [443] }, secrets: [{ env: "OPENAI_API_KEY", value: ENV.fetch("OPENAI_API_KEY"), allowed_host: "api.openai.com" }] ) output = sandbox.exec("python", ["-c", "print('Hello from a microVM!')"]) puts output.stdout sandbox.stopSee the Ruby SDK guide for installation, lifecycle, networking, and backend details.
</details> <details> <summary><b> Go Example ā</b></summary></details>package main import ( "context" "fmt" "log" microsandbox "github.com/superradcompany/microsandbox/sdk/go" ) func main() { ctx := context.Background() // Downloads the microsandbox runtime to ~/.microsandbox/ on first run. if _, err := microsandbox.EnsureRuntime(ctx, microsandbox.RuntimeConfig{}, microsandbox.InstallOptions{}); err != nil { log.Fatal(err) } sandbox, err := microsandbox.CreateSandbox(ctx, "my-sandbox", microsandbox.WithImage("python"), microsandbox.WithCPUs(1), microsandbox.WithMemory(512), ) if err != nil { log.Fatal(err) } defer sandbox.Stop(ctx) output, err := sandbox.Exec(ctx, "python", []string{"-c", "print('Hello from a microVM!')"}) if err != nil { log.Fatal(err) } fmt.Println(output.Stdout()) }
<br />The first call to
create()pulls the image if it isn't cached locally, so it may take longer depending on your connection. Subsequent runs reuse the cache.
<a href="https://docs.microsandbox.dev/sdk/overview"><img src="https://img.shields.io/badge/SDK_Docs-%E2%86%92-A770EF?style=flat-square&labelColor=2b2b2b" alt="SDK Docs"></a>
<br /><a href="./#gh-dark-mode-only" target="_blank"><img height="18" src="https://octicons-col.vercel.app/beaker/ffffff" alt="beaker-dark"></a><a href="./#gh-light-mode-only" target="_blank"><img height="18" src="https://octicons-col.vercel.app/beaker/000000" alt="beaker"></a>Ā Ā Guides
Practical ways to put microsandbox to work:
<br />⢠<img height="14" src="https://octicons-col.vercel.app/container/A770EF"> Docker in a Sandbox: Run Docker without touching the host daemon.<br /> ⢠<img height="14" src="https://octicons-col.vercel.app/code/A770EF"> OpenCode: Give a coding agent an isolated project workspace.<br /> ⢠<img height="14" src="https://octicons-col.vercel.app/globe/A770EF"> Browser Use: Run an AI browser agent inside a microVM.<br /> ⢠<img height="14" src="https://octicons-col.vercel.app/globe/A770EF"> Playwright: Run headless browser jobs inside a microVM.<br /> ⢠<img height="14" src="https://octicons-col.vercel.app/cache/A770EF"> Warm Workers: Snapshot a toolchain and launch clean workers.<br /> ⢠<img height="14" src="https://octicons-col.vercel.app/database/A770EF"> Migration Rehearsal: Test a database migration, then restore the baseline.<br /> ⢠<img height="14" src="https://octicons-col.vercel.app/workflow/A770EF"> GitHub Actions Runner: Run each self-hosted job in a disposable microVM.<br /> ⢠<img height="14" src="https://octicons-col.vercel.app/file/A770EF"> Documents to PDF: Convert untrusted documents in a fresh offline worker.
<a href="https://docs.microsandbox.dev/how-to/overview"><img src="https://img.shields.io/badge/Browse_Guides-%E2%86%92-A770EF?style=flat-square&labelColor=2b2b2b" alt="Browse Guides"></a>
<br /><a href="./#gh-dark-mode-only" target="_blank"><img height="18" src="https://octicons-col.vercel.app/people/ffffff" alt="people-dark"></a><a href="./#gh-light-mode-only" target="_blank"><img height="18" src="https://octicons-col.vercel.app/people/000000" alt="people"></a>Ā Ā Community Showcase
<img height="14" src="https://octicons-col.vercel.app/hubot/A770EF">Ā Ā Agent frameworks & runtimes
⢠<img height="14" src="https://octicons-col.vercel.app/organization/A770EF"> Agentic Coding Quickstart by U.S. GSA: From zero to a running AI coding agent with USAi in minutes.<br /> ⢠<img height="14" src="https://octicons-col.vercel.app/package/A770EF"> Condukt and Once by Tuist: Elixir agentic engine, and cacheable actions that run in fresh sandboxes.<br /> ⢠<img height="14" src="https://octicons-col.vercel.app/link/A770EF"> langchain-microsandbox by kenwoodjw: Microsandbox integration for LangChain Deep Agents.<br /> ⢠<img height="14" src="https://octicons-col.vercel.app/history/A770EF"> Smithers by Smithers: Agent workflows with full observability, rewind, fork, and replay.<br /> ⢠<img height="14" src="https://octicons-col.vercel.app/organization/A770EF"> AgentConnect: Bring multiple AI agents into your team's chats, issues, and pull requests.<br /> ⢠<img height="14" src="https://octicons-col.vercel.app/terminal/A770EF"> wrap by Tobi Lütke: Run coding agents and project commands in isolated Arch Linux microVMs.<br /> ⢠<img height="14" src="https://octicons-col.vercel.app/shield-lock/A770EF"> Agent VM by Wiren Board: Run AI agents in safe VMs scoped to a local folder.
<img height="14" src="https://octicons-col.vercel.app/cpu/A770EF">Ā Ā Tools & infrastructure
⢠<img height="14" src="https://octicons-col.vercel.app/browser/A770EF"> h5i by h5i: Secure, auditable browser for AI agents, written in pure Rust.<br /> ⢠<img height="14" src="https://octicons-col.vercel.app/cloud/A770EF"> Devsy by Devsy: Deploy devcontainers onto any cloud, Kubernetes cluster, or Docker host.<br /> ⢠<img height="14" src="https://octicons-col.vercel.app/briefcase/A770EF"> OpenWork by Different AI: Open-source Claude Cowork alternative with a microsandbox image.
<img height="14" src="https://octicons-col.vercel.app/list-unordered/A770EF">Ā Ā Guides & showcases
<br />⢠<img height="14" src="https://octicons-col.vercel.app/list-unordered/A770EF"> Awesome Microsandbox by ya-luotao: Curated list of SDKs, integrations, tools, and resources.<br /> ⢠<img height="14" src="https://octicons-col.vercel.app/device-desktop/A770EF"> msb-omarchy by ya-luotao: Omarchy desktop with graphics inside a microVM on Apple Silicon.
<a href="https://discord.gg/T95Y3XnEAK"><img src="https://img.shields.io/badge/Share_a_Project-%E2%86%92-A770EF?style=flat-square&labelColor=2b2b2b" alt="Share a Project"></a>
<br /><a href="./#gh-dark-mode-only" target="_blank"><img height="18" src="https://octicons-col.vercel.app/dependabot/ffffff" alt="agents-dark"></a><a href="./#gh-light-mode-only" target="_blank"><img height="18" src="https://octicons-col.vercel.app/dependabot/000000" alt="agents"></a>Ā Ā AI Agents
<img height="14" src="https://octicons-col.vercel.app/book/A770EF">Ā Ā Agent Skills
Teach any AI coding agent how to use microsandbox by installing the Agent Skills. Works with Claude Code, Cursor, Codex, Gemini CLI, GitHub Copilot, and more.
npx skills add superradcompany/skills
<img height="14" src="https://octicons-col.vercel.app/plug/A770EF">Ā Ā MCP Server
<br />Connect any MCP-compatible agent to microsandbox with the MCP server. Provides structured tool calls for sandbox lifecycle, command execution, filesystem access, volumes, and monitoring.
# Claude Code claude mcp add --transport stdio microsandbox -- npx -y microsandbox-mcp
<a href="./#gh-dark-mode-only" target="_blank"><img height="18" src="https://octicons-col.vercel.app/book/ffffff" alt="docs-dark"></a><a href="./#gh-light-mode-only" target="_blank"><img height="18" src="https://octicons-col.vercel.app/book/000000" alt="docs"></a>Ā Ā Documentation
For guides, API references, and examples, visit the microsandbox documentation.
<br /><a href="./#gh-dark-mode-only" target="_blank"><img height="18" src="https://octicons-col.vercel.app/gear/ffffff" alt="contributing-dark"></a><a href="./#gh-light-mode-only" target="_blank"><img height="18" src="https://octicons-col.vercel.app/gear/000000" alt="contributing"></a>Ā Ā Contributing
Interested in contributing to microsandbox? Check out our CONTRIBUTING.md for guidelines and DEVELOPMENT.md for build, test, and release instructions.
<a href="./#gh-dark-mode-only" target="_blank"><img height="18" src="https://octicons-col.vercel.app/law/ffffff" alt="license-dark"></a><a href="./#gh-light-mode-only" target="_blank"><img height="18" src="https://octicons-col.vercel.app/law/000000" alt="license"></a>Ā Ā License
This project is licensed under the Apache License 2.0.
<br /><a href="./#gh-dark-mode-only" target="_blank"><img height="18" src="https://octicons-col.vercel.app/heart/ffffff" alt="acknowledgements-dark"></a><a href="./#gh-light-mode-only" target="_blank"><img height="18" src="https://octicons-col.vercel.app/heart/000000" alt="acknowledgements"></a>Ā Ā Acknowledgements
Special thanks to all our contributors, testers, and community members who help make microsandbox better every day! We'd like to thank the following projects and communities that made microsandbox possible: libkrun and smoltcp
Footnotes
-
We have cool demos showcasing vm pause/resume, snapshotting, and forking: Mario Never Dies and Multiverse of Madness ā©
-
Boot time refers to guest boot on an M1 machine. ā©
Microsandbox alternatives
View more āSimilar ai agents in Developer Tools, ranked by GitHub stars. Compare licence, recent activity and scan status before you choose.
| Name | Stars | Licence | Last updated | Scan |
|---|---|---|---|---|
| Microsandbox (this page) superradcompany | 8.9k | Apache-2.0 | Nov 1, 2026 | Scanned, no flagged issues |
| Deepseek Harness deepseek-ai | 268k | MIT | Oct 30, 2026 | Scanned, no flagged issues |
| Ponytail DietrichGebert | 182k | MIT | Oct 29, 2026 | Scanned, no flagged issues |
| Orca stablyai | 112k | MIT | Nov 1, 2026 | Scanned, no flagged issues |
| Deer Flow bytedance | 85k | MIT | Nov 1, 2026 | Scanned, no flagged issues |
| Ruflo ruvnet | 80k | MIT | Nov 1, 2026 | Scanned, no flagged issues |