Baike.dev
All toolsOnline toolsAI codingTrendingOpen sourceNewsSubmit
Log in
< Back to tools
M

microsandbox

> DevOps
Open source

easy fast local-first microVM runtime and library

7.1K stars0 likes1 views
WebsiteGitHub

About

easy fast local-first microVM runtime and library





Microsandbox runs untrusted workloads inside fast, local microVMs: AI agents, user code, plugins, CI jobs, dev environments, scrapers, and automation.

  • Hardware Isolation: Hardware-level isolation with tiny virtual machines.
  • Branch & Snapshot: Fork live sandboxes. Save running sandbox state and restore later.
  • Cross Platform: Runs on Linux, macOS, and Windows.
  • OCI Compatible: Runs standard container images from Docker Hub, GHCR, or any OCI registry.
  • Docker-Like Workflows: Familiar image, command, shell, and volume workflows.
  • Instant Startup: Average boot times[^boot-time] under 100 milliseconds.
  • Embeddable: Spawn VMs right within your code. No setup server. No long-running daemon.
  • Secrets That Can't Leak: Unexploitable secret keys that never enter the VM.
  • Long-Running: Sandboxes can run in detached mode. Great for long-lived sessions.
  • Agent-Ready: Your agents can create their own sandboxes with our Agent Skills and MCP server.

  Getting Started

  Install the CLI

bash
curl -fsSL https://install.microsandbox.dev | sh        #  macOS /  Linux
powershell
irm https://install.microsandbox.dev/windows | iex      #  Windows
 We also support other package managers →

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

Start creating sandboxes once installed:

bash
msb run ubuntu

  Install the SDK

bash
npm i microsandbox                                       #  TypeScript
bash
cargo add microsandbox                                   #  Rust
bash
uv add microsandbox                                      #  Python
bash
go get github.com/superradcompany/microsandbox/sdk/go    #  Go

Requirements:

  • macOS: Apple Silicon.
  • Linux: KVM enabled.
  • Windows: WHP enabled.

Warning: Microsandbox is still beta software. Expect breaking changes, missing features, and rough edges.


  CLI

The msb CLI provides a complete interface for managing sandboxes, snapshots, images, and volumes.

  Run a Command

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

  Named Sandboxes

bash
# Create and start a named sandbox
msb create --name app python
bash
# Execute commands
msb exec app -- python -c "import this"
msb exec app -- curl https://example.com
bash
# Fork a running sandbox.
msb branch app --name experiment
msb exec experiment -- python -c "print('An independent copy!')"
bash
# Save now, resume later
msb snapshot create --from-sandbox app --full -o saved.msb
msb restore saved.msb --name restored
bash
# Lifecycle
msb stop app
msb start app
msb rm app

  Image Management

bash
msb pull python           # Pull an image
msb image ls              # List cached images
msb image rm python       # Remove an image

  Configuration File

bash
msb run --conf sandbox.yaml -- octocat
yaml
# 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

  Install & Uninstall Sandboxes

bash
msb install ubuntu               # Install ubuntu sandbox as 'ubuntu' command
ubuntu                           # Opens Ubuntu in a microVM
msb uninstall ubuntu             # Uninstall the ubuntu sandbox

  Status & Inspection

bash
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

[!TIP]

Run:
· msb --help for quick help menu.
· msb --tree for complete command hierarchy and descriptions.
· msb <command> --tree for a specific command tree.



  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.

  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());
 Rust Example →
rust
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(())
}
 Python Example →
python
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())
 Ruby Example →
ruby
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.stop

See the Ruby SDK guide for installation, lifecycle, networking, and backend details.

 Go Example →
…

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.



  Examples

Practical ways to put microsandbox to work:

• Docker in a Sandbox: Run Docker without touching the host daemon.
• OpenCode: Give a coding agent an isolated project workspace.
• Browser Use: Run an AI browser agent inside a microVM.
• Playwright: Run headless browser jobs inside a microVM.
• Warm Workers: Snapshot a toolchain and launch clean workers.
• Migration Rehearsal: Test a database migration, then restore the baseline.
• GitHub Actions Runner: Run each self-hosted job in a disposable microVM.
• Documents to PDF: Convert untrusted documents in a fresh offline worker.



  Community Showcase

  Agent frameworks & runtimes

• Eve by Vercel: Agent framework that ships microsandbox as a sandbox backend.
• Agentic Coding Quickstart by U.S. GSA: From zero to a running AI coding agent with USAi in minutes.
• Condukt and Once by Tuist: Elixir agentic engine, and cacheable actions that run in fresh sandboxes.
• langchain-microsandbox by kenwoodjw: Microsandbox integration for LangChain Deep Agents.
• Smithers by Smithers: Agent workflows with full observability, rewind, fork, and replay.
• AgentConnect: Bring multiple AI agents into your team's chats, issues, and pull requests.
• wrap by Tobi Lütke: Run coding agents and project commands in isolated Arch Linux microVMs.
• Agent VM by Wiren Board: Run AI agents in safe VMs scoped to a local folder.

  Tools & infrastructure

• h5i by h5i: Secure, auditable browser for AI agents, written in pure Rust.
• Devsy by Devsy: Deploy devcontainers onto any cloud, Kubernetes cluster, or Docker host.
• OpenWork by Different AI: Open-source Claude Cowork alternative with a microsandbox image.

  Guides & showcases

• Awesome Microsandbox by ya-luotao: Curated list of SDKs, integrations, tools, and resources.
• msb-omarchy by ya-luotao: Omarchy desktop with graphics inside a microVM on Apple Silicon.



  AI Agents

  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.

bash
npx skills add superradcompany/skills

  MCP Server

Connect any MCP-compatible agent to microsandbox with the [MCP serve

Issues· 92 open

View all issuesOpen on GitHub
  • #1631

    investigate where guest input processing stalls

    Updated Sep 22, 2026
  • #1578

    Live resize: nothing observable after `Modify` returns `converging` — request a re-readable status or a wait/completion signal

    SDKFilesystemsCLIUpdated Sep 22, 2026
  • #1624

    msb has no matching libkrunfw

    Updated Sep 22, 2026
  • #1354

    A placeholder in a request body causes a block, but body substitution is off and you cannot set it from the CLI

    CLIUpdated Sep 22, 2026
  • #1616

    `msb start` fails on sandboxes created before 0.7.0: "substitution.basic_auth cannot be preserved"

    SecretUpdated Sep 21, 2026
  • #1623

    SFTP over `msb ssh serve` creates files as root:root regardless of the authenticated guest user, blocking non-root external SSH clients

    Updated Sep 21, 2026
  • #1567

    macOS passthrough: bind mounts on FSKit filesystems (exFAT on macOS 15) fail with ENOENT because /.vol lookups are unsupported

    FilesystemsVolumesMacOSUpdated Sep 19, 2026
  • #1562

    Allow opting out of `exec.log` capture (per sandbox and/or per exec) — interactive sessions are currently written to disk chunk by chunk

    SDKCLIUpdated Sep 19, 2026
  • #1420

    [Feature Request]: Enable `CONFIG_IP_MULTIPLE_TABLES` and `CONFIG_TUN` in guest kernel

    LibkrunLinuxUpdated Sep 18, 2026
  • #1183

    Support runtime-resolved store-backed secrets without persisting plaintext

    SecurityVulnerabilityUpdated Sep 17, 2026

> Tags

Rustagentsdockergolanglinux

No comments yet. Be the first to share.

> Details

PublishedAug 1, 2026
UpdatedSep 22, 2026
CategoryDevOps
PricingOpen source

> Related tools

D
Docker
容器化平台,标准化应用交付
G
GitHub Actions
GitHub 原生 CI/CD 工作流
N
Nginx
高性能 Web 服务器与反向代理