Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/opensandbox-group/OpenSandbox/llms.txt

Use this file to discover all available pages before exploring further.

OpenSandbox is a secure, fast, and extensible sandbox runtime built for AI agents. It provides multi-language SDKs, a unified lifecycle API, and production-ready Docker and Kubernetes runtimes — enabling Coding Agents, GUI Agents, Agent Evaluation, AI Code Execution, and RL Training workloads.

Quickstart

Start a sandbox server and run your first code in minutes

Installation

Install SDKs for Python, JavaScript, Go, Kotlin, and C#

API Reference

Explore the Lifecycle, Execution, and Egress OpenAPI specs

Kubernetes Deployment

Deploy the Kubernetes operator with Helm for production workloads

What is OpenSandbox?

OpenSandbox gives you isolated execution environments — sandboxes — that you create on demand, execute code inside, and discard when done. Each sandbox is a container with a lifecycle managed by the OpenSandbox server, an in-sandbox execution daemon (execd) for commands and file operations, and optional network controls via the egress sidecar.

Multi-Language SDKs

Python, TypeScript, Kotlin, Go, and C# — all with async/sync APIs

CLI (osb)

Full sandbox workflow from the terminal: create, run, files, egress

MCP Server

Expose sandbox tools to Claude Code, Cursor, and other AI clients

Credential Vault

Inject outbound credentials without exposing secrets to sandboxed code

Secure Runtimes

gVisor, Kata Containers, and Firecracker for hardware-level isolation

Pause & Resume

Checkpoint sandbox filesystem state as OCI images between sessions

Get Started in 4 Steps

1

Start the server

uvx opensandbox-server init-config ~/.sandbox.toml --example docker
uvx opensandbox-server
2

Install a SDK

pip install opensandbox
3

Create a sandbox and run code

import asyncio
from opensandbox import Sandbox

async def main():
    sandbox = await Sandbox.create("python:3.12")
    async with sandbox:
        result = await sandbox.commands.run("python -c \"print(1 + 1)\"")
        print(result.logs.stdout[0].text)  # 2
        await sandbox.kill()

asyncio.run(main())

Choose Your Runtime

Docker

Local development and single-host deployments. Zero Kubernetes required.

Kubernetes

Production clusters with the BatchSandbox operator, resource pooling, and pause/resume.

Typical Scenarios

ScenarioDescription
Coding AgentsGive AI agents isolated environments to write, run, and test code
Browser AutomationRun Playwright or Chrome in sandboxed containers with VNC access
Code ExecutionExecute multi-language code safely with the Code Interpreter SDK
Agent EvaluationSpin up reproducible sandbox environments for automated eval pipelines
RL TrainingRun DQN and other RL workloads in isolated, checkpointable sandboxes
Remote DevelopmentLaunch VS Code Web or full desktop environments on demand

Build docs developers (and LLMs) love