The Design & Implementation of Sprites
- •Fly.io introduces 'Sprites,' disposable computers provisioned in under a second for AI agent tasks
- •Warm container pools and S3-backed storage eliminate the usual one-minute provisioning delays
- •New storage architecture enables 300ms checkpointing and restores using SQLite and Litestream
Simon Willison (tech blogger and developer) shares insights from Thomas Ptacek (co-founder of Fly.io) regarding "Sprites," a new approach to disposable computing. Designed for tasks like running untrusted code from an AI Agent, Sprites solve the latency issues of traditional virtual machines. Instead of waiting a minute for a machine to start, users get a "Sprite" in less than a second. This speed is achieved by maintaining pools of "warm" machines that all run the same standardized Container. The underlying storage system is innovative, using a "read-through cache" model. While traditional systems rely on local NVMe drives, Sprites treat these drives as temporary caches for data stored in object storage (a reliable way to store large amounts of data). To manage data locations, the system uses a custom metadata layer powered by local SQLite databases. This metadata is kept safe using Litestream, a tool that replicates database changes to ensure no information is lost if a local machine fails. This architecture allows for fast operations, including Checkpoint & Restore capabilities that take only about 300 milliseconds. This means the state of a computer can be saved and restarted almost instantly. By focusing on "disposable" infrastructure, Fly.io provides a secure environment for running code, which is essential for coding tools that execute code generated by language models. This setup prevents potentially harmful code from affecting the host system while maintaining high performance.