The Design & Implementation of Sprites
Sprites are Linux microVMs that create in a second or two, carry a 100GB durable root filesystem and sleep automatically when idle. Three design decisions separate them from Fly Machines. Every Sprite starts from one standard container, so workers keep pre-warmed pools. Durable state lives on S3-compatible object storage through a modified JuiceFS with a SQLite metadata backend made durable by Litestream, with NVMe serving only as a read-through chunk cache. Most orchestration runs inside the VM's root namespace, around an inner user container. The tradeoffs: checkpoint/restore becomes a cheap metadata operation and migration becomes trivial, but object-backed disks and aggressive sleeping are a poor fit for hot production databases and latency-sensitive apps, which stay on Fly Machines.
Related posts
- Litestream Writable VFS
Fly.io mediumAdeptLitestream's SQLite VFS now supports an optional write mode and background hydration, built so the Sprites storage stack can serve reads and writes milliseconds after a cold boot without first downloading its JuiceFS block map from object storage. Write mode assumes a single writer, disables polling for remote LTX files, and buffers writes locally, syncing them to S3 about every second. That gives 'eventual durability' that suits Sprites but probably not most applications. Hydration serves reads from object storage while pulling a compacted full copy of the database into a temporary local file, then switches reads to that file once it is ready. Ordinary workloads should keep running Litestream as a sidecar instead.
- SBD: We Have a Filesystem at Home
Fly.io mediumAdeptFly.io replaced the modified JuiceFS stack behind Sprites with the Sprites Block Device (SBD), which exposes an object storage bucket to the Linux kernel as an NBD block device formatted with ext4. The old design kept data chunks, a Litestream-backed SQLite metadata database and a separate checkpoints database consistent with each other. In writeback mode, a machine killed between recording metadata and uploading a chunk left dangling references that corrupted every clone-based checkpoint. SBD stores its metadata in the bucket beside the blocks, uses a single daemon with a local cache and background uploads, makes checkpoints versioned block snapshots, and verifies every block read back, restarting the Sprite rather than running on an untrusted disk. A torture-test harness driving write/checkpoint/sleep/wake/restore cycles showed SBD to be orders of magnitude more reliable.
- Building Agents that Don't Break Themselves
Fly.io mediumAdeptSeparate where an agent lives from where it executes code: keep the agent loop on a durable host and send every shell command to a disposable Sprite sandbox. SpriteDoc, an internal multi-user troubleshooting agent built on Pi, creates one Sprite per session on first filesystem use and tears it down when idle. It injects each user's flyctl token only for the duration of a single command, so no credential ever rests in the sandbox. Kyle's Hermes Agent backend instead keeps one persistent Sprite per task and skips dangerous-command approval prompts because the sandbox is the security boundary. Copy-on-write checkpoints let an agent that deletes its own work and toolchain be restored in about nine seconds.
- Agent Swarms on Sprites
Fly.io mediumAdeptRunning each coding agent in a swarm on its own Sprite (a Fly.io sandboxed machine) avoids the shared-filesystem, conflicting-dependency and blast-radius problems of co-located agents. An orchestrator Sprite running Claude Code creates worker Sprites via the API and hands them tasks. Workers can checkpoint and restore their whole environment in about three seconds, which makes speculative parallel attempts practical. Per-agent DNS-level network policies restrict egress, results can flow back over HTTP endpoints, a shared Postgres Sprite or orchestrator file reads, and idle Sprites pause and persist.
- How does Turso Cloud keep your data durable and safe?
Turso mediumAdeptTurso Cloud makes every SQLite database durable on S3 and S3 Express, treating local server disk purely as a cache. Database files are split into 128kB segments grouped into generations, while recent WAL writes are acknowledged only after landing in low-latency S3 Express, with frequent checkpoints (around every 1MB). Segmenting enables lazy fetching, bounded per-tenant local storage and safe replacement of compute nodes. Continuous backups with 90-day point-in-time restore and instant metadata-only branching fall out of the same design.