Agent payments
How Coco checks each payment an agent proposes against the organisation's own policy and records, and what the benchmarks show.
Check each payment an agent proposes against your own policy and records, before it runs.
Agents now prepare and send payments. An accounts payable agent pays supplier invoices, a bank assistant sends transfers, and an agent wallet buys API credits. Coco decides each payment call before it runs, against the organisation's own payment policy and records, and keeps a receipt of every decision.
The problem in payment work
The bank, the payment provider, and the rail check the instruction is valid: the account exists, the amount sits within the limit, and the PayTo agreement is active. None of them checks it's the payment the business meant.
An agent that fills in the payee and the amount from an email or an invoice inherits this gap. A changed account number in a supplier email, or a retry after a timeout, becomes a valid payment.
How Coco governs a payment agent
Control
Rules decide first. Each rule reads facts the application supplies from its own records, such as the supplier master file, the purchase order, and the invoices already paid, through a state callback the model never touches.
One rule from the payment test cases: a supplier receives payment only at the bank account on the supplier master file. Any other account gives ESCALATE.
An optional classifier judges what rules don't reach, such as a payout the user never asked for, and only tightens a verdict. A classifier that fails or answers late gives ESCALATE, and a fact missing from the call or the records denies.
Intervention
Every call ends in one of four verdicts: AUTO_EXECUTE (run), OBSERVE (run and flag), ESCALATE (pause for a person), or DENY (deny with the reason).
- A changed account: Waits with the reason "The bank details differ from the supplier master file, so a person calls the supplier back on the number on file".
- A retry of a paid invoice: Gets DENY, "This invoice is already paid".
- The same invoice to the account on file: Runs.
The agent resumes once a person decides with coco escalations approve or reject. The guard reads the decision from Coco's record, never from the agent.
Evidence
Every decision, allowed payments included, writes a receipt with the call, the facts, each check, and the verdict. Each receipt carries the hash of the one before it, and coco verify walks the chain. A compiled rule cites its document, page, section, and clause.
Keep in mind: Receipts are hash-chained, not signed.
Policy from the organisation's own documents
Coco compiles a payment policy into contracts (behaviour contracts, the rules an agent runs under). A two-page Agent Payments Policy gave 32 cited rules on one run. A run on another model gave 26 rules and 6 review issues, and a contract with open issues doesn't go live until a person settles them. One rule cites section 2, "A single wallet payment above USD 50 requires approval by the Payments Manager before it executes", and gives ESCALATE.
To reproduce, run this from the agent payments project: coco policy extract policies/agent_payments_policy.pdf. Model output varies between runs.
A project starts in Monitor, where every call runs and the receipt records what Enforce would have done. A contract runs in testing before it goes live.
How Coco fits the payment workflow
The agent reads the invoice or bill and proposes a tool call: payout.transfer for accounts payable, payto.approve_agreement and payto.collect for PayTo, send_money for a banking assistant, or wallet_payment.execute for an agent wallet. Coco checks the call before the provider's payout API, the PayTo collection, or the bank API runs it.
Today the demo payment agent runs on the SDK middleware in coco-framework, in process, with the application passing its bank records on every call. The failure cases and the benchmarks call the same engine directly. The HTTP gate and the Claude Code hook take the same contracts, but no payment measurement has run through either.
Coco works beside the bank's own checks, such as confirmation of payee, AML screening, and agreement limits, and doesn't replace them.
What the guardrails stop
Coco replays tool calls and scores every decision. Runs are from 29 September 2026 unless stated.
- Payment transfer corpus: A corpus of 73,356 payment transfer calls built from 4,371 human-written attacks on a simulated bank teller agent, across five levels of payment policy. Rules let none of the 15,550 forbidden transfers run and stopped none of the 57,806 permitted ones. The rules and the labels both come from the corpus's policy levels, so this measures how faithfully a policy is enforced, not attack detection.
- Classifier on top, same corpus: It stopped 1,575 of 3,955 payouts to attackers that a pay-anyone policy permits (39.8%), and held 2,957 of 57,806 permitted transfers for a person (5.1%). In the same run, 4 forbidden transfers ran, all on the daily cap.
- Classifier alone, same corpus: It let 454 of the 15,550 forbidden transfers through. This is why rules decide first.
- Rule decision time: 0.27 ms at the median and 0.51 ms at the 95th percentile, in process.
- AgentDojo banking: Three banking contracts written from facts the account holds stopped 144 of 144 planted-instruction attacks. The known-payee rule alone stopped 112. They held 5 of 16 legitimate tasks for a person.
- Payment failure cases: Eight patterns, from a changed supplier account to a PayTo double collection, run beside their legitimate twins. Coco decided all 17 calls as expected, with the chain intact (19 October 2026). The Coco team wrote both the cases and the contracts, and the payment provider half hasn't run.
To reproduce from a checkout of the SDK, run:
coco eval vault --arms rules # needs access to the gated corpus; about 20 s
coco eval vault --arms rules,hybrid,judge --classifier <classifier-url> --workers 32 --timeout 60
coco eval vault --recount <stamp> # splits held transfers by whether they paid an attacker
uv run --no-project --python 3.12 --with agentdojo==0.1.35 \
python bench/agentdojo/export.py --out bench/agentdojo/cases.jsonl
coco eval agentdojo --arms none,rulesThe classifier arms need a running coco-classifier.
The failure cases run with python run_coco.py from the rail sandbox folder, with no keys and no model.
What Coco can't promise yet
- No customer runs Coco on live payments, so there are no production numbers.
- No run yet takes a payment policy from document to contracts to benchmark, and how accurately Coco reads a payment policy hasn't been measured against an answer key a person has reviewed.
- The payment corpus holds attack conversations only, with no ordinary customer traffic.
- The provider half of the failure cases hasn't run, so a provider accepting each bad call remains an expectation.
- The round trip through the HTTP gate is unmeasured. 0.27 ms covers the engine alone.
- The classifier is an open-weight model used as is, not trained on payment data.
- Coco doesn't stop a deceived customer who confirms the payment, a PayTo pull the payer's bank runs with no agent involved, an approval made in the banking app outside the agent, or a compromised component that writes both the confirmation screen and the call.
- The packages aren't yet published. Request access at trustcoco.ai.
From our team
"The bank checks the instruction is valid. Nobody in the chain checks it is the payment the business meant. We check every payment an agent proposes against the business's own records before it runs, and keep a receipt an auditor replays." Khoa Pham, co-founder and CTO, CocoAI
Working with us
If your agents prepare or send payments, contact us at trustcoco.ai. We start in Monitor on your own policy and records, so you read what Coco would have decided before any contract goes live.