Zeta-Lite: A Concurrent, Branchable In-Browser SQL Database for Agentic Memory
Gene Zhang
Abstract
The browser has become a first-class database host: applications increasingly want to store, query, and reason over structured data entirely on the client - for privacy, offline operation, local-first collaboration, and, most recently, as durable memory for in-browser AI agents. One way to get SQL in the browser, compiling PostgreSQL to WebAssembly (PGlite), inherits PostgreSQL's process model: a single backend connection that executes one statement at a time and blocks. That model cannot express concurrent transactions, and it leaves richer capabilities - graph queries, database branching - to whatever the compiled server happens to include. We present zeta-lite, the browser form factor of the Zeta database engine: a WebAssembly build that compiles the same Zeta server down to a 2.87 MB gzipped artifact. Zeta-lite keeps the engine's log-centric asynchronous MVCC core, which yields two capabilities no other in-browser SQL engine provides. First, overlapping snapshot-isolated transactions on a single thread: multiple transactions hold distinct read/commit timestamps and interleave, with snapshot-isolation conflict detection between them. Second, copy-on-write database branching - whole-database fork, merge, and rebase - is unique in a browser SQL database and rare even in servers. On top of these, zeta-lite exposes a feature-complete PostgreSQL surface (joins, CTEs, window functions, JSONB with GIN indexes, full-text search, HNSW vector search, SQL/PGQ graph queries, multi-database) and snapshot-to-OPFS durability. Across Chrome, Firefox, and a native reference runtime, zeta-lite sustains 268k-315k point reads/s and holds a mixed read/write workload flat over millions of operations. This small, fully-featured, concurrent SQL database is an especially good fit for agentic memory - where cheap branchable state lets an agent explore, inspect, and commit or discard speculative work.
Create a lesson
Related papers
Decoupling Disaggregated Memory Optimizations from Indexing: A Compiler-Runtime Approach
Xinpeng Zhao, Zeling Long, Chaichon Wongkham et al.
Poisoning Attacks on the PGM-index
Atsuki Sato, Martin Aumüller, Yusuke Matsui
A Power Law in Logarithm's Clothing: On the Scalability of Graph-Based Vector Search
Sajad Faghfoor Maghrebi, Navid Eslami, Niv Dayan
Git4Data: Database-Native Version Control for AI Agents
Hongshen Gou, Zuyu Zhang, Yuze Sun et al.
Dual-Metric Partitioning with Adaptive Kernel Execution for Efficient GCN Acceleration
Lingling Zhang, Hang Zeng, Pengpeng Qiao et al.
Relational-Core Graph Analytics Querying graphs at SQL scale, and why the node/edge model is a performance tax, not a truer picture of connected data
Gene Zhang