Best open-source and self-hosted agent sandboxes
For self-hosting, our top picks are E2B, Kubernetes Agent Sandbox and Microsandbox. We weight licence openness, isolation strength, maturity and operational effort.
What self-hosting need from a sandbox
Self-hosting gives control over data, network and cost. When comparing open-source options, look at:
- Licence (Apache-2.0 vs copyleft) and whether the full backend — not just the SDK — is open.
- Isolation you get out of the box, and whether it needs bare metal or nested virtualization.
- Operational effort: Kubernetes-native or single-node, warm pools, snapshots.
See also the self-hosting guide.
Best open-source and self-hosted agent sandboxes, ranked
E2B
Open-source cloud sandboxes for AI agents, each a Firecracker microVM, with pause/resume, snapshots and forking.
- Firecracker microVM
- Open source
- Self-hostable
- BYOC
- Pause/resume
Why it’s here: Apache-2.0 SDKs and backend runtime, a single-node self-host package (E2B Embed) with Terraform for AWS, GCP and Azure, and Firecracker isolation. Needs KVM.
Kubernetes Agent Sandbox
Open-source Kubernetes controller and CRDs for isolated, stateful sandbox pods for AI agents, with first-class support on GKE.
- gVisor or Kata
- Open source
- Self-hostable
- BYOC
- GPU
- Pause/resume
Why it’s here: Apache-2.0 Kubernetes SIG project with warm pools and CRDs; isolation via gVisor or Kata RuntimeClass. Vendor-neutral and production-oriented.
Microsandbox
Open-source, local-first microVM runtime that gives each sandbox its own Linux kernel, with an optional managed cloud.
- MicroVM (libkrun)
- Open source
- Self-hostable
- BYOC
- Snapshots
Why it’s here: Apache-2.0 microVM runtime for Linux, macOS and Windows with SDKs in five languages; beta.
Anthropic Sandbox Runtime
Open-source CLI and library (`srt`) that restricts filesystem and network access for any local process at the OS level, without a container or VM.
- OS-level (Seatbelt / bubblewrap)
- Open source
- Self-hostable
Why it’s here: Apache-2.0 OS-level sandbox for local agents and CLIs; lightweight but not a VM boundary.
Side by side
| Sandbox | Isolation | Open source | Self-host / BYOC | Cold start (vendor) | Max session | Snapshots / pause | GPU | SDKs |
|---|---|---|---|---|---|---|---|---|
| E2B | Firecracker microVM | Yes | Yes / Yes | Not documented | 1 h / 24 h (Pro) | Yes / Yes | No | Python, JavaScript/TypeScript |
| Kubernetes Agent Sandbox | gVisor or Kata | Yes | Yes / Yes | <1 s (warm pool) | Not documented | Yes / Yes | Yes | Kubernetes CRDs, Python, kubectl |
| Microsandbox | MicroVM (libkrun) | Yes | Yes / Yes | <100 ms | Not documented | Yes / Not documented | No | TypeScript, Python, Rust, Go, Ruby, CLI, MCP server |
| Anthropic Sandbox Runtime | OS-level (Seatbelt / bubblewrap) | Yes | Yes / Not documented | Process start | Not documented | No / No | Not documented | CLI (srt), TypeScript (npm) |
Frequently asked questions
Is Daytona still open source?
What is the best open-source alternative to E2B?
Cite this page
Agent Sandboxes. (2026). Best open-source and self-hosted agent sandboxes. agentsandboxes.org. Last reviewed November 8, 2026. https://agentsandboxes.org/best/open-source/
Found an error or a missing sandbox? Submit a correction — every entry links to the sources it relies on.