SQLite is all you need for durable workflows
Recorded: May 29, 2026, 7:03 p.m.
| Original | Summarized |
SQLite is All You Need for Durable Workflows Obelisk Features SQLite is All You Need for Durable Workflows The Durable Part « Back to Blog List |
SQLite is presented as a viable solution for managing durable workflows, arguing that it is sufficient for a large class of systems, positioning it as an alternative to requiring a separate orchestration tier, a direction that the author agrees with but suggests can be further developed. The concept of durable execution is often confused with the necessity for heavy, durable infrastructure; the crucial element is the workflow state, which can be managed by relying on execution logs, replayable history, and retriable activities. SQLite is appealing because it inherently provides transactional durable state without introducing the overhead of a separate database service, thereby eliminating the need for network hops, an extra control plane, or additional operational surface area to secure workflow progress. This intrinsic simplicity suggests that a local database file is often the appropriate level of machinery for many applications. To address the concern regarding the persistence of SQLite files that accumulate during experimentation, the system incorporates Litestream, which facilitates asynchronous streaming of SQLite changes to S3-compatible object storage. This mechanism allows users to maintain working state locally while simultaneously creating a means to back up, migrate, and inspect databases. It is important to note that the replication process is asynchronous, meaning a restoration operation might miss the newest local writes if the local volume disappears before the data is copied. This trade-off is deemed acceptable for systems like AI and experimentation workflows, which prioritize flexibility over the immediate consistency of a highly available shared database. The suggested operating model involves running a system with an SQLite database, using Litestream for backup, and allowing observers to pull necessary databases for debugging and understanding agent activities. This architecture is particularly advantageous for AI agents and AI-generated workflows because these systems are often characterized as bursty and experimental, benefiting from small, self-contained units of state for each agent or tenant. Consequently, deploying a fleet of small servers or containers, each with its own SQLite database and associated object storage backup, offers superior fault isolation, simplicity, and cost-effectiveness compared to maintaining one large, always-on shared system. Conversely, the text specifies that SQLite is not universally applicable; Obelisk also supports Postgres, which is the preferable choice when requirements shift toward needing higher availability, broader shared scalability, or a durability model that mandates asynchronous replication to object storage. For workflow systems that do not require such guarantees from the outset, starting with the minimum necessary infrastructure based on state demand is recommended. In many scenarios, the combination of a local SQLite database backed by Litestream to S3, supplemented by cheap worker infrastructure, provides a durable system with minimal overhead, making it a sensible default, especially in the context of AI agent systems. |