Index Agentica

Self-hosted sandboxes for agents compared

Six ways to isolate agent-run code on hardware you control (OpenSandbox, AIO Sandbox, microsandbox, Kubernetes Agent Sandbox, Anthropic's sandbox-runtime and Docker Sandboxes' local mode) compared on isolation, where they run, agent interface, network and secret controls, maturity and license.

Type
Comparison
Author
Agentica Author
Published
Last verified

Comparison

Self-hosted sandboxes for agents compared
EntryIsolation boundaryRuns onAgent interfaceNetwork and secretsMaturityLicense
OpenSandboxDocker containers locally; on Kubernetes, the Fast Sandbox runtime uses Firecracker microVMs (README: 64 ms P50 creation, serial) with pause/resume of memory and diskYour Docker host to start (uvx opensandbox-server), then Kubernetes through the same lifecycle API, with resource pools and batch creationLifecycle and execution APIs; SDKs for Python, Java/Kotlin, TypeScript, C#/.NET and Go; osb CLI; MCP server; examples for coding agents, browsers and desktopsUnified ingress gateway, per-sandbox egress policies, Credential Vault so sandboxed code can call services without seeing real credentialsLatest release tag release-1.1.1 (2026-10-09); release images signed with Cosign; listed in the CNCF LandscapeApache-2.0
AIO Sandbox (agent-infra)One Docker container holding browser, shell, files, VS Code Server, Jupyter and MCP; the README's run commands disable seccomp (--security-opt seccomp=unconfined)Any Docker host (ghcr.io/agent-infra/sandbox); for cloud use, keep port 8080 private behind a reverse proxy or IngressHTTP API (docs at /v1/docs), MCP at /mcp, VNC browser, VS Code Server; SDKs for Python (agent-sandbox), TypeScript (@agent-infra/sandbox) and GoOptional SANDBOX_API_KEY protects every service (header, bearer or query parameter); without it the services are open; no egress policy documented in the READMELatest release v1.11.0 (2026-06-23); pin release tags for reproducible deploymentsApache-2.0
microsandboxLocal microVMs; README reports average guest boot under 100 ms (on an M1)macOS on Apple Silicon, Linux with KVM, Windows with WHP; the SDK boots a VM as a child process, no server or daemonmsb CLI; SDKs for TypeScript, Rust, Python, Go and Ruby; MCP server (microsandbox-mcp); Agent Skills so agents can create their own sandboxesPer-sandbox host and port allowlists; secrets bound to an allowed host that, per the README, never enter the VMBeta: the README warns of breaking changes and rough edges; latest release v0.7.8 (2026-10-09)Apache-2.0
Agent Sandbox (Kubernetes SIG Apps)Delegated: a Sandbox is a pod using a RuntimeClass such as gVisor or Kata Containers; the project orchestrates, it does not isolate by itselfAny Kubernetes cluster (Sandbox CRD and controller under SIG Apps), installed with kubectl applyKubernetes resources (Sandbox, SandboxTemplate, SandboxClaim, SandboxWarmPool); Go and Python SDKs; optional Sandbox Router HTTP proxy to reach sandbox podsStable hostname and network identity per sandbox; network and secret policy is whatever your cluster and runtime enforceLatest release v1.0.7 (2026-10-15)Apache-2.0
Anthropic Sandbox Runtime (srt)OS-level, no container or VM: sandbox-exec (Seatbelt) on macOS, bubblewrap with network namespace removal on Linux, a dedicated local user plus a Windows Filtering Platform fence on WindowsThe developer's own machine, wrapping one process tree (an agent, a local MCP server, a shell command)srt CLI (srt "command") and a library; npm install -g @anthropic-ai/sandbox-runtime; can wrap MCP servers in .mcp.jsonNetwork deny-by-default through host proxies with allowedDomains / deniedDomains; writes deny-by-default (allowWrite); reads allowed everywhere unless you add denyReadBeta research preview built for Claude Code; latest release v0.0.81 (2026-10-20)Apache-2.0
Docker SandboxesmicroVM per sandboxYour machine (free, including commercial use) or Docker-managed cloud compute (metered); sbx move recreates a sandbox's files on the other sidesbx CLI with presets for coding agents (Claude Code, Codex, Copilot, Cursor, Gemini, OpenCode and others); MCP gateway; Sandboxes API and SDK for cloud sandboxesNetwork policies and credential handling per environment (local and cloud are separate); org-wide network, filesystem and MCP policies are a paid add-onGenerally available product from Dockerproprietary

Verdict: For one developer's coding agent, start with Docker Sandboxes (microVMs, free locally) or microsandbox (microVMs in your own code). sandbox-runtime is the lightest, but it is a process wrapper whose reads are open unless you deny them. For many sandboxes on your own cluster, use OpenSandbox if you want a full platform with egress policies and a credential vault, or Kubernetes Agent Sandbox if you already run gVisor or Kata and want plain Kubernetes resources. Use AIO Sandbox when an agent needs a browser, shell and editor in one place, but treat it as a container with seccomp off, not a VM.

What this covers

These sandboxes run on machines you control: a laptop, a server or your own Kubernetes cluster. Hosted services such as E2B and Daytona are compared in code sandboxes. Run untrusted code in a sandbox explains why an agent needs one at all.

Facts here come from each project's README or docs as of 2026-10-20, plus the release dates on GitHub. Unlike the DevOps MCP servers comparison, we did not run these sandboxes for this piece. Boot-time figures are each project's own.

The boundary is the main difference

The six fall into three groups, from strongest to weakest isolation:

Choose the boundary based on what the agent runs. Code the model wrote from untrusted input, such as a web page, an issue or an email, calls for a VM. A trusted coding agent running your own tests can use a process or container wrapper, as long as its files and network are locked down.

Defaults to change before an agent uses it

How agents drive them

Scale and evaluation workloads

For many short-lived sandboxes, such as eval runs or RL rollouts, OpenSandbox (resource pools and batch creation) and Kubernetes Agent Sandbox (SandboxWarmPool and SandboxClaim) both keep warm capacity so agents do not wait for a cold start. The laptop-oriented options (microsandbox, srt, local Docker Sandboxes) are built for one developer's machine. Whatever you choose, the agent that manages the cluster should not run inside the same trust boundary as the code it launches. The DevOps MCP servers comparison covers giving an agent read-only access to Kubernetes through the Kubernetes MCP Server.

Directory entries in this comparison

Related

Sources

Machine-readable