Skip to main content
Every SQLite store PraisonAI ships uses a hardened connection factory that keeps agent memory and session data intact even on network and container filesystems, without any user configuration. An agent running on Docker Desktop, NFS, or a Kubernetes volume keeps its memory without a single line of configuration.

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

The sqlite_connect factory forwards unknown keyword arguments to sqlite3.connect.

Common Patterns

Docker / Kubernetes / NFS deployments need no special handling — the default Agent(memory=True) already survives them.
Build a custom SQLite-backed store on top of the same hardening.
Favour throughput over the last-transaction durability window with 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

Do not run PRAGMA journal_mode=WAL yourself — sqlite_connect picks WAL where it works and DELETE where it does not.
FULL survives an OS or power crash. Switch to NORMAL only after profiling shows a durability-vs-throughput trade-off worth making.
For any SQLite-backed store you build, call sqlite_connect instead of sqlite3.connect to inherit the fallback and durability defaults.
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.

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