Quickstart
This walks through governing a simple agent workflow from scratch. By the end, you’ll have a chain running with policy evaluation, a denied action raising an exception, and a receipt you can verify offline. The whole thing takes about 10 minutes if you have Python 3.10+ ready.1. Install and configure
.env file:
2. Write a minimal governed workflow
Create a file calledfirst_chain.py:
allow decisions, the first via local_fast_path and the second via backend_evaluation (because it contains financial data, which bypasses the fast-path).
3. Trigger an approval gate
Now bump that purchase amount up past the default approval threshold:ActionDeniedError with the approver’s notes attached.
4. View the chain in your dashboard
Open app.proofrail.dev and navigate to Chains. Yourfirst-workflow chain should be at the top of the list with three events recorded:
- search_web (allow, local fast-path)
- place_order $150 (allow, backend)
- place_order $7,500 (require_approval → human_approval allow)
5. Verify a receipt offline
Receipts are HMAC-signed and hash-chained across your organization. You can verify any receipt without a network call. From the dashboard, find your chain’s receipt and copy its receipt ID. Then:valid=True means the receipt’s data matches its signature. Tampering with the receipt content would flip this to False.
You just shipped governance
In under 10 minutes you went from zero to:- A real agent workflow under chain-level policy
- One action resolved locally for speed (fast-path)
- One action sent to the backend for authoritative evaluation
- One action gated for human approval, resumed cleanly after the approver clicked through
- A tamper-evident audit receipt verifiable without network access
Where to go next
Chain-level governance
The concept that makes ProofRail different from per-call governance tools.
LangGraph adapter
Wrap a compiled LangGraph graph with one line.
MCP adapter
Govern MCP server tool calls.
Configuration
Tune thresholds, fail modes, approvers, and more.
Trouble running this? The most common issues are forgetting
dotenv (env var not loaded), running Python 3.9 or earlier (3.10+ required), or hitting Supabase free-tier latency on the first chain start (give it a few seconds). If your approval email never arrives, check your spam folder and verify your approver address in the dashboard.