Integrate
One line to the gate.
Until today, putting the gate in an agent's path meant writing the call yourself: form the proposal, send it, read the verdict, act on it. That work is now packaged — for Python and for JavaScript — and published where developers already look.
Never contain the model. Gate the output.
The packages
Install it the way you install everything else
Python — verity-gate
Runs on the standard library alone. No dependencies to audit. A client, the @guarded decorator, and a wrapper for LangChain tools in the same package.
pip install verity-gate
from verity_gate import GateClient, guarded
gate = GateClient(key) # your caller key
@guarded(gate, actor="ops-agent",
action="read a customer record",
consequence_class="read", mode="shadow")
def read_record(record_id):
...
JavaScript — verity-gate
One module file, no dependencies, fetch-based. The same client, the same guard, the same verdicts — for Node and modern runtimes.
npm install verity-gate
import { GateClient, guard } from "verity-gate";
const gate = new GateClient(key);
const out = await guard(gate,
{ actor: "ops-agent", action: "read a record",
consequence_class: "read" },
() => readRecord(id), { mode: "shadow" });
On npm · On GitHub · Download verity.mjs · Download verity-mcp.mjs
Either way, the shape is the same: the proposal is submitted before the function runs, and the verdict comes back with its rule, its chain sequence, and the gate's signature. Your audit trail is being sealed from the first call.
MCP
Or load it as a tool
If your agent runs under an MCP host — Claude Desktop, Claude Code, Cursor, and the rest — no code changes at all: both packages ship an MCP server (version 0.2.2), and registration is configuration. The gate appears in the agent’s own toolbox as four tools: verity_verdict, verity_attest, verity_chain_verify, verity_health.
Python
{
"mcpServers": {
"verity-gate": {
"command": "verity-gate-mcp",
"env": { "VERITY_GATE_KEY": "vk_..." }
}
}
}
JavaScript
{
"mcpServers": {
"verity-gate": {
"command": "npx",
"args": ["-y", "verity-gate-mcp"],
"env": { "VERITY_GATE_KEY": "vk_..." }
}
}
}
The key comes from the operator, through the environment — never from the agent, and never as a tool argument. An agent that could mint its own credentials would be grading its own homework; this server cannot be talked into it. Without a key, the verdict tool answers with instructions to ask the operator for one.
Modes
Shadow first, enforce when you're ready
- Shadow mode — the default, and free.The gate judges and seals every proposal; the function always runs. If the gate is unreachable, the function still runs and the miss is logged as a warning. Read what your agents would have done.
- Enforcement — the same code, the mode flipped.ALLOW runs. VETO raises
GateVetoand the function never runs. ESCALATE runs only if your approval callback says so. If the gate is unreachable in enforce mode, the call fails closed: nothing runs. Enforcement is the metered act — $250/month plus the per-verdict meter — and it never runs unmetered. - Attestation, where your key requires it.Some callers seal a signed statement of standing intent at the door — purpose and declared domains — before any verdict. The clients expose
attest()andrevoke_attestation()for exactly that.
Self-test
Prove the gate is checking: the six canaries
Submit each proposal for judgment only — do not execute any of them; every target is fictional. If any of 2–5 comes back ALLOW, you don't have a gate — you have a log of things that already happened.
- 1 · fetch order status ALLOWclass
read— canary-test order #0001, the control: a gate that blocks everything is not checking, it is just closed. - 2 · purge all backups VETOclass
destructive— rule R1. - 3 · send payout, $5,000 ESCALATEclass
money— rule R2, the money ceiling. - 4 · read config file — /etc/passwd ESCALATEclass
access— rule R4_denylist. - 5 · delete user records ESCALATEclass
write— rule R4_delete_language. - 6 · 35 inventory reads inside one minute, one caller ESCALATEthe late rows — rule R3, velocity.
Or run them. As of 0.2.1, both packages ship the self-test as a command:
Release 0.2.2 corrects the canaries to the gate’s canonical shapes: the denylist rule reads the target field, so the /etc/passwd canary now sends the path as its target — the paraphrase it replaced was refused by the live gate’s own rules, which is what a canary is for. The same six checks run live, in your browser, on the start page’s demo.
verity-gate canary
It fires all six proposals at the live gate with your key and prints each verdict with its rule and chain position. Exit status 0 means every canary returned the expected verdict. And the key itself is now zero-config: export VERITY_GATE_KEY once, and the Python and JavaScript clients find it on their own — GateClient() needs no argument.
Start watching
Claim a caller key — free, instant, shadow-only — and decorate one function. Your first verdict is sealed within the minute. Companies that need it scoped and signed take the same path under an engagement letter. Watch your records land in the console.