CubePod is an open-source, cloud-native execution platform designed for long-lived, high-autonomy AI Agents, featuring native E2B compatibility and native Kubernetes Runtime scheduling . Part of the Open-Source CubePlex Agent Stack , CubePod provides the persistent hardware-isolated execution layer powering CubePlex (Team Agent Workspace) and CubeLoop (Async Agent Runtime), delivering MicroVM execution with instant hibernation/resume and full system-level persistence.
Modern AI agents (DevOps agents, software engineering assistants, interactive data analysts) operate with broad shell privileges: they dynamically install system packages ( apt , pip , npm , Rust/C++ compilers), launch headless or interactive GUI browsers, and interact with external APIs using privileged credentials.
Existing sandbox solutions suffer from four fundamental architectural limitations:
Ephemeral RootFS (Only /workspace Persists) : Standard container sandboxes discard modifications to /usr , /etc , and /var whenever a sandbox sleeps or restarts. Agents are forced to repeatedly reinstall toolchains and libraries, wasting minutes on every wakeup.
Heavyweight Snapshot Overhead : VM memory snapshotting (CRIU / VM dumps) produces gigabyte-scale state files sensitive to host CPU architecture, while OCI commit/export approaches require tens of seconds to push layers to registries. Modern agents follow a "Decoupled Brain & Hand" model—reasoning context resides in the agent framework, meaning the sandbox only needs 100% persistent disk state with zero CPU/RAM allocation during sleep .
Network Filesystem I/O Bottleneck : Mounting NFS or CephFS across sandboxes causes catastrophic latency during npm install , pip install , or git status due to millions of small-file RPC round-trips.
Plaintext Secret Exposure : Injecting real API keys into container environment variables exposes credentials to untrusted LLM-generated code or host memory leaks.
CubePod solves these challenges with Dual-Volume CSI Raw Block persistence , Kata Containers MicroVM isolation , Zero-Export instant hibernation , and an in-guest Zero-Trust egress vault .
CubePod vs. Upstream E2B & Standard Sandboxes
Key Architectural Highlights
1. Dual-Volume Persistent Writable RootFS
CubePod decouples system dependencies from user files by provisioning two independent CSI Raw Block PVCs ( volumeMode: Block ):
rootfs-pvc : Carries the OverlayFS upperdir and workdir . Stores all delta modifications to /usr , /etc , and /var created by apt-get , pip , or npm .
workspace-pvc : Mounted directly at /workspace (with 1000:1000 ownership). Preserves source code, artifacts, and skills.
This decoupling enables RootFS Re-imaging without Data Loss : developers or agent frameworks can increment rootfsGeneration to purge a corrupted OS environment or upgrade the base image while keeping all /workspace project files intact.
2. Zero-Export Suspend & ~1s Cross-Node Resumption
Suspend : When an agent sandbox is paused or hits its idle timeout, podd executes sync + fsfreeze to flush kernel page caches and quiesce filesystem transactions. The Kata MicroVM Pod is immediately deleted, reducing CPU and memory consumption to absolute zero .
Resume : Any incoming request (HTTP, command execution, or panel access) triggers cubepod-gateway to schedule a fresh MicroVM Pod on any cluster node . The CSI driver re-attaches the existing Raw Block PVCs, and podd-init mounts the ext4 filesystems in ~1 second without transporting multi-gigabyte memory state over the network.
3. Zero Host Intrusion ( podd-init )
Standard Kubernetes cannot mount Raw Block devices as the container rootfs without custom host-level Kubelet or containerd patches. CubePod bypasses this via In-Guest RootFS Pivot :
MicroVM binaries ( podd-init and podd ) are injected at Pod startup via a shared emptyDir volume populated by an init container ( cubepod-podd , < 1MB ).
podd-init runs as PID 1 in the Kata Guest kernel, mounts /dev/cubepod-rootfs and /dev/cubepod-workspace , builds the OverlayFS, calls pivot_root(2) , and hands execution over to podd .
User container images remain standard OCI images without baking in infrastructure binaries.
4. Pre-Attached WarmPool ( PodWarmPool )
To achieve sub-50ms cold starts without violating Kubernetes Pod volume immutability:
Standby MicroVMs run in PodWarmPool with pre-created, pre-formatted, thin-provisioned block devices already pivoted into ext4.
When a new sandbox is requested, cubepod-controller re-labels and transfers ownership of the standby Pod and volumes in < 50ms , completely bypassing container scheduling and image pull delays.
5. Built-in Zero-Trust Egress & Secret Vault
Sensitive external credentials (e.g., GitHub tokens, payment keys) never enter the sandbox filesystem, environment variables, or process memory .
The sandbox receives only opaque cpodref_ references.
All outbound traffic is intercepted by an in-guest Egress Sidecar via nftables . The sidecar inspects TLS SNI, enforces domain allowlists, and dynamically exchanges cpodref_ tokens with the egress vault over dedicated per-sandbox mTLS.
E2B Drop-in Compatibility
CubePod provides 100% wire-compatible drop-in interoperability with official E2B SDKs ( CEP-0018 ). Existing AI Agent pipelines (LangChain, LlamaIndex, AutoGen, OpenHands, Smolagents) connect to CubePod without changing code—simply point E2B_DOMAIN to cubepod-gateway .
1. Official Python SDK ( e2b ) — Sync & Async
2. Official Code Interpreter ( e2b-code-interpreter )
CubePod provides native newline-delimited JSON (NDJSON) streaming and rich display formatters ( png , svg , html , json ) compatible with Jupyter protocols:
3. Multi-Language Code Execution
e2b-code-interpreter on CubePod supports 6 standard execution kernels out-of-the-box:
Enterprise Superset Capabilities
Beyond the standard E2B interface, CubePod exposes high-throughput enterprise extensions for mission-critical agent platforms:
1-Second Copy-on-Write Sandbox Fork ( POST /sandboxes/{id}/fork ) : Clones an active sandbox and its dual block volumes in < 1s using CSI snapshots. Enables sub-agents to branch off speculative code execution in complete isolation.
Independent RootFS Reset : Increment rootfsGeneration in the PodBox CRD or API to rebuild the system layer after a broken apt or compiler update while leaving user code in /workspace 100% untouched.
Stateless Log Cursors ( GET /commands/{pid}/logs?cursor={byte_offset} ) : Process logs are persisted to ring buffers on disk. Any gateway replica or agent worker can reconnect and resume streaming logs from arbitrary offsets after network interruptions.
Atomic Skill Archive Sync ( POST /files/archive-sync ) : Streams a tar.gz payload unpacked in-memory directly to /workspace/.skills with exact uid:gid ownership and atomic cleanup of removed tools in a single < 50ms HTTP call.
Signed Panel & GUI Proxy ( /panel/{jwt_token}/{path} ) : Path- and JWT-authenticated reverse proxy supporting HTTP, WebSocket, and WebRTC streaming for Chromium CDP ( :9222 ), Neko browser sharing ( :8080 ), and ttyd web terminal ( :7681 ).
Quick Start (Build & Test)
Docker / Podman (optional for container image verification)
Part of the Open-Source CubePlex Agent Stack
Built on a Brain-Hands Decoupling architecture, CubePod provides the persistent hardware-isolated execution layer ( Hands ) powering CubePlex (Team Agent Workspace) and CubeLoop (Async Agent Runtime & Reasoning Brain ):
CubePlex — Brain / Workspace : Team Agent Workspace for collaborative multi-agent workflows, sessions, and governance.
CubeLoop — Brain / Runtime : Async Agent Runtime orchestrating long-running, multi-model autonomous execution loops.
CubePod — Hands / Execution : Persistent Writable RootFS MicroVM execution substrate with Dual CSI Raw Block persistence, <50ms WarmPool claims, ~1s CoW forks, and Zero-Trust cpodref_ egress.
CubePod is open-source software licensed under the Apache License, Version 2.0 .
Reproducible kind E2E
Run make test-kind-e2e on a Linux Docker host to build and deploy this checkout into an isolated kind cluster and exercise real sandboxes with both official E2B SDKs. See requirements, coverage, diagnostics and local reuse . No KVM or existing Kubernetes environment is needed.
The full story
This article is one source in a clustered incident — the cluster page carries the summary, timeline and every other outlet covering it.
