SysArt
Book a briefing
SysArt

Guide

What should an AI audit trail record?

Logs become audit evidence only when they are complete, trustworthy and kept for the right period. This guide sets out what to record for LLM, retrieval and agent systems, which EU rules require or limit logging, and how to protect and retain an audit trail under EU control without keeping more personal data than you need.

Last reviewed by SysArt AI Governance Team11 min readHow we review

In short

An AI audit trail is a tamper-evident record of who used an AI system, on whose authority, with which model and prompt versions, what it retrieved, which tools it called, what people approved and what it returned. For high-risk systems, the EU AI Act requires automatic logs kept at least six months; the GDPR limits content and retention.

DefinitionAn AI audit trail is a time-ordered, tamper-evident record of the events in an AI system's operation that links each request, decision and action to the identities, versions, data and approvals involved, so that auditors and investigators can reconstruct what happened.

Key takeaways

  • An AI audit trail differs from observability data: it must be complete for the events in scope, tamper-evident, access-restricted and kept to a documented schedule, so sampled traces and short-lived debug logs are not enough.
  • For high-risk AI systems, Article 12 of the EU AI Act requires automatic logging over the system's lifetime, and providers and deployers keep the logs under their control for at least six months; for Annex III systems this applies from 2 December 2027.
  • Logs about people are personal data, so GDPR minimisation, storage limitation and security apply; France's CNIL recommends keeping logs of users' access and actions for six months to one year in most cases.
  • DORA's ICT risk management standard and the NIS2 implementing rules for digital providers call for defined log retention, protection against unauthorised changes and synchronised clocks, and MiFID II requires investment firms to keep recorded order-related communications for five years.
  • Record identities, versions, retrieval and permission decisions, tool calls, approvals and guardrail outcomes; keep prompt and output text in a separate, shorter-lived store, and never log secrets.

What is an AI audit trail?

An AI audit trail is a time-ordered, tamper-evident record of what an AI system did and on whose authority: who made each request, which model and prompt versions answered it, what was retrieved, which tools were called, what a person approved and what the system returned. It lets someone who was not there reconstruct an event and trust the result.

It overlaps with observability but serves different readers. Observability helps engineers keep a service fast and correct; our post on observability for on-premises AI covers its metrics, traces and alerts. An audit trail serves auditors testing whether controls operated; supervisors, which can obtain a high-risk system’s logs from its provider on reasoned request (AI Act, Article 21(2)); data protection officers (DPOs), who need to show what personal data was processed and when it was deleted; and incident responders and lawyers establishing who did what, and when.

Those readers change the design. Observability data can be sampled, rotated within days and edited by its operators; an audit trail must be complete for the events in scope, protected against alteration, kept to a documented schedule and readable only by those who need it.

What does the EU AI Act require for logging?

The AI Act requires logging only for high-risk AI systems: the provider designs it into the system, and provider and deployer both keep the logs. For other AI systems, the GDPR, security law and sector rules shape logging.

  • Article 12, record-keeping. A high-risk system must technically allow the automatic recording of events over its lifetime, suited to its intended purpose. The logs must record events relevant to three purposes: identifying situations in which the system may present a risk or undergo a substantial modification, the provider’s post-market monitoring (Article 72), and the deployer’s monitoring of operation. Only remote biometric identification systems get a minimum list of fields.
  • Articles 19 and 26(6). Providers and deployers each keep the logs under their control for a period appropriate to the intended purpose, of at least six months, unless other EU or national law, in particular data protection law, provides otherwise. Financial institutions keep them within the documentation that financial services law already requires. If a supplier hosts the system, agree in the contract how you obtain its logs.

These obligations apply from 2 December 2027 for Annex III systems and from 2 August 2028 for AI in products covered by Annex I. Whether a system is high-risk depends on its intended purpose; the EU AI Act risk checker gives a first indication. The Act prescribes no log format. Record keeping is part of the Commission’s standardisation request to CEN and CENELEC, and ISO/IEC 24970 on AI system logging was at ISO’s publication stage in late October 2026.

Which other EU rules shape AI logging?

The GDPR applies to every log that holds personal data, and security and sector rules add their own requirements.

  • GDPR. A log entry with a user ID, an IP address or a prompt about a customer is personal data (Article 4(1)), so a log store is a processing activity in its own right. Keep only what its purpose needs, for no longer than necessary (Article 5(1)(c) and (e)), secure it, for example with pseudonymisation and encryption (Article 32), and list it in your record of processing activities with its envisaged erasure time limit (Article 30(1)(f)). That record is a register, not a system log; you need both. Our guide to deploying LLMs in line with the GDPR covers lawful basis, impact assessments and data subject rights.
  • DORA. Article 12 of Delegated Regulation (EU) 2024/1774 requires financial entities outside DORA’s simplified framework to define the events they log, set retention from their business and security objectives and ICT risk assessment, protect logs against tampering, deletion and unauthorised access, detect logging failures and synchronise clocks to a documented reliable time source.
  • NIS2. Article 21 of Directive (EU) 2022/2555 requires essential and important entities to take cybersecurity risk-management measures, including incident handling. For cloud, data centre, managed service and certain other digital providers, Implementing Regulation (EU) 2024/2690 adds logging rules: access, authentication, privileged and configuration events, a predefined retention period, protection from unauthorised access or changes, and synchronised time sources.
  • MiFID II. Investment firms record telephone conversations and electronic communications relating to own-account dealing and client orders, including those intended to lead to a transaction, and keep them for five years, or up to seven at the competent authority’s request (Article 16(7)). An AI voice agent or assistant taking part in such communications can bring its transcripts within that duty.

What should you log for LLMs, RAG and agents?

Enough to reconstruct each request and action without copying more personal or confidential content than needed. Give every event a unique ID, a synchronised timestamp and the run ID that links it to the rest of the request.

FieldWhy it mattersHandling and retention
User or agent identity, role and access decisionAttributes each action; shows access control workedKeyed pseudonym; mapping kept separately
Model, version and routing decisionShows which model answered; exposes unapproved changesRegistry reference, not a copy
Prompt template version, parameters, guardrail configurationReproduces behaviour at a point in timeVersion ID or hash
Retrieved document IDs, index version, permission checkShows the answer used only sources the user may readIDs, not passages
Tool calls: tool, version, arguments, result, target systemReconstructs what an application or agent didMask secrets and personal data; large results in the content store
Human approvals and overridesShows who decided, when, on what information and with what outcomeKept as long as the action it covers
Guardrail and policy decisions, errors and fallbacksShows which control fired; explains failures and silent model switchesMetadata, shared with operational logs
Prompt and output contentShows what was asked and answeredSeparate store, restricted access, shortest workable period, or keyed hashes only
Configuration, deployment and permission changes; logging switched on or offEvidence of change control and possible substantial modificationsKept with the change history

Do not log passwords, API keys, tokens or session cookies, full documents when an ID will do, or special category data the purpose does not need. OpenTelemetry’s generative AI conventions, still in development, leave content capture off by default and recommend storing content externally, referenced from the trace, so that it can have separate access controls.

How do you protect an AI audit trail?

Treat it as evidence: restrict who can read it, make changes detectable and keep events in order.

  • Pseudonymise identities with a secret key kept apart from the logs. The European Data Protection Board (EDPB), in Guidelines 01/2025 put to public consultation in January 2025, warns that a plain hash of a known identifier can be recomputed and matched; it recommends keyed functions, such as message authentication codes, with high-entropy secrets. Pseudonymised logs remain personal data (GDPR recital 26).
  • Encrypt logs in transit and at rest, with keys you control.
  • Separate duties. The team that runs an AI system should not be able to edit or delete its trail. France’s data protection authority, the CNIL, recommends storing logs apart from the main system, writable by the application but not overwritable, with access on strict need.
  • Make tampering evident. Use append-only or write-once-read-many (WORM) storage, chain batches with cryptographic hashes, and sign and timestamp records when they are created, as the CNIL recommends. Verify the chain regularly and keep the results.
  • Synchronise clocks, as the DORA standard and the NIS2 rules call for, so that gateway, retrieval, model and tool events line up.
  • Detect gaps. Alert when logging stops or a request reaches a model without an audit event; the NIS2 rules list the stopping and pausing of logs among the events to record.
  • Keep audit and debug logs apart, each with its own pipeline, store, retention and readers. Debug logs may be sampled; audit events may not.

How long should you keep AI and LLM logs?

As long as each purpose and legal duty requires, and no longer. Set a period for each log category and document why.

SourceRetention
AI Act, Articles 19 and 26(6)High-risk system logs under your control: appropriate to the intended purpose, at least six months, unless other law provides otherwise
AI Act, Article 18Providers’ technical and quality management documentation, not logs: 10 years after placing on the market or putting into service
CNIL recommendation 2021-122Logs of users’ access and actions: six months to one year in general; for internal control, longer with documented justification, in most cases up to three years
DORA, Delegated Regulation (EU) 2024/1774Set by the entity from its business and security objectives, the reason for logging and its ICT risk assessment
NIS2, Implementing Regulation (EU) 2024/2690A predefined period, backed up and protected from unauthorised access or changes
MiFID II, Article 16(7)Recorded communications: five years, up to seven at the competent authority’s request

A tiered design reconciles these drivers:

  1. Audit events, as metadata, for the longest period a legal duty or documented purpose justifies; for a high-risk system, at least six months.
  2. Prompt and output content, in a separate store, for the shortest period that serves investigation and quality review, then deleted or reduced to statistics.
  3. Change and configuration history, kept with the technical documentation it supports.

Legal holds. When an incident, complaint, investigation or claim arises, suspend deletion for the records concerned and document the hold’s scope and release. The GDPR’s right to erasure does not apply where processing is necessary for a legal obligation or for legal claims (Article 17(3)(b) and (e)). After a serious incident, the provider of a high-risk system must not alter it in a way that could affect the analysis of its causes before informing the authorities (Article 73(6)), so preserve its logs and versions.

Proving deletion. Expire logs by time partition and keep a record of each deletion run, stating category, period, rule, time and result, but not the deleted data. Cover backups, replicas, search indexes, vector stores and supplier copies. If each period has its own encryption key, destroying the key makes that period unreadable. Then sample expired periods to confirm they are gone.

How do you keep prompts and logs inside EU jurisdiction?

Give prompts, outputs, embeddings, traces and audit logs the same location and access rules as the source systems, because they often hold the most sensitive data in the platform. Logs leave the boundary through routes nobody reviewed:

  • SaaS observability and LLM tracing tools, which receive full prompts and outputs once content capture is on;
  • vendor telemetry in inference servers, guardrail frameworks and agent toolkits;
  • supplier support access from outside the EU;
  • log forwarding and backups to a managed security service or backup provider in another region.

Map every destination of every log stream, switch off content capture and telemetry you have not approved, block unapproved outbound traffic and hold the log encryption keys yourself. Our guides to data sovereignty versus data residency and the CLOUD Act and Schrems II explain when support access counts as a transfer and why EU storage alone may not settle which laws can reach the data. Running a private LLM, its gateway and its log store on infrastructure you control removes most of these routes, though not the need for retention and access rules.

What does an AI agent audit trail need?

Agents act, so their trail must record each action, not only each answer, and show on whose authority it ran. Record every step under one run identifier:

  • the agent’s identity, the user or process it acts for, and the scope of its short-lived delegated credential (an identifier, never the secret);
  • each plan step, model call and tool call, with arguments, results and side effects such as records changed or messages sent;
  • each policy decision, including denials, and each approval: what the reviewer saw, who decided, when and what;
  • messages to and from other agents, and writes to memory;
  • stop events, credential revocations and rollbacks.

The UK National Cyber Security Centre (NCSC) advises treating agent activity as user activity in round-the-clock monitoring, giving each agent its own identity, collecting agent transcripts and sandbox logs, and making logs immutable where possible. It warns that an agent might abuse the log collection infrastructure, so give agents no write access to their own trail. Our guide to AI agent security covers identity, tools and sandboxing, and our AI agent governance framework covers approvals and incident records.

How do you turn logs into audit evidence?

Show what the logs were designed to capture, that they are complete and unaltered, and that they answer an auditor’s questions. For each system, prepare:

  1. A logging specification: events, fields, purposes, retention, access and storage location. For a high-risk system, map events to the Article 12 purposes. Providers describe the logging mechanisms in the instructions for use (Article 13(3)(f)), and their post-market monitoring plan, part of the technical documentation, should show how log data feeds monitoring (Article 72(3)).
  2. Completeness checks: compare requests at the gateway with audit events and investigate every gap.
  3. Integrity records: hash-chain verifications, access reviews of the log store and logging-failure alerts.
  4. Retention records: deletion records, active legal holds and restore tests.
  5. A reconstruction drill: rebuild a past answer or agent action from the trail, with its versions and approvals, and fix whatever you could not answer.

In an AI management system under ISO/IEC 42001, which follows the Plan-Do-Check-Act cycle, these records feed the check step. Know the limits: logs show what happened, not that the system suited its purpose, that its risks were managed or that oversight worked, and keeping more than you need adds GDPR risk. How these rules apply depends on your role, sector and use case, so confirm them with your DPO and qualified legal counsel; this guide is not legal advice.

How SysArt helps

We design the audit trail for one AI system at a time: events and fields, pseudonymisation and access rules agreed with your DPO, tamper-evident storage and a retention schedule. We build it on your infrastructure or in a dedicated environment in EU data centres, and test it against an auditor’s questions. Read more about our AI governance work.

Frequently asked questions

What is an AI audit trail?

An AI audit trail is a time-ordered, tamper-evident record of an AI system's activity: who made each request, which model, prompt and data versions were used, what was retrieved, which tools were called, what people approved and what the system returned. Unlike operational logs, it must be complete for the events in scope, protected against alteration and kept to a documented schedule, so auditors and investigators can rely on it.

What are the EU AI Act logging requirements?

Article 12 requires high-risk AI systems to record events automatically over their lifetime, so that risks and substantial modifications can be identified and post-market and deployer monitoring supported. Providers and deployers keep the logs under their control for a period appropriate to the intended purpose, of at least six months, unless other law provides otherwise (Articles 19 and 26(6)). These duties apply from 2 December 2027 for Annex III systems and 2 August 2028 for Annex I products.

How long should LLM logs be kept under the GDPR?

No longer than each purpose requires, so set a period for each log category and record it in your record of processing activities. For high-risk AI systems, the AI Act sets a minimum of six months. As a benchmark, France's CNIL recommends keeping logs of users' access and actions for six months to one year, and longer only with documented justification, such as internal control or a specific legal duty.

Can we log prompts and outputs under the GDPR?

Yes, if a defined purpose needs them. Log structured metadata for every request, and keep prompt and output text only where a purpose such as incident investigation or quality review requires it. Prompts often contain personal data, so store content separately with restricted access and a short retention period, mask identifiers where possible and never log secrets. OpenTelemetry's generative AI conventions also leave content capture off by default.

What should an AI agent audit trail contain?

Every step of a run under one identifier: the agent's identity and the user it acts for, the scope of its delegated credentials, each model and tool call with arguments and results, policy decisions including denials, approval requests with what the reviewer saw and decided, messages between agents, memory writes, and stop or revocation events. Protect the trail so that the agent itself cannot change it.

How do we keep prompts and logs inside EU jurisdiction?

Map every destination of every log stream, including SaaS observability tools, vendor telemetry, supplier support access, log forwarding and backups. Switch off content capture and telemetry you have not approved, block unapproved outbound traffic and keep the log encryption keys under your control. Running the model, gateway and log store on infrastructure you control removes most outbound routes, but retention and access rules still apply.

How can we prove AI data was deleted?

Expire logs and stored content by time partition on a documented schedule, and keep a record of each deletion run that states the category, period, rule, time and result, without the deleted data itself. Cover backups, replicas, search indexes, vector stores and supplier copies. Where each period is encrypted under its own key, destroying the key makes it unreadable. Sample expired periods regularly, and document any legal holds.

Does logging make an AI system compliant?

No. Logs show what happened; they do not show that a system suits its purpose, that its risks were managed or that oversight worked. Under the EU AI Act, keeping logs is one of several obligations for providers of high-risk systems, next to meeting the design requirements, a quality management system, documentation and conformity assessment. Under the GDPR, logging more than you need creates its own risk.

Sources

  1. AI Act Service Desk: Article 12, record-keeping (consolidated text as at 27 July 2026) · checked 6 November 2026
  2. AI Act Service Desk: Article 13, transparency and provision of information to deployers (paragraph 3(f)) · checked 6 November 2026
  3. AI Act Service Desk: Article 16, obligations of providers of high-risk AI systems · checked 6 November 2026
  4. AI Act Service Desk: Article 18, documentation keeping · checked 6 November 2026
  5. AI Act Service Desk: Article 19, automatically generated logs · checked 6 November 2026
  6. AI Act Service Desk: Article 21, cooperation with competent authorities (paragraph 2) · checked 6 November 2026
  7. AI Act Service Desk: Article 26, obligations of deployers of high-risk AI systems (paragraphs 5 and 6) · checked 6 November 2026
  8. AI Act Service Desk: Article 72, post-market monitoring by providers · checked 6 November 2026
  9. AI Act Service Desk: Article 73, reporting of serious incidents (paragraph 6) · checked 6 November 2026
  10. AI Act Service Desk: Article 113, application dates as amended by Regulation (EU) 2026/1744 · checked 6 November 2026
  11. Official Journal of the EU: Regulation (EU) 2016/679, General Data Protection Regulation (Articles 4, 5, 17, 30 and 32; recital 26) · checked 6 November 2026
  12. EDPB: Guidelines 01/2025 on pseudonymisation, version for public consultation (adopted 16 January 2025) · checked 6 November 2026
  13. CNIL: Délibération n° 2021-122 of 14 October 2021 adopting a recommendation on logging (in French) · checked 6 November 2026
  14. Official Journal of the EU: Commission Delegated Regulation (EU) 2024/1774, ICT risk management framework under DORA (Article 12) · checked 6 November 2026
  15. Official Journal of the EU: Directive (EU) 2022/2555, NIS2 Directive (Article 21) · checked 6 November 2026
  16. Official Journal of the EU: Commission Implementing Regulation (EU) 2024/2690, NIS2 technical and methodological requirements (Article 1; Annex, section 3.2) · checked 6 November 2026
  17. ESMA Interactive Single Rulebook: MiFID II (Directive 2014/65/EU), Article 16, organisational requirements (paragraph 7) · checked 6 November 2026
  18. European Commission: AI Act standardisation (last updated 19 October 2026) · checked 6 November 2026
  19. ISO: ISO/IEC 24970, Artificial intelligence, AI system logging (stage 60.00, under publication, 24 October 2026) · checked 6 November 2026
  20. ISO: ISO/IEC 42001:2023, Information technology, artificial intelligence, management system · checked 6 November 2026
  21. OpenTelemetry: semantic conventions for generative AI client spans, capturing instructions, inputs and outputs (status: development) · checked 6 November 2026
  22. UK National Cyber Security Centre: Managing the cyber risk of agentic AI (20 August 2026) · checked 6 November 2026

Design the audit trail for one AI system

Bring one assistant, RAG application or agent with its users, data and tools. We define the events and fields to record, the protection and retention rules, and the evidence pack your auditors and DPO will review.