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 ships first-party client libraries for five languages, each covering the full surface of the sandbox API: lifecycle management, shell command execution, file operations, egress policy control, and code interpretation. Every SDK follows the same four-step workflow — configure a connection, create a sandbox, perform operations, then clean up — so patterns learned in one language translate directly to another.

Sandbox SDKs

The core libraries for creating and managing sandboxes.
LanguagePackageInstall
Pythonopensandboxpip install opensandbox
JavaScript/TypeScript@alibaba-group/opensandboxnpm install @alibaba-group/opensandbox
Kotlin/Javacom.alibaba.opensandbox:sandboxGradle / Maven
Gogithub.com/alibaba/OpenSandbox/sdks/sandbox/gogo get
C#/.NETAlibaba.OpenSandboxdotnet add package

Code Interpreter SDKs

Higher-level libraries for multi-language code execution inside sandboxes. Built on top of the sandbox SDKs, they add execution contexts and state persistence across runs.
LanguagePackageInstall
Pythonopensandbox-code-interpreterpip install opensandbox-code-interpreter
JavaScript/TypeScript@alibaba-group/opensandbox-code-interpreternpm install @alibaba-group/opensandbox-code-interpreter
Kotlin/Javacom.alibaba.opensandbox:code-interpreterGradle / Maven
C#/.NETAlibaba.OpenSandbox.CodeInterpreterdotnet add package

MCP Server

The MCP server exposes sandbox operations to MCP-capable clients such as Claude Code and Cursor.
pip install opensandbox-mcp

Common Patterns

All SDKs share four standard patterns regardless of language.
1

Connection config

Supply the server domain, API key, and optional transport settings. Most SDKs read OPEN_SANDBOX_API_KEY and OPEN_SANDBOX_DOMAIN from the environment automatically.
2

Sandbox creation

Specify a container image, optional entrypoint, resource limits, environment variables, TTL, and network policy. The SDK blocks until the sandbox reports ready or ready_timeout elapses.
3

Operations

Execute shell commands (with optional real-time streaming), read and write files, resolve port endpoints, inspect or patch egress rules, and inject credentials via Credential Vault.
4

Cleanup

Call kill() to terminate the remote instance immediately, or let the sandbox expire automatically via its server-side TTL. Always call close() on the SDK object to release local HTTP resources.

Choose Your SDK

Python

Async and sync APIs, SandboxPoolSync, SandboxPoolAsync, and optional Redis-backed pool state for distributed deployments.

JavaScript / TypeScript

Typed async API with undici keep-alive pools per instance, volume mounts, and full browser compatibility.

Kotlin / Java

Builder-style API with OkHttp connection pooling, SandboxPool, and an optional sandbox-pool-redis module.

Go

Three focused clients — LifecycleClient, ExecdClient, and EgressClient — with idiomatic SSE streaming callbacks.

C# / .NET

IAsyncDisposable sandbox and manager types, Microsoft.Extensions.Logging integration, and support from .NET Standard 2.0 through .NET 10.

Build docs developers (and LLMs) love