Sample content — the scenarios and numbers below are constructed examples, kept here until real engagement data replaces them.
Applied AI/18 Nov 2026/3 min read
Verifiable agent systems: what it takes to ship one
A payment-repair agent for a tier-1 bank: the tool contract, the replay harness, the injection suite, and the four things that broke before launch.
CRG Digital Engineering
The brief was narrow on purpose: an agent that reads a failed transfer ticket and drafts a repair instruction. No autonomous execution. Human approval before anything moves.
1,284 historical tickets, six weeks, p95 decision time under two seconds. This is the stack we built and where it failed.
1. Make the action surface small enough to audit
The model never touches the ledger. It calls one of four tools:
const tools = {
lookup_transfer: z.object({ reference: z.string().regex(/^TR-[A-Z0-9]{8}$/) }),
list_candidate_accounts: z.object({ beneficiaryName: z.string().max(140) }),
draft_repair: z.object({
reference: z.string(),
beneficiaryId: z.string().uuid(),
amountMinor: z.number().int().positive().max(50_000_00),
reasonCode: z.enum(["BIC_MISMATCH", "NAME_MISMATCH", "DUPLICATE", "RETURNED"]),
}),
request_approval: z.object({ draftId: z.string().uuid(), note: z.string().max(500) }),
};
amountMinor is capped at the repair delta, not the original amount. request_approval is the only path that produces a side effect, and it only queues work — a separate service that does not import the model runtime executes it.
2. Put the policy check outside the model
The tempting design is a system prompt that says "never exceed the original amount". We did not do that. Every tool call passes through a policy function that runs before the tool executes:
function authorise(call: ToolCall, ticket: Ticket): Decision {
if (call.name === "draft_repair") {
if (call.args.amountMinor > ticket.missingMinor) return deny("amount_exceeds_delta");
if (ticket.flags.includes("AML_HOLD")) return deny("hold_active");
if (!ticket.candidates.some(c => c.id === call.args.beneficiaryId))
return deny("beneficiary_not_in_ticket");
}
return allow();
}
Denials are returned to the model as tool errors, so it can retry with a valid call. Everything denied is logged with the rule name — that log is what made the pilot reviewable.
3. Evaluate on final state, not on prose
The replay harness loads a ticket, runs the agent, and asserts the resulting draft:
- reference matches the ticket;
- amount equals the missing delta;
- beneficiary is in the ticket's candidate list;
- reason code matches the classifier's label in the fixture;
- no tool call was denied for a policy reason.
Free-text explanations are never asserted. They are graded separately by a human sample of 120 tickets per week.
| Metric | Pilot result |
|---|---|
| Drafts accepted without edits | 92.4% |
| Out-of-contract tool calls | 0 |
| p95 decision time | 1.4 s |
| Cost per ticket | $0.06 |
4. Red-team the retrieval, not just the prompt
3,000 injection variants run on every prompt change: instructions hidden in beneficiary names, tickets whose "notes" field contains a fake system message, tool outputs with conflicting amounts. Eleven categories, all generated from templates rather than hand-written.
The one that got through: a ticket with two candidates whose names matched within edit distance 1. The model picked the more recently used account. The fix was boring — a deterministic resolver that requires an exact match when two candidates are within distance 2, and asks for approval otherwise. We kept the failing case in the suite.
What this does not prove
It proves the agent behaves on 1,284 historical tickets and 3,000 synthetic attacks. It does not prove it behaves on the ticket that has never happened. That is why the approval step exists, and why the policy engine, not the prompt, is what we would defend in an audit.
Scenario and figures are illustrative samples, not published client results.