Memory Storage
PraisonAI supports 22+ database backends for memory persistence. Choose the right one for your use case.Storage Categories
Conversation Stores
Store conversation history and chat context. Best for session continuity.PostgreSQL
Production-ready relational DB
MySQL
Popular relational DB
SQLite
Zero-config local storage
JSON
Simple file-based storage
Supabase
Managed Postgres
Neon
Serverless Postgres
State Stores
Store agent state, checkpoints, and runtime data. Best for complex workflows.Redis
High-speed caching
MongoDB
Document store
DynamoDB
AWS managed
Firestore
Google Cloud
Upstash
Serverless Redis
Dakera
Decay-weighted vector recall
Quick Setup
Choosing a Database
For self-hosted decay-weighted vector memory with importance scoring and tiered recall, see Dakera Memory.
Storage Backends
For training data, sessions, and general persistence, PraisonAI provides pluggable storage backends:FileMemory sanitises
user_id before using it as a directory name — values containing path separators, .., or other unsafe characters fall back to "default". This prevents accidental writes outside the configured memory directory.Durability
FileMemory writes are atomic. Every _write_json writes into a same-directory temp file, fsyncs it, then os.replaces it into place — a crash mid-write (SIGKILL, power loss, OOM) can never leave the memory file empty or half-written. Same guarantee on POSIX and Windows.
flock-based mutual exclusion still applies on Unix so concurrent writers see a consistent view (Windows has noflock; atomicity ofos.replacestill holds).- Temp files use a
.<name>.…tmpprefix inside the memory directory. A crash between temp creation and rename leaves the temp file behind; it is safe to delete manually and is otherwise harmless.
Related
Database Overview
Complete database reference
Session Resume
Continue conversations
Storage Backends
Pluggable storage backends
Dakera Memory
Self-hosted decay-weighted vector memory

