Postgres
Give agents read access to your database with row-level scopes.
Data
Official
v2.1.0
Install
~/infra
$
lattis tools add postgres
✓ tool registered postgres_ro
✓ 14 tables in scope
● first query ran 3 s ago

Lattis · production
tool.postgres.queries
Queries per hour
1,840 / h
tool.postgres.latency.p50
Median query time
12 ms
tool.postgres.scoped
Rows filtered by scope
99.2%
Overview
Connect a Postgres database as an agent tool. Lattis generates typed query tools from your schema and enforces row-level scopes per agent, so a support agent only sees the rows its workspace owns.
What agents get
postgres.query
tool
Read-only SQL, checked against row scopes
postgres.describe
tool
Table and column names with types
postgres.search
tool
Full-text search on the tables you allow
tool.postgres.queries
count
Queries per run, traced with the SQL text
tool.postgres.rows
gauge
Rows returned per query, after scoping
Setup
01
Create a read-only role
Give Lattis a role with SELECT on the tables agents may read.
02
Add the tool
Run the install command and paste the connection string.
03
Set row scopes
Choose the tables and row filters each agent can query.
Run your first agent in five minutes.
1M free tokens a month. No card, no sales call, production keys in two minutes.
$ npm install @lattis/sdk
$ export LATTIS_API_KEY=lt_••••••••
$ npx lattis run hello-agent
✓ plan · ✓ search_docs · ✓ answer
● run completed · 3 steps · 0.9 s