Quick Start
1
Simple Usage
Set
session_id — PraisonAI persists to JSON automatically:2
With Configuration
Custom session directory or the conversation JSON store:
How It Works
Compaction Checkpoint Key
When context compaction persists a checkpoint, the session JSON gains an optional top-levellast_compaction object. It is omitted entirely when no checkpoint exists, so older session files load unchanged.
See Compacted Session Resume for how the key is produced and consumed.
Configuration Options
DefaultSessionStore
JSONConversationStore
On macOS, Linux, and Windows,
DefaultSessionStore uses file locking for multi-process safety. On platforms without fcntl, a one-time warning is logged and single-process usage remains safe.Best Practices
Use session_id for quick dev
Use session_id for quick dev
No
db= needed — set session_id and conversations persist to ~/.praisonai/sessions/ automatically.Set a custom session_dir for projects
Set a custom session_dir for projects
Point
DefaultSessionStore(session_dir=...) at a project folder to keep sessions alongside your code.Upgrade when data grows
Upgrade when data grows
JSON suits development and small deployments. Move to SQLite or PostgreSQL when you need querying or multi-instance scaling.
Back up the sessions directory
Back up the sessions directory
Copy the session folder regularly — each session is a single readable
.json file.Related
SQLite Persistence
Upgrade to SQLite for SQL queries and better concurrency
Database Persistence
Compare all persistence backends

