by alibaba
Secure, Fast, and Extensible Sandbox runtime for AI agents.
# Add to your Claude Code skills
git clone https://github.com/alibaba/OpenSandboxLast scanned: 4/17/2026
{
"issues": [],
"status": "PASSED",
"scannedAt": "2026-04-17T06:07:18.760Z",
"semgrepRan": false,
"npmAuditRan": true,
"pipAuditRan": true
}OpenSandbox is an open-source ai agents skill for AI coding assistants such as Claude Code, Codex CLI, and ChatGPT, built by alibaba. Secure, Fast, and Extensible Sandbox runtime for AI agents. It has 10,975 GitHub stars.
Yes. OpenSandbox passed SkillsLLM's automated security scan — a dependency vulnerability audit plus prompt-injection heuristics — with no high-severity issues. You can read the full report in the Security Report section on this page.
Clone the repository with "git clone https://github.com/alibaba/OpenSandbox" and add it to your Claude Code skills directory (see the Installation section above).
OpenSandbox is primarily written in Python. It is open-source under alibaba on GitHub, so you can review or fork the full source.
Yes. SkillsLLM lists many other AI Agents skills you can browse and compare side by side. Open the AI Agents category from the badge at the top of this page, or use the Related Skills and comparison links further down to weigh OpenSandbox against similar tools.
No comments yet. Be the first to share your thoughts!
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 is now listed in the CNCF Landscape.
Python:
pip install opensandbox
Java/Kotlin (Gradle Kotlin DSL):
dependencies {
implementation("com.alibaba.opensandbox:sandbox:{latest_version}")
}
Java/Kotlin (Maven):
<dependency>
<groupId>com.alibaba.opensandbox</groupId>
<artifactId>sandbox</artifactId>
<version>{latest_version}</version>
</dependency>
JavaScript/TypeScript:
npm install @alibaba-group/opensandbox
C#/.NET:
dotnet add package Alibaba.OpenSandbox
Go:
go get github.com/alibaba/OpenSandbox/sdks/sandbox/go
OpenSandbox 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-cli
Quick 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 http
Minimal 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 -h
Install the Code Interpreter SDK
uv pip install opensandbox-code-interpreter
Create a sandbox and execute commands and codes.
import asyncio
from datetime import timedelta
from code_interpreter import CodeInterpreter, SupportedLanguage
from opensandbox import Sandbox
from opensandbox.models import WriteEntry
async def main() -> None:
# 1. Create a sandbox
sandbox = await Sandbox.create(
"opensandbox/code-interpreter:v1.0.2",
entrypoint=["/opt/opensandbox/code-interpreter.sh"],
env={"PYTHON_VERSION": "3.11"},
timeout=timedelta(minutes=10),
)
async with sandbox:
# 2. Execute a shell command
execution = await sandbox.commands.run("echo 'Hello OpenSandbox!'")
print(execution.logs.stdout[0].text)
# 3. Write a file
await sandbox.files.write_files([
WriteEntry(path="/tmp/hello.txt", data="Hello World", mode=644)
])
# 4. Read a file
content = await sandbox.files.read_file("/tmp/hello.txt")
print(f"Content: {content}") # Content: Hello World
# 5. Create a code interpreter
interpreter = await CodeInterpreter.create(sandbox)
# 6. Execute Python code (single-run, pass language directly)
result = await interpreter.codes.run(
"""
import sys
print(sys.version)
result = 2 + 2
result
""",
language=SupportedLanguage.PYTHON,
)
print(result.result[0].text) # 4
print(result.logs.stdout[0].text) # 3.11.14
# 7. Cleanup the sandbox
await sandbox.kill()
if __name__ == "__main__":
asyncio.run(main())
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 ref