WTWilly Tai
Case studyAI Governance & Assurance · the spine

The layer that makes agents safe enough to run.

Most AI demos show an agent acting. Almost none show how you'd prove what it did, or stop it when it shouldn't. This is that missing layer: one control plane every agent passes through, risk-classified, gated, and written to a tamper-evident ledger. It is what separates a clever demo from something a regulated business will actually deploy.

01 / The pain

Enterprises won't run an agent they can't audit.

Give an agent the power to act, whether that means releasing a payment, escalating a case, or committing stock, and the first question every risk officer asks is: how do I know what it did, that it stayed within policy, and that the record hasn't been changed since? Orchestration demos skip straight past this, so the agents that dazzle on stage never reach production. The blocker to enterprise AI is rarely capability. It is nearly always control.

02 / Why the naive approach fails

"Just write it to an audit log" isn't tamper-evidence.

The obvious version is to let the agent decide and write what it did to a log table. It fails the moment a regulator leans on it:

So the gate has to be deterministic rules, giving a decision you can re-derive. The log has to be hash-chained, so any edit is detectable and locatable. And the whole thing has to replay. On top of that, you have to be able to break it on demand to prove it works.

NAIVE model decides → INSERT into log_table ✗ rows can be edited silently✗ decision not reproducible✗ "verified" can't be falsified REFINED · deterministic gate + hash-chained ledger Classify (rules) Gate Hash-chain entry Replay = verify
fig.1 · an editable log versus a deterministic gate and hash-chained ledger
03 / How it works

One gate, two independent guarantees.

Every action any agent proposes is routed through one plane, whether it comes from the audit bot, the AML monitor, the KYC desk, or the payments flow. It is risk-classified by rules rather than a model, the policy gate decides allow / escalate to a human / block, and the decision is written to an append-only, hash-chained ledger. One honest point: the gate is deterministic if/else logic. That is deliberate, and it is why the decision is reproducible. The AI lives in the agents being governed. The gate is the seatbelt, and a seatbelt shouldn't be clever.

Audit Bot AML monitor KYC desk Payments Classifyrules · tier Policy gatedecide allow · automatic escalate → human block Ledgerhash-chained Replayre-derive 126 actions · 4 agents · one ledger · integrity verified · replay 126/126
fig.2 · the trust boundary, a deterministic gate and one ledger for every agent

The ledger gives two independent proofs. Each entry's hash covers its contents and the previous hash, which makes it a chain. Integrity means the record wasn't altered. Replay means the decision re-derives from its inputs. They catch different attacks. Replay would catch a flipped decision even if someone re-hashed the whole chain.

entry N−1hash = h₋₁ entry Nhash = sha256(h₋₁ + body) entry N+1hash = sha256(hN + …) Integrity → was anything altered? Replay → does the decision re-derive? edit any body → its hash changes → every later hash mismatches → break located at exactly that seq
fig.3 · the hard part, the hash chain and the two independent guarantees
04 / One worked example

Tamper with a record on purpose, and watch it get caught.

Take a verified ledger of 126 actions. An insider quietly flips one gated decision, seq 0140, an AML block, to "allow", hoping it slips through. The moment you re-verify:

StateIntegrityReplayWhat you see
Beforeverified126/126chain intact, every decision re-derives
After tampering seq 0140BROKEN at 0140DRIFT [0140]the chain breaks at the altered row; replay flags the same row
Caught two independent ways. The hash chain breaks at exactly seq 0140 (integrity), and replay re-derives "block" where the record now says "allow" (reproducibility). Even if the attacker had re-hashed the whole chain to hide the edit, replay would still catch the decision drift. None of this is asserted on trust. It is the live "Run tamper test" button on the home page, so press it.
05 / Numbers & honest trade-offs

One run, four agents, governed.

126
actions governed
From 4 agents, one ledger.
84 / 40 / 2
allow / escalate / block
By policy, not by model.
126/126
replay reproduced
Deterministic, every time.
2-way
tamper caught
Integrity + replay.

The honest trade-off. The gate is rules, not machine learning, and that is the feature rather than a shortcut. A learned policy would be faster to write and impossible to defend to a regulator, whereas deterministic rules are reproducible, explainable, and replayable. There is deliberately no clever model in the decision path. The AI lives in the agents the ledger governs, and the ledger's job is to make their actions provable. (One nuance kept honest: the hash excludes the timestamp, so an unchanged ledger reproduces identical hashes on re-run. Otherwise "reproducible" would be a half-truth.)

06 / Governance, shown

It governs every demo on this site.

The same control plane sits under the Audit Bot, the monitor, the AML and KYC agents, and the operations tower. Governance isn't bolted onto one page. It is the spine the whole portfolio runs on. A sample entry:

AI Control Ledger · entryintegrity verified · replay 126/126
seq        : 140
agent      : AML Monitor
action     : escalate_aml
subject    : W00008          amount : S$19,641
tier       : high          decision : escalate → MLRO   policy : POL-AML
evidence   : [T-…-S01 … S07]
prev_hash  : 4a91…0c3d    hash : 8f22…b6e1
Threat model: append-only; write access is the only trust assumption; a flipped decision or amount breaks the chain at its seq and is also caught by replay.
07 / Old vs new

From "trust the agent" to "prove what it did."

BEFORE · agents act, you hope agent acts writes a log row can't prove it wasn't changed AFTER · every action provable classify → gate → hash-chain → replay · tamper caught two ways
fig.4 · un-auditable agents become a provable control plane

What this says about how I work.

This is the competency I'd most want a hiring manager to see. Anyone can wire up an agent that acts. The rare and valuable skill, the one a regulated organisation needs before it adopts AI, is designing the safeguards that make those agents trustworthy: a deterministic gate you can re-derive, a human checkpoint on the consequential action, and a tamper-evident trail that can itself be proven. I don't treat governance as a slide. I build it as the layer everything else runs on, and I make it falsifiable. Press the button and watch it catch a lie.

See it run.

The tamper test above isn't a screenshot. It is the live interaction on the home page. Press it and watch integrity break and replay drift, then reset.

Run the live tamper test →Runs client-side, here on the site, with no backend needed.