PraisonAIUI provides full session management for chat conversations — create, switch, view history, and delete sessions.
| Mode | Flag | Persists? | Best For |
|------|------|-----------|----------|
| Memory | --datastore memory (default) | ❌ Lost on restart | Development, testing |
--datastore memory
| JSON Files | --datastore json | ✅ ~/.praisonaiui/sessions/ | Single-user, local |
--datastore json
~/.praisonaiui/sessions/
| JSON (custom path) | --datastore json:/path/to/dir | ✅ Custom directory | Custom setups |
--datastore json:/path/to/dir
| Custom DB | Implement BaseDataStore | ✅ Your database | Production |
BaseDataStore
Every API endpoint has a CLI equivalent:
Use --server to target a different server:
--server
Implement BaseDataStore for any database (SQLite, PostgreSQL, Redis, MongoDB, etc.):
Register before the server starts:
| Mode | Command | Transport | Session Source |
|------|---------|-----------|---------------|
| Standalone (default) | aiui run app.py | SSE over HTTP | DataStore |
aiui run app.py
| PraisonAI | aiui run app.py --backend praisonai | WebSocket | WebSocketGateway |
aiui run app.py --backend praisonai
In standalone mode, sessions are managed by the configurable DataStore.
In praisonai mode, sessions are managed by the WebSocketGateway from the praisonai package.
WebSocketGateway