CubeSandbox is a high-performance sandbox service designed specifically for AI agents, built on RustVMM and KVM technology. Developed by TencentCloud and written in Rust, it provides instant sandbox creation with sub-60 millisecond cold start times and minimal memory overhead of less than 5MB per instance, enabling thousands of concurrent agent sandboxes to run on a single node.
The core architecture delivers hardware-level isolation by giving each sandbox its own dedicated guest OS kernel, eliminating the shared-kernel vulnerability risks inherent in container-based approaches like Docker. This isolation model makes it safe to execute untrusted code generated by large language models. Despite this strong security posture, CubeSandbox maintains exceptional performance characteristics that traditional virtual machines cannot match, striking a balance between the speed of containers and the isolation of full VMs.
A key feature is native compatibility with the E2B SDK, allowing users to migrate existing E2B-based applications with minimal code changes—typically just updating a single environment variable. The system supports both single-node deployment and scales to multi-node clusters, with a web console accessible on port 12088 for managing sandboxes, templates, nodes, and version matrices directly from a browser.
CubeSandbox includes a sophisticated template system that converts OCI images into templates in a single step, with official presets available from a Template Store that automatically distribute across cluster nodes. The snapshot, clone, and rollback functionality operates at hundred-millisecond granularity through the CubeCoW copy-on-write snapshot engine, allowing sandboxes to be checkpointed at any point and restored to previous states or forked into new instances.
Security features include a credential vault that allows agents to call external APIs and LLMs while ensuring API keys never enter the sandbox environment, preventing exposure in logs or model context. Egress control provides domain allowlists with instant blocking of unauthorized traffic and full audit logging for compliance requirements. Version 0.5 introduced AutoPause and AutoResume functionality for idle sandboxes, reducing costs through automatic suspension and wake-on-demand, along with ARM64 native support and network policy hardening including per-sandbox traffic tokens and policy-based routing.
The project maintains active development with recent releases including v0.5.0 featuring Terraform-based one-click cluster deployment, v0.4.0 adding the credential vault and dashboard capabilities, and v0.3.0 introducing the snapshot engine. The repository is licensed under Apache 2.0 and welcomes contributions. A PyPI package is available at version 0.3.0, and the project is recognized in the CNCF Landscape as an AI-native infrastructure component. The system is positioned for production use by AI agent platforms requiring secure, scalable code execution environments with minimal resource overhead.