CubeSandbox is Tencent Cloud’s open-source sandbox service for AI agents: it spins up hardware-isolated MicroVMs in under 60 milliseconds, so agents can execute untrusted code safely at serious scale. Released in 2026, it has quickly gathered about 13,000 stars on GitHub.
Agents that write and run code need sandboxes, and the usual choices force a trade-off: containers share a kernel and are risky for untrusted code, while full virtual machines are slow and heavy. CubeSandbox is built on RustVMM and KVM so every sandbox gets its own kernel in a MicroVM, yet resource pooling and snapshot cloning skip cold-start overhead โ average creation is under 60ms with less than 5MB of memory overhead per sandbox, allowing thousands of instances per server. Its API is compatible with the E2B SDK, so teams can migrate from E2B Cloud by changing an endpoint rather than rewriting code. State management is unusually strong, with snapshots, cloning and rollback at hundred-millisecond granularity, and security is layered: eBPF-based network isolation, egress filtering, and a credential vault that injects API keys at the boundary so secrets never enter sandbox code. A web console, single-node to multi-node cluster deployment, Terraform and Kubernetes installers, and ARM64 support round out a production-oriented package.
CubeSandbox is free and open source under the Apache-2.0 license. You deploy it on your own servers or cloud instances, so your only cost is the underlying infrastructure.
CubeSandbox is for platform teams and AI product companies that run agent-generated code at scale and need stronger isolation than containers with far better density and startup speed than traditional virtual machines.