Examples
Hands-on examples demonstrating various Cube Sandbox use cases. Each example is a self-contained project with its own README, source code, and dependency definitions.
| Example | Description |
|---|---|
| Code Sandbox Quickstart | The most basic usage: create a sandbox, run Python code, execute shell commands, manage network policies, and more — all via the E2B SDK. |
| Browser Sandbox (Playwright) | Run a headless Chromium inside a MicroVM and control it remotely with Playwright via CDP. |
| OpenClaw Integration | Deploy Cube Sandbox and configure the OpenClaw skill so AI agents can execute code in isolated VM environments. |
| SWE-bench with mini-swe-agent | Automate SWE-bench coding tasks in isolated sandboxes using cube-sandbox + mini-swe-agent, with multi-model support and RL training vision. |
TIP
All examples share the same environment variable conventions (E2B_API_URL, E2B_API_KEY, CUBE_TEMPLATE_ID). See the Quick Start guide to set up your Cube Sandbox deployment first.