An AI agent audit trail has one job: when an agent does something surprising — a large refund, an email to the wrong customer — it lets you answer what happened, and who allowed it? in minutes, not days. Most teams only discover their logs can't do this after the first incident.
Logs are not an audit trail
Application logs and LLM traces record what the model saw and said. They're great for debugging prompts. They usually can't tell you which rule allowed an action, who approved it, or whether the limit in force at the time was the same one in force today. An audit trail is built around decisions, not tokens.
What to record for every agent action
For each action an agent attempts, record:
- When — a precise timestamp
- Which agent — and its version
- On whose behalf — the user or customer the agent was acting for
- The action and its arguments —
issue_refund, order, amount - The decision — allowed, denied, or held for approval
- The reason — which rule matched, in plain words
- The approver — if a person decided, who and how long it took (see human in the loop for AI agents)
- The policy version — the exact rules in force at that moment
Denied and held requests matter as much as the ones that ran: they're the evidence that your AI agent guardrails work.
Link every decision to a policy version
Rules change. A decision is only explainable if you know which version of which rule made it. Store the policy version with every decision, and keep old versions readable. Versioned policies make this automatic.
Keep it append-only
A record that can be edited after the fact can't settle a dispute. Write decisions to a log that can only grow, and record corrections as new entries that point to the original.
Make it searchable for different people
Engineers, process owners and reviewers ask different questions: everything one agent did this week, every refund over a threshold, every action one person approved, everywhere a rule denied something. Make those filters easy, and make the log exportable to the security and data tools your teams already use.
Go deeper
- AI agent compliance — the controls and records reviewers ask for
- The EU AI Act and AI agents — oversight, logging and deadlines
- ISO 42001 for AI agents — mapping runtime controls to an AI management system
- AI agent observability vs. audit — what to monitor and what to record
Where Gaten fits
Gaten writes every agent request and decision — with the approver and policy version — to an append-only audit trail you can search and export. See the audit trail.
Frequently asked questions
What's the difference between an AI audit trail and LLM observability?
Observability tools trace prompts, responses and latency to help you debug. An audit trail records decisions about actions — what was allowed, by which rule, and by whom — to support accountability and review.
How long should AI agent audit logs be kept?
It depends on your industry and internal policies. Ask your compliance team; many organisations align it with how long they keep other financial or access records.
Does an audit trail make us compliant?
No tool can promise that. A good audit trail gives reviewers the records they usually ask for; whether that satisfies a specific regulation is a judgement for your legal team.

