SQLite Backend
Local-first SQLite storage with WAL, sqlite-vec vectors, and FTS5 keyword indexing.
What is it?
The default storage backend. Memories live in a single SQLite file (or :memory:) using Node's built-in node:sqlite.
Why does it exist?
Zero infrastructure for development and most production single-node agents. No Docker, no managed DB — just a file.
How does it work?
import { sqlite } from "wolbarg";
storage: sqlite("./memory.db")
// or
storage: sqlite(":memory:")Uses:
- WAL mode for concurrent readers
- Prepared statements
- sqlite-vec when available (BLOB cosine fallback otherwise)
- FTS5 for keyword indexing (schema v2)
When should it be used?
Prefer SQLite for local agents, demos, CI, and single-machine services. Move to PostgreSQL when you need multi-host access or central ops tooling.
Performance notes
- Cold start is typically single-digit milliseconds in published benchmarks
- Database size scales roughly linearly with memory count (~2.6 MB / 1k records in mock embedding suites)
- Hybrid BM25 needs
keywordSearch: bm25()so FTS stays in sync