RAiN — Rivium AI Network
Back to Help

Postgres Search

Look things up in the business's own Postgres database. Read-only.

What it does

Reads the business's own Postgres database. Read-only, always — the transaction is opened read-only by the server, so no query written here can change their data.

What you need

Connection string from PostgreSQL. The database has to be reachable from the internet. A host of localhost or 127.0.0.1 copied out of an app's config file is the server talking to itself and will not work from here.

Connecting it

Credentials belong to one project, not to your workspace and not to you. A system built for one client never runs on another client's account, and a package handed to a business runs on theirs.

  1. Open the project and stay on the Visual Editor tab.
  2. Open the Tools & Integrations rail on the right.
  3. Find this tool, open it, and paste the credential.

To change it later, open the same panel — you can leave the key blank to keep the stored one and change only the other field.

Using it in a step

An Action step runs one tool with the arguments you type, exactly as written, with no model involved — so it costs nothing per run and behaves the same every time. Add one from the canvas toolbar, choose Postgres Search, and fill in:

Field Required What goes in it
query no SQL, or a plain-language question. It only ever reads.
table no Optional. Narrows a plain-language question to one table.
limit no How many rows to return.

Values can carry results forward: {{previous}} is the step before, and {{row:column}} is a column from the row this run is about when the trigger fans out.

Press Try it to run the step on its own before committing to a whole sequence.

Using it with an agent

Tick Postgres Search on any agent that should be able to call it, and the agent decides when to. Use an agent when the judgement matters and an Action step when the certainty does.

A worked example

A school's student records live in Postgres. A step asks for families with a balance over ₦50,000 whose term started more than 30 days ago, and the trigger turns each row into its own run.

When it goes wrong

It refuses a localhost connection string. A host of localhost copied from an app's config is that server talking to itself. The database has to be reachable from the internet.

The database refuses the query. The message comes back in the database's own words — column c.balance does not exist — which is usually enough to fix it.

See also