Find your next open-source project

Search by name, purpose, or keyword — or paste a GitHub repository URL

opensandbox-group/OpenSandbox

AI Engineering

Run AI agents in isolated Docker or Kubernetes sandboxes to execute code, commands, files, browsers and desktops through one API.

17,227
1,632
Go
Apache-2.0
10 months old

What OpenSandbox does

OpenSandbox provides isolated execution environments for AI applications, so an agent can run code, execute shell commands, manage files, and control browsers or desktops without touching the host directly. It starts locally with Docker and scales to Kubernetes behind a unified sandbox lifecycle API, which makes the same integration usable in development and in a cluster.

It is aimed at teams building coding agents, code interpreters, browser/desktop automation, and agent evaluation or RL workloads that need one disposable environment per trial. The runtime covers fast sandbox creation, pause/resume with memory and disk state, inbound and outbound network control, and a credential vault that lets sandboxes call external services without holding real secrets. SDKs are available for Python, Java/Kotlin, TypeScript/JavaScript, C#/.NET, and Go, alongside a CLI and an MCP server.

Quick start

You need Docker for local execution and Python 3.10+ for the examples and local runtime README.

  1. Initialize and start the sandbox server:
uvx opensandbox-server init-config ~/.sandbox.toml --example docker
uvx opensandbox-server
  1. Install the Python SDK:
uv pip install opensandbox
  1. Create a sandbox from an alpine image, run a command, write and read a file, execute a script, then destroy the sandbox:
import asyncio

from opensandbox import Sandbox
from opensandbox.models import WriteEntry

async def main() -> None:
    sandbox = await Sandbox.create("alpine")
    try:
        execution = await sandbox.commands.run("echo 'Hello OpenSandbox!'")
        print(execution.logs.stdout[0].text)

        await sandbox.files.write_files([
            WriteEntry(
                path="/tmp/hello.sh",
                data="echo \"Hello $1\"\necho '2 + 2 =' $((2 + 2))",
                mode=755,
            )
        ])
        content = await sandbox.files.read_file("/tmp/hello.sh")
        print(f"Content: {content}")

        execution = await sandbox.commands.run("sh /tmp/hello.sh OpenSandbox")
        for log in execution.logs.stdout:
            print(log.text)
    finally:
        await sandbox.destroy()

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

Alternative interfaces use the same server: the osb CLI (pip install opensandbox-cli) and the MCP server (pip install opensandbox-mcp). The examples directory contains runnable integrations for Claude Code, Codex CLI, Playwright, Chrome, desktops, and Harbor evaluation.

Constraints and operational notes

  • Docker is required for local execution; cluster deployment uses the Kubernetes operator and has separate setup steps in the deployment guide.
  • The Fast Sandbox runtime's published creation latency figures apply to its Firecracker path on Kubernetes and specific concurrency conditions; they are not a general guarantee for every deployment.
  • Official release images are published to Docker Hub, GHCR, and Alibaba Cloud Container Registry. The README recommends pinning production images by digest. Legacy per-component releases carry Cosign signatures and provenance attestations, but current umbrella releases have a tracked signing and provenance gap, so do not assume the same verification evidence for those images release verification.
  • Code is licensed under Apache-2.0, with separate documentation licensing and contribution terms.

HotRepo's take

On the 2026-11-09 Python daily list, OpenSandbox recorded 16,743 stars and 1,580 forks with 159 stars gained that day, placing 14th on that language board. Those figures show measurable attention around the date, but a single snapshot cannot establish a trend or prove adoption. The more concrete signal is the project's positioning within the Agentic AI Foundation and its breadth of interfaces — multiple SDKs, a CLI, and MCP — which lowers the cost of trying it from different agent stacks. The release-signing caveat above is the main operational detail worth checking before production use.

Written by AI from the project's README, updated . The project's own docs are the source of truth.

You might also like

  1. kubernetes-sigs/agent-sandboxA Kubernetes CRD and controller for running stateful, singleton sandboxes with stable identity, aimed at AI agent runtimes and RL workloads.Go4,429
  2. pydantic/montyRuns Python code written by an LLM in a sandbox that has no filesystem, network, or environment variables, and starts in under a millisecond.Rust8,769
  3. docker/docker-agentDefine multi-agent setups in YAML, wire in MCP tools and any model provider, then run or share them via Docker.Go4,609
  4. agent-substrate/substrateA Kubernetes runtime for running untrusted AI agents in isolated, snapshot-resumable sandboxes at high density.Go5,768