Skip to main content
SQLite saves agent conversations to a local .db file — no external database required.
The user develops locally; SQLite writes conversations to a single file on disk.

Quick Start

1

Simple Usage

2

With Configuration

Choose sync or async when using the factory directly:
Before PR #1763, AsyncSQLiteConversationStore exposed sync wrappers callable from regular functions. Those wrappers were removed — use mode="sync" (sync_sqlite backend) when calling from sync code.

How It Works


Sync vs Async


Configuration Options

URL formats


Best Practices

The sync_sqlite backend (mode="sync") uses per-call connection locking for multi-threaded agents.
Set the database path via environment variables and use absolute paths for deployments.
Run PRAGMA journal_mode=WAL when multiple readers share the same file.
SQLite handles thousands of conversations; move to PostgreSQL for multi-instance deployments.

PostgreSQL Persistence

Scale up when you outgrow SQLite

Database Persistence

Compare all persistence backends