Developer quickstart
Connect Runtime Governance to your agent in ~15 minutes
One synchronous call at your agent's plan → act boundary. Pass the tool call your agent is about to make; get back a deterministic PERMIT / ESCALATE / BLOCK verdict beforeanything executes. No rip-and-replace, no change to your agent's logic.
The service never executes your tools — it inspects the proposed JSON only. Sub-millisecond engine compute. Self-host in your own VPC, or use the hosted endpoint.
1See the contract
A request is a trajectory— the one or more tool calls about to run. The response is the engine's real verdict, with the Ω domain, a replayable trajectory_hash, and an attestation tying it to the exact engine + ruleset.
POST {GOVERNANCE_URL}/v1/evaluate
Authorization: Bearer {GOVERNANCE_TOKEN} # optional
Content-Type: application/json
{
"trajectory": [
{ "tool": "transfer_funds",
"args": { "amount": 50000, "to": "acct_991" } }
],
"domains": ["finance"] // optional; defaults to all Ω
}{
"verdict": "BLOCK", // PERMIT | ESCALATE | BLOCK
"permitted": false, // execute only when true
"blocked": true,
"layer": "V5+",
"reason": "Ω violation: finance_high_value_unverified_transfer",
"omega_domain": "finance",
"trajectory_hash": "9f3c1a8e7b22",
"attestation": {
"engine_commit": "96ecd39…",
"ruleset_hash": "7b1f…"
}
}2Route on the verdict
Execute the tool — no forbidden state is reachable.
Hold for a human. A review card names who must sign off and why.
Deny before execution — the trajectory reaches Ω.
On ESCALATE, the response carries a human-review card you can render or forward to an approver:
{
"verdict": "ESCALATE",
"permitted": false, // held — not auto-executed
"requires_human_review": true,
"omega_domain": "healthcare",
"review": {
"reason": "Clinical recommendation generated.",
"required_action": "Oncology consultant review.",
"decision_authority": "Oncology consultant",
"next_step": "Approve / Reject recommendation.",
"execution_status": "HELD FOR HUMAN REVIEW"
}
}3Drop in the guard
A few lines wherever your framework dispatches tools. Copy governanceGuard.ts or governance_guard.py from examples/integration/ and call it before execution.
import { guardedDispatch, GovernanceBlocked } from "./governanceGuard";
// At your plan -> act boundary, gate the dispatch:
try {
await guardedDispatch(
{ tool: "transfer_funds", args: { amount: 50000, to: "acct_991" } },
(call) => runTool(call), // ALLOW -> execute
(v) => routeToHuman(v.review), // ESCALATE -> human sign-off
{ domains: ["finance"] },
);
} catch (e) {
// BLOCK -> never runs
if (e instanceof GovernanceBlocked) deny(e.result.reason);
}from governance_guard import guard, GovernanceBlocked, GovernanceEscalation
# Call immediately BEFORE executing a tool:
try:
guard("transfer_funds", {"amount": 50000, "to": "acct_991"},
domains=["finance"])
run_tool(...) # ALLOW -> execute
except GovernanceEscalation as e:
route_to_human(e.review) # ESCALATE -> human sign-off
except GovernanceBlocked as e:
deny(str(e)) # BLOCK -> never runscurl -s "$GOVERNANCE_URL/v1/evaluate" \
-H "content-type: application/json" \
-H "authorization: Bearer $GOVERNANCE_TOKEN" \
-d '{
"trajectory": [
{ "tool": "transfer_funds",
"args": { "amount": 50000, "to": "acct_991" } }
]
}'4Wire your framework
Same one-call pattern everywhere: OpenAI Agents (gate tool dispatch), LangGraph (a governance node before the tool node), LangChain (a pre-tool guard), AutoGen (the execute step), MCP (at the client/host before forwarding), and custom orchestrators (call at the plan→act boundary).
from governance_guard import govern_langchain_tool
# Wrap each tool once; every invocation is now governed pre-execution.
tools = [govern_langchain_tool(t) for t in tools]
agent = create_agent(llm, tools) # nothing else changes5What you get for free
- Never executes your tools — inspects the proposed JSON only.
- Metadata-only logging — your tool args / payloads are never stored.
- Deterministic + replayable — same trajectory → same verdict + hash.
- Attestable — every verdict ties to the engine commit + ruleset hash.
- Fast — sub-ms compute; co-locate or self-host to remove the round-trip.
- Self-hostable — pure-Python engine pinned to a commit, runs in your VPC.