Skip to main content

PostgreSQL

PostgreSQL is the recommended production database for conversation persistence.

Installation

Docker Setup

Quick Start

Connection String Format

If you use structured configuration (memory={"host": "...", "user": "...", "password": "..."}) or the PostgresDB(host=..., user=..., password=...) constructor, credentials are URL-encoded for you. Only escape yourself when passing a raw postgresql://... URL string.
Example:
Credentials with special characters “just work” through the structured constructor:

Environment Variables

CLI

Schema

Tables are auto-created:
  • praison_sessions - Session metadata
  • praison_messages - Conversation messages

Troubleshooting

Connection refused:
Authentication failed:
  • Verify username/password
  • Check pg_hba.conf for connection rules