Audit log
An audit log is a chronological record of actions in a computer system, showing who or what did what and when, kept so that activity can be checked, investigated and accounted for later.
NIST defines an audit log as a chronological record of system activities, including who accessed the system and what operations were performed in a given period. A typical entry records a time, an actor, an action and its target: an administrator granted a permission, a user signed in from a new location, a file was deleted. The point is evidence. When something goes wrong, the log lets investigators reconstruct what happened and who was responsible.
AI services keep audit logs in two senses. The first is ordinary administration. OpenAI's Audit Logs API, for example, lists user actions and configuration changes in an organisation's account across nearly 150 event types, such as an API key being created, a failed login or a change to someone's role. The second is a record of what the AI system itself did: the inputs it received, the outputs it produced and, for agents, the tools it called and the actions it took on a user's behalf.
The second kind is becoming a legal requirement. Article 12 of the EU AI Act requires high-risk AI systems to be technically capable of recording events automatically throughout their lifetime, so that their functioning can be traced, risks identified and the system monitored after it is placed on the market. For remote biometric identification systems, the logs must at least record when each use started and ended, the reference database checked, the input data that produced a match and who verified the result. Under Article 26, deployers must keep the logs under their control for at least six months, unless other law says otherwise.
A log is only as useful as what goes into it and whether anyone reads it. Logs of prompts and outputs can contain personal data, so how long to keep them has to be balanced against data protection law, which the AI Act itself defers to. Logs also need protecting: an attacker who can edit them can erase the evidence.
It is a time-ordered record of activity in a system: who signed in, what they changed and when. Organisations use audit logs to investigate incidents, show compliance and hold people, and increasingly AI systems, accountable for actions. At minimum, who used the system, when, what went in and what came out. For AI agents it should also record which tools were called, what actions were taken and on whose authority. Regulated uses may require specific fields, such as the reference database and verifier for biometric identification under the EU AI Act. Yes, for high-risk AI systems. Article 12 requires them to be able to record events automatically over their lifetime, and Article 26 requires deployers to keep the logs under their control. Under the EU AI Act, deployers of high-risk AI systems must keep logs for a period suited to the system's purpose and at least six months, unless EU or national law, particularly data protection law, provides otherwise.Common questions
What is an audit log?
What should an AI audit log contain?
Does the EU AI Act require logging?
How long must AI logs be kept?
Search for "audit log" with a product name, or for "AI Act Article 12 record-keeping" and "logging AI agents". NIST's security publications, the text of the EU AI Act and vendors' own documentation are the most reliable sources. For legal duties, check the official text and regulator guidance rather than summaries.Finding more
Working out what this means for your business?
Aileron Shift builds the systems behind this site: AI newsrooms that research, write and publish on their own, marketing automation and WordPress hosting for companies that need to move faster than their competitors.