opensandbox-group /OpenSandbox
Secure, Fast, and Extensible Sandbox runtime for AI agents.
★ 17,325⑂ 1,649👁 62⑃ 2,164● 657▤ 186
+29
Daily
+894
Weekly
+1,523
Monthly
17,325
stars
1,649
forks
62
watchers
2,164
prs
657
issues
186
releases
README
OpenSandbox
An Agentic AI Foundation (AAIF) Project
Run AI agents in sandboxes on your own infrastructure.
OpenSandbox gives AI applications isolated environments to execute code, run commands, manage files, and operate browsers or desktops. Start locally with Docker and deploy on Kubernetes through a unified sandbox API.
Quick Start · Examples · Documentation · Fast Sandbox
Features
| Feature | What it enables | Learn more |
|---------|-----------------|------------|
| Fast Sandbox runtime | Fast, high-density sandboxes on Kubernetes. Firecracker creation: 64 ms P50 (serial) / 125.4 ms P99 (10 concurrent). Firecracker sandboxes support pause/resume with memory and disk state preserved. | Integration · Performance · Pause/resume |
| Agent working environments | Execute commands, manage files, and run code with built-in APIs. Integration examples show how to run coding agents, browsers, and desktops inside sandboxes. | Examples |
| Network access control | Route inbound traffic through a unified ingress gateway and control outbound access with per-sandbox egress policies. | Ingress · Egress |
| Credential Vault | Let agents call external services without exposing real credentials to sandbox workloads. | Credential Vault |
| Local to cluster | Start with Docker and deploy on Kubernetes through a unified lifecycle API. Resource pools and batch creation support agent evaluation and RL training workloads. | Kubernetes runtime |
| SDKs, CLI, and MCP | Integrate with Python, Java/Kotlin, TypeScript/JavaScript, C/.NET, or Go SDKs. Use osb from the terminal or connect agents through MCP. | SDKs · CLI · MCP |
| Extensible sandbox protocol | Build custom runtime integrations against defined sandbox lifecycle and execution APIs. | API specs |
Getting Started
Requirements:
- Docker (required for local execution)
- Python 3.10+ (required for examples and local runtime)
Install and Configure the Sandbox Server
bash
uvx opensandbox-server init-config ~/.sandbox.toml --example docker
uvx opensandbox-server
Show help
uvx opensandbox-server -h
Create a Sandbox and Execute Commands/Scripts
Install the Sandbox SDK
bash
uv pip install opensandbox
Create a sandbox from an alpine image and execute commands and scripts.
python
import asyncio
from opensandbox import Sandbox
from opensandbox.models import WriteEntry
async def main() - None:
1. Create a sandbox from the alpine image
sandbox = await Sandbox.create("alpine")
try:
2. Execute a shell command
execution = await sandbox.commands.run("echo 'Hello OpenSandbox!'")
print(execution.logs.stdout[0].text)
3. Write a script file
await sandbox.files.write_files([
WriteEntry(
path="/tmp/hello.sh",
data="echo \"Hello $1\"\necho '2 + 2 =' $((2 + 2))",
mode=755,
)
])
4. Read the file back
content = awTop issues
#143Wanted: Who is using OpenSandbox | 如果贵司正在使用 OpenSandbox 请留言24 comments · 2026-01-28#348feat: add developer console for sandbox operations with phased auth model8 comments · 2026-03-05#2170JS, C#, Go and Kotlin SDKs replay protected OpenSandbox headers on cross-origin redirects (Python strips them)7 comments · 2026-10-10#1277execd: RunCommand doesn't terminate its chunked SSE response cleanly (missing completeCh/waitForExecutionComplete pattern used by RunCode/RunInSession)7 comments · 2026-07-12#2134[Help Wanted] Build an OpenSandbox plugin for DeepSeek Harness with fast-sandbox runtime support6 comments · 2026-10-08#1843[Feature] Support execution identity for file APIs to enforce per-session filesystem permissions5 comments · 2026-09-14#1773execd isolated sessions: upper_max_bytes enforced only at allocation — writes uncapped, then all new sessions wedge5 comments · 2026-09-09#1373CredentialMatch can't disambiguate two credentials bound to an identical destination shape5 comments · 2026-07-22
Discussions
#2286OpenSandbox CLI included in AgentManager's tool catalog0 comments · 2026-10-18#1681Signed-route endpoint access for the Docker runtime (pre-OSEP feedback)1 comments · 2026-08-31#1660Why does execd wait 1s before closing command SSE responses?2 comments · 2026-08-28#1612I think it's meaningful to separate components(like execd) out0 comments · 2026-08-25#1602Interested in contributing more deeply to OpenSandbox0 comments · 2026-08-24#1453Support versioned Docker image tags for components like opensandbox-server and opensandbox-controller0 comments · 2026-08-07#1276OpenSandbox is on Repository Radar's Starbound watchlist 📦0 comments · 2026-07-11#1110[免费安全体检] opensandbox-group/OpenSandbox — 三大安全风险 & 修复建议0 comments · 2026-06-22
Latest release
OpenSandbox 1.2.1 release-1.2.1 2026-11-13Stable patch release for users upgrading from 1.2.0, including both 1.2.1 release candidates and subsequent fixes. Server, CLI, SDKs, charts, and platform images ship together at 1.2.1. Highlights - Dynamic credentials: Credential Vault Exchange resolves credentials per request across the server, egress, and all five SDKs, without vault persistence of resolved secrets (2457 2535 2534 2560). - Multi-version Fast Sandbox VMMs: managed Firecracker 1.16.1/1.17.0 bundles let new template builds select the highest installed version while existing artifacts restore with their exact recorded VMM ve
相关报道 (7)
blog.csdn我为什么用 OpenSandbox 跑 GitHub Copilot 和 Microsoft Agent Framework2026-10-15新浪网OpenSandbox:重新思考 Agent 时代的 Runtime|QCon 北京2026-04-08blog.csdn【GitHub项目推荐--OpenSandbox:阿里巴巴开源的通用AI应用沙箱平台】⭐⭐⭐2026-03-11mobile01【測評分享】GitHub Trending 熱門專案 - alibaba/OpenSandbox2026-03-04InfoQ.cnOpenSandbox:重新思考 Agent 时代的 Runtime2026-07-29Amazon Web Services (AWS)在 Amazon EKS 上构建安全的 AI Agent 沙箱2026-07-1551CTO给 AI Agent 上个"保险箱":最火的两个开源沙盒项目2026-04-07