Quick Start
How It Works
SQLite (Default)
PostgreSQL
Redis
MongoDB
Best Practices
Start with SQLite in development
Start with SQLite in development
persistence="sqlite" needs no server and stores everything in a single file. Switch to a networked backend only when multiple instances share sessions.Match the backend to the access pattern
Match the backend to the access pattern
Redis suits short-lived, high-throughput sessions; PostgreSQL suits durable, queryable history; MongoDB suits flexible document state.
Reuse one session_id to resume
Reuse one session_id to resume
The
session_id is the key that ties writes together. Pass the same ID on reconnect to continue the earlier conversation.Related
Persistence Overview
Persistence concepts
Session Resume
Resume saved sessions

