Quicksand

An open-source Python sandbox for AI agents that runs QEMU Linux VMs locally on macOS, Linux, and Windows, with snapshots and desktop control.

Screenshot of Quicksand website

Quicksand gives AI agents a full Linux virtual machine on your own hardware, controlled through an async Python API. It's for developers who need agents to execute code or interact with a desktop inside a separate operating system. Each sandbox has its own kernel and uses QEMU for hypervisor-level isolation.

It runs on macOS, Linux, and Windows, supports x86_64 and ARM64, and can use hardware acceleration. It doesn't require root privileges, Docker, or a cloud account. The Python project is open source under the MIT license.

Sandboxes start with networking disabled. You can allow internet access and forward ports when a task needs them, while host directory sharing lets agents work with selected files. Multiple agents can have separate Linux user accounts within one VM.

For code execution, the API runs shell commands and returns their output, errors, and exit status. Checkpoints capture the full VM state so an agent's changes can be rolled back after a failed operation. You can also save disk state and load it later, including on another machine.

Prebuilt images cover Ubuntu and Alpine, with headless environments for command-line tasks and Xfce4 desktops for graphical work. Desktop control includes screenshots, typing, clicks, and mouse movement. The Ubuntu desktop includes Firefox; the Alpine desktop includes Chromium. Agent-focused images include Python development tools, while a computer-use image adds Playwright and browser access through noVNC.

Similar to Quicksand