CubeSandbox: Instant, Concurrent, Secure & Lightweight Sandbox Service for AI Agents (12.9k stars)
What it does
All text below is quoted directly from the project README.
>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.
Product Highlights:
- Ultra-fast Startup: Resource pooling and snapshot cloning skip all cold-start overhead. Average <60ms cold start, sandbox creation faster than a blink.
- Hardware Isolation: Every sandbox runs a dedicated OS kernel in its own MicroVM.
- E2B SDK Compatible: Compatible with E2B SDK interface. Switch from E2B Cloud seamlessly by changing one environment variable, zero client code changes.
- High-density Deployment: <5MB overhead per sandbox enables thousands of instances per server via kernel sharing and Copy-on-Write (CoW). Supports automatic sandbox pause and resume, further improving deployment density and cost optimization.
- Network Security: eBPF-based inter-sandbox isolation and egress filtering at kernel level; built-in L7 security proxy enables per-domain/path/method policies with automatic credential injection, secrets never visible to sandbox code.
- Flexible State Management: High-frequency snapshot and rollback at hundred-millisecond granularity. Create checkpoints on running sandboxes, roll back to any saved state at any time, or fork from a specific state to explore in parallel.
- Volume Framework: E2B-compatible Volume framework that lets users plug in custom backend storage solutions. Volumes have an independent lifecycle and can be shared across sandboxes.
- Production Deployment: Deploy production clusters on Tencent Cloud with one click using Terraform. Also supports deployment on standard Kubernetes clusters (preview).
- ARM Architecture Support: Full native ARM64 support across compilation, build, and deployment workflows.
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|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.
Repository
TencentCloud/CubeSandbox
Repository stats
|Metric|Value|
|:-|:-|
|Stars|12,926|
|Forks|1,192|
|Last release|v0.7.3 (2026-10-12)|
|Languages|Go 32.9%, Rust 25.7%, C 22.3%|
|Contributors|112|
|AI contributor accounts (Claude / Codex / Cursor / Copilot)|cursoragent (45 commits), claude (6)|
|AI co-authored commits|Cursor: 45, Claude: 7|
Main contributor
|Field|Value|
|:-|:-|
|Name|LoGin|
|GitHub|@fslongjin|
|Commits to this repo|356 (top contributor)|
|Bio|A software engineer passionate about OS kernel & IaaS. Currently working at @Tencent|
|Company / Location|@DragonOS-Community @Tencent / Shenzhen, China|
|Website|longjin666.cn|
|Followers|346|
|Public repos|147|
|On GitHub since|2020-04-06|
11 points · 1 comment
Mentions
CubeSandbox: Instant, Concurrent, Secure & Lightweight Sandbox Service for AI Agents (12.9k stars) What it does All text below is quoted directly from the project README. >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. Product Highlights: - Ultra-fast Startup: Resource pooling and snapshot cloning skip all cold-start overhead. Average <60ms cold start, sandbox creation faster than a blink. - Hardware Isolation: Every sandbox runs a dedicated OS kernel in its own MicroVM. - E2B SDK Compatible: Compatible with E2B SDK interface. Switch from E2B Cloud seamlessly by changing one environment variable, zero client code changes. - High-density Deployment: <5MB overhead per sandbox enables thousands of instances per server via kernel sharing and Copy-on-Write (CoW). Supports automatic sandbox pause and resume, further improving deployment density and cost optimization. - Network Security: eBPF-based inter-sandbox isolation and egress filtering at kernel level; built-in L7 security proxy enables per-domain/path/method policies with automatic credential injection, secrets never visible to sandbox code. - Flexible State Management: High-frequency snapshot and rollback at hundred-millisecond granularity. Create checkpoints on running sandboxes, roll back to any saved state at any time, or fork from a specific state to explore in parallel. - Volume Framework: E2B-compatible Volume framework that lets users plug in custom backend storage solutions. Volumes have an independent lifecycle and can be shared across sandboxes. - Production Deployment: Deploy production clusters on Tencent Cloud with one click using Terraform. Also supports deployment on standard Kubernetes clusters (preview). - ARM Architecture Support: Full native ARM64 support across compilation, build, and deployment workflows. 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|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. Repository TencentCloud/CubeSandbox Repository stats |Metric|Value| |:-|:-| |Stars|12,926| |Forks|1,192| |Last release|v0.7.3 (2026-10-12)| |Languages|Go 32.9%, Rust 25.7%, C 22.3%| |Contributors|112| |AI contributor accounts (Claude / Codex / Cursor / Copilot)|cursoragent (45 commits), claude (6)| |AI co-authored commits|Cursor: 45, Claude: 7| Main contributor |Field|Value| |:-|:-| |Name|LoGin| |GitHub|@fslongjin| |Commits to this repo|356 (top contributor)| |Bio|A software engineer passionate about OS kernel & IaaS. Currently working at @Tencent| |Company / Location|@DragonOS-Community @Tencent / Shenzhen, China| |Website|longjin666.cn| |Followers|346| |Public repos|147| |On GitHub since|2020-04-06|