1
Install
2
Make a credential for your agent, and one for yourself
3
Write warden.yaml
Point Warden at your database with a role that is not a superuser. This is the only place the database credential exists — no agent ever sees it.Every field is explained in the configuration reference.
warden.yaml
4
Write a policy
What the agent may touch, what needs a human, and what is masked. Replace the table names with yours.Check it before starting:
policy.yaml
5
Start the gateway
native means PostgreSQL enforces it, enforced means Warden does, unavailable means nobody does yet — and Warden says so rather than implying otherwise. A connection that cannot meet its policy refuses to start. See the capability ladder.6
Be the agent
acme tenant’s, because Warden rewrote the query before PostgreSQL saw it — and the email comes back as a tok_… token. Try to defeat it with an alias or a function (SELECT upper(email) AS shout …): the value is masked inside the statement, so there is nothing to alias.7
Try to change something
8
Be the human
Open http://127.0.0.1:9470/ and sign in with your operator token, or use the API:The pending change carries a preview: fidelity The agent’s call returns
exact, the records it touches, and the before/after of each field — produced by running the change in a transaction and rolling it back. Approve it:committed, and names who approved it. If the row changed while you were deciding, it returns stale instead and nothing is written — see previews and fences.9
Check the record
Connect a real agent
warden-mcp was installed alongside the gateway. Point any MCP-speaking agent at it:
Next
Policy reference
Everything a policy can say, and the traps worth knowing about.
Approvals
Blocking and async, and what an agent should do with each outcome.
Debug Mode
Step through your agent’s database traffic live.
The API
Four endpoints for agents, and the control plane for operators.