Secure, Fast, and Extensible Sandbox runtime for AI agents.
Secure, Fast, and Extensible Sandbox runtime for AI agents.
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.
OpenSandbox release images are published under the same component name in three official registries:
docker.io/opensandbox/<component>ghcr.io/opensandbox-group/opensandbox/<component>sandbox-registry.cn-zhangjiakou.cr.aliyuncs.com/opensandbox/<component>Tagged release images are signed keylessly with Cosign and include provenance attestations. Pin production images by digest and follow the release verification guide to verify the image against the OpenSandbox GitHub Actions identity before deployment.
Pick your language:
Pythonpip install opensandboxdependencies {
implementation("com.alibaba.opensandbox:sandbox:{latest_version}")
}<dependency>
<groupId>com.alibaba.opensandbox</groupId>
<artifactId>sandbox</artifactId>
<version>{latest_version}</version>
</dependency>npm install @alibaba-group/opensandboxdotnet add package Alibaba.OpenSandboxgo get github.com/alibaba/OpenSandbox/sdks/sandbox/goOpenSandbox also provides osb, a terminal CLI for the common sandbox workflow: create sandboxes, run commands, move files, inspect diagnostics, and manage runtime egress policy.
Install:
pip install opensandbox-cli
# or
uv tool install opensandbox-cliQuick start:
osb config init
osb config set connection.domain localhost:8080
osb config set connection.protocol http
osb config set connection.api_key <your-api-key>
osb sandbox create --image python:3.12 --timeout 30m -o json
osb command run <sandbox-id> -o raw -- python -c "print(1 + 1)"See the CLI README for the full command reference.
The OpenSandbox MCP server exposes sandbox creation, command execution, and text file operations to MCP-capable clients such as Claude Code and Cursor.
Install and run:
pip install opensandbox-mcp
opensandbox-mcp --domain localhost:8080 --protocol httpMinimal stdio config:
{
"mcpServers": {
"opensandbox": {
"command": "opensandbox-mcp",
"args": ["--domain", "localhost:8080", "--protocol", "http"]
}
}
}See the MCP README for client-specific setup.
Requirements:
uvx opensandbox-server init-config ~/.sandbox.toml --example docker
uvx opensandbox-server
# Show help
# uvx opensandbox-server -hInstall the Sandbox SDK
uv pip install opensandboxCreate a sandbox from an alpine image and execute commands and scripts.
…OpenSandbox provides examples covering SDK usage, agent integrations, browser automation, and training workloads. All example code is located in the examples/ directory.
For more details, please refer to the examples documentation.
This project is open source under the Apache 2.0 License.
See ROADMAP.md for the current project roadmap, planning scope, and how roadmap items are managed.
execd isolated sessions: upper_max_bytes enforced only at allocation — writes uncapped, then all new sessions wedge
Clarify execd documentation and the protocol boundary for independent implementations
proposal: standalone operator console contribution (extends OSEP-0006 / #348, relates to #835)
feat(egress): support chained upstream CONNECT proxy under the fast-sandbox profile
Why isn't Codex-style apply_patch provided?
Rewrite BatchSandbox pod-failure recovery on current main (supersedes #1523)
Define core metrics/traces for BatchSandbox controller and systematically integrate OpenTelemetry
bug(docker): snapshots of gVisor (runsc) sandboxes silently drop all writes under runsc's default --overlay2=root:self
[Feature] SDK SandboxPool: dynamic / time-window-based pool sizing via a capacity-provider interface
opensandbox-server 1.1.0 on PyPI is missing services/fast_sandbox/generated — the server fails to start (ModuleNotFoundError)