Provides PostgreSQL database configuration for agent session history, chat storage, and memory persistence.
agno/db/postgres
Config
Supports two connection patterns: Option 1 — Connection URL:
Option 2 — Separate fields:
Common fields:
Outputs
Dependencies
Depends on: Nothing directly, but fields support FieldReferences (e.g., fromgcp/cloudsql outputs).
Depended on by:
agno/agent— in thedbfieldagno/team— in thedbfieldagno/memory/manager— in thedbfieldagno/knowledge— in thecontents_dbfield
Example — Using Cloud SQL outputs
Example — Using connection URL
Notes
- You must provide either
connection_urlorhost+database. When using separate fields,usernameandpasswordare also required. - Credentials in the URL take precedence — if the URL already contains credentials, the separate
username/passwordfields are ignored. - The
db_schemadefaults to"ai". Agno creates tables within this schema automatically at runtime. - This resource is stateless — it does not create the database itself. Use
gcp/cloudsql/databaseto provision the actual database.