Free Consultation
Developer docs

Governance API

1. Quickstart

  1. Create a free account (no card, no sales call) and note your organization.
  2. In AI Inventory — Assets on the account page, register an asset of kind agent or mcp_server.
  3. Click Activate for Control Plane on that asset — you'll get an API key, shown once. Copy it now.
  4. Call POST /api/control-plane/evaluate with 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:

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
    }
  }'

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

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

8. Contact

Questions, higher-volume needs, or found a bug in this API: info@autogovern.io.