docs/getting-started/introduction.mdx
microsandbox is a local-first microVM runtime for untrusted workloads: AI agents, user code, plugins, package installs, CI jobs, dev environments, scrapers, and automation.
Each sandbox is a lightweight VM with its own Linux kernel, filesystem, and network boundary. Start one locally with the msb CLI or an SDK, or run it on microsandbox cloud with an API key. From there, what you do inside the sandbox is up to you.
It keeps the familiar workflow of OCI images and command execution, while moving risky work out of the host process.
<CodeGroup> ```bash npx npx microsandbox run debian ```curl -fsSL https://install.microsandbox.dev | sh
msb run debian
irm https://install.microsandbox.dev/windows | iex
msb run debian
let sb = Sandbox::builder("hello") .image("python") .create() .await?;
let output = sb.exec("python", ["-c", "print('Hello from a microVM!')"]).await?; println!("{}", output.stdout()?);
sb.stop().await?;
```typescript TypeScript
import { Sandbox } from "microsandbox";
await using sb = await Sandbox.builder("hello")
.image("python")
.create();
const output = await sb.exec("python", ["-c", "print('Hello from a microVM!')"]);
console.log(output.stdout());
from microsandbox import Sandbox
sb = await Sandbox.create("hello", image="python")
output = await sb.exec("python", ["-c", "print('Hello from a microVM!')"])
print(output.stdout_text)
await sb.stop()
sb, err := m.CreateSandbox(ctx, "hello", m.WithImage("python"))
if err != nil {
return err
}
defer sb.Stop(ctx)
out, err := sb.Exec(ctx, "python", []string{"-c", "print('Hello from a microVM!')"})
if err != nil {
return err
}
fmt.Println(out.Stdout())