Heyang Zhou, the developer behind mvSQLite—a massively scalable, time-traveling SQLite-compatible distributed database built in 2022—has found its killer workload. In a post published this week on Hacker News, Zhou explains why AI agents are the perfect fit for SQLite, and how his new project Willow aims to capitalize on that alignment.
The Entropy Problem
LLMs destroy information when they work. That's not a bug—it's just how these systems operate under the hood. Zhou argues that any serious agent harness needs to compensate by making some or all state undestroyable. Existing solutions take different approaches: permission requests and pre-exec reviews (Anthropic's Claude Code), fine-grained sandboxing (OpenAI's Codex), or simply giving agents a full computer to work in. Willow takes a fourth path entirely. The system maintains the complete state of an agent's virtual filesystem at every point in time, stored as SQLite tables with large blobs offloaded to S3. Because mvSQLite stores multi-versioned data natively, reading a filesystem snapshot from three days ago costs exactly the same as reading the current version—no additional overhead whatsoever.
Time Travel Without the Overhead
When a user accidentally tells an LLM to nuke a document and then asks for it back, Willow can restore it through three straightforward tool calls: GetVersionAtTimestamp("3 days ago") returns a 20-character mvSQLite version identifier (an 8-byte FoundationDB read version plus a 2-byte batch ID), followed by Read with that version pin, and finally Copy to restore the file. Those twenty hex characters are your entire time machine. Old versions eventually fall outside the database's retention window and get garbage collected—but up until that point, every snapshot of every agent's filesystem is addressable and retrievable in milliseconds.
Why Agents Are Embarrassingly Concurrency-Friendly
Agent loop execution is what Zhou calls an "embarrassingly concurrent" workload: light on CPU, spends most time waiting for LLMs to generate tokens, and perfectly shardable across nodes. Willow packs up to 1,000 agents per OS process, each running its own SQLite database backed by mvSQLite. This works because agents are single-threaded by nature—they don't benefit from parallel writes within a single session. More importantly, LLM token generation is currently 100x to 1000x slower than the actual write operation. Until that ratio flips, SQLite's limitations around high-throughput concurrent read-write transactions simply don't matter.
The LLMs-Already-Know-SQL Advantage
mvSQLite uses vanilla libsqlite3.so with a different VFS plugged in. Because of SQLite's ubiquity and excellent training data coverage, LLMs write SQL fluently—they already understand the syntax, the idioms, the edge cases. Willow leans into this: every agent-deployed website (the kind you get from "build me a habit tracker and deploy it") is served straight out of the harness with application data living in a dedicated mvSQLite database.
Stateless Clients, Decoupled Storage
Traditional cloud-SQLite patterns keep synchronized local files on each compute node—the right shape for one big database with many readers, but completely wrong for a million small databases that any node might need to claim at any moment. mvSQLite sidesteps this by delegating replication, backups, high availability, and most transaction processing to FoundationDB. Clients are stateless. They don't touch local disk, open and close databases in milliseconds, and an unused database costs only the storage it occupies. Making a transaction feels more like reading or writing an EBS volume than querying a traditional database.
Key Takeaways
- mvSQLite's multi-versioning makes filesystem time-travel free at read time—critical for agent state recovery
- Agent workloads are naturally single-threaded, sidestepping SQLite's concurrency limitations
- LLMs already speak fluent SQL, reducing friction when agents need to interact with data
- Stateless client architecture and FoundationDB backing enable true multi-tenant scale without operational headaches
The Bottom Line
In 2022, mvSQLite was a database searching for its purpose. AI agents handed it one: each agent as its own SQLite instance, its own history, its own filesystem—by the million. Zhou has found his workload, and it's exactly as weird and fitting as hacker culture tends to produce.