opensandbox-group/OpenSandbox

Secure, Fast, and Extensible Sandbox runtime for AI agents.

What it solves

AI agents need safe places to execute code, run commands, and interact with files, browsers, or desktops without risking the host system. OpenSandbox gives each agent an isolated sandbox so untrusted or model-generated actions are contained. It also solves scaling: you can start with Docker on a laptop and move to Kubernetes for production, all through a single API.

How it works

OpenSandbox exposes a unified sandbox API with consistent lifecycle and execution calls. You create a sandbox from a container image (like alpine), then run commands, write and read files, and destroy the sandbox when done. Under the hood, the Fast Sandbox runtime uses Firecracker microVMs on Kubernetes, achieving very fast creation times (64 ms median for serial, 125.4 ms P99 for 10 concurrent) and supporting pause/resume with memory and disk state. Network traffic goes through a unified ingress gateway, and per-sandbox egress policies control outbound access. A Credential Vault lets agents call external services without exposing real credentials. SDKs are available for Python, Java/Kotlin, TypeScript/JavaScript, C#/.NET, and Go, plus a CLI (osb) and an MCP server for integration with agent clients like Claude Code and Cursor.

Who it's for

Developers and teams building AI agents that need to safely execute code or automate tasks — for example coding agents, browser automation, data analysis, or agent evaluation. It is also suited for teams that need to run sandboxes at scale on Kubernetes, including for reinforcement-learning training workloads that create many sandboxes in batch.

Highlights

  • Fast Sandbox runtime: Firecracker creation in 64 ms (P50 serial) and 125.4 ms (P99 for 10 concurrent), with pause/resume support.
  • Agent working environments: run commands, manage files, and execute code; examples include coding agents (Claude Code, Codex CLI, DeerFlow), browser automation (Playwright, Chrome), and desktop access.
  • Network access control: unified ingress gateway and per-sandbox egress policies.
  • Credential Vault: agents call external services without exposing real credentials to the sandbox.
  • Local to cluster: start with Docker, deploy on Kubernetes with a unified lifecycle API; resource pools and batch creation support evaluation and RL training.
  • Multiple integration options: Python, Java/Kotlin, TypeScript/JavaScript, C#/.NET, Go SDKs, an osb CLI, and an MCP server.
  • Extensible sandbox protocol: build custom runtime integrations against defined lifecycle and execution APIs.

Related

  • Dispatch
  • Project
  • Project
  • Project
  • Project