Guide
EU AI Act Article 12: logging requirements for AI agents
Article 12 is the record-keeping rule of the EU AI Act. It says high-risk AI systems must technically allow for the automatic recording of events, in other words logs, over the lifetime of the system. For an AI agent that calls tools, models and APIs on its own, this is the article that decides whether you can later show what the agent actually did.
What the logs have to make possible
Article 12 does not list a fixed set of fields. Instead it sets purposes the logging must serve. The logs must be capable of supporting:
- Identifying risk situations. Spotting situations where the system may present a risk or where a substantial modification has occurred.
- Post-market monitoring. Giving the provider the data needed for the monitoring system described in Article 72.
- Monitoring of operation. Letting deployers monitor how the system runs in practice, as required of them under Article 26.
Extra minimums for remote biometric identification
For the remote biometric identification systems listed in Annex III, Article 12 adds minimum logging content: the period of each use, the reference database the input was checked against, the input data that led to a match, and the identity of the people involved in verifying the results. Most AI agents are not in this category, but it shows the level of detail regulators have in mind.
How long logs must be kept
Retention sits in other articles. Providers must keep the logs their high-risk systems generate, to the extent those logs are under their control, and deployers must do the same for logs under their control. The baseline is at least six months, unless other EU or national law, data protection law in particular, requires something different. Check which period applies to your sector.
What this means for an AI agent
A chat transcript is not enough. To meet the purposes above, an agent's logs should capture, per event and with a timestamp:
- Model calls. Which model and version ran, and what it was asked to do.
- Tool and API calls. What the agent invoked, with what arguments, and what came back.
- Errors and retries. Timeouts, failures and fallbacks, since these are the raw material for risk situations.
- Human oversight. Every approval, override or escalation, with who did it and when.
- Configuration and version changes. Prompt, threshold and model changes, so a change in behavior can be tied to a change you made.
Common gaps
- Logging inputs and outputs but not the intermediate tool calls.
- No record of which model or prompt version produced an output.
- Logs that can be edited or deleted without a trace.
- Personal data stored in logs with no retention or minimization plan.
- Human review happening in a separate tool, so it never reaches the log.
From logs to documentation
Logs are only useful if you can organize them against the Act. The same events that satisfy Article 12 are the evidence behind several Annex IV sections, such as monitoring, human oversight and change history. If your agent already emits OpenTelemetry, LangSmith, AgentOps or MCP traces, you have most of the raw data. Attestly maps those traces to the Annex IV sections for you, and a person reviews the result before you rely on it. See why traces beat scans.
Not sure if your system is high-risk?
Run the free EU AI Act risk checker. No signup required.
Check now →