Audit Trail UX
How do you show what the agent did and who approved it?
The quick read · Pattern 10
The 60-second version
An audit trail should explain a decision as it was made, not merely list events. Connect the proposal, evidence snapshot, authority, intervention and observed outcome so another person can reconstruct the case.
- Offer a timeline for scanning, an event log for detail and a narrative for investigation.
- Separate decision-time evidence from facts learned later.
- Link corrections and exports back to the original record and access rules.
Watch for: An approval is not proof of a good outcome. Retention, access controls and tamper evidence need engineering and policy decisions; a polished timeline does not guarantee compliance.
Animated walkthrough · 0:55
From an event log to a decision record
Synthetic walkthrough. Follow one held payment from a bare log entry to the evidence, authority and rationale behind the decision. Later findings remain separate from what the reviewer knew at the time.
The payment remains held and verification stays open. This synthetic case does not demonstrate fraud prevention or a completed investigation.
Try the Decision Record Explorer →
Read the walkthrough
- A payment was held. The log names Maya and the time, but does not explain why.
- The same payment opens as a decision record, connecting its proposal, evidence and authority.
- The evidence snapshot shows a matched invoice and a bank-detail change from two days earlier. Confirmation was still missing.
- Treasury and Procurement must independently confirm the change. Maya can hold the payment, but cannot approve it alone.
- Maya records her reason: the bank change is unverified. No funds are released, and supplier verification remains open.
- A later, separately dated update adds new evidence without rewriting the original snapshot.
- A reviewer can reconstruct the decision. The Decision Record Explorer lets you inspect a synthetic record yourself.
The Problem
Every regulated system that involves AI agents making or recommending consequential decisions faces the same audit problem: you must prove what the agent did, what evidence it relied on, who approved it, and what happened next. But the audit trail as typically implemented is a compliance afterthought — a CSV export, a raw event log, a database table that nobody reads until something goes wrong and a regulator asks for it. By then, the people who actually need to understand what happened — the operations manager, the product team, the investigating auditor — are staring at thousands of timestamped rows with no narrative, no context, and no way to answer the only question that matters: what actually happened, and was it right?
The Decision Record Explorer demonstrates the distinction behind this pattern: a log says something happened; a decision record helps us understand why.
The Anti-Pattern
The Compliance CSV Dump. A flat event export tells reviewers that an approval happened, but omits the proposal, evidence and rationale needed to reconstruct it.
The Blockchain Explorer Anti-Pattern. An immutable log can still be hard to understand. Transaction identifiers and hashes can support verification, but a reviewer still needs to see the evidence and decision context in a readable form.
The "Audit as Afterthought" Pattern. A conversation history captures messages but gives the reviewer no clear decision boundaries or record of authority.
The Invisible Audit Trail. If people can find a purchase record only by searching settings after noticing a charge, they have little chance to catch the problem early.
The Pattern
The Core Thesis
An audit trail for AI agent systems must serve two audiences simultaneously, without forcing either to use the other's interface:
| Audience | Needs | Reads the trail when... | Success metric |
|---|---|---|---|
| Compliance / Legal / Regulatory | Completeness, immutability, export, chain of custody, temporal ordering | Investigation, periodic audit, regulatory request | "Can we prove, to an external examiner, exactly what happened?" |
| Operational Users (product team, ops manager, business owner) | Context, narrative, searchability, speed | Something unexpected happened, performance review, calibrating trust | "Can I understand what happened and why in under 60 seconds?" |
The design error is building for one audience and expecting the other to cope. The pattern is: capture once, present three ways, export to anything.
The Decision Record: A First-Class Object
The fundamental unit of the audit trail is not a log line — it's a Decision Record. This is the concept I've built and published at accountability-lab.studio, and it's the backbone of this entire pattern.
A Decision Record captures one complete decision cycle:
| Field | What it captures | Why it matters |
|---|---|---|
| Record ID | Unique, immutable identifier (e.g., ADR-2048-A7) |
Referenceability. Every downstream discussion can cite a specific decision. |
| Proposal | What the agent proposed, in business language. "Release an £84,200 supplier payment after a recent bank-detail change." | The what. Not a function call, not a JSON payload — a human sentence. |
| Evidence Snapshot | What data the agent relied on, frozen at the moment of proposal. Source documents, confidence scores, model version, data freshness timestamps. | The basis. This is what makes replay possible — you see what the agent saw, not what the data looks like now. |
| Authority Chain | Who/what had standing to approve. Which gate fired, what level, which policy rule routed it. | Maps to the Authority pillar. "Treasury and procurement must independently confirm any change to beneficiary details." |
| Intervention | What the human did. Approved / Rejected / Amended / Escalated. Who, when, how long they took, what they changed. | Maps to the Contestability pillar. The structured decision, not just a boolean. |
| Outcome | What actually happened after the decision. "No funds released. Supplier verification remains open." | Closes the loop. Without outcome, you have an approval log, not an accountability record. |
| Outcome Evaluation | Did the result match expectations? Was the decision correct in hindsight? | Feeds the learning loop. This is what populates the Accountability Lab Eval Kit. |
The Decision Record Explorer at accountability-lab.studio demonstrates this with a concrete scenario: an agent proposing an £84,200 payment after a bank-detail change, held by a human reviewer (Maya Chen), with two-person review requested. Record ADR-2048-A7. Every field visible. Every pillar represented. That's the reference implementation for this pattern.
Three Views of the Same Data
The same underlying Decision Records render into three distinct views, each optimised for a different question:
View 1: Timeline View — "What happened, in order?"
The default operational view. A vertical timeline with Decision Records as discrete cards, showing the flow of agent proposals → human interventions → outcomes. Each card shows a one-line summary with expandable detail. Colour-coded by status: green (approved and outcome matched), amber (approved but outcome diverged), red (rejected or held), grey (pending).
-
Decision timeline
- 14:32 · ADR-2048-A7 · held
- £84,200 bank-change payment; Maya requested two-person review
- 14:18 · ADR-2047-B3 · approved / outcome matched
- £2,400 Acme retainer; L1 receipt
- 13:55 · ADR-2046-C1 · approved / outcome diverged
- 500 packaging units ordered; 480 delivered; shortfall flagged
- 13:41 · ADR-2045-D8 · rejected
- Net-30 → Net-15 requires a contract amendment
- Expand record
- Replay
- Export
View 2: Event Log View — "What exactly happened, machine-readable?"
The audit view is a structured, sortable list of recorded events, including decisions, agent actions, state transitions and data access. Export formats can support independent review.
-
ADR-2048 · event log
- 14:31:55 · PROPOSAL_CREATED
- agent:ops4.2 · £84,200 payment proposed
- 14:31:58 · EVIDENCE_SNAPSHOT
- system · 3 source records captured
- 14:32:01 · GATE_TRIGGERED
- agent:ops4.2 · L4 bank-change rule
- 14:32:07 · GATE_HELD
- maya.chen · review requested
- Export CSV
- Export JSON
- Review integration
View 3: Narrative View — "Tell me the story of this decision."
The investigation view. Takes a single Decision Record and renders it as a readable narrative with all four pillars explicitly annotated. This is what the operations manager opens when the CEO asks "what happened with the Northstar payment?" and needs an answer in five minutes, not five hours.
-
Proposal
Operations Agent v4.2 proposes an £84,200 payment to Northstar Components after a bank-detail change.
-
Evidence · snapshot at 14:31:58
Invoice INV-8847, supplier bank update from 12 November, and 12 historical payments. The two-day-old change falls inside the seven-day review window in fictional policy TP-114.
-
Authority
L4: Treasury and Procurement must independently confirm beneficiary banking changes. Routed to Maya Chen; Procurement reviewer pending.
-
Intervention · 14:32:07
Maya holds the payment six seconds after the gate appears. Reason: bank change unverified; full review still pending.
-
Outcome · pending
No funds released. Supplier verification remains open. Evidence snapshot and linked intervention preserved; hold and amendment remain available.
Filtering and Search: Finding Patterns Across Thousands of Decisions
An audit trail that only works for individual lookups fails at scale. The search interface must support structured queries that answer operational and compliance questions:
Structured filter categories:
- By gate level: "Show me every L4 escalation in Q3"
- By outcome: "Show me every decision where outcome diverged from expectation"
- By actor: "Show me every decision Maya Chen reviewed"
- By policy trigger: "Show me every time the agent exceeded its spending authority"
- By timing: "Show me every approval that resolved in under 3 seconds" (the rubber-stamp detector — this is exactly what the Accountability Lab Eval Kit measures with its
fast_approvalsmetric) - By agent: "Show me every decision made by Operations Agent v4.2"
- By status: "Show me all currently held decisions awaiting review"
The search returns results in whichever view the user was already in (timeline, event log, or narrative), with the filter applied as a persistent lens — not a separate results page. This is important: the user's mental model stays in the audit context; they're narrowing the trail, not leaving it.
Saved searches become monitors. A filter like "every approval resolved in under 3 seconds" isn't just a one-time query — it's a standing alert. The system should allow any search to be saved as a monitor with configurable notification thresholds. "Alert me if more than 5 rubber-stamp approvals happen in a single day." This bridges the gap between retrospective audit and real-time oversight — which is the Accountability Lab's Oversight Console function.
The Replay Capability
This is the feature that separates a real audit trail from an event log: temporal reconstruction. When someone opens a Decision Record six months after the fact, they must see what the agent and the approver saw at the moment of decision — not what the data looks like now.
The evidence snapshot in each Decision Record is immutable: it captures the specific documents, data values, model version, and confidence scores that existed at decision time. Replay means:
- Show the proposal screen exactly as the approver saw it. Same layout, same data, same evidence links — but clearly marked as a historical reconstruction. "You are viewing this decision as it appeared to Maya Chen on 14 November 2025 at 14:32."
- Show what has changed since. A diff between the evidence-at-decision-time and current data. "The supplier's bank details were reverted to original on 18 November" or "This invoice was subsequently cancelled." The diff is the investigation tool — it answers "knowing what we know now, was this decision correct?"
- Never silently show current data in a historical context. If the evidence snapshot is unavailable (older records, migration gaps), say so explicitly: "Evidence snapshot unavailable for this record. Current data shown — may not reflect decision-time state." Silence here is the most dangerous failure mode in audit UX.
-
Decision-time view · 14 Nov 14:32:07
Bank account ending 8834 changed two days before payment. The change was unverified; payment held.
-
Later case history
- 18 November
- Verified supplier channel restores account ending 6612
- 22 November
- Supplier reports the earlier change was unauthorised
- 25 November
- Case closed as an attempted redirect; held payment was not released
- Compare snapshots
- Export replay package
Immutability with Human Readability
The audit trail must be tamper-evident without making the UI feel like a blockchain explorer. The implementation pattern:
- Hash chain under the hood. Linking each record’s hash to the previous record can help reveal tampering. It does not establish whether the record is complete, accurate or sufficient for a particular audit.
- Verification is one click, not a technical exercise. A "Verify Integrity" button on any record checks the hash chain and reports: "✅ This record and all 1,246 preceding records are unmodified since creation." Or: "⚠️ Chain integrity broken at ADR-1987 — [View Details]." The user never sees a hash.
- Amendments are append-only, never overwrites. If a Decision Record needs correction (e.g., an outcome was wrongly recorded), the original is preserved and a correction record is appended, referencing the original. "ADR-2048-A7-CORR-1: Outcome updated from 'pending' to 'fraud prevented — see investigation IR-445.'" The correction shows both the original and the amendment, with clear timestamps.
- The integrity guarantee is visible but not intrusive. A small lock icon (🔒) on each record indicates chain integrity. Green = verified. Amber = not yet verified this session. Red = integrity issue. Hovering shows: "Record integrity: verified · Chain position: 2,048 · Last verified: 2 minutes ago." No hashes. No block numbers. No gas fees.
Export and Integration
Audit data must flow into existing GRC (Governance, Risk, Compliance) toolchains without manual transformation:
| Export target | Format | What's included |
|---|---|---|
| CSV / Excel | Flat table, one row per event or per decision | For ad hoc analysis, the compliance analyst's comfort zone |
| JSON / JSONL | Structured, nested Decision Records | For programmatic integration, SIEM ingestion |
| PDF evidence package | Narrative view + evidence snapshots + hash verification | For regulatory submissions — the "hand this to the auditor" format |
| SIEM / SOAR push | Real-time event stream (Splunk, Sentinel, QRadar format) | For security operations monitoring |
| GRC platform sync | API integration (ServiceNow GRC, Archer, OneTrust) | For enterprise risk registers and control testing |
The critical export rule: every export includes the evidence snapshot, not just a pointer to current data. An exported audit package must be self-contained — readable and verifiable without access to the live system. This is the lesson every compliance team learns during their first system migration: if the audit trail references data that lives in a system you're decommissioning, the trail is worthless.
Annotated Component Architecture
-
Views
Timeline for scanning; event log for detailed queries; narrative for investigation.
-
Filter / search / monitor
Structured queries, saved searches, authority checks and review signals.
-
Decision record store
Proposal, evidence snapshot, authority chain, intervention, outcome and evaluation. Append corrections as linked records; define retention and access rules. Hash chaining may provide tamper evidence, not a complete security guarantee.
-
Export / integration
CSV, JSON, PDF packages and authorised monitoring integrations.
Design in practice
The Decision Record Explorer uses a synthetic payment held after a change to bank details. Follow the proposal, evidence and authority through to the hold, then compare what the decision record explains with what a flat list of events would tell you.
Implementation Notes
Data architecture for evidence snapshots. The biggest technical challenge is snapshot storage. Every Decision Record must include a frozen copy of the evidence the agent relied on — not a pointer to live data. For document references, this means storing either a content hash + archived copy, or a versioned reference to an immutable document store. In practice: use content-addressable storage (CAS) for evidence artifacts, with the CAS hash embedded in the Decision Record. Storage costs are real but manageable — most evidence snapshots are metadata plus document references, not full document copies. Budget approximately 5-50KB per Decision Record for metadata, plus document storage at source size.
Hash chain implementation. Use SHA-256 for the chain hash. Each record's hash covers: record ID + timestamp + proposal content + evidence snapshot hash + authority chain + intervention data + outcome + previous record hash. Store the hash as a field on the record. Verification walks the chain backwards from any record to the genesis record. For performance at scale (millions of records), maintain periodic checkpoint hashes — verify from the nearest checkpoint rather than walking the full chain every time. Consider publishing daily chain-tip hashes to an external append-only ledger (a company blockchain, a timestamping service, or even a daily tweet) for external auditability.
Replay fidelity. The replay screen must render the approval UI as the approver saw it, which means the evidence snapshot must include not just data but presentation metadata: which fields were highlighted, what order they appeared in, which warnings were surfaced. In practice, store a serialised representation of the approval screen state (a JSON snapshot of the component tree at render time) alongside the data snapshot. This is expensive to implement but essential for regulatory investigations where the question is: "did the interface make this risk visible?"
Event stream architecture. Decision Records are the high-level objects; the event log is the low-level stream. Use an event-sourcing pattern: every state transition emits an immutable event (PROPOSAL_CREATED, GATE_TRIGGERED, GATE_HELD, EVIDENCE_SNAPPED, APPROVED, REJECTED, OUTCOME_RECORDED, etc.). Decision Records are projections over the event stream. This means the event log view and the timeline view are different projections of the same source data, not separate systems — which eliminates the most common audit trail bug: two views that disagree.
Rubber-stamp detection. Very fast decisions can be a signal for review. Compare speed with evidence complexity and inspect a sample of decisions before drawing conclusions.
Retention and privacy. Agree which evidence must be retained, for how long and by whom. Minimise personal data in the event record and validate any retention or deletion policy with the responsible teams.
API surface. Expose Decision Records via a read-only REST API with structured query support. Minimum endpoints: GET /decisions/{id} (single record), GET /decisions?filter=... (filtered list), GET /decisions/{id}/replay (evidence snapshot + screen state), GET /decisions/{id}/events (event stream for a single decision), GET /chain/verify/{id} (hash chain verification from record to nearest checkpoint). Write operations happen through the agent platform's normal workflow, never through the audit API — the audit trail is append-only by design.
When to Use / When NOT to Use
Use this pattern when:
- The agent takes consequential actions in regulated domains. Finance, healthcare, legal, HR, procurement — anywhere a regulator might ask "what happened and who approved it?"
- Multiple humans interact with agent decisions. The audit trail becomes essential when the person who set up the agent, the person who approved a decision, and the person who investigates a problem are three different people.
- Trust calibration depends on historical evidence. If you're using Pattern #2 (Approval Gates) with adaptive gate levels, the audit trail is what provides the evidence for loosening or tightening gates over time.
- The agent operates at scale. A single agent making five decisions a day can be supervised by memory. An agent making five hundred decisions a day requires a designed trail to maintain oversight.
- You need to answer "what happened?" faster than "let me pull the logs." If the current answer to an incident question involves a developer running database queries, you need this pattern.
Do NOT use this pattern when:
- The agent is purely advisory with no execution authority. If the agent suggests but never acts — and the human takes the action in a separate system with its own audit trail — you're doubling the compliance burden without adding accountability. Log the suggestions, but don't build a Decision Record architecture.
- The interaction is ephemeral and non-consequential. A chatbot answering "what's the weather?" doesn't need a four-pillar Decision Record. Apply proportionate effort.
- You haven't built the approval gates yet. This pattern depends on Pattern #2 (Approval Gates) and Pattern #1 (Delegation Transparency) being in place. Without structured decision boundaries, there's nothing meaningful to audit. Build the gates first, then build the trail.
- Compliance theatre is the actual goal. If the organisation wants an audit trail to check a box without genuine intention to review decisions or improve agent behaviour, this pattern is overkill. A flat event log with CSV export will satisfy the checkbox. But it won't protect you when something goes wrong.
The Capstone
This is the tenth and final pattern in the AX Pattern Library's free tier, and it's intentionally last. Every preceding pattern feeds into this one:
- Pattern #1 (Delegation Transparency) provides the context for what authority was delegated — the audit trail records whether that delegation was honoured.
- Pattern #2 (Approval Gates) provides the decision boundaries — each gate firing creates a Decision Record.
- Pattern #3 (Confidence & Uncertainty) determines what evidence signals are captured in the snapshot.
- Pattern #4 (Progress for Non-Deterministic Tasks) feeds the outcome tracking — did the task complete as expected?
- Pattern #5 (Error Recovery) creates its own Decision Records when things go wrong and recovery paths are taken.
- Pattern #6 (Agent Memory & Context) determines what the agent knew at decision time — critical for replay fidelity.
- Pattern #7 (Multi-Agent Status Dashboards) is the real-time complement to the audit trail — the dashboard shows now, the trail shows then.
- Pattern #8 (Handoff: AI to Human) generates Decision Records at every handoff boundary.
- Pattern #9 (Configuration vs Conversation) defines the policies that determine which gates fire and how — the audit trail records whether those policies were followed.
The audit trail is where accountability becomes tangible. Not as a principle, not as a policy, but as an interface that a real person can open, read, and use to answer: what happened, why, and was it right?
That question — and the four pillars that structure the answer (Authority, Evidence, Traceability, Contestability) — is what I've built the Accountability Lab to demonstrate. This pattern is its codification for any team building agent systems that need to earn and maintain trust in regulated environments.
AX Pattern Library · Pattern #10 of 10 (Free Tier) · accountability-lab.studio · wfk.digital · tonkey.digital