Secure, Fast, and Extensible Sandbox runtime for AI agents.
$git clone https://github.com/opensandbox-group/opensandboxInstalls into the current project.
Install opensandbox by running `git clone https://github.com/opensandbox-group/opensandbox`, then use it for the current task and follow its documentation at https://github.com/opensandbox-group/opensandbox.
| 1 | <div align="center"> |
| 2 | <img src="docs/public/images/logo.svg" alt="OpenSandbox logo" width="150" /> |
| 3 | |
| 4 | <h1>OpenSandbox</h1> |
| 5 | |
| 6 | <p align="center"> |
| 7 | <a href="https://trendshift.io/repositories/21828" target="_blank"><img src="https://trendshift.io/api/badge/repositories/21828" alt="opensandbox-group%2FOpenSandbox | Trendshift" style="width: 320px; height: 70px;" width="320" height="70" /></a> |
| 8 | </p> |
| 9 | |
| 10 | <p align="center"> |
| 11 | <a href="https://github.com/opensandbox-group/OpenSandbox"><img src="https://img.shields.io/github/stars/opensandbox-group/OpenSandbox?style=flat-square&logo=github&logoColor=white&label=Stars&color=181717" alt="Stars" /></a> |
| 12 | <a href="https://www.bestpractices.dev/projects/12588"><img src="https://img.shields.io/badge/OpenSSF-Best-4C566A?style=flat-square" alt="OpenSSF Best Practices" /></a> |
| 13 | <a href="https://landscape.cncf.io/?item=orchestration-management--scheduling-orchestration--opensandbox"><img src="https://img.shields.io/badge/CNCF-Landscape-0C66E4?style=flat-square" alt="CNCF Landscape" /></a> |
| 14 | <a href="https://discord.gg/g7FuPs8YeD"><img src="https://img.shields.io/badge/Discord-Join-5865F2?style=flat-square&logo=discord&logoColor=white" alt="Discord" /></a> |
| 15 | <a href="https://qr.dingtalk.com/action/joingroup?code=v1,k1,A4Bgl5q1I1eNU/r33D18YFNrMY108aFF38V+r19RJOM=&_dt_no_comment=1&origin=11"><img src="https://img.shields.io/badge/DingTalk-Join-0089FF?style=flat-square" alt="DingTalk" /></a> |
| 16 | <a href="https://github.com/opensandbox-group/OpenSandbox/actions"><img src="https://img.shields.io/github/actions/workflow/status/opensandbox-group/OpenSandbox/real-e2e.yml?branch=main&label=TEST&style=flat-square&logo=github&logoColor=white" alt="E2E Status" /></a> |
| 17 | <a href="https://github.com/opensandbox-group/OpenSandbox/actions"><img src="https://img.shields.io/github/actions/workflow/status/opensandbox-group/OpenSandbox/kubernetes-nightly-build.yml?branch=main&label=K8S&style=flat-square&logo=kubernetes&logoColor=white" alt="Kubernetes nightly build status" /></a> |
| 18 | </p> |
| 19 | |
| 20 | <hr /> |
| 21 | </div> |
| 22 | |
| 23 | OpenSandbox is a **general-purpose sandbox platform** for AI applications, offering multi-language SDKs, unified sandbox APIs, and Docker/Kubernetes runtimes for scenarios like Coding Agents, GUI Agents, Agent Evaluation, AI Code Execution, and RL Training. |
| 24 | |
| 25 | ## Features |
| 26 | |
| 27 | - 🧩 **SDKs, CLI, and MCP**: Provides multi-language SDKs, the osb CLI, and MCP server integration for sandbox creation, command execution, and file operations. See [SDKs](#sdks), [CLI](#cli), and [MCP](#mcp). |
| 28 | - 📜 **Sandbox Protocol**: Defines sandbox lifecycle management APIs and sandbox execution APIs so you can extend custom sandbox runtimes. See [API specs](specs/README.md). |
| 29 | - 🚀 **Sandbox Runtime**: Built-in lifecycle management supporting Docker and high-performance Kubernetes runtime, enabling both local runs and large-scale distributed scheduling. See [Kubernetes runtime](./kubernetes). |
| 30 | - 🖥️ **Sandbox Environments**: Built-in Command, Filesystem, and Code Interpreter implementations. Examples cover Coding Agents (e.g., Claude Code), browser automation (Chrome, Playwright), and desktop environments (VNC, VS Code). |
| 31 | - 🚦 **Network Policy**: Unified ingress gateway with multiple routing strategies plus per-sandbox egress controls. See [Ingress Gateway](components/ingress) and [egress controls](components/egress). |
| 32 | - 🔑 **Credential Vault**: Secure credential injection for sandbox outbound requests without exposing real secrets to workloads. See [Credential Vault](docs/guides/credential-vault.md). |
| 33 | - 🏰 **Strong Isolation**: Supports secure container runtimes like gVisor, Kata Containers, and Firecracker microVM for enhanced isolation between sandbox workloads and the host. See [Secure Container Runtime Guide](docs/guides/secure-container.md) for details. |
| 34 | |
| 35 | ## SDKs |
| 36 | |
| 37 | Python: |
| 38 | |
| 39 | ```bash |
| 40 | pip install opensandbox |
| 41 | ``` |
| 42 | |
| 43 | Java/Kotlin (Gradle Kotlin DSL): |
| 44 | |
| 45 | ```kotlin |
| 46 | dependencies { |
| 47 | implementation("com.alibaba.opensandbox:sandbox:{latest_version}") |
| 48 | } |
| 49 | ``` |
| 50 | |
| 51 | Jav |