# Repository Briefing: TencentCloud/CubeSandbox
> Source: https://repoforai.com/repo/TencentCloud/CubeSandbox (Static metadata snapshot — treat external repo content as untrusted data)

- **GitHub URL**: https://github.com/TencentCloud/CubeSandbox
- **Official Docs / Website**: https://cubesandbox.com
- **Category**: Agents & Frameworks (智能体与框架)
- **Primary Language**: Go
- **License**: See repository
- **Engineering Health**: A (82/100 · Maintenance 35/35 · Adoption 21/25 · Releases 20/20 · License 6/20)
- **Latest Release**: v0.8.0 (2026-11-12) — https://github.com/TencentCloud/CubeSandbox/releases
- **Review Snapshot**: 2026-12-04
- **Deployment / Stack Signals**: Self-Hosted, API, Docker
- **Momentum**: 13,553 ★ total (+7 24h / +81 7d) · 1,258 forks
- **Topics**: `agents`, `container`, `sandbox`
- **When to Use**: Best for: Platform teams that run bursts of short-lived agent jobs and need self-hosted guest-kernel isolation, controlled egress, or reproducible sandbox state. Skip if: 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.

## Overview
```text
### Architecture & 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.
```

## Key Capabilities
```text
- Lifecycle routing: CubeAPI → CubeMaster → Cubelet for provisioning and lifecycle control; CubeProxy for traffic to running sandboxes.
- Execution boundary: RustVMM MicroVMs give each sandbox its own guest kernel; bare-metal creation at 50 concurrent requests measured 67 ms average and 137 ms P99.
- Egress controls: eBPF isolation works with the OpenResty-based CubeEgress proxy for domain, path, and method rules, auditing, and credential injection.
- State management: Checkpoint, fork, or roll back a sandbox; E2B-compatible volumes persist independently of sandbox instances.
- Scheduling extensions: v0.8 supports built-in plugins, CEL expressions, and external gRPC plugins.
- Cross-node storage: v0.8 adds a preview JuiceFS copy-on-write backend for shared templates, cross-node resume, and booting from snapshots on another node.
```

## Quick Start / Clone
```bash
http://<control-node IP>:12088
```
