The guard between your database
and everyone who talks to it
sluice reads every query before PostgreSQL runs it. Dangerous ones are blocked, big changes wait for a yes, and every decision is on record.
Pre alphaOpen source on GitHubYour app reads an order
A teammate updates every customer
An AI agent drops the orders table
A nightly job updates one customer
- psql
- psycopg
- asyncpg
- SQLAlchemy
- JDBC
- pgbench
Tried with the clients and drivers you already use
PostgreSQL decides who can delete. sluice also asks what, how much, and whether anyone really meant it.
Protect the database from the bad day
The accidents every team knows, and what happens when sluice is in front of PostgreSQL.
Friday, 18:04, on production
Someone forgets the WHERE
update customers set plan = 'team';
0of 1,284 customers changed
Waiting for you
Delete 183 customers?
Keep themDelete
A big delete waits for a yes
686 orders would go with them. Nothing is final until someone answers.
with gone as (delete from orders returning *) select count(*) from gone;
A delete hidden in a read
sluice reads SQL with PostgreSQL's own parser, so it is not fooled.
A table dropped on the wrong server
Schema changes only go through your migrations.
00:0008:0019:0024:00
A script that runs at 3 a.m.
Writes are allowed from 08:00 to 19:00. Outside those hours, they are refused.
customers in the table
A delete you regret
sluice saved the rows before deleting them, so you can put them back. Rows removed by a cascade are not included, and it warns you.
Let AI agents near production
Give a model real data to work with, and keep control of what it can see, change and take out.
Your agent asks for the customers
It gets the answer, not their personal data
In your table
- Tomas Okafortomas1@northwind.io
- Ines Barretoines2@northwind.io
- Jonas Weberjonas3@northwind.io
What the agent reads
- ~c47e5676e08cfb5b~8b0da529e3f1e2f3
- ~d959602557e295b6~007b82f4e688f236
- ~e0bc7e8b0513435a~f682c38837a3eeb0
The same value always gives the same token, so counts and joins still work.
delete from orders
It tries to write
The account stays read only, whatever the model decides.
Rows this hour200k / 200k
The rest is not sent
It reads too much
A budget per hour, across all its connections.
It opens the wrong table
Mark a table nobody should read, and your team is told.
#database
The agent wants to change 183 rows.
ApproveRefuse
It wants to go further
Send the question to a person, somewhere the agent cannot answer for itself.
A guard rail for what ends up in prompts and transcripts, not a security boundary.
Know exactly what happened
Every query, who sent it, what sluice decided and why. Detailed enough to answer the question that matters.
Monday morning
Who deleted 183 customers last night?
The answer is in the log, as JSON, ready for your log tools.
- Who
- app
- When
- 23:14:08
- Query
- delete from customers where plan = 'trial'
- Table
- customers
- Rule
- confirm-big-deletes
- Decision
- held, then approved
- Rows
- 183
- Shape
- 883b761b0fbd13d3
Line 4 was changed
A log nobody can quietly edit
Sign it with a key, and a changed line is detected.
Metrics for your dashboards
Counters for Prometheus and a health check.
Connection closed
An AI agent tried to read a server file.
Alerts where you already are
Slack, Mattermost, Discord or any URL.
Read an order
Update every customer
Update one customer
Watch before you block
Audit mode lets everything run and shows what your rules would stop.
What it will not do
- Not a security boundary
- It catches mistakes and keeps a record. GRANT and row level security stay the real protection.
- It judges queries, not effects
- A function or a trigger runs code it never sees.
- It has a cost
- About 0.1 ms per query in one test on a laptop. It suits a team or a workload, not a huge service.
- It is pre alpha
- No packaged release yet: you build it from source.