qualia_postgres, without ever seeing the URL in chat.
Both the desktop app and Qualia Cloud connect the same way, from the same settings page. The one difference — where the connection comes from, and so what your database has to allow — is called out below.
Connections are read-only by default. The client sets the session to reject writes, so a stray
UPDATE fails instead of running. That is a guard rail, not a boundary: the agent can open a read-write connection when you ask for a write, and a statement can switch a transaction back. Use a database role that can only read if you want writes to be impossible rather than merely unasked for.Prerequisites
- A PostgreSQL database reachable from where the kernel runs (see Network access).
- A database role for Qualia to connect as. A role with
SELECTon the tables you want to explore and nothing more is the recommended posture. - Its connection URL, in libpq form:
postgresql://user:password@host:5432/database. Add?sslmode=requireif your server requires TLS.
Connecting
- Open Settings → Integrations → Postgres.
- Paste the connection URL into Connection URL. It saves as you type, and shows afterwards with the credentials masked:
postgresql://••••@host:5432/database. On desktop the URL is held in the operating system’s keychain — or, on a machine without one, in a file only your user account can read — and only the masked form is written to Qualia’s settings file. - Ask the agent to query the database. It loads the
postgresskill and connects throughqualia_postgres.
Network access
The connection is opened by the notebook kernel, not by the Qualia app or the Qualia Cloud API.- Desktop: the kernel runs on your machine, so anything you can reach from a terminal, Qualia can reach.
- Qualia Cloud: the kernel runs in a cloud sandbox whose IP address is neither fixed nor ours. A database behind an IP allowlist, or inside a private network with no public endpoint, is unreachable from there. Open the database to public connections over TLS with a read-only role, or connect from the desktop app instead. Deployments that restrict sandbox egress to an allowlist block outbound database connections entirely; ask your Qualia administrator whether yours does.
What the agent can do
With a connection saved, the agent can:- Explore the schema — tables, columns, foreign keys, approximate row counts — through the PostgreSQL catalog.
- Run queries into pandas DataFrames, with values bound as parameters rather than pasted into SQL.
- Stream large results in batches instead of loading a whole table.
- Write, only when you ask, over a connection it opens read-write for that purpose.

