Bhardwaj says agents need sandboxes to run tools during inference and reward functions during reinforcement learning. A full Linux environment also lets coding agents inspect processes, debug apps, and recover from failed steps. Because generated code may be buggy or malicious, it needs limits that protect host systems and data.
Arrakis: How To Build An AI Sandbox From Scratch
Speaker
Abhishek Bhardwaj, solo founder and developer of Arrakis, explains how he built an open-source AI sandbox for code execution and computer use at AI Engineer.
Arrakis is a self-hosted service for spawning customizable sandboxes, with snapshot and restore for agent workflows. Bhardwaj describes its microVM runtime, boot times under seven seconds at the time of the talk, and support for port forwarding, Chrome with VNC, and Docker-based customization. He explains how containers use namespaces and cgroups, but still share the host kernel, while microVMs run a separate guest kernel.
Bhardwaj describes microVMs as lightweight virtual machines with a smaller set of supported architectures and devices, which reduces code and can improve boot speed and memory use. Arrakis uses Cloud Hypervisor, citing its device hot-plugging and snapshot support at the time of selection. The VM boundary is intended to reduce the host’s exposure to untrusted, multi-tenant agent code.
Each sandbox uses a shared read-only root filesystem and its own writable OverlayFS layer; snapshots persist the writable layer. For networking, Arrakis connects each VM’s TAP device to a Linux bridge and sets up firewall rules and port forwarding. A guest code server handles commands and file transfers, while Chrome and a VNC server support computer use.
Snapshots preserve guest memory and the writable filesystem, so agents can return to a checkpoint with processes and open GUI windows restored. In a Claude Desktop demo through Arrakis’s MCP server, the agent builds a collaborative Google Docs clone, adds dark mode, then restores the earlier snapshot. Bhardwaj names sub-second boot, Btrfs-based incremental snapshots, and dynamic memory management as ongoing work.
Takeaways
- A full Linux environment can let agents debug and recover using familiar system tools.
- Containers package dependencies and isolate resource views, but still share the host kernel.
- MicroVMs trade some performance and device flexibility for a stronger isolation boundary.
- Snapshot both guest memory and writable files to preserve running workflows.
- Plan networking and resource management alongside execution if agents need real apps and multi-tenant isolation.
Mentioned in this talk
Search inside this talk
What was claimed 9
- previously atAbhishek Bhardwaj previously at
Replit
“The last couple of years, I was at Replit”
YouTube Verified2 sources· Talk, Web· archived
- previously atAbhishek Bhardwaj previously at
Microsoft“At Microsoft, I worked on Windows Subsystem for Linux”
YouTube Verified2 sources· Talk, Web· archived
- feature
Arrakis: Snapshot and restore for sandbox backtracking“It has out-of-the-box support for backtracking via snapshot and restore”
YouTube Unverified1 source· Talk
- feature
Arrakis: Open-source, self-hosted sandbox service for AI code execution and computer use“Arrakis provides a secure, fully customizable, and self-hosted solution to spawn and manage AI sandboxes”
YouTube Unverified1 source· Talk
- metric
Arrakis: Boots in less than 7 seconds; a pull request aims to reduce this below 1 second“Currently, Arrakis boots in less than seven seconds”
YouTube Unverified1 source· Talk
- feature
Arrakis: Python API, Go client, MCP server, and OpenAPI-compatible YAML“It has a Python API, a Go client, and an MCP server”
YouTube Unverified1 source· Talk
- feature
Arrakis: Docker tooling and Dockerfile customization“it's configurable with Docker tooling”
YouTube Unverified1 source· Talk
- uses
Arrakis uses Cloud Hypervisor“use Cloud Hypervisor as the microVM VMM for Arrakis”
YouTube Unverified1 source· Talk
- feature
Arrakis: Plans to use Btrfs for incremental snapshots and persistence“we want first-class support for snapshots and persistence. That means moving to Btrfs”
YouTube Unverified1 source· Talk











