Documentation Index
Fetch the complete documentation index at: https://docs.praison.ai/llms.txt
Use this file to discover all available pages before exploring further.
Persistence Overview
PraisonAI supports automatic database persistence for conversations, knowledge, and state management across 22 database backends.Quick Start
Enable persistence in 2 lines:Installation
Supported Backends
| Category | Backends | Count |
|---|---|---|
| Conversation | PostgreSQL, MySQL, SQLite, SingleStore, Supabase, SurrealDB, Turso | 7 |
| Knowledge | Qdrant, ChromaDB, Pinecone, Weaviate, LanceDB, Milvus, PGVector, Redis, Cassandra, ClickHouse, MongoDB Vector, Couchbase, SingleStore Vector, SurrealDB Vector, Upstash Vector, LightRAG, LangChain, LlamaIndex, CosmosDB | 19 |
| State | Redis, MongoDB, DynamoDB, Firestore, Upstash, Memory, GCS | 7 |
Backend Aliases
The persistence registry provides user-friendly aliases for common databases: Conversation stores:neon,cockroachdb,xata→postgresasyncpg,postgres_async→async_postgresaiomysql,mysql_async→async_mysqlaiosqlite,sqlite_async→async_sqlitelibsql→turso
chromadb→chromamongodb_atlas,cosmos,azure_cosmos→ Vector store variantsllama_index,langchain_adapter→ Framework adapters
motor,mongodb_async→async_mongodb
Architecture
Key Features
- Zero Config: SQLite works out of the box with
memory=True - Session Resume: Same
session_id= continue conversation - Lazy Loading: No performance impact until used
- CLI Support:
praisonai persistence doctor/run/resume
Concurrency & Thread Safety
Persistence sync wrappers (get_session, add_message, get, set, delete, list_keys, clear, close, …) are safe to call from any context — plain sync scripts, worker threads, or code running inside a live event loop (FastAPI, Streamlit, background tasks). They route through a canonical async bridge, so you will not see RuntimeError: This event loop is already running anymore.
The DbAdapter’s lazy store initialisation is also race-free: the first thread to touch the adapter constructs the stores, and subsequent threads see the ready instance.
These improvements were added in PraisonAI PR #1466 to ensure robust multi-threaded operation in production environments.
Schema Migration (PR #1597)
If you ran an async store before this release, either:- Pass
table_prefix="praisonai_"explicitly to keep your old tables, or - Rename existing tables:
ALTER TABLE praisonai_sessions RENAME TO praison_sessions;(and likewise for_messages).
state (sessions), and tool_calls + tool_call_id (messages). The store creates them automatically on first connect via CREATE TABLE IF NOT EXISTS. Existing tables on a pre-#1597 schema will not auto-migrate; add the columns with:
Next Steps
- Quickstart - Get started in 5 minutes
- Session Resume - Continue conversations
- CLI Reference - Command-line usage
- Backend Plugins - Custom storage backends

