Agentic AI System Design / Chapter 5: Agent Security & Blast Radius

Scenario 5.3Multi-Agent Pipeline · Fraud Operations

The Fraud Was a Maintenance Window

Difficulty Pressure SafetyCostCompliance
Three-panel illustration of the scenario “The Fraud Was a Maintenance Window”

1The Setup & Tipping Point

You have just joined Halvard Bank, a retail bank with about three million customers, as Lead AI Architect on Fraud Operations. A month ago, four agents replaced the overnight fraud desk; they run around the clock with no human on duty and pass their findings to each other as written messages. Every agent runs on a top-tier frontier model, chosen after some benchmarking, and has its own set of tools. All four can read_transaction_log and send_customer_email; beyond that (dashed tools act outside the pipeline):

AgentRoleFurther tools
MonitorFlags suspicious transactionsread_customer_profile read_account_balance flag_transaction freeze_account
InvestigationExamines and scores each caseread_customer_profile read_fraud_case_history read_merchant_database freeze_account escalate_to_human
ActionFreezes, emails, refundsread_fraud_case_history freeze_account issue_refund escalate_to_human close_fraud_case
ReportWrites the summary and audit entryread_customer_profile read_fraud_case_history write_audit_log issue_refund

On Saturday night, the Monitor saw a wall of unconfirmed card transactions, flagged them, and, to be safe, froze accounts and emailed customers. The Investigation agent, unsure, called the model again and again to re-examine its reasoning, and pulled the history of every loosely related account. The Action agent froze more accounts, and all Sunday, payments declined on frozen accounts arrived as new cases. Summarizing one of those cases, the Report agent noticed a discrepancy and refunded $1,200 on its own initiative, before writing the audit entry. On Monday morning, reviewing the scattered logs revealed a routine cause: scheduled database maintenance had held card confirmations for an hour.

incident review · the bill by Monday 06:00
1Cases: flagged at 23:01 · from declined payments on frozen accounts105 · ≈ 520
2Accounts frozen: by the Monitor · by the Action agent · genuine customers2 · 4 · 6 of 6
3Fraud alerts sent by the Monitor · refund issued by the Report agent, before its audit entry3 · $1,200
4Calls per investigation · account histories read · total model spend22 · ≈ 1,900 · ≈ $21,800
Typical handoff: “likely account takeover, though it could be a system delay” → account frozen

All six customers have complained, two of them to the financial ombudsman, and the COO wants the pipeline fixed or switched off before next weekend.

2Digest & Disarm

The questions worth asking

You

Is anyone reachable at night?

The team

An on-call fraud analyst is available every night, but the pipeline cannot page them: escalate_to_human files a ticket for the next business day.

You

Is maintenance scheduled in advance?

The team

Yes, every few weeks, announced a week ahead on the published maintenance calendar, which no agent reads. During a window, confirmations queue for up to an hour, then post normally.

You

How many flags does a weekend usually produce, and how many are real fraud?

The team

On average, about 60 flags a weekend, of which about 8 turn out to be fraud.

You

What does each kind of mistake cost?

The team

Missed card fraud costs the bank about $1,800 a case. A wrongful freeze strands a customer’s money until a branch lifts it, and after a day it must be reported to the regulator. An email cannot be unsent, and a refund is rarely recovered.

The instinctive trap

Tell the agents to be careful, cap the retries, or put a human in it. A couple of the bolder answers are simply wrong. The rest help, so they are not wrong, but they are not enough, and trying them reveals the second layer.

Wrong

“Add a supervisor agent to approve every action.” — One more model call, reading the same prose and the same stale data. A model approving a model checks how confident a recommendation sounds, not whether it is true.

Wrong

“Switch the pipeline off on weekends.” — Fraud does not stop on weekends: a normal one has about 8 real cases. And the next maintenance window may fall on a Tuesday night.

Not enough

Stricter instructions. “Never refund without an investigation; never freeze on a single signal.” It lowers the odds. But the Report agent still holds issue_refund, and an instruction is a request the model follows most of the time, not a limit it cannot cross.

Not enough

A retry cap on the Investigation agent. It cuts the calls per case, and with them most of the bill. It does nothing about the refund, the emails, or the freezes, and the loop still produces hundreds of cases.

Not enough

A human escalation trigger. Escalation is right for genuine uncertainty, but this uncertainty had an answer in the maintenance calendar. Nearly every case read as uncertain, so the trigger would have filed hundreds of tickets for Monday, or, wired to a pager, woken the analyst hundreds of times, for a glitch the pipeline could have recognized; and the Monitor’s freezes and emails bypass the trigger entirely.

Not enough

A newer, smarter model. Rarer mistakes, the same tools, the same stale data: without the maintenance calendar, no model can verify that a confirmation is late rather than missing. And it puts the most expensive model on nodes that only read logs and write summaries.

What this really is

It is a blast-radius problem. No step looked unreasonable to the agent taking it, but every call had the full power of the bank behind it, and none of the fixes above touch the loop: the pipeline’s own actions had become its input.

It is not a maintenance problem. The window was only the trigger: the agents read “late” as “missing,” and missing confirmations look like fraud. The next trigger may be on no calendar.

The system today, with the symptoms numbered to match the exhibit

Root-cause map

Symptom
Structural cause
Fixed by
Monitor froze 2 accounts and emailed 3 customers; Report issued a $1,200 refund
≈ 1,900 account histories read
“likely account takeover, though it could be a system delay” → frozen
6 of 6 frozen accounts genuine; refund before its audit entry
22 calls per case; ≈ $21,800
≈ 520 cases from declined payments on frozen accounts
105 flags right after scheduled maintenance
Agents hold tools their roles never need
Data reads are unscoped
Handoffs are prose, and the next agent reads tone as confidence
Nothing coded stands between a recommendation and an irreversible action
No budget per case, and the top-tier model on every node
The pipeline’s actions feed its own input
No agent can tell that its data is stale
Decision 1
Decision 2
Decision 3

3The Pro Architecture

Each agent can do only its job, nothing irreversible happens without a coded check and an audit entry first, and the pipeline notices when it is feeding itself.
Each agent can do only its job, nothing irreversible happens without a coded check and an audit entry first, and the pipeline notices when it is feeding itself.

Decision 1Least-privilege tool scoping

Fixes: out-of-role freezes, emails, and refund; unscoped reads

Give each agent only what its role requires: every tool that changes an account, moves money, or contacts a customer belongs to the Action agent alone. The Monitor keeps its three read tools and flag_transaction. The Investigation agent keeps its four read tools and escalate_to_human. The Report agent keeps read_fraud_case_history and write_audit_log, and writes the case summary. The Action agent holds freeze_account, issue_refund, send_customer_email, close_fraud_case, and escalate_to_human. A Report agent that cannot call issue_refund cannot issue a refund, whatever it concludes about a discrepancy. Scope the arguments as well as the tools: issue_refund takes an order and an amount but no destination, so money can only return to the original payment method, and its cap is enforced by the payments service, not by a prompt. Scope the data, too: reading is part of the blast radius, so the Investigation agent reads only the accounts in its case and their direct counterparties, not every account loosely related to them. Twenty-six tool grants become sixteen, and the instructions that remain are for quality, not safety.

Decision 2Contractual agency: hand off contracts, not prose

Fixes: tone read as confidence; unchecked irreversible actions

Replace the written messages with a structured contract, generated under the same schema constraints as any other structured output: case, fraud confidence as a number, recommendation, the evidence it rests on, and whether the data was fresh. A confidence of 0.43 cannot be read as “likely,” however the explanation around it is worded. Code, not a model, then decides what crosses the gate: below a confidence of 0.75, or on stale data, nothing irreversible happens, and the case pages the on-call analyst. The gate writes the audit entry before any action, never after, so no action exists without a record. Once the decision is a contract, the Action agent needs no model at all: carrying out an approved freeze is code. And every step leaves a trace (inputs, outputs, model, confidence, timestamp), so Monday’s post-mortem becomes a log query.

Decision 3Cognitive tiering, budgets, and a circuit breaker

Fixes: 22 calls per case, the bill, the loop, the maintenance window

Match each model to the cognitive demand of its task, not to the stakes of the pipeline it lives in: the Investigation agent earns the top-tier model, while the Monitor and the Report agent run on a small one. Then treat spend as a permission. Give every case a budget of model calls and tokens, and the night a budget in dollars; a case that exceeds its budget is parked for a human, not retried. Finally, add a circuit breaker fed by the signals no agent read, the maintenance calendar and the live confirmation lag. It pauses every irreversible action, while investigation and logging continue and the analyst is paged, when upstream data is stale, flags run at several times a normal weekend’s rate, or new cases trace back to the pipeline’s own actions, such as declined payments on an account it froze.

4Beyond: The Signal Ladder and Stretch Round

That was 1 of 18

The Complete Edition has all 18, published progressively on Leanpub. The free Core Edition has 6 scenarios, one from every chapter, plus the framework behind them.