README.md
1 # OpenSandbox Examples 2 3 Examples for common OpenSandbox use cases. Each subdirectory contains runnable code and documentation. 4 5 ## Integrations / Sandboxes 6 - ๐งฐ [**aio-sandbox**](aio-sandbox): All-in-one sandbox setup using OpenSandbox SDK and agent-sandbox 7 - <img src="https://kubernetes.io/icons/favicon-32.png" alt="Kubernetes" width="16" height="16" style="display:inline-block;width:16px;height:16px;vertical-align:middle;margin-right:4px;" /> [**agent-sandbox**](agent-sandbox): Create a kubernetes-sigs/agent-sandbox instance and run a command 8 - ๐งช [**code-interpreter**](code-interpreter): Code Interpreter SDK singleton example 9 - ๐พ [**host-volume-mount**](host-volume-mount): Mount host directories into sandboxes (read-write, read-only, subpath) 10 - ๐ฆ [**docker-pvc-volume-mount**](docker-pvc-volume-mount): Mount Docker named volumes via the `pvc` backend (parity with Kubernetes PVC API) 11 - โ๏ธ [**docker-ossfs-volume-mount**](docker-ossfs-volume-mount): Mount OSSFS volumes in Docker runtime (inline credentials, subpath, sharing) 12 - <img src="https://kubernetes.io/icons/favicon-32.png" alt="Kubernetes" width="16" height="16" style="display:inline-block;width:16px;height:16px;vertical-align:middle;margin-right:4px;" /> [**kubernetes-pvc-volume-mount**](kubernetes-pvc-volume-mount): Mount Kubernetes PersistentVolumeClaims into sandboxes for persistent storage 13 - ๐ฏ [**rl-training**](rl-training): Reinforcement learning training loop inside a sandbox 14 - <img src="https://img.shields.io/badge/-%20-D97757?logo=claude&logoColor=white&style=flat-square" alt="Claude" width="16" height="16" style="display:inline-block;width:16px;height:16px;vertical-align:middle;margin-right:4px;" /> [**claude-code**](claude-code): Call Claude (Anthropic) API/CLI within the sandbox 15 - <img src="https://geminicli.com/favicon.ico" alt="Google Gemini" width="16" height="16" style="display:inline-block;width:16px;height:16px;vertical-align:middle;margin-right:4px;" /> [**gemini-cli**](gemini-cli): Call Google Gemini within the sandbox 16 - <img src="https://developers.openai.com/favicon.png" alt="OpenAI" width="16" height="16" style="display:inline-block;width:16px;height:16px;vertical-align:middle;margin-right:4px;" /> [**codex-cli**](codex-cli): Call OpenAI/Codex-like models within the sandbox 17 - <img src="https://avatars.githubusercontent.com/u/159934110?s=32&v=4" alt="Qwen" width="16" height="16" style="display:inline-block;width:16px;height:16px;vertical-align:middle;margin-right:4px;" /> [**qwen-code**](qwen-code): Run Qwen Code inside the sandbox 18 - <img src="https://www.kimi.com/favicon.ico" alt="Kimi" width="16" height="16" style="display:inline-block;width:16px;height:16px;vertical-align:middle;margin-right:4px;" /> [**kimi-cli**](kimi-cli): Call Kimi Code CLI (Moonshot AI) within the sandbox 19 - <img src="https://img.shields.io/badge/-%20-1C3C3C?logo=langgraph&logoColor=white&style=flat-square" alt="LangGraph" width="16" height="16" style="display:inline-block;width:16px;height:16px;vertical-align:middle;margin-right:4px;" /> [**langgraph**](langgraph): LangGraph agent orchestrating sandbox lifecycle + tools 20 - <img src="https://google.github.io/adk-docs/assets/agent-development-kit.png" alt="Google ADK" width="16" height="16" style="display:inline-block;width:16px;height:16px;vertical-align:middle;margin-right:4px;" /> [**google-adk**](google-adk): Google ADK agent calling OpenSandbox tools 21 - ๐ฆ [**nullclaw**](nullclaw): Launch a Nullclaw Gateway inside a sandbox 22 - ๐ฆ [**openclaw**](openclaw): Run an OpenClaw Gateway inside a sandbox 23 - ๐ฅ๏ธ [**desktop**](desktop): Launch VNC desktop (Xvfb + x11vnc) for VNC client connections 24 - <img src="https://playwright.dev/img/playwright-logo.svg" alt="Playwright" width="16" height="16" style="display:inline-block;width:16px;height:16px;vertical-align:middle;margin-right:4px;" /> [**playwright**](playwright): Launch headless browser (Playwright + Chromium) to scrape web content 25 - <img src="https://code.visualstudio.com/assets/favicon.ico" alt="VS Code" width="16" height="16" style="display:inline-block;width:16px;height:16px;vertical-align:middle;margin-right:4px;" /> [**vscode**](vscode): Launch code-server (VS Code Web) to provide browser access 26 - <img src="https://www.google.com/chrome/static/images/chrome-logo.svg" alt="Google Chrome" width="16" height="16" style="display:inline-block;width:16px;height:16px;vertical-align:middle;margin-right:4px;" /> [**chrome**](chrome): Launch headless Chromium with DevTools port exposed for remote debugging 27 28 ## How to Run 29 - Set basic environment variables (e.g., `export SANDBOX_DOMAIN=...`, `export SANDBOX_API_KEY=...`) 30 - Add provider-specific variables as needed (e.g., `ANTHROPIC_AUTH_TOKEN`, `OPENAI_API_KEY`, `GEMINI_API_KEY`, `API_KEY` for Qwen Code, `KIMI_API_KEY`, etc.; model selection is optional) 31 - Navigate to the example directory and install dependencies: `pip install -r requirements.txt` (or refer to the Dockerfile in the directory) 32 - Then execute: `python main.py` 33 - To run in a container, build and run using the `Dockerfile` in the directory 34 - Summary: First set required environment variables via `export`, then run `python main.py` in the corresponding directory, or build/run the Docker image for that directory.