The browser has become a first‑class database host, and more applications now want to store, query, and reason over structured data entirely on the client for privacy, offline use, local‑first collaboration, and increasingly as durable memory for in‑browser AI agents. A common way to bring SQL to the browser is to compile PostgreSQL to WebAssembly (e.g., PGlite), but this 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 leaves richer capabilities such as graph queries or database branching to whatever the compiled server happens to include. We introduce zeta-lite, the browser‑form factor of the Zeta database engine: the same server compiled to WebAssembly yields a 2.87 MB gzipped artifact while preserving the log‑centric asynchronous MVCC core. This core provides two capabilities absent from other in‑browser SQL engines: overlapping snapshot‑isolated transactions on a single thread, where multiple transactions hold distinct read/commit timestamps and interleave with conflict detection at snapshot isolation; and copy‑on‑write database branching, enabling whole‑database fork, merge, and rebase—unique in a browser SQL context and rare even on 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 durability to OPFS. Benchmarks across Chrome, Firefox, and a native reference runtime show zeta-lite sustaining 268k‑315k point reads per second and handling mixed read/write workloads over millions of operations with a flat performance curve. This small, fully‑featured, concurrent SQL database is especially well‑suited for agentic memory, where cheap branchable state lets an agent explore, inspect, and decide to commit or discard speculative work.
Review