# Validate connectionpraisonai persistence doctor --conversation-url "mydata.db"# Run with persistencepraisonai persistence run \ --conversation-url "mydata.db" \ --session-id "local-session" \ "Hello!"
For training data, sessions, and general persistence, use the SQLiteBackend:
Choosing table_name: keep it to letters, digits, and underscores. SQL keywords (select, order) and digit-leading names (9table) are safe — the backend quotes identifiers internally. See Table name rules.
TrainingStorage is a context manager. Using with (or calling .close() explicitly)
releases the underlying SQLite connection so the database file can be deleted or
reopened immediately — essential on Windows, and best practice everywhere for
long-running processes. On backends without an open resource (e.g. FileBackend)
.close() is a safe no-op.
# Training with SQLite backendpraisonai train agents --input "Hello" --storage-backend sqlite --storage-path ~/.praisonai/train.db# Session list with SQLite backendpraisonai session list --storage-backend sqlite --storage-path ~/.praisonai/sessions.db