Skip to content

CubePod — Sandbox Built for Long-Lived Autonomous Agents

v0.5.0 · Apache 2.0 · 100% E2B Compatible

Sandbox Built for Long-Lived Autonomous Agents

Persistent Writable RootFS MicroVM Execution Platform

Hardware-isolated Kata MicroVMs backed by Dual CSI Raw Block volumes. Sleep at 0 CPU/RAM, resume on any node in ~1s, and keep OS packages intact.

$
MicroVM Lifecycle Demo
node-01 · 42ms claim
Kata MicroVM Compute 2 vCPU · 4 GiB · Active
OverlayFS Root (/) RW · podd :49983
/dev/cubepod-rootfs RW · Persistent upperdir

apt, pip & npm survive sleep

/dev/cubepod-workspace RW · /workspace

volumeKey: agent-ws · 1000:1000

Both CSI block volumes attached; OS deltas and workspace data stay decoupled.
CLAIM LATENCY
< 50ms
PodWarmPool Claim

Pre-formatted standby MicroVMs

RESUME & FORK
~1s
CoW Fork & Resume

Cross-node CSI block re-attach

IDLE OVERHEAD
0 CPU
Zero-Export Suspend

0 RAM · no memory snapshots

PERSISTENCE
100%
RootFS + /workspace

Decoupled dual block PVCs

DEVELOPER EXPERIENCE

Drop-in E2B Compatibility or Superset SDKs

Switch tabs or click Replay to watch the live podd daemon execution stream.

agent_runner.py
export E2B_DOMAIN="127.0.0.1:8080"
export E2B_API_KEY="cpod_live_secret"

from e2b_code_interpreter import Sandbox

with Sandbox.create() as sbx:
    sbx.commands.run("pip install pandas matplotlib")
    res = sbx.run_code("import pandas as pd; pd.DataFrame({'a':[1,2,3]})")
    print(res.results[0].html)
from cubepod import AsyncCubePod

async with AsyncCubePod(base_url="http://127.0.0.1:8080") as cp:
    box = await cp.create(
        "cubeplex-ubuntu24-desktop",
        volume_key="agent-ws-042",
        secret_bindings=[{
            "env_name": "GITHUB_TOKEN",
            "placeholder": "cpodref_gh_readonly_01",
            "allowed_hosts": ["api.github.com"],
        }],
    )
    forked = await cp.fork(box.sandbox_id)
    await cp.reset_rootfs(box.sandbox_id)
    await cp.pause(box.sandbox_id)
import { Sandbox } from 'cubepod';

const sbx = await Sandbox.create({
  baseUrl: 'http://127.0.0.1:8080',
  templateId: 'cubeplex-ubuntu24-desktop',
  volumeKey: 'agent-ws-042',
});

await sbx.files.archiveSync({ 'app/main.py': 'print("ok")\n' }, { dest: '/workspace' });
const panel = await sbx.createEndpoint(8080, { expiresInSeconds: 3600 });
console.log('GUI Panel:', panel.url);
await sbx.pause();
cubepod health
cubepod sandbox create --template cubeplex-ubuntu24-desktop
cubepod sandbox exec <id> "apt-get update && apt-get install -y ripgrep"
cubepod sandbox fork <id>
cubepod sandbox reset-rootfs <id>
cubepod sandbox pause <id>

# Expose sandbox tools via Model Context Protocol
cubepod mcp
podd-daemon · /var/log/cubepod.stream STREAMING
[0.038s] WARMPOOL Claimed standby Kata MicroVM pod-wp-84a1 (<50ms)
[0.094s] CSI-BLK Attached /dev/cubepod-rootfs (ext4) + /dev/cubepod-workspace
[0.412s] OVERLAY pip install pandas matplotlib committed to RootFS upperdir
[0.680s] KERNEL python3 kernel executed cell · 1 HTML table artifact captured
[0.715s] READY State persisted on block PVC across suspend & wake
_
SYSTEM INTERNALS

Four-Layer Architecture Stack

Decouples ephemeral OCI images from persistent RootFS deltas with zero host kubelet patches.

01

Access & Ingress Layer

Client Interfaces

Drop-in E2B SDKs, native CubePod SDKs (Python/TS/Go), CLI, and MCP stdio Server.

E2B Drop-incubepod mcpSigned /panel/{jwt}/
02

Control & Gateway Plane

Kubernetes

Auto-Resume traffic interceptor, PodWarmPool reconciler, and per-pod mTLS CA.

cubepod-gatewaycubepod-controllerPodWarmPool
03

Kata MicroVM Data Plane

Hardware Isolation

Dedicated guest kernel running Rust PID 1 podd-init, podd, and zero-trust egress.

podd-init (Rust)podd :49983cubepod-egressLazy Desktop
04

CSI Raw Block Storage Plane

Zero-Copy CoW

Read-only Base OCI image over independent rootfs-pvc and workspace-pvc block devices.

Longhorn V2 SPDKOpenEBS LVMDual Raw Block
COMPARISON

CubePod vs. Upstream E2B & Containers

Dimension CubePod v0.5.0 Upstream E2B Containers
System Persistence RootFS + /workspace persistent Ephemeral RootFS Lost on restart
Storage Engine Dual CSI Raw Block (NVMe-oF) Ephemeral overlay Overlay / NFS
OS / Data Coupling Decoupled (rootfsGeneration) Coupled state Full wipe on reset
Suspend & Wake 0 CPU/RAM · ~1s block attach Memory dump / cold boot Always billed RAM
Sandbox Forking < 1s CoW dual-volume clone Full copy / N/A Not supported
Secret Isolation cpodref_ + mTLS proxy swap Plaintext env vars Plaintext ENV
Deployment 100% E2B Superset · Self-Host Proprietary SaaS DIY plumbing
CUBEPLEX OPEN-SOURCE STACK · BRAIN-HANDS DECOUPLING

Part of the Open-Source CubePlex Agent Stack

Built on a Brain-Hands Decoupling architecture: CubePlex (Team Agent Workspace) and CubeLoop (Async Agent Runtime) act as the reasoning Brain, while CubePod provides the persistent hardware-isolated execution Hands.