How Open Source Storage Stacks Power AI Agent Sandbox Platforms

    This article examines how an open source storage stack supports an AI agent sandbox platform, focusing on the storage bottleneck created by task-driven, short-lived agent workloads. It explains the three-layer model of image, instance, and control plane, the boundary between the open source code and a separate research platform, and a self-hostable architecture split across control, node, and storage planes. Key topics include on-demand block loading, copy-on-write, image prewarming, memory oversubscription, API compatibility for migration, and a practical deployment checklist covering capacity planning, observability, stability, and security. The goal is to help teams build a minimal working loop first, then tune tail latency and reclaim policies with real operational data.

    1. The Problem: Where Agent Sandboxes Hit a Storage Bottleneck

    An AI agent execution environment differs fundamentally from a traditional virtual machine or container environment: its lifecycle is defined by a task rather than a service. A single agent task may last only tens of seconds, yet it needs a complete runtime environment the moment it starts. Under training and batch evaluation workloads, the number of concurrent tasks can grow by an order of magnitude. If every task pulls a full image from remote storage, storage and network bandwidth quickly become the bottleneck, and startup latency becomes unpredictable.

    One open source agent sandbox platform abstracts this problem into three layers: an image layer (read-only and shareable), an instance layer (writable and short-lived), and a control plane responsible for scheduling and lifecycle management. The core idea of its storage subsystem is on-demand block loading plus copy-on-write: images are loaded block by block on first access, multiple instances share the same read-only data, and writes land only in an instance’s private layer. This approach is closely related to the layered file systems and block-level snapshot designs common in the industry, but it adds enhancements for concurrency and prewarming in agent scenarios.

    2. Relationship to Two Platforms: Contribution Boundary and Encapsulation Boundary

    Based on public information, the storage subsystem was contributed by a frontier research lab, while the platform packaging and sandbox interface compatibility layer were built on the other side. The hosting organization itself has a joint open source nature combining a university lab and a model vendor. This explains a common point of confusion: the production metrics in the platform documentation (for example, an image scale in the millions and a high memory oversubscription ratio) come from the platform side’s real workloads, not from the internal data of the storage code contributor.

    It is important to be clear that the open source version is not the full implementation of a certain deep security sandbox platform. The combination mentioned in that platform’s paper, namely a read-only compressed file system plus persistent memory plus direct access, along with its own distributed file system backend, is not included in this open source code. The open source version follows a different, more general, and easier-to-self-host route: block device snapshots and copy-on-write at the core, with a backend that can connect to local files, object storage, or S3-compatible storage services. Understanding this boundary helps avoid applying paper metrics directly to a self-built environment during selection.

    3. Architecture Breakdown: Control Plane, Node Plane, and Storage Plane

    A self-hostable sandbox platform typically consists of three planes:

    • Control plane: receives create and destroy requests, maintains instance and image metadata, and performs node selection and quota checks. It handles only metadata and state machines and does not move data blocks, so it can stay lightweight.
    • Node plane: an agent running on each host that mounts snapshots, starts micro virtual machines or high-density containers, and reports heartbeats and metrics.
    • Storage plane: stores image block data and instance diff layers, and supports snapshots, cloning, and reclamation.

    The key to keeping the control plane lightweight is separation of responsibilities: the data path is pushed entirely down between nodes and storage, and the control plane does not participate in I/O. A schematic control plane interface can be abstracted as:

    1. POST /instances { image_id, resources, env } -> instance_id
    2. GET /instances/{id} -> status, mounts, metrics
    3. DELETE /instances/{id} -> reclaimed
    4. POST /images { layer_refs } -> image_id

    The cost of this design is that the control plane must rely on node reports to build an accurate view. It therefore needs lease and timeout-based reclamation mechanisms; otherwise a split state can occur where the control plane believes an instance is alive while it has long disappeared on the node.

    4. On-Demand Block Storage: Breaking Startup Latency into Optimizable Parts

    The value of on-demand block loading is that it turns startup from one large copy into a series of small reads. Image metadata arrives first, the instance can enter a running state, and blocks are backfilled by the storage plane on first access. Engineering work needs to focus on four points:

    1. Read amplification and caching: hot blocks should be cached locally on the node to avoid the same image being fetched from the backend repeatedly by multiple instances.
    2. Prefetch strategy: sequential prefetching based on image layer dependency order controls tail latency better than purely random on-demand loading.
    3. Copy-on-write granularity: a block size that is too small causes metadata bloat, while one that is too large amplifies writes, so it needs to be determined through workload stress testing.
    4. Reclamation: after an instance is destroyed, its diff layer must be reclaimed reliably, otherwise storage usage grows linearly over time.

    5. Image Prewarming and Memory Oversubscription: Two Levers for High-Concurrency Startup

    At a scale of millions of images, the biggest enemy of cold start is backend fetch bandwidth. Practical approaches include prewarming high-frequency images ahead of the task queue, converting image blocks into a node-local read-only cache, and performing block-level deduplication and sharing across multiple instances of the same image. Memory oversubscription relies on the assumption that most instances are idle most of the time. It needs to be combined with idle detection and active reclamation, along with an upper limit on the oversubscription ratio and alerts, to avoid triggering cascading page swaps when batch tasks stack up.

    6. Compatibility Layer and Migration: Why Interface Compatibility Matters More Than Feature Parity

    The platform provides a general sandbox interface compatibility layer so that existing agent code can migrate without changes. In practice, the compatibility scope should be documented clearly: file system semantics, network egress policy, process and signal behavior, and the consistency level of snapshot and restore. Any capability the compatibility layer cannot cover should be marked as a difference in the documentation, rather than letting users discover inconsistent behavior at runtime.

    7. Deployment Checklist

    • Capacity planning: estimate storage as total image size multiplied by the number of replicas plus the peak of instance diff layers, and reserve a reclamation buffer.
    • Prewarming: build image popularity statistics and prefetch ahead of time based on queue predictions.
    • Observability: collect backend fetch counts, cache hit rate, mount latency, diff layer growth, and reclamation delay.
    • Stability: use lease heartbeats between the control plane and nodes, and set instance timeout reclamation and orphan mount cleanup.
    • Security boundary: image signing and source verification, least-privilege instance networking, and diff layer encryption and destruction.

    8. Conclusion

    The value of an open source storage stack lies not in replicating every metric from a paper, but in putting a verifiable engineering paradigm of on-demand block loading, copy-on-write, and a lightweight control plane into the hands of self-builders. For teams preparing to build an agent sandbox platform, the pragmatic path is to first get a minimal closed loop running, then use prewarming and caching to reduce tail latency, and finally use observability data to decide the oversubscription ratio and reclamation policy. If running in an environment with capabilities such as object storage, container platforms, and monitoring and alerting, like Baidu AI Cloud, you can directly reuse general cloud products to carry the storage plane and observability pipeline, and focus your effort on scheduling and prewarming strategies.