← Top storiesDiscussion
0
Link

Microsoft just built something AI agents desperately need: A safer place to execute code.

github.comby · 2 days ago

Quicksand (microsoft/quicksand) is an async Python API for launching, controlling and snapshotting QEMU virtual machines, built mainly for sandboxing AI agents. It is MIT-licensed and has about 39 stars and 3 forks. The code is in Python, with 261 commits on main. Key points Setup: It installs with pip install quick-sandbox. It needs no root, no Docker and no system dependencies, and it runs on x86_64 and ARM64 across macOS, Linux and Windows. Images: It ships pre-built Ubuntu 24.04 and Alpine 3.23 VMs, with desktop variants (Xfce4 plus Firefox or Chromium). It also has agent-oriented images. quicksand-agent adds Python 3.12 and uv. quicksand-cua adds Playwright and Chromium for computer-use agents. Main features Commands: sb.execute() runs shell commands inside the VM and returns stdout and the exit code. File sharing: You can mount host directories at boot or hot-mount them on a running sandbox. Networking: Sandboxes are network-isolated by default. Internet access and port forwarding are opt-in through NetworkMode.FULL. Save and load: sb.save() stores disk state, which you can reload later, even on another machine. Checkpoint and revert: You can capture full VM state and roll back after a risky action. Desktop control: With a desktop image you can take screenshots, type text, press keys and move or click the mouse. Configuration: You can set memory (default 512M), CPU cores, disk size, mounts, port forwards, display and auto-save.

no comments