Back to rankings

superradcompany/microsandbox

Rustdocs.microsandbox.dev

🧱 easy, fast and local-first microVM runtime

agentsdockerlinuxmacossandboxvirtualizationvmsecurityself-hostedrustwindowsnodejs
Star Growth
Stars
7k
Forks
356
Weekly Growth
Issues
39
2k4k6k
Nov 2024May 2025Dec 2025Jul 2026
Artifactscrates.iocargo add microsandbox
README

——   easy, fast, local microVMs for untrusted workloads   ——


GitHub release Discord Apache 2.0 License

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 microVM technology.
  • 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.

rocket-darkrocket  Getting Started

  Install the SDK

cargo add microsandbox                                   # 🦀 Rust
uv add microsandbox                                      # 🐍 Python
npm i microsandbox                                       # 🟦 TypeScript
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
 We also support other package managers →

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

Then you can run msb directly:

msb run debian

Requirements:

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

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


sdk-darksdk  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

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 →
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())
 TypeScript Example →
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());
 Go Example →
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.EnsureInstalled(ctx); 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())
}

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.


SDK Docs


cli-darkcli  CLI

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

  Run a Command

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

  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
# Lifecycle
msb stop app
msb start app
msb rm app

  Image Management

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

  Install & Uninstall Sandboxes

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

  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

[!TIP]

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


CLI Docs


agents-darkagents  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.

npx skills add superradcompany/skills

  MCP Server

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

docs-darkdocs  Documentation

For guides, API references, and examples, visit the microsandbox documentation.


contributing-darkcontributing  Contributing

Interested in contributing to microsandbox? Check out our CONTRIBUTING.md for guidelines and DEVELOPMENT.md for build, test, and release instructions.


license-darklicense  License

This project is licensed under the Apache License 2.0.


acknowledgements-darkacknowledgements  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


Backed by Y Combinator


[^boot-time]: Boot time refers to guest boot on an M1 machine.

Related repositories
Significant-Gravitas/AutoGPT

AutoGPT is the vision of accessible AI for everyone, to use and to build on. Our mission is to provide the tools, so that you can focus on what matters.

PythonPyPIOtheraiopenai
agpt.co
185.6k46.1k
langflow-ai/langflow

Langflow is a powerful tool for building and deploying AI-powered agents and workflows.

PythonPyPIMIT Licensereact-flowchatgpt
langflow.org
152.2k9.6k
langchain-ai/langchain

The agent engineering platform.

PythonPyPIMIT Licenseaianthropic
docs.langchain.com/langchain/
142.3k23.7k
Shubhamsaboo/awesome-llm-apps

100+ AI Agent & RAG apps you can actually run — clone, customize, ship.

PythonPyPIApache License 2.0llmsrag
theunwindai.com
125.8k18.6k
dair-ai/Prompt-Engineering-Guide

🐙 Guides, papers, lessons, notebooks and resources for prompt engineering, context engineering, RAG, and AI Agents.

MDXMIT Licensedeep-learningprompt-engineering
promptingguide.ai
76.8k8.4k
ruvnet/ruflo

🌊 The leading agent meta-harness. Deploy intelligent multi-player swarms, coordinate autonomous workflows, and build conversational AI systems. Features adaptive memory, self-learning intelligence, RAG integration, and native Claude Code / Codex / Hermes and many more Integrated

TypeScriptnpmMIT Licenseclaude-codeswarm
cognitum.one
65.5k7.8k
mem0ai/mem0

Universal memory layer for AI Agents

TypeScriptnpmApache License 2.0aichatgpt
mem0.ai
61.4k7.1k
microsoft/autogen

A programming framework for agentic AI

PythonPyPICreative Commons Attribution 4.0 Internationalchatgptllm-agent
microsoft.github.io/autogen/
59.9k9k
crewAIInc/crewAI

Framework for orchestrating role-playing, autonomous AI agents. By fostering collaborative intelligence, CrewAI empowers agents to work together seamlessly, tackling complex tasks.

PythonPyPIMIT Licenseagentsai
crewai.com
55.9k7.9k
FlowiseAI/Flowise

Build AI Agents, Visually

TypeScriptnpmOtherartificial-intelligencechatgpt
flowiseai.com
54.8k24.7k
run-llama/llama_index

LlamaIndex is the leading document agent and OCR platform

PythonPyPIMIT Licenseagentsapplication
developers.llamaindex.ai
51k7.8k
mudler/LocalAI

LocalAI is the open-source AI engine. Run any model - LLMs, vision, voice, image, video - on any hardware. No GPU required.

GoGo ModulesMIT Licensellamaai
localai.io
47.7k4.3k