CubeSandbox setup: deploy an AI agent sandbox

Learn CubeSandbox's single-node setup, template creation and Python execution, plus how sandbox pause and resume saves VM state to disk.

Player not loading? Watch on YouTube

This quick start introduces CubeSandbox, an open source sandbox service for running AI agent tasks in separate micro VMs. The speaker describes each VM as having its own kernel and OS-level isolation, with security controls for compute, storage and networking. These are product claims; the demo does not establish that every threat is contained.

The self-hosted setup starts with a bare metal server that meets the project's requirements, though the narration does not specify hardware minimums. An installation command completes a standalone deployment. The example then creates a sandbox template, uses a job ID to wait for completion, and downloads an image to create a snapshot. After setting the template ID in an environment variable file, the presenter runs a script to create a code interpreter sandbox and executes Python code inside it.

The demo also covers saving a running sandbox's state to disk, destroying the VM and resuming execution later. Inbound and outbound network policies control network isolation. For existing E2B users, the speaker claims migration requires changing one environment variable without code changes. Performance figures differ between the sources: the narration claims cold starts under 80 milliseconds and 5 MB of memory overhead, while the description says under 60 milliseconds and under 5 MB.