Agent Audit Trail
A durable, tamper-evident, append-only record of every consequential decision and action an AI agent takes — the agent's answer to 'what did you do, and why?' It is not the same as application logs: ordinary logs are for debugging and get rotated away, while an audit trail is for accountability and must survive the incident, the audit, and the retention window a regulator asks about. A useful entry captures, per action: the *trigger* (what caused the run), the *context* (inputs and retrieved data the agent saw), the *reasoning* (trace of the plan and tool calls, not just the final action), the *action and its authority* (what it did, under which identity and scopes), and the *outcome*. To be trustworthy it must be tamper-evident — append-only storage, ideally hash-chained so altering history is detectable — which is where it meets Non-Repudiation. Under the EU AI Act, deployers of high-risk systems are specifically required to keep the logs their AI automatically generates.
Example
An accountable audit-trail entry: trigger = scheduled 2am reconciliation; context = bank feed hash + 3 flagged transactions; reasoning = trace showing the agent matched 2 and escalated 1; action = wrote to staging_ledger under identity 'recon-agent' scope 'ledger:write:staging'; outcome = 1 item sent to an approval gate; signed and hash-chained to the prior entry.
Frequently asked questions
- How is an audit trail different from observability logs?
- Observability exists to help *you* debug and improve the agent — it's operational and can be sampled, mutable, and short-lived. An audit trail exists to hold someone *accountable* — it must be complete for consequential actions, tamper-evident, and retained long enough to answer an auditor or a court. The audit trail is often the durable, hardened subset of your observability data.
- Do we need to log the agent's full reasoning?
- Log enough to reconstruct the *decision*, not necessarily every token. Capture the plan, the tool calls, the key inputs and retrieved context, and the final action with its authority. 'It refunded $4,000' is a log line; 'it refunded $4,000 because it read a forged receipt and skipped the fraud check' is an account — the second is what accountability requires.