Skip to content
Back to search

OpenSandbox

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

Safety scan

A static text scan, not a guarantee. Select the badge to see what was scanned and every finding.

Checked today

Check it deeper on your machine

It has changed since its scan on 11 Nov 2026.

As a Claude Code plugin, install it and then ask Claude Code:

/plugin marketplace add keithmackay/mackayi/plugin install scanskillsafety@mackayiDo a deep scan of https://github.com/opensandbox-group/OpenSandbox with scanskillsafety

Or from a terminal, clone it and run it:

git clone https://github.com/keithmackay/scanskillsafety-skill ~/.claude/skills/scanskillsafetynode ~/.claude/skills/scanskillsafety/cli.cjs --deep 'https://github.com/opensandbox-group/OpenSandbox'

It checks the exact commit: every file, its packages against OSV (api.osv.dev), how it compares with this page's scan (findsafeskills.com receives the repository's address), and, if you agree, Claude reading every file with your own Claude subscription. It never runs the code.

Badge for your README
findsafeskills safety rating

Markdown

[![findsafeskills safety rating](/api/listings/opensandbox-group--opensandbox/badge.svg)](/listings/opensandbox-group--opensandbox)

HTML

<a href="/listings/opensandbox-group--opensandbox"><img src="/api/listings/opensandbox-group--opensandbox/badge.svg" alt="findsafeskills safety rating" /></a>

Install

i

Install instructions from the README

As written by the repo's author. findsafeskills has not verified these steps.

Requirements:

- Docker (required for local execution) - Python 3.10+ (required for examples and local runtime)

Install and Configure the Sandbox Server

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

uv pip install opensandbox

Create a sandbox from an `alpine` image and execute commands and scripts.

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 = await sandbox.files.read_file("/tmp/hello.sh")
        print(f"Content: {content}")

        # 5. Execute the script
        execution = await sandbox.commands.run("sh /tmp/hello.sh OpenSandbox")
        for log in execution.logs.stdout:
            print(log.text)

    finally:
        # 6. Cleanup the sandbox
        await sandbox.destroy()

if __name__ == "__main__":
    asyncio.run(main())

What was scanned

The files the safety scan read, as written by the repository's author and shown as plain text. Lines with a finding are marked.

README.md · README · 276 lines

View this file on GitHub (read at the repository's current version: the scan did not record which commit it read)

This file has changed since it was scanned, so this is not exactly the text that was scanned, and no line is marked. The findings are listed with the safety scan above.

  1. <div align="center">
  2. <img src="docs/public/images/logo.svg" alt="OpenSandbox logo" width="150" />
  3. <h1>OpenSandbox</h1>
  4. <p align="center">
  5. <a href="https://aaif.io/projects/opensandbox"><strong>An Agentic AI Foundation (AAIF) Project</strong></a>
  6. </p>
  7. <p align="center">
  8. <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>
  9. <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>
  10. <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>
  11. <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>
  12. <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>
  13. <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>
  14. </p>
  15. <p align="center">
  16. <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>
  17. </p>
  18. <hr />
  19. </div>
  20. **Run AI agents in sandboxes on your own infrastructure.**
  21. 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.
  22. [Quick Start](#getting-started) · [Examples](#examples) · [Documentation](#documentation) · [Fast Sandbox](docs/architecture/fast-sandbox/index.md)
  23. ## Features
  24. | Feature | What it enables | Learn more |
  25. |---------|-----------------|------------|
  26. | **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](docs/architecture/fast-sandbox/index.md) · [Performance](docs/architecture/fast-sandbox/performance.md) · [Pause/resume](docs/architecture/fast-sandbox/checkpoints.md) |
  27. | **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](docs/examples/index.md) |
  28. | **Network access control** | Route inbound traffic through a unified ingress gateway and control outbound access with per-sandbox egress policies. | [Ingress](docs/architecture/network/ingress.md) · [Egress](docs/architecture/network/egress.md) |
  29. | **Credential Vault** | Let agents call external services without exposing real credentials to sandbox workloads. | [Credential Vault](docs/guides/credential-vault.md) |
  30. | **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](docs/architecture/control-plane/operator.md) |
  31. | **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](#sdks) · [CLI](#cli) · [MCP](#mcp) |
  32. | **Extensible sandbox protocol** | Build custom runtime integrations against defined sandbox lifecycle and execution APIs. | [API specs](specs/README.md) |
  33. ## Getting Started
  34. Requirements:
  35. - Docker (required for local execution)
  36. - Python 3.10+ (required for examples and local runtime)
  37. ### Install and Configure the Sandbox Server
  38. ```bash
  39. uvx opensandbox-server init-config ~/.sandbox.toml --example docker
  40. uvx opensandbox-server
  41. # Show help
  42. # uvx opensandbox-server -h
  43. ```
  44. ### Create a Sandbox and Execute Commands/Scripts
  45. Install the Sandbox SDK
  46. ```bash
  47. uv pip install opensandbox
  48. ```
  49. Create a sandbox from an `alpine` image and execute commands and scripts.
  50. ```python
  51. import asyncio
  52. from opensandbox import Sandbox
  53. from opensandbox.models import WriteEntry
  54. async def main() -> None:
  55. # 1. Create a sandbox from the alpine image
  56. sandbox = await Sandbox.create("alpine")
  57. try:
  58. # 2. Execute a shell command
  59. execution = await sandbox.commands.run("echo 'Hello OpenSandbox!'")
  60. print(execution.logs.stdout[0].text)
  61. # 3. Write a script file
  62. await sandbox.files.write_files([
  63. WriteEntry(
  64. path="/tmp/hello.sh",
  65. data="echo \"Hello $1\"\necho '2 + 2 =' $((2 + 2))",
  66. mode=755,
  67. )
  68. ])
  69. # 4. Read the file back
  70. content = await sandbox.files.read_file("/tmp/hello.sh")
  71. print(f"Content: {content}")
  72. # 5. Execute the script
  73. execution = await sandbox.commands.run("sh /tmp/hello.sh OpenSandbox")
  74. for log in execution.logs.stdout:
  75. print(log.text)
  76. finally:
  77. # 6. Cleanup the sandbox
  78. await sandbox.destroy()
  79. if __name__ == "__main__":
  80. asyncio.run(main())
  81. ```
  82. ## Examples
  83. Explore examples by what you want your agent to do. Runnable source code lives in [`examples/`](examples/).
  84. | Use case | What you can build | Examples |
  85. |----------|--------------------|----------|
  86. | **Coding agents** | Run coding agents in isolated environments to edit files, execute commands, and complete development tasks. | [Claude Code](docs/examples/claude-code.md) · [Codex CLI](docs/examples/codex-cli.md) · [DeerFlow](docs/examples/deer-flow.md) |
  87. | **Code execution and data analysis** | Execute model-generated code and work with results through the Code Interpreter SDK. | [Code Interpreter](docs/examples/code-interpreter.md) |
  88. | **Browser and desktop automation** | Automate web interactions and testing, or give agents access to a desktop environment. | [Playwright](docs/examples/playwright.md) · [Chrome](docs/examples/chrome.md) · [Desktop](docs/examples/desktop.md) |
  89. | **Agent evaluation** | Run evaluations with a separate sandbox for each trial. | [Harbor Evaluation](docs/examples/harbor-evaluation.md) |
  90. See the [full example catalog](docs/examples/index.md) for more coding agents, framework integrations, remote development environments, Kubernetes deployment, and storage patterns.
  91. ## SDKs
  92. Pick your language:
  93. <details>
  94. <summary><b>Python</b></summary>
  95. ```bash
  96. pip install opensandbox
  97. ```
  98. </details>
  99. <details>
  100. <summary><b>Java/Kotlin (Gradle Kotlin DSL)</b></summary>
  101. ```kotlin
  102. dependencies {
  103. implementation("com.alibaba.opensandbox:sandbox:{latest_version}")
  104. }
  105. ```
  106. </details>
  107. <details>
  108. <summary><b>Java/Kotlin (Maven)</b></summary>
  109. ```xml
  110. <dependency>
  111. <groupId>com.alibaba.opensandbox</groupId>
  112. <artifactId>sandbox</artifactId>
  113. <version>{latest_version}</version>
  114. </dependency>
  115. ```
  116. </details>
  117. <details>
  118. <summary><b>JavaScript/TypeScript</b></summary>
  119. ```bash
  120. npm install @alibaba-group/opensandbox
  121. ```
  122. </details>
  123. <details>
  124. <summary><b>C#/.NET</b></summary>
  125. ```bash
  126. dotnet add package Alibaba.OpenSandbox
  127. ```
  128. </details>
  129. <details>
  130. <summary><b>Go</b></summary>
  131. ```bash
  132. go get github.com/alibaba/OpenSandbox/sdks/sandbox/go
  133. ```
  134. </details>
  135. ## CLI
  136. 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.
  137. Install:
  138. ```bash
  139. pip install opensandbox-cli
  140. # or
  141. uv tool install opensandbox-cli
  142. ```
  143. Quick start:
  144. ```bash
  145. osb config init
  146. osb config set connection.domain localhost:8080
  147. osb config set connection.protocol http
  148. osb config set connection.api_key <your-api-key>
  149. osb sandbox create --image python:3.12 --timeout 30m -o json
  150. osb command run <sandbox-id> -o raw -- python -c "print(1 + 1)"
  151. ```
  152. See the [CLI README](cli/README.md) for the full command reference.
  153. ## MCP
  154. The OpenSandbox MCP server exposes sandbox creation, command execution, and text file operations to MCP-capable clients such as Claude Code and Cursor.
  155. Install and run:
  156. ```bash
  157. pip install opensandbox-mcp
  158. opensandbox-mcp --domain localhost:8080 --protocol http
  159. ```
  160. Minimal stdio config:
  161. ```json
  162. {
  163. "mcpServers": {
  164. "opensandbox": {
  165. "command": "opensandbox-mcp",
  166. "args": ["--domain", "localhost:8080", "--protocol", "http"]
  167. }
  168. }
  169. }
  170. ```
  171. See the [MCP README](sdks/mcp/sandbox/python/README.md) for client-specific setup.
  172. ## Official Container Images
  173. OpenSandbox release images are published under the same component name in three official registries:
  174. - Docker Hub: `docker.io/opensandbox/<component>`
  175. - GitHub Container Registry: `ghcr.io/opensandbox-group/opensandbox/<component>`
  176. - Alibaba Cloud Container Registry: `sandbox-registry.cn-zhangjiakou.cr.aliyuncs.com/opensandbox/<component>`
  177. Pin production images by digest and check the [release verification guide](docs/community/release-verification.md) for signing coverage before deployment. Legacy per-component releases support Cosign signatures and provenance attestations; current umbrella releases have a [tracked signing and provenance gap](https://github.com/opensandbox-group/OpenSandbox/issues/2463) and must not be assumed to provide the same verification evidence.
  178. ## Documentation
  179. - [Website](https://open-sandbox.ai) — Project homepage and documentation site
  180. - [Architecture](docs/architecture/index.md) — System design and component responsibilities
  181. - [Deployment Guide](docs/deployment/index.md) — Kubernetes installation and operations
  182. - [Server Configuration](docs/getting-started/configuration.md) — Runtime and server settings
  183. - [SDK Reference](docs/sdks/index.md) — Language guides and capability coverage
  184. - [CLI Guide](cli/README.md) — Installation and command reference
  185. - [MCP Integration](sdks/mcp/sandbox/python/README.md) — Setup for MCP-capable clients
  186. - [API Reference](docs/api/index.md) — Sandbox lifecycle and execution contracts
  187. - [Credential Vault](docs/guides/credential-vault.md) — Outbound credential injection
  188. - [Release Verification](docs/community/release-verification.md) — Image signing and artifact verification
  189. - [Enhancement Proposals](oseps/README.md) — Design proposals and technical direction
  190. - [Roadmap](ROADMAP.md) — Project priorities and planning
  191. ## Contact and Discussion
  192. - Issues: Submit bugs, feature requests, or design discussions through GitHub Issues
  193. - Discord: Join the [OpenSandbox Discord community](https://discord.gg/g7FuPs8YeD)
  194. - DingTalk: Join the [OpenSandbox technical discussion group](https://qr.dingtalk.com/action/joingroup?code=v1,k1,A4Bgl5q1I1eNU/r33D18YFNrMY108aFF38V+r19RJOM=&_dt_no_comment=1&origin=11)
  195. ## About
  196. OpenSandbox is a project of the [Agentic AI Foundation (AAIF)](https://aaif.io/projects/opensandbox).
  197. Code is licensed under the [Apache 2.0 License](LICENSE). See the [contribution guide](CONTRIBUTING.md#license) for documentation licensing and contribution terms.

Ratings and comments

Sign in to rate this skill.

Sign in

Free to use. If it’s helped, pass it on.