Skip to main content
Goal: in five minutes, you will install Certior, declare an agent’s capability boundary, run an allowed call, run a blocked call, and read the audit log. No server, no LLM key. Open the quickstart in Colab — run every step below in your browser, nothing to install.
Prefer to see it first? Try the Certior playground — watch a real agent get prompt-injected and blocked, in your browser, with no install.

1. Install

This pulls in z3-solver, httpx, pydantic, jsonschema, and PyYAML. Requires Python 3.11+. Every tool call is enforced by Z3 against a policy model proven sound in Lean 4 offline — that is the always-on SDK path. The optional Lean binary adds server-side plan verification (used by Certior’s plan-verification endpoint, not the per-call SDK Guard.verify()); install it with (not bundled in the wheel; Linux x86_64 / macOS arm64):
This step is optional - the SDK runtime stays on the always-on Z3 path either way. See Lean verification.

2. Declare a Guard

  • policy selects the compliance preset ("default", "hipaa", "sox", "legal_privilege").
  • permissions is the capability ceiling for this guard. A child agent’s permissions must be a subset.
  • budget_cents is the spending ceiling. Each verified call deducts its declared cost.

3. Wrap a tool and call it

@guard.wrap runs guard.verify(...) before the function body. On success the function executes; on a block it raises CertiorBlocked without calling the function.

4. Trigger a block

The guard’s permissions=["network:http:read"] does not cover filesystem:write, so Z3 returns UNSAT and the wrap raises CertiorBlocked. The function body never ran.

5. Inspect the audit log

Each verify() (whether via wrap or direct call) appends an entry of shape {tool, allowed, violations: int, pii_count: int, latency_ms, time} to guard.audit_log. The full violations list and the signed VerifiedCertificate itself are on the returned VerifyResult - the audit log keeps only counts and timing.

What’s next