An AI agent audit trail is a tamper-evident, append-only record of each agent run: who or what triggered it and on whose behalf, which sources it retrieved, which model and version responded, every tool call with its arguments and result, each policy decision and approval, and the final output or action. Keep it inside your own perimeter on synchronised clocks, and retain it for at least six months where the EU AI Act's high-risk rules apply, or longer where sector law or your own risk assessment requires.
The test of an audit trail is easy to state and hard to pass: can someone outside the engineering team reconstruct one run months later and show that every action in it was permitted? The sections below cover the record itself, its integrity, its privacy limits and the retention rules, and end with the questions auditors ask. The security guide for agentic AI explains why the same record also matters for detecting attacks.
Audit trail, observability and telemetry are different jobs
Teams often assume their tracing tool doubles as an audit trail. It rarely does, because the three serve different readers.
| Telemetry | Observability | Audit trail | |
|---|---|---|---|
| Question it answers | Is the system healthy? | Why did this run behave this way? | Was this action permitted, and who is accountable? |
| Typical content | Metrics, counters, latency, token use | Traces and logs across agents, models and tools | Identities, inputs, sources, tool calls with arguments, decisions, approvals, outputs |
| Main reader | Operations | Engineers | Audit, risk, compliance and investigators |
| Sampling | Acceptable | Often acceptable | Never for in-scope runs |
| Integrity | Best effort | Best effort | Append-only, tamper-evident and access-controlled |
| Retention | Short, operational | Set by engineering needs | Set by law and internal policy |
OpenTelemetry’s semantic conventions for generative AI show why a trace is not automatically evidence. The conventions, which moved to their own repository in 2026 and are still marked Development, define spans such as invoke_agent and execute_tool, but make tool-call arguments and results, prompts and model outputs opt-in attributes because they may contain sensitive information. A default trace can show that a tool ran without showing what it was asked to do. Observability is covered in the guide to logs, traces and audits for agents, the agent observability explainer and the comparison of LLM observability tools.
What an AI agent audit trail should record for each run
Record one entry per step, linked by a run identifier, so that a run involving several agents and tools can be rebuilt as a tree.
| Field group | What to record | Why it matters |
|---|---|---|
| Run identity | Run ID, parent run ID, agent ID and version, workflow version, environment | Ties every step to an approved configuration |
| Initiator and on-behalf-of | The authenticated person, or the schedule, event or application that started the run; the identity whose rights the agent used | Shows who is accountable and whose authority was spent |
| Trigger and input | The request as received, or a reference and hash where it holds sensitive content | Shows what the agent was asked to do |
| Retrieved sources | Document or record IDs with versions or content hashes, and the permission filter applied | Shows what the agent knew, and that it saw only what the requester could see |
| Model | Provider, model name and exact version, routing decision and reason, parameters, system prompt version | Ties an output to an approved model and allows replay |
| Tool calls | Tool name and version, arguments, result or a reference to it, target system and record, idempotency key | Shows exactly what changed and where |
| Policy decisions | Allow, deny or hold, with the policy version, the matched rule and the reason | Proves that controls ran, including the actions they stopped |
| Approvals | Approver identity and role, when the request was shown and decided, what was shown, the decision and any comment | Proves that oversight was real and informed |
| Output and actions | Final answer or document, and downstream changes with references | Connects the run to its business effect |
| Errors and interventions | Failures, retries, fallbacks, guard-model blocks, human overrides, kill-switch events | Explains abnormal runs and shows that intervention worked |
| Integrity | Sequence number, timestamp from a synchronised clock, hash of the previous entry, checkpoint or signature reference | Makes tampering detectable |
Store references rather than copies where content already lives under its own access control, but keep enough to reconstruct the decision: a document ID without a version or hash cannot prove what the agent read once the document changes. The governance and security handbook gives a field-level trace schema, and decision receipts for regulated agent workflows package the same fields into one reviewable record per consequential decision.
Making the audit trail tamper-evident
Sooner or later an auditor asks how you know the record has not been changed. Four measures answer the question.
Append-only, write-once storage. Write entries to storage that cannot be overwritten or deleted before the retention date, such as object storage with a retention lock or a WORM archive, administered by a team other than the one running the agents. US broker-dealers know the pattern: SEC Rule 17a-4(f)(2)(i) requires electronic records to be preserved either with a complete time-stamped audit trail of every modification and deletion or in a non-rewriteable, non-erasable format.
Hash chains and signed checkpoints. Put a hash of the previous entry into each new one, so that removing or editing any entry breaks the chain, and sign the latest hash at intervals. Merkle-tree logs of the kind Certificate Transparency uses (RFC 9162) add inclusion and consistency proofs, and a time-stamping authority under RFC 3161 can show that a checkpoint existed at a given moment.
Synchronised clocks. Timestamps from drifting hosts make a multi-agent run impossible to put in order. DORA’s risk-management standards require financial entities to synchronise the clocks of their ICT systems to a documented reliable reference time source, ISO/IEC 27001:2022 lists clock synchronisation as Annex A control 8.17, and NIST SP 800-92 asks administrators to keep every logging host on a common time source.
Protection and failure detection. Restrict who can read the trail, since it concentrates sensitive data, and alert when logging stops. The DORA standards name both duties: protect logging systems and log information against tampering, deletion and unauthorised access, and detect a failure of logging systems.
Privacy: minimisation, pseudonymisation and erasure
A log of agent runs holds personal data whenever prompts, documents or tool arguments mention people, so the GDPR applies to the log itself.
- Minimise. Article 5(1)(c) limits personal data to what is necessary for the purpose. Log the fields an auditor needs rather than whole conversations by habit, and redact sensitive values before they are written.
- Pseudonymise. Replace direct identifiers with tokens and keep the mapping separately under its own access control, as the definition in Article 4(5) requires; Article 32(1)(a) names pseudonymisation and encryption among the measures for securing processing.
- Limit storage. Article 5(1)(e) allows identifiable data to be kept no longer than necessary. Set retention per field group, because the skeleton of who, what and when may need to outlive the payload.
- Handle erasure requests. The right to erasure in Article 17 does not apply where processing is necessary to comply with a legal obligation or to establish, exercise or defend legal claims, under Article 17(3)(b) and (e). Records a law requires can usually stay; convenience copies cannot.
The AI Act points the same way: its six-month minimum for logs applies unless Union or national law, in particular data protection law, provides otherwise. Deletion across indexes, caches and derived data is covered in retention and erasure for private RAG, and the pii-redact tool can strip personal data before an entry is stored.
How long to keep AI agent logs: EU AI Act logging requirements and other rules
| Rule | Who it binds | What it requires | Retention |
|---|---|---|---|
| EU AI Act, Article 12 | Providers of high-risk AI systems, as a design duty | The system must technically allow automatic recording of events over its lifetime, so that risks and substantial modifications can be identified, post-market monitoring supported and deployers’ monitoring enabled | Sets no period itself |
| EU AI Act, Article 19 | Providers | Keep the automatically generated logs under their control | At least six months unless other law provides otherwise; financial institutions keep them with their financial-services documentation |
| EU AI Act, Article 26(6) | Deployers | Keep the automatically generated logs to the extent they are under the deployer’s control | At least six months, with the same exception and the same rule for financial institutions |
| DORA standards: Delegated Regulation (EU) 2024/1774, Article 12 | EU financial entities | Logging procedures that define the events to log, protect logs from tampering and deletion, detect logging failures and synchronise clocks, covering access control and identity management, capacity, change management, ICT operations and network traffic | Set by the entity from its business and security objectives, the reason for logging and its ICT risk assessment |
| ISO/IEC 27001:2022, Annex A controls 8.15 (Logging) and 8.17 (Clock synchronisation) | Organisations certified to ISO/IEC 27001 | Produce, protect and analyse logs of relevant events, on synchronised clocks | Defined in your own policy |
| NIST SP 800-92 (2006), with a Rev. 1 draft from October 2023 | US federal guidance, often used as a reference elsewhere | Log management as a lifecycle of generating, transmitting, storing, analysing and disposing of logs, with policies that preserve original logs | Defined by policy and applicable law |
Two sets of dates frame the EU rules. DORA has applied to financial entities since 17 January 2025. The AI Act’s high-risk obligations apply from 2 December 2027 for Annex III systems and from 2 August 2028 for products under Annex I, after the Digital Omnibus on AI, Regulation (EU) 2026/1744, moved the dates. Most agents will not be high-risk, yet six months is a sensible floor for any agent that touches customers or regulated decisions, because complaints and disputes can surface long after the event.
Which agents fall under the high-risk rules is covered in the EU AI Act for AI agents, and how DORA’s ICT rules reach AI in DORA and AI. For a high-risk system, the AI record-keeping agent drafts an Article 12 logging specification.
What auditors ask, and the fields that answer
| Auditor’s question | Records that answer it |
|---|---|
| Which agents ran in production during the period, and who owns each? | Agent registry with owners and versions; run identity |
| Who started this run, and whose authority did the agent use? | Initiator and on-behalf-of fields |
| What did the agent know when it acted? | Retrieved sources with versions or hashes; input reference |
| Which model produced this output, and was that model approved? | Model name, version and routing reason; the model’s approval record |
| What exactly did the agent change? | Tool calls with arguments, results and target references |
| Did a person approve, and what did that person see? | Approval record with the payload presented, timestamps and decision |
| Did any control block or alter the run? | Policy decisions and guard results, including denials |
| How do you know the record is complete and unaltered? | Hash-chain verification, write-once settings, clock-synchronisation evidence, logging-failure alerts |
| How long do you keep it, and on what basis? | Retention schedule with its legal basis per field group |
| Can you produce this without the vendor’s help? | Export path and logs stored under your control |
Questions about oversight deserve particular care, because an approval record without the evidence shown to the approver proves only that a button was pressed. The EU AI Act’s expectations are explained in human oversight for high-risk AI systems, and the evidence pack checklist for on-premises AI shows how logs turn into audit artefacts. Logging permission decisions is the other half of proving access control; the guide to AI agent permissions covers how those decisions are made.
How to test an AI agent audit trail before an auditor does
A reconstruction drill, run each quarter and after any change to the logging pipeline, finds the gaps while they are still cheap to fix:
- Pick a consequential run at random and rebuild it from the trail alone: initiator, sources, model version, each tool call and the approval. Every missing field is a finding.
- Compare the trail with the downstream system’s own records of the same changes. Timestamps that disagree point to clock drift; changes with no matching entry point to lost events.
- Verify the hash chain against the latest signed checkpoint, then try to edit or delete an entry with an administrator account and confirm the storage refuses.
- Stop one log source on purpose and check that the alert fires.
- Plant a test secret and a test personal identifier in a run, then search the stored trail to confirm both were redacted.
Keep the drill record. It is evidence in its own right that the control operates, which is what an auditor tests.
Common gaps in AI agent audit logging
Prompts logged, tool arguments missing. Prompt and response logging is common, while tool arguments and results are often left out because default tracing treats them as optional. Without them you can see that an agent called a payments tool, but not with which amount or payee.
Approvals with no context. A record that says a named user approved at a given minute does not show whether that person saw the right payload or had time to read it. Store what was presented and how long the decision took.
Logs held in a vendor cloud. When the trail sits in a provider’s console, its retention, export and access follow the provider’s terms. Article 26(6) obliges deployers to keep logs only “to the extent such logs are under their control”, which is a reason to keep them under yours, not a loophole.
Unpinned model versions. Logging an alias such as “latest” makes reproduction impossible once the provider updates the model behind it.
Broken correlation across agents. When work passes between agents and tools, each component must carry the same run ID or the trail falls apart into fragments. The 2026-07-28 MCP revision documents how to carry OpenTelemetry trace context in request metadata, which helps keep tool calls on the same trace.
Secrets and personal data in the log. Traces capture what agents see, including tokens pasted into tickets and customer details in documents. Scan and redact before storage.
Silent logging failures. If a log pipeline stops, nobody may notice until an investigation finds the gap. Alert when any source stops sending.
How VDF AI fits
Each agent in VDF AI Agents writes its own audit log and execution trace: the input and who sent it, the retrieval hits it used, every tool call with its arguments, what the model returned and the output it produced. Reviewers can search that record with audit-trail-query, which filters an append-only, tenant-scoped audit trail by time, actor or resource.
Approval evidence lives with the run. If a consequential step pauses at an approval gate, or at the Human Approval node of VDF AI Networks, the review, the reviewer and the time it took are stored together with that run, and human-approval-request records the approver’s identity. Networks keep an execution history with provenance, and VDF AI Router attaches a reason and the candidate list to every routing decision.
Across agents and Networks, the AI governance platform adds a Vault that holds a cryptographically durable record of every execution, decision receipts that hash the prompt, sources, model, tools and outcome together, and evidence packs for the EU AI Act or a sector audit built from those records. Its controls are mapped to the EU AI Act, DORA, NIS2, GDPR and ISO 42001; the mapping supports your evidence but does not make a system compliant on its own. Run in your own data centre, a private cloud or an air-gapped network, the whole trail stays in your custody, and the Trust Center lists the deployment options.
Sources
Legal texts were read on EUR-Lex and the Commission’s AI Act Service Desk on 6 November 2026, as were the openly published standards and specifications; for ISO/IEC 27001, whose text is sold, only control names are cited.
- Regulation (EU) 2024/1689, the AI Act, on EUR-Lex
- AI Act Service Desk: Article 26, deployer obligations
- Digital Omnibus on AI, Regulation (EU) 2026/1744
- DORA risk-management standards (Article 12, logging)
- GDPR, Regulation (EU) 2016/679, on EUR-Lex
- ISO/IEC 27001 information security standard
- NIST SP 800-92 on log management (2006)
- NIST SP 800-92 Rev. 1 draft (October 2023)
- OpenTelemetry generative AI conventions repository
- SEC Rule 17a-4 in the eCFR
- RFC 9162: Certificate Transparency 2.0
- RFC 3161: the Time-Stamp Protocol