TencentCloud/CubeSandbox
E2B-compatible MicroVMs for self-hosted, isolated AI agent execution
Automated SPDX check for reference only — not legal advice. Disclaimer
GitHub Star History
Full-history star trajectory from GitHub official history. Switch ranges or hover any point for exact counts.
Evidence-Backed Technical Brief
AI Deep ReviewArchitecture & Core Mechanics
CubeSandbox separates sandbox lifecycle control from traffic routing. CubeAPI, a Rust REST gateway compatible with E2B, accepts lifecycle requests. CubeMaster tracks cluster state and selects a compute node, and Cubelet manages the sandbox on that node. CubeProxy routes E2B-compatible traffic to the running instance. In the KVM configuration, RustVMM MicroVMs run a separate guest kernel per sandbox instead of sharing the host kernel as ordinary containers do.
CubeVS applies eBPF network isolation and kernel-level policy. CubeEgress, an OpenResty-based gateway, adds application-layer filtering, request auditing, and credential injection so secrets need not be placed inside the guest. The v0.8 scheduler supports built-in plugins, CEL expressions, and external gRPC plugins, allowing teams to customize placement without changing the client API.
Key Capabilities & Differentiators
Resource pooling and snapshot cloning reduce startup work. On bare metal, sandbox creation took 60 ms at single concurrency; at 50 concurrent creations it averaged 67 ms, with P95 at 90 ms and P99 at 137 ms. The reported base memory overhead is below 5 MB for sandbox configurations up to 32 GB. Neither metric measures application readiness or the memory consumed by guest workloads.
Running sandboxes can be checkpointed, rolled back, or forked from a saved state. Idle instances can pause automatically and resume on a subsequent request. E2B-compatible volumes have an independent lifecycle, can be shared across sandboxes, and support pluggable storage backends. The v0.8 JuiceFS copy-on-write backend adds cross-node template sharing, resume, and boot from snapshots in preview. The browser console supports template management, sandbox creation, and live log viewing.
Trade-offs & Limitations
Compared with ordinary Docker containers, the separate guest kernel gives CubeSandbox a different isolation boundary, but introduces a virtualization layer and more service components to operate. It is most compelling when you need that boundary and create enough short-lived sandboxes to benefit from rapid cloning. If jobs are trusted and run for a long time, creation latency may matter less than operational simplicity. Benchmark the complete job on your hosts, not just sandbox creation.
Compared with managed E2B, endpoint compatibility can lower migration effort, but it does not remove responsibility for capacity, upgrades, egress policy, or storage recovery. Verify the SDK operations your workload depends on rather than treating API compatibility as proof of feature parity. The root contains a LICENSE file, but the license terms are unspecified here; verify the target release before commercial hosting or redistribution.
Hardware & Deployment Guide
Start with a single node and expand to a multi-node cluster when scheduling or capacity requires it. The standard quick-start targets x86_64 Linux with KVM; native ARM64 build and deployment are also supported. The PVM path targets ordinary cloud VMs without nested virtualization, while the QEMU development environment is for evaluation rather than representative performance testing. Tencent Cloud has a Terraform deployment path, and standard Kubernetes deployment remains in preview. After one-click deployment, the console is available on control-node port 12088; sandbox creation requires a ready template.
On upgrade, note that v0.7 separated node operations into CubeOps and introduced preview cross-node pause and resume with an S3 backend. v0.8 adds the preview JuiceFS backend, scheduler plugins, filesystem-only snapshots, and automatic restart policies, along with sandbox metrics and logs integrated with Prometheus and Grafana. Before depending on cross-node recovery, test snapshot, resume, and logging behavior on the intended hosts and storage backend.
Platform teams that run bursts of short-lived agent jobs and need self-hosted guest-kernel isolation, controlled egress, or reproducible sandbox state.
A shared-kernel container meets your isolation needs, you prefer a managed fleet, or your production design depends on cross-node or Kubernetes features that are still in preview.
Quick Start & Installation
http://<control-node IP>:12088
Comparison vs. Top Agents & Frameworks Alternatives
Full comparison →| Repository | Stars | 7d Trend | Stack | License | Core Positioning |
|---|---|---|---|---|---|
| CubeSandbox ★ | 13.6k | +81 | Go | — | E2B-compatible MicroVMs for self-hosted, isolated AI agent execution |
| sealos | 18.4k | +14 | Go | — | A Kubernetes-backed desktop Ops Agent for deploying and running full-stack apps |
| multica | 59.1k | +891 | Go | — | A shared task board that dispatches coding agents to machines you control. |
| pentagi | 35.7k | +489 | Go | MIT | Self-hosted multi-agent penetration testing with logs and reports for human revi |
AI Context Briefing (for Claude / Cursor / Windsurf)
Standardized architecture summary & quickstart commands ready to paste into coding agents.
curl -sL https://repoforai.com/repo/TencentCloud/CubeSandbox.md
Active README embeds unlock Hot-Tier 6h Telemetry Refresh automatically (zero pay-to-rank).
Frequently Asked Questions about CubeSandbox
How does an existing E2B client connect to a self-hosted cluster?
What hardware should I budget for, and what does the memory figure include?
Can we self-host it commercially or redistribute a modified deployment?
When is CubeSandbox a better fit than Docker or managed E2B?
Upstream README & Documentation
This profile focuses on independent engineering analysis and live telemetry. Read the full upstream README, changelog, and examples directly on GitHub.
Top 10 Breakout Open-Source AI Repos, Every Thursday
Signal-only digest of fast-growing AI repos, SPDX license alerts, and architecture picks. Zero spam.
Zero spam · 1-click unsubscribe · Privacy Policy