Instant, Concurrent, Secure & Lightweight Sandbox Service for AI Agents
δΈζζζ‘£ Β· Quick Start Β· Documentation Β· Changelog Β· X(Twitter)
Cube Sandbox is a high-performance, out-of-the-box secure sandbox service built on RustVMM and KVM. It supports both single-node deployment and easy scaling to multi-node clusters. It is compatible with the E2B SDK and can create a hardware-isolated, fully serviceable sandbox in under 60ms with less than 5MB of memory overhead.
π° News
|
|
v0.5: AutoPause, Terraform deployer, ARM64 & network policy hardening AutoPause/AutoResume β idle sandboxes auto-suspend and wake on the next request. Terraform one-click cluster deploy ARM64 native full-stack support network policy hardening β per-sandbox traffic tokens, policy-routing egress. Changelog β Β· Terraform deploy β |
|
|
v0.4: Safer egress, easier ops Credential vault β Agents call external APIs as usual; keys never enter the sandbox. Dashboard β version matrix and template health checks; see at a glance whether templates need rebuilding after upgrades. Changelog β Β· Security proxy guide β Β· WebUI guide β |
|
|
Snapshot, Clone & Rollback at hundred-millisecond granularity CubeSandbox 0.3.0 introduces the CubeCoW Copy-on-Write snapshot engine, enabling event-level snapshots, instant cloning, and rollback to any saved state. Changelog β |
|
|
π Initial open-source release Cube Sandbox is now open source! Millisecond boot, hardware-level isolation, E2B-compatible sandbox for AI Agents. Changelog β |
Product Highlights
|
β‘ Sub-60ms boot Β· High density Β· Auto pause/resume Average <60ms cold start, <5MB overhead per instance β run thousands of Agents on one node. Supports automatic sandbox pause and resume for cost optimization |
π Hardware-level isolation Each sandbox gets its own Guest OS kernel β no Docker shared-kernel escapes; run untrusted LLM-generated code safely |
π Seamless E2B migration Native E2B SDK compatibility β swap one URL env var, zero business code changes |
|
π₯οΈ Web console
Manage sandboxes, templates, nodes, and version matrix in the browser β open |
π Credential vault Agents call LLMs and external APIs as usual β keys never enter the sandbox, model context, or logs |
π‘οΈ Egress control Domain allowlists, instant block on unauthorized egress, full audit logs for compliance |
|
πΈ Snapshot Β· Clone Β· Rollback Hundred-millisecond checkpoints on running sandboxes β roll back or fork from any saved state |
π¦ Template system Turn OCI images into templates in one step, install official presets from the Template Store, auto-distribute across nodes |
π€ AgentHub digital assistants Spin up OpenClaw assistants in one click β snapshots, rollback, and assistant template publishing |
Demos
1.cubesandbox.-.mp4 |
2.cubesandbox.demo.mp4 |
Cube-Sandbox.RL.demo.mp4 |
5.cube.V0.3.0.-.-.mp4 |
| Installation & Demo | Performance Test | RL (SWE-Bench) | Snapshot Β· Clone Β· Rollback |
Benchmarks
In the context of AI Agent code execution, CubeSandbox achieves the perfect balance of security and performance:
| Metric | Docker Container | Traditional VM | CubeSandbox |
|---|---|---|---|
| Isolation Level | Low (Shared Kernel Namespaces) | High (Dedicated Kernel) | Extreme (Dedicated Kernel + eBPF) |
| Boot Speed *Full-OS boot duration |
200ms | Seconds | Sub-millisecond (<60ms) |
| Memory Overhead | Low (Shared Kernel) | High (Full OS) | Ultra-low (Aggressively stripped, <5MB) |
| Deployment Density | High | Low | Extreme (Thousands per node) |
| E2B SDK Compatible | / | / | β Drop-in |
- Cold start benchmarked on bare-metal. 60ms at single concurrency; under 50 concurrent creations, avg 67ms, P95 90ms, P99 137ms β consistently sub-150ms.
- Memory overhead measured with sandbox specs β€ 32GB. Larger configurations may see a marginal increase.
For detailed metrics on startup latency and resource overhead, see the Core Operations Performance Benchmark Report (bare metal) and the PVM Cloud Server Benchmark Report.
Quick Start
β‘ Millisecond-level startup β watch the fast-start flow above.
Cube Sandbox requires an x86_64 Linux environment with KVM support.
The guide walks you through everything in four steps β provisioning a server, installing Cube Sandbox, creating a sandbox template, and running your first agent code. No source build needed, up and running in minutes.
Choose your deployment path:
First thing after install: open the Web console
π₯οΈ Visual management β from overview to creating a sandbox and streaming logs, all in your browser.
After one-click deployment, open in your browser:
http://<control-node IP>:12088
Recommended three steps:
- Check overview β Open Overview, confirm nodes are Ready and capacity looks healthy
- Prepare a template β Install an official preset from Template Store; skip if you already have a
READYtemplate under Templates - Create a sandbox β Sandboxes β + New sandbox, pick a
READYtemplate, and view live logs on the detail page within seconds
See the full WebUI console guide.
Deep Dive
- Documentation Home β complete guide navigation
- βοΈ PVM Deployment β deploy on ordinary cloud VMs without bare metal or nested virtualization
- Template Concepts β image-to-template concepts and workflows
- Example Projects β hands-on examples (code execution, browser automation, OpenClaw integration, RL training, and more)
- π₯οΈ WebUI Console β visual management right after install (
:12088) - π Security Proxy & Credential Vault β CubeEgress domain filtering, injection, and auditing
- π€ Digital Assistant AgentHub β create and manage OpenClaw assistants (Preview)
- π» Development Environment (QEMU VM) β no KVM access? Try Cube Sandbox inside a disposable OpenCloudOS 9 VM
Architecture
| Component | Responsibility |
|---|---|
| CubeAPI | High-concurrency REST API Gateway (Rust), compatible with E2B. Swap the URL for seamless migration. |
| CubeMaster | Cluster orchestrator. Receives API requests and dispatches them to corresponding Cubelets. Manages resource scheduling and cluster state. |
| CubeProxy | Reverse proxy, compatible with the E2B protocol, routing requests to the appropriate sandbox instances. |
| Cubelet | Compute node local scheduling component. Manages the complete lifecycle of all sandbox instances on the node. |
| CubeVS | eBPF-based virtual switch, providing kernel-level network isolation and security policy enforcement. |
| CubeEgress | OpenResty-based egress security gateway: L7 domain filtering, credential injection, and access auditing; works with CubeVS kernel policies so sandbox traffic cannot bypass inspection. |
| CubeHypervisor & CubeShim | Virtualization layer β CubeHypervisor manages KVM MicroVMs, CubeShim implements the containerd Shim v2 API to integrate sandboxes into the container runtime. |
π For more details, please read the Architecture Design Document and CubeVS Network Model.
Community & Contributing
We welcome contributions of all kindsβwhether it's a bug report, feature suggestion, documentation improvement, or code submission!
- π Found a Bug or have questions? Submit an issue on GitHub Issues.
- π‘ Have an Idea? Join the conversation in GitHub Discussions.
- π οΈ Want to Code? Check out our CONTRIBUTING.md to learn how to submit a Pull Request.
- π Want to contribute docs? Submit bilingual PRs to our community doc channels: Troubleshooting, Use Cases, and Integrations.
- π¬ Want to Chat? Join our Discord.
Roadmap
Coming soon β see the full roadmap for details.
| Feature | Description |
|---|---|
| Kubernetes-Native Deployment | Deploy and operate CubeSandbox entirely within a K8s cluster using CRDs, operators, and native scheduling β no out-of-band orchestration |
| Volume Support | Persistent and shared volume support compatible with the E2B volume protocol |
| Cross-Node Pause & Resume | Suspend a sandbox on one node and resume it on another with full memory and filesystem state preserved |
| E2B API Compatibility | Close remaining gaps with the E2B specification for full drop-in compatibility |
| Control Plane / Data Plane Separation | Decouple the control plane from the data plane so control plane upgrades or failures never affect sandboxes already in flight |
| Sandbox Fault Recovery | Automatic detection and recovery of crashed VMs, stuck shim processes, and network partitions with configurable recovery policies |
| Scheduling & Operations Enhancements | Resource-aware placement, affinity rules, live rebalancing, and node drain with sandbox migration |
License
CubeSandbox is released under the Apache License 2.0.
The birth of CubeSandbox stands on the shoulders of open-source giants. Special thanks to Cloud Hypervisor, Kata Containers, virtiofsd, containerd-shim-rs, ttrpc-rust, and others. We have made tailored modifications to some components to fit the CubeSandbox execution model, and the original in-file copyright notices are preserved.
Cube Sandbox is listed in the CNCF Landscape.





