Quicksand
How it works
Each sandbox is a full QEMU virtual machine with its own kernel, started (in ~2 s) through an async Python API used as a context manager. Network isolation relies on SLIRP NAT with restrict=on; internet access (NetworkMode.FULL) and port forwarding (guestfwd/hostfwd) are opt-in. Acceleration uses KVM, falling back to TCG emulation when unavailable. Disk state is held in qcow2 overlays, and snapshots/checkpoints and reverts are handled by the savevm mechanism. Host directories mount via CIFS or 9p. It runs on macOS, Linux, and Windows, on x86_64 and ARM64.
Problem solved
AI agents that execute generated code or control a computer need strong isolation from the host. Containers share the host kernel, and cloud solutions require infrastructure and accounts. Quicksand provides VM-level isolation locally, without root, Docker, or the cloud.
Components
A full VM with its own kernel forming a single sandbox; hypervisor-level isolation rather than sharing the host kernel as containers do.
An interface (async context manager) to launch the sandbox, execute commands (stdout/stderr/exit code), and control the desktop.
Checkpoint, revert, and disk-state persistence via qcow2 overlays; state can be resumed later or on another machine.
Network-isolated by default (restrict=on); optional internet (NetworkMode.FULL) and bidirectional port forwarding.
Ubuntu 24.04 and Alpine 3.23 images (base and Xfce4 desktop) plus agent images: quicksand-agent and quicksand-cua (Playwright, Chromium).
Implementation
Evolution
Added guest OS user accounts and streaming stdin (2026-09-14).
Added bidirectional port forwarding between host and guest (2026-10-14).
Hyperparameters (configurable axes)
Isolated by default; NetworkMode.FULL enables internet access.
Choice of base image/OS (Ubuntu/Alpine, desktop, agent images).
Mounting host directories into the VM via CIFS or 9p.
Hardware KVM acceleration or software TCG emulation as a fallback.
Hardware requirements
Runs on any x86_64 or ARM64 host (macOS/Linux/Windows); uses hardware acceleration (KVM) with TCG emulation as a fallback.