header-langage
简体中文
繁體中文
English
Tiếng Việt
한국어
日本語
ภาษาไทย
Türkçe
Scan to Download the APP
Partnered With:

Tencent Cloud Open Sources CubeSandbox, Compatible with E2B, Capable of Running 2,000 Sandboxes on a Single Host

According to Perceptions Beating's monitoring, Tencent Cloud has open-sourced the AI Agent Sandbox Cube Sandbox, written in Rust under the Apache 2.0 license.

The sandbox is an isolated environment for Agents to run code, preventing the generated code from accidentally deleting files or accessing the host without authorization. Currently, products such as OpenAI Agents SDK, Manus, Perplexity, Hugging Face, and others are using a similar architecture, and the de facto standard interface is E2B. Cube is compatible with the E2B interface, allowing business code to remain unchanged. By only modifying an environment variable, Agents can be transitioned from E2B's hosted service to the self-deployed Cube.

Tencent Cloud has released two sets of performance data. The cold start time for a single concurrency is below 60ms, with an average of 67ms for 50 concurrent requests, P95 at 90ms, and P99 at 137ms. The memory footprint for a single instance is less than 5MB (measured when the sandbox size does not exceed 32GB), and a 96-core server can run over 2000 sandboxes simultaneously. In the same scenario, Docker container startup takes around 200ms and shares the host kernel, while traditional virtual machine startup takes seconds with a minimum memory footprint of 20MB per instance.

Cube's approach involves providing each Agent with an independent Guest OS kernel, implementing hardware-level isolation, and reducing the startup time to within a hundred milliseconds. Acceleration is achieved through resource pool pre-allocation, snapshot cloning, and low-level lock optimization. Memory compression is achieved through Rust rewriting, Copy-on-Write memory reuse, and disk sharing using reflink. The project also includes CubeVS, which uses eBPF for network isolation between sandboxes.

Two use cases have been verified for scalability. Cube was originally running in the Tencent Cloud Serverless system, handling billions of calls. After migrating the Yuenbao AI programming scenario to Cube, resource core-hour consumption decreased by 95.8%. Externally, MiniMax achieved minute-level scheduling of hundreds of thousands of sandbox instances in Agentic RL training using Cube. The next step in the plan is to open-source event-level snapshot rollback, providing sub-hundred-millisecond state rollback.

举报 Correction/Report
Correction/Report
Submit
Add Library
Visible to myself only
Public
Save
Choose Library
Add Library
Cancel
Finish