Governance API
1. Quickstart
- Create a free account (no card, no sales call) and note your organization.
- In AI Inventory — Assets on the account page, register an asset of kind
agentormcp_server. - Click Activate for Control Plane on that asset — you'll get an API key, shown once. Copy it now.
- Call
POST /api/control-plane/evaluatewith that key before your agent takes an action (see below).
That's the whole integration. There's no separate "developer portal" signup — the same free account that runs the Workbench issues the key.
2. Authentication
Send your key as a standard bearer token:
Authorization: Bearer agtk_<your key>
Content-Type: application/json
A few things worth knowing about how this key behaves, all verified live when this was built:
- The key is authoritative for identity. Whatever
agentname you put in the request body is ignored — every logged action uses the real name you registered the asset under. You cannot spoof a different agent's identity by changing the request body. - An unrecognized key is rejected outright (
401) — it never silently falls back to anonymous/unauthenticated behavior. - Suspending or revoking the key (from the account page, any time) makes the very next call using it return a
denydecision before any policy logic runs — a real per-agent kill switch, not just a documentation-level suspension. - Your traffic is isolated to your own organization's ledger — it never appears in the public anonymous demo ledger, and no other organization can see or act on your asset, even by guessing a valid ID.
3. Request & response
Minimal request — only tool and action_type are required:
curl -X POST https://autogovern.io/api/control-plane/evaluate \
-H "Authorization: Bearer agtk_<your key>" \
-H "Content-Type: application/json" \
-d '{
"action": {
"tool": "customer-db",
"action_type": "db_write",
"target": "accounts/12345",
"payload": "update billing_email to new@example.com",
"records_affected": 1
}
}'
| Field | Type | Notes |
|---|---|---|
action.tool | string | What's being called (e.g. an API, a database, a payment processor). |
action.action_type | string | One of read, search, summarize, classify, external_api, message_user, email_send, db_write, permission_change, db_delete, code_deploy, payment. Anything else is treated as a moderate-risk unknown action. |
action.target | string | Optional — what the action affects. |
action.payload | string | Optional — scanned and redacted for PII/secrets before it's stored; the raw value is never persisted. |
action.reversible | boolean | Optional — defaults from the action type if omitted. |
action.sensitivity | 0–3 | Optional data-sensitivity hint. |
action.records_affected | number | Optional blast-radius hint. |
Response:
{
"decision": "review",
"riskScore": 42,
"riskBand": "medium",
"reversible": false,
"actionLabel": "Write to a system",
"matchedControls": [ { "id": "human_oversight", "label": "Human approval before execution", "refs": "EU AI Act Art. 14 · NIST GOVERN" } ],
"matchedPolicies": [],
"reasons": [ "Irreversible action on sensitive data — human approval required" ],
"ledger": { "id": 4021, "seq": 4021, "hash": "…", "prev_hash": "…" },
"agentIdentity": { "public_id": "ast_xxxxxxxxxxxx", "name": "customer-support-agent", "kind": "agent", "key_status": "active" }
}
4. Handling the decision
allow— proceed with the action.review— hold for human approval before proceeding. Resolve it withPOST /api/control-plane/action/:id/decision({"decision":"approved"|"denied"}) using the ledgeridfrom the response, or build your own approval queue against your organization's own ledger.deny— do not proceed. Checkreasons[]for why (a policy match, a risk threshold, or your own key being suspended/revoked).
Every call is written to the tamper-evident, hash-chained ledger regardless of decision — see your organization's own slice of it at GET /api/auth/org/:orgId/assets/:assetId/ledger while signed in, or verify the whole chain's integrity (no per-row content, just validity) at GET /api/control-plane/verify.
5. Node & Python snippets
No published package — these are small, dependency-free, single-file wrappers you can vendor directly into your project. Copy the code below or download the file.
// see /sdk/node/autogovern.js
const { AutoGovernClient } = require('./autogovern');
const gov = new AutoGovernClient({ apiKey: process.env.AUTOGOVERN_API_KEY });
const result = await gov.evaluate({
tool: 'customer-db',
action_type: 'db_write',
target: 'accounts/12345',
payload: 'update billing_email to new@example.com',
});
if (result.decision === 'allow') {
// proceed
} else {
console.log('Blocked:', result.decision, result.reasons);
}
⬇ Download autogovern.js
# see /sdk/python/autogovern.py
from autogovern import AutoGovernClient
import os
gov = AutoGovernClient(api_key=os.environ["AUTOGOVERN_API_KEY"])
result = gov.evaluate({
"tool": "customer-db",
"action_type": "db_write",
"target": "accounts/12345",
"payload": "update billing_email to new@example.com",
})
if result["decision"] == "allow":
... # proceed
else:
print("Blocked:", result["decision"], result["reasons"])
⬇ Download autogovern.py
6. Rate limits
Authenticated calls (with a valid, active key) are limited to 300 requests/minute per key. Unauthenticated calls to the same endpoint (the public Workbench demo) stay at the original 60 requests/minute per IP — unchanged, so this doesn't affect anyone just trying the Workbench without an account. There's no separate paid tier to raise this further today; if your real usage needs more, tell us.
7. What's verified vs. what you control
- Verified by us: your key resolves to exactly the agent/MCP-server identity you registered; a suspended or revoked key is denied before policy evaluation; your ledger data is isolated from every other organization and from the public demo.
- You control: what counts as an "action" worth checking (call this before anything consequential, not just once at startup), what you do with a
reviewdecision (build your own approval UI, or use the ledgeridto resolve it via the API), and whether your agent fails open or closed if this endpoint is unreachable — this API does not currently offer a managed fail-mode setting, so build that choice into your own calling code. - This governs a single action at a time — it's not a full agent framework, and it doesn't execute anything on your behalf. It only tells you what a documented, deterministic policy engine thinks should happen next.
8. Contact
Questions, higher-volume needs, or found a bug in this API: info@autogovern.io.