A single agent with a single job can be run from memory. A handful of agents cannot. Someone has to know which one posts to the public, which one only drafts, how much each may spend in a day, and who gets the message when one stops. Without written answers, the answers live in one person's head, and they are missing on the day they are needed.
This playbook is the coordinating layer. It does not repeat the individual runbooks. Separate guides cover retries and failures, monitoring, cost and scheduling. The playbook decides which of them applies, and makes sure each agent has an owner, a limit and a runbook before it runs. The example agents are invented, and the code was run only on that synthetic registry. Nothing here comes from measuring a production operation.
The registry is the center
The first artifact is a plain list with one record per agent. It can be a file in version control. The fields in the diagram are a starting set:
- Owner. One named person who receives the alert. A team alias is easy to ignore.
- Tier. What the agent is allowed to do: read, draft, write inside your own systems, or write to the outside world.
- Approval. Whether a person must say yes before a write happens.
- Daily budget. A stop threshold that you track yourself and check before every run. It stops new runs. It is not a cap the provider enforces on the bill.
- Timeout. A per-run limit so a stuck call cannot run indefinitely.
- Runbook. A link to the steps for this agent when it fails.
- Last review. The date a person last read the record and confirmed it is still right.
The tiers come from a security idea. OWASP's guidance on excessive agency says the root causes are excessive functionality, excessive permissions and excessive autonomy. Its recommendations map onto the registry: offer an agent only the extensions it needs, give those extensions only the permissions they need, and require a human to approve high-impact actions. It also says authorization should be enforced in the downstream system and not left to the model's judgment. The registry records the decision, but it does not enforce it. The enforcement lives in the credentials the agent holds and the approval step in the code that performs the write.
A run gate that stops before it starts
The second artifact is a gate that runs before every scheduled run and returns reasons not to start. Three reasons cover most cases: the daily budget threshold is reached, the agent has failed several times in a row, or an authorization error happened. OWASP's guidance on unbounded consumption supports the first and the last. It recommends rate limits and quotas, timeouts for expensive operations, limits on queued and total actions, and monitoring of resource use. A budget check before each run is a simple form of those controls.
An authorization failure gets special handling. If a token expired or was revoked, retrying only repeats the failure and may lock the account. The gate stops, and the alert goes to the owner.
A heartbeat check for silent failure
The third artifact answers a different question: has the agent succeeded recently? Every record says how often the agent should succeed, and the check compares that interval with the time of the last success. A missing success past twice the interval is a symptom worth an alert.
This follows Google's SRE guidance on monitoring. It separates the symptom (what is broken) from the cause (why). It advises paging a person only for conditions that need a human, since too many alerts lead people to skim or ignore them, and it says to avoid alerts that fire because something "seems a bit weird." Monitoring rules that reach a pager should be simple and represent a clear failure. "No success in twice the expected interval" is simple and clear. "The model's answers look different today" is neither.
The code
The whole kit is three short functions. Registry records are dictionaries here. In real use they could be loaded from a file.
from datetime import date, datetime, timedelta
TIERS = ("read", "draft", "write_internal", "write_external")
REVIEW_DAYS = 30 # an example interval, set your own
def audit(registry, today):
"""Return a list of (agent, problem). Empty list means the registry passes."""
problems = []
for a in registry:
n = a.get("name", "?")
if not a.get("owner"):
problems.append((n, "no owner"))
if a.get("tier") not in TIERS:
problems.append((n, "unknown tier"))
if a.get("tier") == "write_external" and a.get("approval") != "human":
problems.append((n, "external write without human approval"))
if not a.get("daily_budget_usd"):
problems.append((n, "no daily budget"))
if not a.get("timeout_s"):
problems.append((n, "no timeout"))
if not a.get("runbook"):
problems.append((n, "no runbook"))
last = a.get("last_review")
if not last or (today - date.fromisoformat(last)).days > REVIEW_DAYS:
problems.append((n, "review overdue"))
return problems
def stop_reasons(a, spent_today_usd, consecutive_failures, auth_failed):
"""Reasons a run must not start. Checked before every scheduled run."""
reasons = []
if auth_failed:
reasons.append("auth failed: stop and tell the owner")
if spent_today_usd >= a["daily_budget_usd"]:
reasons.append("daily budget reached")
if consecutive_failures >= a.get("max_failures", 3):
reasons.append("too many consecutive failures")
return reasons
def missed_heartbeat(a, now):
"""True if the last success is older than twice the expected interval."""
ls = a.get("last_success")
if not ls:
return True
return now - datetime.fromisoformat(ls) > timedelta(hours=2 * a["expected_every_hours"])
What the test showed
The test used five invented agents for a fictional small publisher. One was complete. The others were seeded with gaps: a newsletter sender allowed to write externally with no approval and a review date more than thirty days old, a price checker with no owner, no budget and no runbook, a report writer with no timeout, and a legacy poster with a made-up tier, no review date and no success ever recorded.
The audit returned exactly the eight seeded problems and nothing else, and it returned an empty list for the complete record. The run gate returned no reasons under normal spend, one reason for a spent budget, one for repeated failures, and all three, in a fixed order, when budget, failures and an auth error coincided. The heartbeat check passed an hourly agent that last succeeded fifty minutes earlier and a weekly agent that last succeeded five days earlier. It flagged a daily agent whose last success was more than two days old, and an agent with no recorded success.
These checks show that the audit finds the gaps it is written to find. They do not show that your registry is accurate, that owners read their alerts, or that a budget number is the right one. The thirty-day review interval is an example value, and the right interval depends on how fast your agents and their permissions change.
Routing incidents to runbooks
The diagram above is the playbook's table of contents in practice. When a heartbeat is missed, look at the last log line first and do not rerun a write until you know whether the earlier one landed. The monitoring guide covers the signals. When the same failure repeats, stop the schedule and check whether any write succeeded before the error, as the retries guide explains. When spend nears the limit, let the gate stop runs and look for what changed, then use the cost guide. When wrong output has already gone public, pause the agent and correct the record by hand, then write the fix into that agent's own runbook. When authorization fails, stop and tell the owner, which the scheduling guide covers for timed jobs.
Keeping this table short is the point. A playbook that copies every runbook goes stale in several places at once. One that only routes can be checked in a minute.
Where agents multiply
Registries matter most when agents start coordinating. A lead agent that starts workers, as in the guide on sub-agents, adds new runs that need budgets and owners. An agent with browser access, covered in the guide on browser control, is a write-capable agent even if its job sounds like reading. List both in the registry with their real tier. OWASP also lists a compromised peer agent as a trigger for excessive agency, so one agent's output should be treated as data by the next.
Failure cases
A registry that nobody reads. A record last reviewed a year ago is worse than none, because it looks authoritative. The overdue check exists for this.
An owner who has left. Reassign owners when people change roles, and treat a bounced alert as a registry bug.
Approval fatigue. If a person approves dozens of writes a day, they stop reading them. Reduce the volume or narrow the agent's tier.
A budget that is only a number. A cap in the registry does nothing unless the gate reads it before each run and the spend figure comes from the provider's usage data.
Alert noise. If the heartbeat alert fires weekly for a job that is expected to be late, fix the expected interval, not the alert.
Permissions that outlive their purpose. OWASP gives the example of an extension trialed during development and dropped, but still available to the agent. Review credentials as well as the registry.
Next step
List every agent, scheduled job and automation you have running today, including the ones you think of as scripts. Write one record for each with the fields above, and run the audit. Fix the three worst gaps this week, which will usually be a missing owner, a missing budget and an external write with no approval. Put a recurring date in your calendar to read the registry again.
Sources
- OWASP, LLM06 Excessive Agency: the three root causes, minimizing extensions and permissions, human approval for high-impact actions, downstream authorization, the dropped-extension example, and compromised peer agents as a trigger.
- OWASP, LLM10 Unbounded Consumption: rate limits and quotas, timeouts, limits on queued and total actions, usage monitoring, and the pay-per-use cost risk.
- Google SRE Book, Monitoring Distributed Systems: symptoms versus causes, paging only for conditions that need a human, alert fatigue, and keeping alert rules simple.

