Skip to content

Latest commit

 

History

History
32 lines (29 loc) · 4.71 KB

File metadata and controls

32 lines (29 loc) · 4.71 KB

OpenSandbox Examples

Examples for common OpenSandbox use cases. Each subdirectory contains runnable code and documentation.

Integrations / Sandboxes

  • 🧰 aio-sandbox: All-in-one sandbox setup using OpenSandbox SDK and agent-sandbox
  • Kubernetes agent-sandbox: Create a kubernetes-sigs/agent-sandbox instance and run a command
  • 🧪 code-interpreter: Code Interpreter SDK singleton example
  • 💾 host-volume-mount: Mount host directories into sandboxes (read-write, read-only, subpath)
  • ☁️ docker-ossfs-volume-mount: Mount OSSFS volumes in Docker runtime (inline credentials, subpath, sharing)
  • 🎯 rl-training: Reinforcement learning training loop inside a sandbox
  • Claude claude-code: Call Claude (Anthropic) API/CLI within the sandbox
  • iFlow iflow-cli: CLI invocation template for iFlow/custom HTTP LLM services
  • Google Gemini gemini-cli: Call Google Gemini within the sandbox
  • OpenAI codex-cli: Call OpenAI/Codex-like models within the sandbox
  • Kimi kimi-cli: Call Kimi Code CLI (Moonshot AI) within the sandbox
  • LangGraph langgraph: LangGraph agent orchestrating sandbox lifecycle + tools
  • Google ADK google-adk: Google ADK agent calling OpenSandbox tools
  • 🦞 nullclaw: Launch a Nullclaw Gateway inside a sandbox
  • 🦞 openclaw: Run an OpenClaw Gateway inside a sandbox
  • 🖥️ desktop: Launch VNC desktop (Xvfb + x11vnc) for VNC client connections
  • Playwright playwright: Launch headless browser (Playwright + Chromium) to scrape web content
  • VS Code vscode: Launch code-server (VS Code Web) to provide browser access
  • Google Chrome chrome: Launch headless Chromium with DevTools port exposed for remote debugging

How to Run

  • Set basic environment variables (e.g., export SANDBOX_DOMAIN=..., export SANDBOX_API_KEY=...)
  • Add provider-specific variables as needed (e.g., ANTHROPIC_API_KEY, OPENAI_API_KEY, GEMINI_API_KEY, KIMI_API_KEY, IFLOW_API_KEY/IFLOW_ENDPOINT, etc.; model selection is optional)
  • Navigate to the example directory and install dependencies: pip install -r requirements.txt (or refer to the Dockerfile in the directory)
  • Then execute: python main.py
  • To run in a container, build and run using the Dockerfile in the directory
  • 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.