This is an early release preview. You may encounter bugs.
CubeSandbox logo
Unclaimed

Tool coding

CubeSandbox

Instant, Concurrent, Secure & Lightweight Sandbox for AI Agents.

Built by Tencent

A+ 91/100 GitHub score ? This grade is derived from GitHub signals, not user votes. Open for the full breakdown.
No votes yet

01 / About

What CubeSandbox is.

CubeSandbox is a sandbox service for running agent-generated code, built on RustVMM and KVM. Each sandbox is a MicroVM with its own OS kernel rather than a shared-kernel container, and the reported figures are a cold start under 60 ms and under 5 MB of memory overhead per sandbox, which the project ties to thousands of instances per node through kernel sharing and copy-on-write. It runs on a single node and scales to multi-node clusters.

The API is compatible with the E2B SDK, so client code moves over by changing an environment variable, and the Volume framework follows the same interface while letting you plug in custom backend storage with an independent lifecycle. Remaining gaps against the E2B specification are listed as roadmap work.

State management is snapshot-based. The CubeCoW copy-on-write engine takes event-level snapshots at hundred-millisecond granularity, so you can checkpoint a running sandbox, roll back to any saved state, or fork from one state to explore branches in parallel. Idle sandboxes pause automatically and resume on the next request, and with an S3 backend a sandbox can be suspended on one node and resumed on another, or created from a snapshot, in preview.

Isolation extends to the network: CubeVS is an eBPF virtual switch enforcing inter-sandbox isolation and egress filtering in the kernel, and CubeEgress is an OpenResty gateway applying per-domain, path, and method policies with credential injection, so keys never enter the sandbox and traffic cannot bypass inspection. The rest of the system splits into CubeAPI, the CubeMaster orchestrator, CubeProxy, the per-node Cubelet, and CubeHypervisor with a containerd Shim v2 implementation.

Deployment targets an x86_64 Linux host with KVM, with native ARM64 support across compilation, build, and deployment. Options include cloud VMs, bare metal, a Terraform cluster deployment on Tencent Cloud, Kubernetes in preview, and a disposable QEMU development VM for hosts without KVM access. A web console on port 12088 covers node health, template preparation, sandbox creation, and live logs.

Features

  • MicroVM isolation: every sandbox boots a dedicated kernel under KVM, with eBPF policy enforcement on top
  • Sub-60 ms creation: resource pooling and snapshot cloning remove cold-start overhead; under 50 concurrent creations the reported average is 67 ms with a P99 of 137 ms
  • E2B compatibility: a drop-in API and Volume framework, switched by changing one environment variable
  • Snapshot, clone, rollback: event-level copy-on-write checkpoints, restore to any saved state, and parallel forks
  • AutoPause and resume: idle sandboxes suspend and wake on the next request, including cross-node resume with an S3 backend in preview
  • Egress security: L7 domain, path, and method policies with credential injection and access auditing
  • Deployment paths: cloud VM, bare metal, Terraform on Tencent Cloud, Kubernetes in preview, and a development VM without KVM
  • Web console: cluster overview, template store and health, sandbox lifecycle, and streaming logs on port 12088

02 / Discussion CREDIBILITY-GATED

Discussion

Reading is open to everyone. Posting and voting need a verified identity or a GitHub grade of B or higher.

  • No discussions yet.

04 / Build

Build with CubeSandbox.

Browse the catalogue for frameworks, tools, and harnesses, each scored on real GitHub credibility.

Get CubeSandbox →

Browse the catalogue