Coco
Use cases

KYC onboarding

How Coco governs an AI agent working customer onboarding cases, reading the case folder before each step and sending every approval to a person.

Check each action an onboarding agent takes against the procedure and the live state of the case.

KYC rules are deterministic and already audited. The agent working them isn't. Coco checks each action before it runs, and keeps a receipt.


The problem in KYC work

An onboarding case moves through fixed steps: independent verification, screening for sanctions, politically exposed persons (PEP), and adverse media, a risk assessment, and an approval a person signs. Failures sit in the order. A risk assessment written before independent verification rests on what the customer said about themselves, and the file still looks complete.

The demo governs a public, MIT licensed onboarding workflow for Claude Code. It sets 17 mandatory stagegates, five independent searches before any risk assessment, and an immutable audit trail. Each is a sentence in the agent's instructions, and the agent holds an edit tool. A system prompt asks. It doesn't stop.

How Coco governs a KYC onboarding agent

Coco decides each call before it runs, against facts read from the case folder rather than anything the agent says. Four contracts (behaviour contracts) govern the case. Three come from the workflow's own procedure. The fourth, on data leaving the machine, is Coco's own rule.

Control

Rules decide first. Before a risk assessment, the contract looks for the verification report, the audit trail, and five evidenced searches. The check case.step0_screenshots_count >= 5 returns DENY when it fails. With four searches in the folder, Coco denies the write. When the fifth lands, the same call runs.

A session rule judges two calls together: after a session opens a customer file, every outbound call gets DENY. An unreadable case folder, or a tool no contract covers, also gets DENY. An optional classifier only ever tightens a verdict. None has run on this workflow, so rules alone decide today.

Intervention

The KYC demo workspace exercises all four verdicts across 11 scenarios: 3 AUTO_EXECUTE, 1 OBSERVE, 1 ESCALATE, and 6 DENY. It's a functional demo, not a benchmark.

  • AUTO_EXECUTE (run): A risk assessment on a fully verified case.
  • OBSERVE (run and flag): Five searches present, the index naming them missing. The agent writes the assessment, and the receipt records the gap. The demo script lands here at the fifth search, because it never writes the index.
  • ESCALATE (pause for a person): A complete file with no manager sign-off (case.manager_sign_off == true fails). The analyst sees a permission prompt. A session without prompts turns it into DENY.
  • DENY (deny with the reason): An approval before sanctions screening, or the agent writing the sign-off itself: "The manager sign-off is the human record of a human decision, so the agent cannot write it".

Evidence

Every decision writes a receipt with the call, the check, the verdict, the reason, and the case state judged. Receipts are hash-chained into a ledger, so an edit to an earlier receipt breaks the chain. They aren't signed. One of the four contracts protects the case's own record: the first write creates the audit trail, and any rewrite gets DENY. These contracts trace to the workflow's procedure, not to a regulation clause.

Policy from the organisation's own documents

The four enforced contracts were written by hand. The policy pipeline didn't compile them.

Separately, the pipeline read two sections of Australia's AML/CTF Rules 2025 (5-2 to 5-5 and 6-12 to 6-15). It found 27 of 31 gold rules, 27 of its 34 rules matched the gold, and it found all 6 senior manager approval duties. Conditions are the weak spot: operator and value agree on 1 of 24.

Keep in mind: A model annotated the gold and no person has reviewed it, so this measures extraction against that annotation, not legal accuracy.

The contract bank compiles annotated rules from five Australian and US sources into 29 draft KYC and AML contracts. Rules section 5-5 says "a senior manager of the reporting entity will determine ... whether the reporting entity will continue a business relationship with the customer". Its check returns ESCALATE to a senior manager when a customer becomes a foreign PEP, or a domestic or international organisation PEP rated high risk, with no continuation decision on record. No person has reviewed the 29, and nothing enforces them.

To reproduce, run:

# SDK checkout: extraction and scoring (model output varies)
coco eval policy --run --sets kyc_aml/au_amlctf_rules_2025 --docs 2 --max-pages 3
# contract bank: drafts per source file, 29 in total
grep -c 'status: draft' contract_bank/kyc_aml/*.yaml
# guardrails checkout: the 11 scenarios, then the case state on a receipt
python -m pytest tests/test_dashboard.py -k kyc
python -m pytest tests/test_gate.py -k case_state

How Coco fits KYC onboarding

The agent reads customer documents, runs searches through a web fetch or browser, and writes each report and the approval into the case folder.

Today the KYC contracts run in the Claude Code hook, called before every tool call. The hook reads the contract, the session's history, and the live case folder, returns a verdict, and writes the receipt. The contracts use the guardrails pack format, not the SDK's, and neither the SDK middleware nor the HTTP gate holds a KYC contract beyond the drafts.

Running the same checks through the SDK or the HTTP gate, in front of a KYC platform, needs a case state connector that isn't built. Coco doesn't run the identity, screening, or risk checks, and doesn't make the KYC decision.

What the guardrails stop

No set of KYC violations or attacks has run through Coco, so there's no KYC figure. The figures below come from payments and injection benchmarks, and measure the SDK engine, not the hook.

  • Payments: On a corpus of 73,356 payment transfer calls built from 4,371 human-written attacks, Coco's rules let none of the 15,550 forbidden transfers run and stopped none of the 57,806 permitted ones.
  • Injection, AgentDojo v1.2.2: Of 588 planted attacks, rules and classifier together prevented 582, with 18 of 97 legitimate tasks held for a person. Rules alone prevented 467.

To reproduce from an SDK checkout, run:

coco eval vault --arms rules
coco eval agentdojo --arms none,rules,judge,hybrid --classifier <classifier-url>

What Coco can't promise yet

  • A measured KYC result. None exists.
  • A classifier on KYC, or a platform connector. Neither exists, and case state comes from a folder on disk.
  • Controls past order and screening. Checks on the policy version in force, overdue refresh, screening freshness, and a later fact reopening an earlier step aren't built.
  • Reviewed regulatory contracts, or an adverse media source in the corpus.
  • Coverage past the hook's limits. Claude Code gives the hook 30 seconds, and past that the call proceeds with no receipt. Two sessions on one case don't see each other. Anyone able to edit the Claude Code settings removes the hook unless the fleet is managed.

From our team

"An agent assembles a KYC file well. Accepting the customer stays a person's decision, and a sentence in a prompt does not keep it there. Coco reads the case folder before each step, puts every approval in front of a person, and keeps a receipt of what it saw when it decided. We have not measured a KYC result yet, and we say so until we have." Khoa Pham, co-founder and CTO, CocoAI

Working with us

If you run onboarding, KYC, or AML work with agents, contact us at trustcoco.ai. The packages aren't published yet, so access starts with a conversation.


On this page