World's Fair 2025
Arrakis: How To Build An AI Sandbox From Scratch - Abhishek Bhardwaj, OpenAI
Overview
Arrakis is an open-source, self-hosted service for creating and managing AI sandboxes, designed for secure code execution and computer use by AI agents. It leverages microVMs to provide isolated environments, enabling AI models to safely utilize tools like code execution and search. The system emphasizes security, speed, and the ability for agents to backtrack and replan using snapshots, facilitating more complex task completion.
Who should watch
- AI engineers and builders working with AI agents that require code execution or tool use.
- Developers interested in secure environments for running untrusted or AI-generated code.
- Those looking to build or understand infrastructure for AI agent sandboxing.
- Individuals exploring solutions for agent reliability through state persistence and backtracking.
Key takeaways
- AI sandboxes are crucial for modern AI agents that leverage tool calling (e.g., code execution, search) for enhanced responses and for reinforcement learning during training.
- Arrakis utilizes microVMs, specifically Cloud Hypervisor, for its sandboxing runtime, offering a security-first approach with fast boot times and lower memory consumption compared to traditional VMs.
- Security is paramount; microVMs provide stronger isolation than containers, mitigating risks from potentially malicious or buggy AI-generated code.
- The system supports snapshotting and restoring the entire state of a sandbox, allowing AI agents to backtrack to previous checkpoints, replan, and recover from failures in multi-step workflows.
- Arrakis offers a customizable environment through Docker tooling, allowing users to define the binaries and packages available within the sandbox.
- Networking is handled via tap devices and Linux bridges, with automatic port forwarding to easily access services like VNC or code servers within the sandbox.
- The architecture includes a shared read-only base layer for the root filesystem and a writable layer for each sandbox, balancing resource sharing with individual isolation.
- The project aims to further optimize boot times to under one second and explore file systems like Btrfs for more efficient incremental snapshots.
Notable quotes
*Sandboxing is the next big unlock in intelligence.*
*Agents can also go a long way with the full Linux sandbox at their disposal.*
*Security is paramount for AI sandboxes.*
Unofficial community note. Prefer the recording for nuance.