Agent Auth Gateway v1.0

Documentation

The 3-line integration.

Wrap the tool call you already make. Ask the gateway first. Obey the decision. Your agent needs an API key (create one under Console → API keys) and its agent id (shown on the agent page).

Scope, stated plainly: the gateway can only observe and control actions that are presented to it. An action your agent takes without calling the gateway first is not observed, not evaluated, and not controlled by the gateway — the gateway's records cover presented actions only, and no record here can prove an action that was never presented never happened.

PYTHON requests
import requests

def authorized(agent_id, action, estimated_cost=0.0):
    """Ask the gateway. Returns (decision, payload)."""
    r = requests.post(
        "https://authgateway.getingeniousai.com/v1/proxy",
        headers={"Authorization": "Bearer aag_YOUR_KEY"},
        json={"agent_id": agent_id,
              "action": action,
              "estimated_cost": estimated_cost},
        timeout=10)
    r.raise_for_status()
    g = r.json()
    return g["decision"], g

# in your agent loop:
decision, gate = authorized(7, "send_email", 0.02)
if decision == "allow":
    send_email(draft)
elif decision == "deny":
    log(f"blocked: {gate['reason']}")
else:  # require_approval
    approval_id = gate["approval_id"]
    wait_until_decided(approval_id)  # poll GET /v1/approvals
JAVASCRIPT fetch
async function authorized(agentId, action, estimatedCost = 0) {
  const r = await fetch(
    "https://authgateway.getingeniousai.com/v1/proxy", {
    method: "POST",
    headers: {
      "Authorization": "Bearer aag_YOUR_KEY",
      "Content-Type": "application/json" },
    body: JSON.stringify({ agent_id: agentId,
      action, estimated_cost: estimatedCost }),
  });
  if (!r.ok) throw new Error(await r.text());
  const g = await r.json();
  return [g.decision, g];
}

// in your agent loop:
const [decision, gate] =
  await authorized(7, "send_email", 0.02);
if (decision === "allow") await sendEmail(draft);
else if (decision === "deny") log(`blocked: ${gate.reason}`);
else await waitUntilDecided(gate.approval_id);

Decisions

DecisionMeaningYour loop should
ALLOWPolicy passed: caps, lists, risk tier all clear.Run the action.
DENYKill switch, denylist, or a cap would be breached. Fail-closed.Skip it; log gate.reason.
REQUIRE_APPROVALUnlisted or high-risk action. Held for a human (Pro+).Poll GET /v1/approvals until decided.

Consent-gated image tools PRO

Consent-gated policy rules (Pro) gate image-generation tool calls on consent attestation metadata — deterministic, never an accuracy play: the gateway checks that the call carries context.consent_attested=true plus a non-empty context.attested_by. It never judges image content. Install the one-click ARTICLE5_CONSENT_GATE template (Console → Policy templates) to configure this control for your sensitive image-generation workflows. Honest scope: consent attestation here is a configurable protective control, not a universal statutory requirement — EU AI Act Article 5 does not require a consent attestation on every image-generation call (Article 5 prohibits specific practices, including non-consensual intimate imagery; this gate is one optional control toward that risk). The gateway proves a configured attestation record was made; it does not prove the consent behind it was legally valid. Missing attestation → the call is denied or routed to the approval queue per the rule's mode, and can optionally trip the agent's kill switch. Every decision lands in the audit log with the rule name, agent identity, and the missing-attestation reason.

CONSENT ATTESTATION ON IMAGE-GEN CALLS THIS GATE COVERS
{
  "agent_id": 7,
  "action": "generate_image",
  "estimated_cost": 0.04,
  "context": { "consent_attested": true, "attested_by": "workflow:consent-form-v2",
               "scope": "likeness-use:promo-2026", "subject_ref": "subject:8841",
               "intended_use": "product promo image", "authorization_source": "signed release form R-118",
               "attested_at": "2026-11-13T15:00:00Z", "expires_at": "2027-11-13T15:00:00Z",
               "withdrawal_state": "none" }
}

The fields after attested_by are optional extended attestation-record fields: scope, subject_ref (subject / rights-holder reference), intended_use, authorization_source, attested_at, expires_at, withdrawal_state (none / withdrawn, with withdrawn_at). When supplied, they are carried back on the proxy response as the call's consent_attestation record. Calls that supply none of them behave exactly as before.

Destructive-action gates PRO

Destructive-action gates (Pro) make irreversible tool calls impossible to auto-execute — deterministic, never an accuracy play: the gateway matches the call name and detail text against your fnmatch or regex patterns (e.g. *delete*, re:drop\s+(table|database|schema)) plus parameter thresholds read from the call context (e.g. record_count >= 100). Fail-closed: a call that doesn't declare the parameter is treated as meeting the threshold, so agents can't dodge a bulk rule by omitting it. A matched call is denied outright, held for human approval with a dry-run preview of exactly what would happen, or auto-denied when it would also breach the agent's budget cap — and can optionally trip the agent's kill switch. Every decision (held, approved, denied, auto-denied, expired) lands in the gate audit ledger with the full context and a pre-execution state snapshot. Install the one-click DESTRUCTIVE_GATE template (Console → Destructive gates). Preview any call without side effects at POST /v1/destructive-gates/dry-run.

CALL PARAMETERS FOR THRESHOLD RULES
{
  "agent_id": 7,
  "action": "delete_records",
  "estimated_cost": 0.02,
  "context": { "record_count": 500 }
}

Infra-agent blast-radius bound PRO

The blast-radius bound (Pro) caps an infra agent's credential inheritance at provisioning time — the only checkpoint that works on agents whose changes take effect immediately with no PR/CI review. Declare the bound per agent (allowed credential scopes, egress domains, persistence vectors, max score); the inherited scopes are scored 0–100, MITRE ATT&CK-mapped (each scored scope lists the ATT&CK tactics + technique IDs the inherited credential could enable — e.g. cloud:admin → T1078, T1136, T1098). Anything above the bound holds for your approval via the approval queue — never silently escalated. Every inheritance decision (allow / hold / grant / denial) is appended to a hash-chained evaluation ledger; the console verifies the chain and flags tampering.

What it does NOT claim: scores are advisory estimates, never "safe" certifications — a sub-bound score does not mean the agent is safe. The bound cannot stop breaches that bypass credential inheritance (social engineering, supply-chain compromise of the agent's own code, a cloud admin widening the service account directly at the provider). ATT&CK technique mapping is heuristic, not detection evidence. Unknown scope tokens hold for approval by design until the scored catalog covers them.

SCORE AN INHERITANCE REQUEST VIA API
{
  "agent_id": 7,
  "requested_scopes": ["db:read", "ssh:exec"]
}

POST the above to POST /v1/blastradius/evaluate (Bearer key, Pro plan) → {"decision": "allow"} or {"decision": "require_approval", "approval_id": 42, "score": 68, "band": "High", "attack_tactics": [...]}. Read the bound with GET /v1/blastradius/policy?agent_id=7. Console: agent detail → Blast-radius bound →.

Agent-Economy Defense Pack PRO

Agent transactions presented to the gateway are judged inline against a counterparty allowlist and a per-agent transaction policy: per-transaction, daily, and monthly commerce limits, allowed merchant categories, a velocity cap, and an approval threshold. A rogue-spend tripwire holds micro-payment bursts to new counterparties, structuring patterns (repeated amounts just under the approval threshold), and fan-out to the approval queue. Tag a proxy call with context.commerce = {"counterparty": "acme cloud", "category": "cloud", "amount_cents": 1200} — untagged calls are never judged as commerce. The gateway never moves, holds, or settles money; it returns a decision. Enforcement covers only transactions presented to the gateway — agent spend outside the gateway is not seen.

Cross-runtime policy: GET /v1/commerce/bundle exports the workspace policy, allowlist, and commerce kill state as an HMAC-signed bundle a runtime can verify offline. Live enforcement for any runtime is POST /v1/commerce/check with {agent_id, counterparty, amount_cents, category, runtime} — the gateway returns the same decision the proxy gives and records it in the commerce ledger. Anyone can verify a bundle at POST /api/commerce/verify-bundle. What is live is the bundle, the verification, and the check endpoint — no native plugin runs inside OpenShell or any other runtime; wiring the call is the runtime operator's step. The commerce kill switch (console at /app/commerce) halts all agent commerce spend while engaged, and an agent with its kill switch engaged is denied commerce everywhere.

Evidence connector — Flight Recorder

Link a gateway agent to its Agent Flight Recorder agent (console: /app/connector) and every authorization for that agent — the decision, any human approval, and the execution outcome — is written into the recorder's hash-chained evidence log under one correlation ID. Send correlation_id with each POST /v1/proxy call (top level, or inside context); the same ID returns on every response for that action, including after an approval resolves. After executing an allowed action, report the result once with POST /v1/connector/outcome — a duplicate report is refused, never double-recorded. Denied actions are closed automatically: a blocked action is a recorded action, not a gap. Delivery runs through a durable outbox with duplicate-safe retries, so a recorder outage never blocks authorization — the one exception is strict-evidence mode, an opt-in per-pair setting under which listed actions wait for their decision to be confirmed in the chain and fail closed if the recorder is unreachable. Event summaries carry classes only (action, decision, reason class, approver role, outcome class, amounts in cents) — keys, prompts, message content, and personal data never enter an event. Verification covers the records that were submitted; it cannot prove an action that was never sent to the gateway or the recorder never happened.

Anchored-Identity Attestation (Pro) is covered on the attestation page: anchored agent identities, short-lived tokens and the sealed attestation log.

API reference

EndpointAuthNotes
POST /v1/proxyBearer aag_…Body: agent_id action estimated_cost (USD) · 300 req/min per key
GET /v1/agentsBearer aag_…Agents with live spend vs caps
GET /v1/approvals?status=pendingBearer aag_…Pro+ · poll for decisions
POST /v1/approvals/{id}/approveBearer aag_…Pro+ · decide as the key holder. Wallet-touch holds need two distinct approver identities (dual control) — the first approval returns {"status": "pending", "dual_control": {...}}
POST /v1/approvals/{id}/denyBearer aag_…Pro+ · decide as the key holder. One deny always denies immediately
POST /v1/agents/{id}/killBearer aag_…Body {"enabled": false} disables instantly
GET /v1/policy-rulesBearer aag_…Pro+ · consent-gated policy rules
POST /v1/policy-rulesBearer aag_…Pro+ · create rule: {name, patterns, mode, agent_id?, trip_kill_switch?}
DELETE /v1/policy-rules/{id}Bearer aag_…Pro+ · delete rule
GET /v1/destructive-gates/rulesBearer aag_…Pro+ · destructive-gate rules
POST /v1/destructive-gates/rulesBearer aag_…Pro+ · create gate rule: {name, patterns, param_conditions, mode, agent_id?, trip_kill_switch?}
DELETE /v1/destructive-gates/rules/{id}Bearer aag_…Pro+ · delete gate rule
POST /v1/destructive-gates/dry-runBearer aag_…Pro+ · preview the gate decision — no writes
GET /v1/destructive-gates/decisionsBearer aag_…Pro+ · gate audit ledger
POST /v1/reserveBearer aag_…Pro+ · reserve budget before a high-cost action: {agent_id, action, amount (USD), note?, ttl_minutes?} → open hold, or held + approval when it would breach a cap
POST /v1/reservations/{id}/settleBearer aag_…Pro+ · capture the actual: {actual_cost (USD)} · hold releases, actual counts as real spend
POST /v1/reservations/{id}/cancelBearer aag_…Pro+ · release an open hold without spending
GET /v1/reservations?agent_id=&status=Bearer aag_…Pro+ · the reservation ledger
POST /v1/blastradius/evaluateBearer aag_…Pro+ · score a credential inheritance request: {agent_id, requested_scopes[]} → allow or hold (approval_id)
GET /v1/blastradius/policy?agent_id=Bearer aag_…Pro+ · read the agent's declared blast-radius bound
POST /v1/commerce/checkBearer aag_…Pro+ · cross-runtime enforcement: {agent_id, counterparty, amount_cents, category?, runtime?} → allow / deny / require_approval
GET /v1/commerce/bundleBearer aag_…Pro+ · signed cross-runtime policy bundle (policies, allowlist, kill state)
GET /v1/commerce/policy?agent_id=Bearer aag_…Pro+ · read a commerce policy
POST /v1/commerce/policyBearer aag_…Pro+ · save a commerce policy
GET /v1/commerce/counterpartiesBearer aag_…Pro+ · the counterparty allowlist
POST /v1/commerce/counterpartiesBearer aag_…Pro+ · add a counterparty: {counterparty, category?, status?, agent_id?}
DELETE /v1/commerce/counterparties/{id}Bearer aag_…Pro+ · remove a counterparty
GET /v1/commerce/transactionsBearer aag_…Pro+ · the commerce decision ledger
POST /api/commerce/verify-bundlepublicVerify a signed policy bundle: {bundle} → {valid, reason}
GET /v1/authz/proofsBearer …Team · signed authorization proof envelopes minted from granted in-scope approvals (payment, fund transfer, data export, destructive op)
GET /v1/authz/proofs/{decision_id}Bearer …Team · the envelope for one approval decision → {payload, signature}
GET /api/authz/verifypublicVerify a signed authorization proof (x401 pattern): ?payload=<canonical JSON>&signature=<hex> → {valid, reason, action_type, …} · decision metadata only · money-moving proofs are single-use and consumed by the first successful verification · a proof binds an approval decision to its exact parameters — it does not verify any person's legal identity
POST /v1/connector/outcomeBearer …Report an execution outcome once: {correlation_id, outcome: succeeded|failed|not_executed, not_executed_reason?, error_class?, duration_ms?, actual_cost_cents?} · duplicates refused
GET /v1/connector/actions/{correlation_id}Bearer …Decision, approval state, evidence delivery, and may_execute (the strict-evidence release check)
GET /v1/connector/linksBearer …Evidence-connector links for this workspace (keys are never returned)

Webhooks PRO

POSTED TO YOUR WEBHOOK URL · PUBLIC HOSTS ONLY
{
  "event": "approval.required",   // or "approval.decided"
  "approval_id": 42,
  "agent": "billing-agent",
  "action": "refund_customer",
  "estimated_cost_cents": 420,
  "approve_url": "https://…/a/SIGNED_TOKEN"  // no login needed
}

Rate limits: /v1/proxy 300/min per key · other v1 endpoints 120/min per key. Every response includes a human-readable reason.

Webhooks are one of several outbound paths — n8n workflows, Slack and Teams, GitHub and GitLab issues and the REST events API are collected on the integrations page.

Reading the decision log like an auditor

The decision log is the product's memory, and it is worth reading before you need it. Each entry records the agent, the action presented, the estimated cost, the decision, and the reason the policy produced it. When an agent surprises you in production, the log separates two very different problems: a policy that said the wrong thing, and an agent that never asked. The first is a policy edit. The second is a wiring gap, and no policy change fixes it.

A practical starting policy for a new agent is short. Allowlist the three or four actions the agent exists to perform. Cap daily spend at a number you would shrug at, not a number you would feel. Send everything else to approval for the first weeks. You will loosen it with evidence, which is the right order: the log of approval requests shows you exactly which actions your agent actually needs, instead of the list you guessed at setup. The guides collect these patterns, and the pricing page shows which decision features each plan carries.

Frequently asked questions

What are the three gateway decisions?

Allow means the policy passed the action — caps, lists, and risk tier all clear. Deny means the kill switch, a denylist, or a cap stopped it, fail-closed. Require_approval holds an unlisted or high-risk action until a human decides.

How does my agent wait for an approval?

When the proxy returns require_approval, it includes an approval_id. Your loop polls GET /v1/approvals until the action is decided, then proceeds only if it was approved.

Does the gateway log actions my agent takes on its own?

No. The gateway's records cover presented actions only. An action your agent takes without calling the gateway first is not observed, not evaluated, and not controlled.

Sources