Agent Auth Gateway v1.0

Guides

Field manuals for
agent governance.

Original, in-depth guides on AI agent cost control and authorization policies — how we think about spend caps, approval queues, policy simulation, forecasting, and lockdowns. No filler, no recycled takes.

How to Set AI Agent Spend Caps That Actually Stop Runaway Bills

9 MIN READ

Per-agent daily and monthly spend caps: the first defense against runaway AI bills. How to size them, hard blocks vs alerts, and failure modes teams miss.

spend capsbudget controlcost control 2026-10-11

The Human-in-the-Loop Approval Queue Playbook for Risky Agent Actions

8 MIN READ

Not every risky agent action can be denied outright. Routing rules, SLAs, mobile-friendly decisions and audit trails for human-in-the-loop approval queues.

approvalshuman in the looprisky actions 2026-10-11

Allowlists vs. Denylists: Writing Agent Action Policies That Hold Up in Production

10 MIN READ

Allowlists vs denylists for agent tool access: which default-deny posture holds up in production, and how to write action policies that survive real agents.

allowlistsdenylistsauthorization policy 2026-10-11

Forecasting AI Agent Spend: Predicting Your Monthly API Bill Before It Lands

9 MIN READ

Predict your monthly AI API bill before it lands. Burn-rate forecasting from live logs: sizing caps, spotting runaways early, and auto-throttle.

forecastingburn ratecost prediction 2026-10-11

Step-Up Lockdown: Freezing a Misbehaving Agent Like a Bank Freezes a Card

8 MIN READ

Freeze a misbehaving agent the way a bank freezes a card: anomaly-triggered lockdowns where every action needs a human until the incident is released.

anomaly detectionstep-up authincident response 2026-10-11

The Runaway Accounting Agent: About $50K in Under an Hour

5 MIN READ

Mandiant documented a runaway accounting agent: over 15,000 paid API calls in under an hour, about $50,000. Missing: a spend ceiling and a kill switch.

incidentsspend controlrunaway agent 2026-10-24

How to Stop an AI Agent Runaway Loop

8 MIN READ

A LangChain multi-agent pipeline looped for about 264 hours and burned $47,000 in API costs. Dashboards and logs watched; nothing could refuse the next call.

incidentsspend controllangchain 2026-10-24

AI Agent Budget Caps: Provider Caps vs Per-Agent Refusal

7 MIN READ

Provider spend caps and per-agent refusal both promise to stop runaway AI bills. They act at different points, on different clocks, with different blind spots.

spend capsbudget controlarchitecture 2026-11-06

What Is an Agent Kill Switch (and Where It Must Sit)?

6 MIN READ

An agent kill switch blocks all future mediated actions for an agent, instantly. Where it must sit in the architecture, and how it differs from a pause button.

kill switchincident responsearchitecture 2026-11-06

MCP Health Probe: Is Your MCP Server Reachable and Safe?

6 MIN READ

An MCP health probe checks reachability, transport, auth posture, the tool inventory exposed, and whether its verdict is enforced. What each result means.

mcpsupply chainsecurity 2026-11-06

How to Set Spend Limits for a CrewAI Crew

7 MIN READ

CrewAI crews delegate, retry and re-plan in loops that multiply model spend. Per-agent caps, step budgets and a kill switch sized for multi-agent crews.

crewaispend capsmulti-agent 2026-11-14

How to Control Spend in AutoGen Multi-Agent Chats

7 MIN READ

AutoGen conversations can talk themselves into thousands of turns. Turn budgets, per-speaker caps and termination controls that actually bound the bill.

autogenspend capsmulti-agent 2026-11-14

How to Add Spend Guardrails to the OpenAI Agents SDK

7 MIN READ

Agents SDK runs chain tools and hand off between agents. Where run-level budgets, per-agent caps and approval gates sit when guardrails only validate.

openai agents sdkguardrailsspend caps 2026-11-14

How to Give Every AI Agent Its Own API Key

7 MIN READ

One shared key means no attribution, no scoped stop and a fleet-wide rebuild on any leak. Issuing, scoping, storing and rotating per-agent keys, step by step.

api keysidentitycredentials 2026-11-14

Scoped Tokens for AI Agents: Least Privilege in Practice

7 MIN READ

Short-lived, narrowly scoped tokens beat standing god-keys for agents. How to scope by action, resource, amount and time — and how scopes fail when too wide.

scoped tokensleast privilegeauthorization 2026-11-14

How to Rate Limit an AI Agent (Calls, Tokens and Concurrency)

7 MIN READ

Rate limits shape an agent's speed; spend caps shape its total. Setting calls-per-minute, token and concurrency limits that stop loops early.

rate limitingloopstoken budgets 2026-11-14

What an Audit Log for AI Agent Actions Must Record

7 MIN READ

When an agent acts, the log is the difference between an answer and an argument. The fields every agent action log needs, retention, and tamper-evidence.

audit logscompliancerecords 2026-11-14

Multi-Agent Spend Attribution: Finding Which Agent Spent What

7 MIN READ

Shared keys and pooled invoices hide which agent, run or customer drove the bill. Attribution by identity, run and delegation chain — and what to do with it.

attributionmulti-agentcost allocation 2026-11-14

How to Sandbox an AI Agent's Tool Calls

7 MIN READ

A sandbox limits where an agent's actions can land: filesystem, network, data and spend boundaries. Designing sandboxes that contain failures.

sandboxingcontainmenttool calls 2026-11-14

Human-in-the-Loop Patterns for AI Agents, Compared

7 MIN READ

Approve-everything burns out reviewers; approve-nothing burns down budgets. HITL patterns — pre-approval, sampling, escalation — and when each fits.

human in the loopapprovalspatterns 2026-11-14

How to Allocate AI Agent Costs to Teams and Customers

7 MIN READ

Agent spend pooled at the account level cannot be priced, budgeted or argued with. Allocation by agent, run and customer — from logs to finance-ready numbers.

cost allocationchargebackunit economics 2026-11-14

An Incident Response Runbook for AI Agents: The First Hour

7 MIN READ

When an agent misbehaves, improvisation is expensive. A first-hour runbook: stop, preserve, attribute, decide, release — with the evidence each step needs.

incident responserunbookkill switch 2026-11-14

Budget Tripwires: The Warning Layer Between Normal and Capped

7 MIN READ

Caps stop spend; tripwires start conversations. Designing burn-rate, percentage and novelty tripwires that warn early enough to matter — and do not cry wolf.

tripwiresalertsburn rate 2026-11-14

Retry Storms: How Agent Tool Retries Multiply a Bill

7 MIN READ

A timeout is not a failure to an agent — it is an invitation to try again, at scale. Retry budgets, backoff and idempotency rules that end retry storms.

retry stormstimeoutsidempotency 2026-11-14

When Prompt Injection Spends Money: Bounding a Fooled Agent

7 MIN READ

Injected instructions cannot be reliably detected, but their spend can be bounded. Amount caps, destination allowlists and scoped tokens as containment.

prompt injectionspend controlcontainment 2026-11-14

MCP Authorization: Controlling Which Tools an Agent May Call

7 MIN READ

Connecting an MCP server gives every agent its whole tool catalogue. Per-agent MCP authorization: tool-level allowlists, argument limits and spend rules.

mcpauthorizationtool access 2026-11-14

MCP Tool Poisoning: Defending Against Malicious Tool Descriptions

7 MIN READ

Tool descriptions and results are content an agent reads — and may obey. Tool poisoning: what it looks like, and the inventory, pinning and policy defences.

mcptool poisoningsupply chain 2026-11-14

Why AI Agents Need Their Own Identity, Not Yours

7 MIN READ

Agents acting under a human's credentials inherit that human's whole authority and leave that human holding the blame. Separate agent identities: what changes.

identitycredentialsaccountability 2026-11-14

How to Rotate AI Agent Credentials Without Downtime

7 MIN READ

Credential rotation fails when it is improvised. The overlap procedure — issue, deploy, verify, revoke — plus the registry and rehearsal that make it routine.

credential rotationsecretsoperations 2026-11-14

Approval Fatigue: Why Your Reviewers Stopped Reading, and Fixes

7 MIN READ

When everything needs approval, nothing gets reviewed. Measuring approver fatigue, narrowing queues, batching safely and restoring real human judgement.

approval fatiguehuman in the loopqueues 2026-11-14

Designing Agent Spend Alerts That People Actually Act On

7 MIN READ

Most spend alerts are either silent until too late or noisy until muted. Alert design: baselines, thresholds, wording and escalation that survive 2 a.m.

alertsspend controlmonitoring 2026-11-14

Postmortem: The Agent That Ran All Weekend

7 MIN READ

Friday-evening deployments, empty offices and Monday invoices: the weekend runaway is a failure class of its own. Its timeline, causes and controls.

incidentsrunaway agentpostmortem 2026-11-14

When Retrieval Eats the Budget: Controlling RAG and Embedding Costs

7 MIN READ

Embedding and retrieval costs hide below the model bill until a re-index or a chatty retriever multiplies them. Controls for the quiet half of agent spend.

ragembeddingscost control 2026-11-14

Model Routing as Cost Control for AI Agents

7 MIN READ

Routing every step to the biggest model is a pricing decision made by default. Tiered routing with quality sampling, escalation rules and per-tier caps.

model routingcost controlquality 2026-11-14

Step Budgets and Iteration Limits for AI Agents

7 MIN READ

Dollars lag; steps lead. Setting per-run step and iteration budgets from real run data, and what an agent should do when the budget ends mid-task.

step budgetsiteration limitsloops 2026-11-14

Fail Closed or Fail Open? Defaults for Agent Authorization

7 MIN READ

When the policy layer cannot decide, the default decides. Which agent actions must fail closed, which may fail open, and how to choose per action class.

fail closedarchitecturepolicy 2026-11-14

How to Dry-Run an Agent Policy Change Before It Ships

7 MIN READ

Policy changes break agents quietly: a tightened rule can deny real work for a week unnoticed. Replay recorded decisions against a new policy first.

policy simulationdry rungovernance 2026-11-14

Delegating Authority to Sub-Agents Without Handing Over the Keys

7 MIN READ

Sub-agents that inherit the orchestrator's full authority turn delegation into privilege escalation. Attenuated delegation: narrower scope, smaller budgets.

delegationsub-agentsscoped tokens 2026-11-14

The Unit Economics of Agent Spend, Per Customer

7 MIN READ

An AI feature that costs more to serve than it earns is a slow leak with good engagement metrics. Computing cost per customer, per task and per retained dollar.

unit economicscost allocationpricing 2026-11-14

Designing a Tool Allowlist an Agent Can Actually Live With

7 MIN READ

Allowlists fail two ways: too tight and the agent routes around them, too loose and they are decoration. Patterns for drawing, testing and evolving them.

allowliststool accesspolicy design 2026-11-14

Kill Switch Drills: Testing Your Agent's Stop Button

7 MIN READ

A kill switch that has never been pressed is a hope, not a control. Running stop drills and game days: who presses, how fast, what breaks, and what to record.

kill switchdrillsincident readiness 2026-11-14

The Month-End Finance Review for AI Agent Spend

7 MIN READ

Reconciling agent spend monthly: gateway totals vs provider invoices, cap breaches, approval exceptions and the questions finance should ask every agent owner.

financemonth endreconciliation 2026-11-14

Egress Controls for AI Agents: Where Your Data Is Allowed to Go

7 MIN READ

Agents exfiltrate through ordinary tools — a send here, a webhook there. Destination allowlists, payload inspection points and novelty rules for agent egress.

egressdata lossexfiltration 2026-11-14

Secrets Your AI Agent Should Never See

7 MIN READ

Anything in an agent's context can be repeated, logged or extracted. Which secrets must stay outside the prompt — and the brokered-credential pattern.

secretscredentialscontext safety 2026-11-14

Session Limits for Long-Running and Always-On Agents

7 MIN READ

Always-on agents accumulate context, cost and quiet drift. Session budgets, context checkpoints, restarts and handovers that keep long-running work bounded.

sessionslong-running agentscontext 2026-11-14

Playbook: What to Do in the First Hour After an Agent Key Leaks

7 MIN READ

A leaked agent key is a timed event. Revoke, attribute, rotate, hunt the path: the ordered first-hour playbook, and the preparation that makes each step fast.

key compromiseincident responsecredentials 2026-11-14

Agent Governance for Small Teams: The Minimum Viable Setup

7 MIN READ

Five people cannot run an enterprise governance programme, and do not need one. The five controls that give a small team real agent governance.

small teamsgovernancegetting started 2026-11-14

The Pre-Launch Authorization Checklist for a New AI Agent

7 MIN READ

Twenty checks before a new agent touches production: identity, caps, allowlists, approvals, logging, drills and the owner who answers for all of it.

launch checklistgovernanceproduction readiness 2026-11-14

Put the theory to work

Every technique in these guides — caps, queues, simulation, forecasting, lockdowns — is a feature in the gateway, not just advice.

How the guides fit together

Read in order, the library is one argument. The spend-caps guide comes first because a cap is the control that works while you sleep: it refuses the charge, not the report about the charge. The approval-queue playbook covers the actions a cap cannot judge, the ones that are legitimate at $40 and reckless at $4,000, and it is honest about queue fatigue, because a queue humans rubber-stamp is decoration. Allowlists versus denylists is the policy-writing guide, and it takes a side: allowlists fail closed and age better, denylists fail open and read better in a demo.

The second half is about seeing trouble early. The forecasting guide predicts the monthly API bill from run history before the invoice lands. The lockdown guide borrows the bank card freeze: step-up lockdown stops a misbehaving agent mid-run without killing the sessions that are behaving. The runaway accounting agent post-mortem, about $50K in under an hour, is the incident the whole library exists to prevent, and the kill-switch guide explains where that switch has to sit in the call path to matter at all. The MCP health probe closes the set with the reachability and safety checks a tool server should pass before an agent is allowed near it.

Frequently asked questions

Where should I start with the Agent Auth Gateway guides?

Start with the spend-caps guide. A cap that refuses an over-budget call is the one control that protects you at 3 a.m. without a human awake. Move to the approval-queue playbook once caps are in place, because the queue handles the judgement calls a number cannot.

Do the guides assume I already run the gateway?

No. Each guide teaches the technique on its own terms: the policy shapes, the thresholds, the failure modes. The gateway implements the same techniques as features, and the closing panel on this page links the docs if you want the product version after the manual one.

What is the runaway accounting agent guide about?

It is a post-mortem of an accounting agent that spent about $50K in under an hour through a retry loop nobody had capped. The guide reconstructs the loop, names the three points where a cap, a queue, or a kill switch would have stopped it, and prices each control against the loss.

How long are the guides?

Each guide page shows its own read time in minutes next to the title in the list above, and its publication date beside it. They are written to be finished in one sitting and used as references afterwards.

Sources