opensandbox-group/OpenSandbox
One lifecycle API for self-hosted agent sandboxes on Docker and Kubernetes
Automated SPDX check for reference only — not legal advice. Disclaimer
GitHub Star History
Full-history star trajectory from GitHub official history. Switch ranges or hover any point for exact counts.
Evidence-Backed Technical Brief
AI Deep ReviewArchitecture & Core Mechanics
OpenSandbox is an execution substrate for agents, not an agent framework or model server. A Python FastAPI control plane exposes a common lifecycle API over Docker, Kubernetes, and Fast Sandbox backends. Execution is separate: execd provides in-sandbox operations, while workload ports and an optional ingress gateway expose services running inside a sandbox. Egress enforcement and Credential Vault handle outbound policy and credential injection separately from lifecycle orchestration.
The repository layout reflects those boundaries: server/, components/, kubernetes/, and manifests/ cover the runtime and deployment, while specs/, sdks/, and cli/ cover contracts and client access. Applications can use SDKs in Python, Java/Kotlin, JavaScript/TypeScript, C#/.NET, or Go, or operate through the osb CLI. The MCP adapter exposes a narrower set of creation, command, and text-file operations. The optional developer console provides a web UI and a backend for that UI.
Key Capabilities & Differentiators
A sandbox provides command execution, file operations, and an environment for running code. Examples cover coding agents, code interpretation, Playwright and Chrome, desktops, and per-trial agent evaluation. The platform supports warm client pools with optional Redis coordination, snapshots, and idle auto-pause with wake-on-access. Runtime options include standard containers, Kata, and confidential PeerPods; execd init mode is on by default, but privilege reduction is opt-in.
On Kubernetes, Fast Sandbox combines Firecracker with OverlayBD and supports full memory-and-disk pause and resume. Its published benchmark reports median create API acknowledgment (t_api_ack) of 65.3 ms serial and 70.9 ms at 16-way concurrency, up to 800 live MicroVMs per Fastlet, and about 10.2 MiB of Firecracker PSS and 17.5 MiB in host memory delta per 2 GiB sandbox. API acknowledgment is not workload readiness, and the density result should not be used as a capacity guarantee for a different workload.
Trade-offs & Limitations
The common API is most valuable when more than one application needs the same execution and lifecycle contract. For a single trusted internal runner, direct Docker has fewer moving parts if the application already owns timeouts and cleanup. For a cluster-only batch workload that needs no interactive command or file API, native Kubernetes resources may suffice. A managed sandbox service is worth comparing when operating nodes and runtime upgrades is not part of the team's remit; self-hosting gives the team control over placement and policy but leaves it responsible for both.
A common API does not make container and VM isolation equivalent or give every backend the same performance and lifecycle behavior. Before a multi-tenant rollout, test the required isolation boundary, verify egress restrictions and credential handling, and measure readiness, pause/resume, and failures under actual load. The code is Apache-2.0; documentation licensing is handled separately in CONTRIBUTING.md, and redistributed workload images warrant their own license review.
Hardware & Deployment Guide
For a local deployment, start with Docker, Python 3.10+, and uv. Generate the Docker example configuration with uvx opensandbox-server init-config ~/.sandbox.toml --example docker, then run uvx opensandbox-server. If server.apikey is configured, set OPENSANDBOXAPIKEY for SDK calls or connection.apikey for osb. The local CLI example connects to localhost:8080 over HTTP, creates a sandbox, executes a command, and explicitly deletes the sandbox. No model service or GPU is listed as a prerequisite for this path.
For Kubernetes, validate the selected runtime on the target nodes before committing to a rollout. Load-test CPU, memory, and storage with representative images and workloads, and verify ingress and egress policy from a running sandbox. Release 1.3.0 aligns the server, CLI, and all five SDK packages at 1.3.0 after four release candidates that published images but held package releases. Official images are available from Docker Hub, GHCR, and Alibaba Cloud Container Registry. Pin production images by digest and verify signing and provenance coverage separately: current umbrella releases have a tracked verification gap (issue #2463) compared with legacy per-component releases.
execd handles in-sandbox operations, with an optional ingress gateway for workload traffic.execd init mode is enabled by default, while privilege reduction is opt-in.osb CLI, and an MCP adapter for sandbox, command, and text-file operations.Teams building coding agents, browser automation, or evaluation systems that need isolated execution on their own infrastructure and a common API from local Docker to Kubernetes.
A trusted internal job only needs a disposable container, or your team wants a managed service without owning runtime upgrades, network controls, and artifact verification.
Quick Start & Installation
uvx opensandbox-server init-config ~/.sandbox.toml --example docker # Start the local server. Because example.config.toml leaves server.api_key unset, # type YES at the startup prompt (or pass OPENSANDBOX_INSECURE_SERVER=YES in # non-interactive shells; if you set server.api_key in ~/.sandbox.toml, also # export OPEN_SANDBOX_API_KEY=<your-api-key> for client calls). uvx opensandbox-server # Show help # uvx opensandbox-server -h
Comparison vs. Top Agents & Frameworks Alternatives
Full comparison →| Repository | Stars | 7d Trend | Stack | License | Core Positioning |
|---|---|---|---|---|---|
| OpenSandbox ★ | 18.2k | +191 | Go | Apache-2.0 | One lifecycle API for self-hosted agent sandboxes on Docker and Kubernetes |
| sealos | 18.4k | +14 | Go | — | A Kubernetes-backed desktop Ops Agent for deploying and running full-stack apps |
| multica | 59.1k | +891 | Go | — | A shared task board that dispatches coding agents to machines you control. |
| pentagi | 35.7k | +489 | Go | MIT | Self-hosted multi-agent penetration testing with logs and reports for human revi |
AI Context Briefing (for Claude / Cursor / Windsurf)
Standardized architecture summary & quickstart commands ready to paste into coding agents.
curl -sL https://repoforai.com/repo/opensandbox-group/OpenSandbox.md
Active README embeds unlock Hot-Tier 6h Telemetry Refresh automatically (zero pay-to-rank).
Frequently Asked Questions about OpenSandbox
How does an application integrate with the control and execution planes?
execd data plane to run commands and work with files. Workload ports and the optional ingress gateway handle access to services running inside a sandbox. The SDKs and osb cover routine integration; the MCP adapter exposes sandbox creation, command execution, and text-file operations to MCP clients.What hardware and VRAM should I budget for?
Can we self-host it commercially, and what should we check before redistribution?
CONTRIBUTING.md for documentation licensing, and review redistribution obligations and the licenses of any third-party images you ship. Separately, verify release artifacts: a digest identifies an image but does not replace a signature or provenance attestation.When is OpenSandbox a better fit than direct Docker or Kubernetes?
Upstream README & Documentation
This profile focuses on independent engineering analysis and live telemetry. Read the full upstream README, changelog, and examples directly on GitHub.
Top 10 Breakout Open-Source AI Repos, Every Thursday
Signal-only digest of fast-growing AI repos, SPDX license alerts, and architecture picks. Zero spam.
Zero spam · 1-click unsubscribe · Privacy Policy