PostgreSQL Agent Storage is a class that implements the AgentStorage interface using PostgreSQL as the backend storage system. It provides robust, relational storage for agent sessions with support for JSONB data types, schema versioning, and efficient querying.

Parameters

ParameterTypeDescriptionDefault
table_namestrName of the PostgreSQL tableRequired
schemaOptional[str]Database schema name"ai"
db_urlOptional[str]PostgreSQL connection URLNone
db_engineOptional[Engine]Pre-configured SQLAlchemy engineNone
schema_versionintSchema version number1
auto_upgrade_schemaboolAuto-upgrade schema on initFalse