OpenSandbox AI Agent

by opensandbox-group• 16k•• Scanned•Claim this listing•Request removal
Developer Toolsaaifaiai agentai infrakubernetes

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

OpenSandbox is an open-source ai agent by opensandbox-group, written mainly in Python, with 16,355 GitHub stars and the Apache-2.0 license. Its code was last updated Nov 1, 2026. The latest PyPI release is opensandbox-server 1.2.1, published Nov 13, 2026, with 32,562 downloads last week.

<div align="center"> <img src="docs/public/images/logo.svg" alt="OpenSandbox logo" width="150" /> <h1>OpenSandbox</h1> <p align="center"> <a href="https://aaif.io/projects/opensandbox"><strong>An Agentic AI Foundation (AAIF) Project</strong></a> </p> <p align="center"> <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> <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> <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> <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> <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> <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> </p> <p align="center"> <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> </p> <hr /> </div>

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

FeatureWhat it enablesLearn more
Fast Sandbox runtimeFast, 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 environmentsExecute 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 controlRoute inbound traffic through a unified ingress gateway and control outbound access with per-sandbox egress policies.Ingress · Egress
Credential VaultLet agents call external services without exposing real credentials to sandbox workloads.Credential Vault
Local to clusterStart 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 MCPIntegrate 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 protocolBuild 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

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())

Examples

Explore examples by what you want your agent to do. Runnable source code lives in examples/.

Use caseWhat you can buildExamples
Coding agentsRun coding agents in isolated environments to edit files, execute commands, and complete development tasks.Claude Code · Codex CLI · DeerFlow
Code execution and data analysisExecute model-generated code and work with results through the Code Interpreter SDK.Code Interpreter
Browser and desktop automationAutomate web interactions and testing, or give agents access to a desktop environment.Playwright · Chrome · Desktop
Agent evaluationRun evaluations with a separate sandbox for each trial.Harbor Evaluation

See the full example catalog for more coding agents, framework integrations, remote development environments, Kubernetes deployment, and storage patterns.

SDKs

Pick your language:

<details> <summary><b>Python</b></summary>
pip install opensandbox
</details> <details> <summary><b>Java/Kotlin (Gradle Kotlin DSL)</b></summary>
dependencies {
    implementation("com.alibaba.opensandbox:sandbox:{latest_version}")
}
</details> <details> <summary><b>Java/Kotlin (Maven)</b></summary>
<dependency>
    <groupId>com.alibaba.opensandbox</groupId>
    <artifactId>sandbox</artifactId>
    <version>{latest_version}</version>
</dependency>
</details> <details> <summary><b>JavaScript/TypeScript</b></summary>
npm install @alibaba-group/opensandbox
</details> <details> <summary><b>C#/.NET</b></summary>
dotnet add package Alibaba.OpenSandbox
</details> <details> <summary><b>Go</b></summary>
go get github.com/alibaba/OpenSandbox/sdks/sandbox/go
</details>

CLI

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.

MCP

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.

Official Container Images

OpenSandbox release images are published under the same component name in three official registries:

  • Docker Hub: docker.io/opensandbox/<component>
  • GitHub Container Registry: ghcr.io/opensandbox-group/opensandbox/<component>
  • Alibaba Cloud Container Registry: sandbox-registry.cn-zhangjiakou.cr.aliyuncs.com/opensandbox/<component>

Pin production images by digest and check the release verification guide 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 and must not be assumed to provide the same verification evidence.

Documentation

Contact and Discussion

About

OpenSandbox is a project of the Agentic AI Foundation (AAIF).

Code is licensed under the Apache 2.0 License. See the contribution guide for documentation licensing and contribution terms.

OpenSandbox alternatives

View more →

Similar ai agents in Developer Tools, ranked by GitHub stars. Compare licence, recent activity and scan status before you choose.

NameStarsLicenceLast updatedScan
OpenSandbox (this page)
opensandbox-group
16kApache-2.0Nov 1, 2026Scanned, no flagged issues
Deepseek Harness
deepseek-ai
268kMITOct 30, 2026Scanned, no flagged issues
Ponytail
DietrichGebert
182kMITOct 29, 2026Scanned, no flagged issues
Orca
stablyai
112kMITNov 1, 2026Scanned, no flagged issues
Deer Flow
bytedance
85kMITNov 1, 2026Scanned, no flagged issues
Ruflo
ruvnet
80kMITNov 1, 2026Scanned, no flagged issues