Compass Docs
ConnectionsIntegrations

Postgres

Connect a PostgreSQL database to query and modify its data from agents and workflows.

The Postgres integration connects Compass to a PostgreSQL database. Once connected, your agents and workflows can inspect its schema, run queries, and modify rows — through a typed set of tools.

Connecting

Under Studio → Connections, choose Postgres and click New connection, then provide:

FieldRequiredNotes
HostYesThe database server hostname.
PortNoDefaults to 5432.
DatabaseYesThe database name to connect to.

Postgres authenticates with Username & Password. Credentials are encrypted and never shown again — see Config and credentials. Compass verifies the connection when you save it.

Tools

The integration exposes these tools. In a workflow, an Integration node runs one of them per step; as an agent tool, you choose which the agent may call.

ToolWhat it does
list_tablesList all user tables in the database.
list_columnsList the columns of a table (name optionally qualified as schema.table).
execute_sqlRun a SELECT statement, with positional parameters.
insertInsert a row and return the inserted record.
updateUpdate rows matching an equality filter; returns the rows affected.
deleteDelete rows matching an equality filter; returns the rows affected.

Each tool has a typed input and output, so the canvas can validate what you wire in and downstream steps know the shape of what comes back.

Let an agent explore the schema

Granting an agent list_tables and list_columns alongside execute_sql lets it discover the database structure and then query it — useful for answering ad-hoc questions over your data.

Next

On this page