Microsandbox

Security & Safety 💻 Rust ⚖️ Apache-2.0 🟢 Actively maintained
8.1k stars

Microsandbox is a tool that runs untrusted workloads inside fast, local microVMs with hardware-level isolation. It solves the problem of safely executing AI agents, user code, plugins, CI jobs, and other untrusted code by providing a lightweight, embeddable sandbox. It is for developers who need secure, isolated execution environments with Docker-like workflows.

✨ Key features

  • Hardware-level isolation with microVM technology
  • Cross-platform: Linux, macOS, Windows
  • Runs standard OCI container images
  • Docker-like workflows: image, command, shell, volume
  • Average boot times under 100 milliseconds
  • Embeddable SDK for TypeScript, Rust, Python, Go, Ruby

🎯 Use cases

  • Run AI agents in isolated microVMs
  • Execute untrusted user code or plugins
  • Run CI jobs in disposable sandboxes
  • Create isolated dev environments
  • Run scrapers or automation tasks

📦 Installation

🧰 Requirements: macOS (Apple Silicon), Linux (KVM enabled), or Windows (WHP enabled). No API keys required.

Install the SDK

npm i microsandbox                                       # 🟦 TypeScript
cargo add microsandbox                                   # 🦀 Rust
uv add microsandbox                                      # 🐍 Python
go get github.com/superradcompany/microsandbox/sdk/go    # 🐹 Go

Install the CLI

Boot a microVM in a single command:

npx microsandbox run debian

Or install the msb command globally:

curl -fsSL https://install.microsandbox.dev | sh        # 🍎 macOS / 🐧 Linux
irm https://install.microsandbox.dev/windows | iex      # 🪟 Windows

Other package managers:

brew install superradcompany/tap/microsandbox
npm i -g microsandbox
uv tool install microsandbox
cargo install microsandbox

🚀 Usage

Run Code in a Sandbox (TypeScript)

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());

CLI Example

msb run python -- python3 -c "print('Hello from a microVM!')"

⚠️ Good to know

Microsandbox is still beta software; expect breaking changes, missing features, and rough edges.

❓ FAQ

What are the system requirements?

macOS requires Apple Silicon, Linux requires KVM enabled, and Windows requires WHP enabled.

Can I run standard container images?

Yes, Microsandbox is OCI compatible and runs images from Docker Hub, GHCR, or any OCI registry.

How fast does a sandbox boot?

Average boot times are under 100 milliseconds on an M1 machine.

Is there a way to run sandboxes in the background?

Yes, sandboxes can run in detached mode for long-lived sessions.

📊 Repository

Stars★ 8,090
Forks🍴 426
Open issues🐛 89
Last commit🕒 Sep 4, 2026
Created📅 Oct 2024
Language💻 Rust
License⚖️ Apache-2.0

🤖 Overview, features, install steps and FAQ were generated from the project's README on Sep 4, 2026. Always check the original source before running commands.