Logs and traces
Detailed technical output: requests, timings, errors, the internal steps of a model call.
- Sampled, rotated, often deleted in days
- Editable by whoever runs the system
- Structure changes with the code
- Read when something breaks
Who or what acted, on whose behalf, with which model and inputs, what it did, who approved it — written once, sealed, and kept as long as the law asks.
Logs help engineers fix systems. An audit trail lets someone outside the team reconstruct a decision months later and trust that the record has not been changed. This guide covers what an AI audit trail must capture for models and agents, how tamper evidence works, how retention rules combine, and what the EU AI Act, US record-keeping rules and NIST controls expect.
Updated · 7 sources
An AI audit trail is a chronological, append-only record of what AI systems and the people around them did: each model or agent action, its inputs and sources, the model and configuration version, the outcome, and every human review, edit or approval — with who, what, when and on whose behalf. Unlike an application log, it is kept as evidence: complete, protected from change, tamper-evident and retained for as long as the applicable rules require.
Most AI stacks already produce logs and traces. They answer an engineer’s question — why did this fail? An audit trail answers an auditor’s question — who did what, and can I rely on this record? The same event can feed both, but the requirements differ.
Detailed technical output: requests, timings, errors, the internal steps of a model call.
The evidential record of actions and decisions: who, what, when, to which record, with what result.
NIST SP 800-53 sets the classic content of an audit record in control AU-3: what happened, when, where, from what source, with what outcome, and who was involved. For AI, each of those needs a little more precision — and three fields that classic logs never had.
| AU-3 element | Classic system log | AI model or agent step |
|---|---|---|
| Type of event | Sign-in, file read, setting changed | Model call, tool call, decision, value edit, approval |
| When | Time stamp | Time stamp in UTC or with its offset; step order within the run |
| Where | Host or application | Project, workflow, agent and run identifier |
| Source | Process or address | The agent, the person it acted for, and what triggered it |
| Outcome | Success or failure | The output or change made — before and after values — or the refusal |
| Identity | User account | The person who reviewed, approved or overrode, separate from the agent |
NIST asks that audit information be protected from unauthorized modification and deletion, and offers cryptographic integrity as an enhancement. A hash chain is the common way to do it: each entry carries a fingerprint of itself and of the entry before, so changing one breaks every link after it.
Entries are only ever appended. The store refuses updates and deletes.
Each new entry stores the hash of the entry before it.
A cryptographic hash, such as SHA-256, is computed over the entry’s content and that link.
Copy the latest seal somewhere the system’s operators cannot reach — a ticket, an inspection file.
Recompute every seal from the start; the first mismatch names the entry that was changed.
Evident, then prevented. A hash chain shows that a record changed; it does not stop the change. Pair it with append-only storage, separate duties for whoever runs the store, and a routine verify — then a change is both hard to make and impossible to hide.
There is no single number. The AI law sets a floor, the record-keeping law of your sector usually sets a longer period, and privacy law pushes back against keeping personal data longer than needed. The longest applicable duty for each record type wins, and a legal hold suspends deletion.
Which rule sets the retention for an AI audit record?
The rules below were written for different industries and eras, but they converge on the same four properties: automatic, complete, attributable and unalterable without trace.
Agents raise the bar on attribution. When an agent acts for a person, the record has to show both: the agent that took the step and the person on whose authority it ran. Without that, non-repudiation in the NIST sense — evidence of who performed an action — fails for every automated step.
The Botminds audit trail is append-only at the database, sealed entry by entry with a hash chain, and checked on demand by a verify call that names the first entry that does not match — for every recorded change by every person and every agent.
Each entry stores the previous entry’s hash and a SHA-256 seal over its own content, set by the database itself.
Keep the chain’s latest seal in an inspection file or a ticket; a later verify proves every entry before it.
Each step of each run is streamed, kept and replayable.
Project, workspace and platform feeds, filtered by who, what and when, exported as CSV or JSON.
One timeline joins stage moves, value edits, agent runs, re-extraction and indexing.
E-signatures bound to exactly what was signed; preservation holds make every delete path refuse until release.
See the design in AI governance on Botminds, and the Academy lessons on audit and compliance and observability.
An AI audit trail is an append-only, tamper-evident record of what AI systems and the people around them did — each model or agent action, its inputs and sources, the model and configuration version, the outcome, and every human review or approval — kept as evidence for the period the rules require.
The terms overlap. In practice, logs are technical output kept for troubleshooting, often sampled and short-lived; an audit trail is the evidential record of actions and decisions, complete, protected from change and kept for a set retention period.
For high-risk AI systems, yes in substance: Article 12 requires automatic recording of events over the system’s lifetime for traceability, and Articles 19 and 26(6) require providers and deployers to keep the logs under their control for at least six months, unless other law sets otherwise.
The longest applicable rule for each record type: the EU AI Act sets a six-month floor for high-risk systems, sector rules such as SEC Rule 17a-4 run to years, and FDA Part 11 ties audit trails to the life of the records. Privacy law argues for minimising personal data in them.
Each entry carries a cryptographic hash over its content and the previous entry’s hash, so changing any entry breaks the chain from that point. Keeping the latest hash outside the system lets anyone verify the whole history up to it.
Enough to reconstruct the decision should be. Where prompts carry personal or confidential data, store references or fingerprints, restrict who may read the content, and set its retention with your privacy team.
Reconstruct the run: the request and who made it, the agent’s plan, each tool call and its result, the sources it read, what it changed, and who approved. Then check each step against the agent’s granted tools and the approvals your policy required.
Every recorded change by people and agents is appended to a hash-chained trail the database protects from edits. A verify call names the first entry that does not match, every agent run is kept and replayable, and feeds export as CSV or JSON.
Bring one process and its documents. We’ll show you the agents, the controls and the record, running on your data.