TencentCloud / CubeSandbox
TencentCloud / CubeSandbox
CubeSandbox: Instant, Concurrent, Secure & Lightweight Sandbox Service for AI Agents CubeSandbox:面向 AI Agent 的即时、高并发、安全且轻量级的沙箱服务
中文文档 · 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. Cube Sandbox 是一款基于 RustVMM 和 KVM 构建的高性能、开箱即用的安全沙箱服务。它支持单节点部署,并可轻松扩展至多节点集群。该服务兼容 E2B SDK,能够在 60 毫秒内创建硬件隔离、功能完备的沙箱,且内存开销低于 5MB。
📰 News
v0.5: AutoPause, Terraform deployer, ARM64 & network policy hardening v0.5 版本:自动暂停、Terraform 部署器、ARM64 支持及网络策略加固
- AutoPause/AutoResume — idle sandboxes auto-suspend and wake on the next request.
- 自动暂停/自动恢复 — 空闲沙箱自动挂起,并在下一次请求时唤醒。
- Terraform one-click cluster deploy
- Terraform 一键集群部署
- ARM64 native full-stack support
- ARM64 原生全栈支持
- network policy hardening — per-sandbox traffic tokens, policy-routing egress.
- 网络策略加固 — 提供沙箱级流量令牌及策略路由出口控制。
Changelog → · Terraform deploy →
v0.4: Safer egress, easier ops v0.4 版本:更安全的出口控制与更便捷的运维
- Credential vault — Agents call external APIs as usual; keys never enter the sandbox.
- 凭证保险库 — Agent 可照常调用外部 API,但密钥绝不会进入沙箱内部。
- 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. CubeSandbox 0.3.0 引入了 CubeCoW 写时复制(Copy-on-Write)快照引擎,支持事件级快照、即时克隆以及回滚至任意保存状态。
🎉 Initial open-source release 🎉 首次开源发布
Cube Sandbox is now open source! Millisecond boot, hardware-level isolation, E2B-compatible sandbox for AI Agents. Cube Sandbox 现已开源!为 AI Agent 提供毫秒级启动、硬件级隔离且兼容 E2B 的沙箱环境。
Product Highlights
⚡ Sub-60ms boot · High density · Auto pause/resume ⚡ 60ms 内启动 · 高密度 · 自动暂停/恢复 Average <60ms cold start, <5MB overhead per instance — run thousands of Agents on one node. Supports automatic sandbox pause and resume for cost optimization. 平均冷启动时间 <60ms,单实例开销 <5MB — 可在单节点上运行数千个 Agent。支持自动暂停与恢复,以实现成本优化。
🔒 Hardware-level isolation 🔒 硬件级隔离 Each sandbox gets its own Guest OS kernel — no Docker shared-kernel escapes; run untrusted LLM-generated code safely. 每个沙箱拥有独立的 Guest OS 内核 — 无需担心 Docker 共享内核逃逸;安全运行不可信的 LLM 生成代码。
🔌 Seamless E2B migration 🔌 无缝迁移 E2B Native E2B SDK compatibility — swap one URL env var, zero business code changes. 原生兼容 E2B SDK — 只需替换一个 URL 环境变量,无需修改任何业务代码。
🖥️ Web console 🖥️ Web 控制台 Manage sandboxes, templates, nodes, and version matrix in the browser — open :12088 right after install. 在浏览器中管理沙箱、模板、节点和版本矩阵 — 安装后即可通过 :12088 端口访问。
🔐 Credential vault 🔐 凭证保险库 Agents call LLMs and external APIs as usual — keys never enter the sandbox, model context, or logs. Agent 可照常调用 LLM 和外部 API — 密钥绝不会进入沙箱、模型上下文或日志中。
🛡️ 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. 对运行中的沙箱进行百毫秒级检查点备份 — 可回滚或从任意保存状态进行分支(Fork)。
📦 Template system 📦 模板系统 Turn OCI images into templates in one step, install official presets from the Template Store, auto-distribute across nodes. 一键将 OCI 镜像转换为模板,从模板商店安装官方预设,并自动分发至各节点。
🤖 AgentHub digital assistants 🤖 AgentHub 数字助手 Spin up OpenClaw assistants in one click — snapshots, rollback, and assistant template publishing. 一键启动 OpenClaw 助手 — 支持快照、回滚及助手模板发布。
Performance Test
In the context of AI Agent code execution, CubeSandbox achieves the perfect balance of security and performance: 在 AI Agent 代码执行场景中,CubeSandbox 在安全性和性能之间实现了完美平衡:
| Metric | Docker Container | Traditional VM | CubeSandbox |
|---|---|---|---|
| Isolation Level | Low (Shared Kernel Namespaces) | High (Dedicated Kernel) | Extreme (Dedicated Kernel + eBPF) |
| Boot Speed | 200ms | Seconds | Sub-millisecond (<60ms) |
| Memory Overhead | Low (Shared Kernel) | High (Full OS) | Ultra-low (<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. 冷启动测试基于裸金属环境。单并发下为 60ms;在 50 并发创建下,平均 67ms,P95 为 90ms,P99 为 137ms — 始终保持在 150ms 以内。
Quick Start
⚡ Millisecond-level startup ⚡ 毫秒级启动 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. Cube Sandbox 需要支持 KVM 的 x86_64 Linux 环境。本指南通过四个步骤引导您完成:配置服务器、安装 Cube Sandbox、创建沙箱模板以及运行您的第一个 Agent 代码。无需源码编译,几分钟即可运行。
Choose your deployment path: 选择您的部署路径:
- 🖥 PVM · Cloud VM → 🏆 Recommended
- 🏗 Bare Metal →
- 💻 Dev-Env → ⚠️ Not recommended — poor performance
First thing after install: open the Web console
安装后的第一件事:打开 Web 控制台
🖥️ 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
🖥️ 可视化管理 — 从概览到创建沙箱及查看实时日志,一切尽在浏览器中。一键部署后,请在浏览器中访问:http://<控制节点 IP>:12088
Recommended three steps: 推荐三个步骤:
- Check overview — Open Overview, confirm nodes are Ready and capacity looks healthy.
- 检查概览 — 打开概览页面,确认节点状态为 Ready 且容量健康。
- Prepare a template — Install an official preset from Template Store; skip if you already have a READY template under Templates. 2. 准备模板 — 从模板商店安装官方预设;如果“模板”页面下已有 READY 状态的模板,可跳过此步。
- Create a sandbox — Sandboxes → + New sandbox, pick a READY template, and view live logs on the detail page within seconds. 3. 创建沙箱 — 进入“沙箱”页面 → 点击“+ 新建沙箱”,选择一个 READY 模板,几秒钟内即可在详情页查看实时日志。
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 — hand-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)