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:
| Field | Required | Notes |
|---|---|---|
| Host | Yes | The database server hostname. |
| Port | No | Defaults to 5432. |
| Database | Yes | The 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.
| Tool | What it does |
|---|---|
| list_tables | List all user tables in the database. |
| list_columns | List the columns of a table (name optionally qualified as schema.table). |
| execute_sql | Run a SELECT statement, with positional parameters. |
| insert | Insert a row and return the inserted record. |
| update | Update rows matching an equality filter; returns the rows affected. |
| delete | Delete 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.