Skip to main content
You need a PostgreSQL database you can connect to, and about ten minutes.
1

Install

Other routes — container image, release archive — are in Install.
2

Make a credential for your agent, and one for yourself

Each prints the secret once, with the hash to paste into your configuration. Keep the secrets; the config file should carry only the hashes, so the file is not itself a credential.
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.
warden.yaml
Every field is explained in the configuration reference.
4

Write a policy

What the agent may touch, what needs a human, and what is masked. Replace the table names with yours.
policy.yaml
Check it before starting:
5

Start the gateway

The first thing it prints is the capability ladder — what is enforced on this connection, and by whom:
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

You asked for every customer. You get only the 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

This one waits. Policy sends changes to a human.
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 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:
The agent’s call returns 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

Every step — the read, the refused attempt, the approval, the commit — is in a hash-chained log that reports whether it is intact.

Connect a real agent

warden-mcp was installed alongside the gateway. Point any MCP-speaking agent at it:
The agent gets four tools and no database credential. See the MCP server.

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.
Serving on anything but loopback needs TLS — Warden refuses a non-loopback listener without it unless you say so explicitly. Before anything real, read TLS and state.