Skip to content

Examples ​

OpenSandbox provides ready-to-run examples covering SDK usage, agent integrations, browser automation, and training workloads.

TIP

All example source code is available in the examples/ directory on GitHub.

Coding Agents ​

Run coding CLIs and AI agent frameworks inside isolated sandboxes.

ExampleDescription
Claude CodeRun Claude Code CLI in a sandbox
Gemini CLIRun Gemini CLI in a sandbox
Codex CLIRun OpenAI Codex CLI in a sandbox
Apply Model PatchesApply Codex-style file patches with a custom sandbox image
OpenCodeRun the OpenCode coding agent in a sandbox
Qwen CodeRun Qwen Code CLI in a sandbox
Kimi CLIRun Kimi CLI (Moonshot AI) in a sandbox
LangGraphLangGraph state-machine workflow with sandbox
Deep AgentsDeep Agents file/shell tools running in a sandbox
Google ADKGoogle ADK agent using OpenSandbox tools
OpenClawOpenClaw Gateway inside a sandbox
DeerFlowDeerFlow agent turns with tools running in a sandbox

Browser & Desktop ​

Execute browser workloads and host desktop environments in sandboxes.

ExampleDescription
ChromeChromium sandbox with VNC and DevTools
PlaywrightPlaywright + Chromium headless testing
DesktopFull desktop environment with VNC
VS CodeVS Code Web (code-server) in a sandbox

Core Usage ​

Fundamental sandbox operations and SDK workflows.

ExampleDescription
Code InterpreterEnd-to-end Code Interpreter SDK workflow
Scheduled Client PoolAdjust idle capacity by business hours using Go's pool Resize API
AIO SandboxAll-in-One sandbox setup
Agent SandboxKubernetes agent-sandbox integration
AKS + KataAKS deployment with Kata VM isolation, ingress, egress, and Credential Vault
WindowsWindows sandbox via KVM/QEMU
Harbor EvaluationRun a Harbor agent evaluation, one sandbox per trial

Storage ​

Persistent and shared storage patterns for sandboxes.

ExampleDescription
Host Volume MountMount host directories into sandboxes
Docker PVC VolumeDocker named volume mounts
Docker OSSFS VolumeDocker OSSFS (OSS FUSE) mounts
rclone Volume MountRemote storage through external Docker plugins or Kubernetes CSI volumes
Kubernetes PVCKubernetes PersistentVolumeClaim mounts

How to Run ​

  1. Start the OpenSandbox server (see Quick Start)
  2. Set environment variables: export SANDBOX_DOMAIN=..., export SANDBOX_API_KEY=...
  3. Add provider-specific variables as needed (e.g., ANTHROPIC_AUTH_TOKEN, OPENAI_API_KEY)
  4. Navigate to the example directory and run: python main.py

TIP

Most examples include a main.py entry point. Follow each example's run instructions for other languages. Some also include a Dockerfile for containerized execution.

Copyright © OpenSandbox a Series of LF Projects, LLC