Quick Start
1
Simple Usage
Nothing to configure — hardening is automatic for any SQLite-backed store.
2
Custom Store
Build your own SQLite-backed store with the hardened factory.
How It Works
The factory tries WAL first, then probes the on-disk header before ever falling back — so a database another connection wrote in WAL is never downgraded.Configuration Options
Thesqlite_connect factory forwards unknown keyword arguments to sqlite3.connect.
Common Patterns
Docker / Kubernetes / NFS deployments need no special handling — the defaultAgent(memory=True) already survives them.
synchronous="NORMAL" (safe under WAL against process crashes).
Choosing a synchronous Level
Scope
The core memory (STM/LTM), session, transcript, and generic
SQLiteBackend stores use the hardened factory today. The bot/gateway wrapper stores (_outbox, _dlq, _ingress, approval, delivery-control, and kanban) are not wired in yet.Best Practices
Let the factory choose the journal mode
Let the factory choose the journal mode
Do not run
PRAGMA journal_mode=WAL yourself — sqlite_connect picks WAL where it works and DELETE where it does not.Keep synchronous=FULL unless you measured a bottleneck
Keep synchronous=FULL unless you measured a bottleneck
FULL survives an OS or power crash. Switch to NORMAL only after profiling shows a durability-vs-throughput trade-off worth making.Use sqlite_connect for custom stores
Use sqlite_connect for custom stores
For any SQLite-backed store you build, call
sqlite_connect instead of sqlite3.connect to inherit the fallback and durability defaults.Expect DELETE on hostile filesystems
Expect DELETE on hostile filesystems
On Docker Desktop, NFS, or network volumes the on-disk journal mode may be
DELETE. This is correct behaviour, not a regression, and does not change any API.Related
SQLite Persistence
Local file database for conversations
SQLite Transcript Store
Concurrent gateway session persistence
Memory
Short- and long-term agent memory
Session Store
Cross-session search and recall

