An AI agent audit trail is a record of what an agent did, and who it was acting for.
This guide is for anyone whose team has started to use AI agents and wants to know who is answerable when one acts. You do not need to build agents to be affected: if an agent sends email, changes files or pays bills in your name, its records may be the only way to see what really happened.
In short
- An AI agent is software that can take actions, not just chat. Each action should leave a record.
- A useful record names two parties: the agent that acted, and the person or team it acted for.
- If the agent borrows a person's account, the records may show only the person, so nobody can tell who did it.
- Give each agent its own identity, record who asked, and keep the records where they are hard to change.
What you will learn
- Explain what an audit trail for an AI agent is.
- Spot a record that cannot tell the agent and the person apart.
- Check whether your agents have their own identities.
- Ask the right questions before an agent is allowed to act.
- Activity record (audit trail)
- a dated list of who did what, where and when, kept so it can be checked later.
- Acting for someone (on behalf of)
- when an agent does a task that a person or team asked for, using rights they handed over.
- Handing over rights (delegation)
- giving another identity limited power to act for you, while it keeps its own name.
What is an AI agent audit trail?
Think of an assistant with a company card who runs errands for a manager. The card statement lists each purchase. But a good receipt also says which manager asked for it.
An AI agent works the same way. It is software that can act on its own, such as booking meetings, sending email or changing records. Each time it acts, the system it touches can write a line in a log (a running list of events). Put together, those lines are the agent's audit trail.
A good trail answers four questions. Which agent acted? Who asked it to? What did it do? When did it happen? The second question is the one that is often missing.
An agent is a kind of non-human identity (NHI). So it needs its own digital identity, like a service account or an API key. Then its actions can be told apart from a person's.
Where the comparison stops working: a shop assistant can be asked later what they bought and why. An agent has no memory you can question in the same way. If the record was not written at the time, the answer may simply be gone.
Why does it matter?
When something goes wrong, people need to know who is answerable. If the records cannot tell the agent from the person, the wrong one may be blamed.
Records also matter after an attack. The UK's national cyber security body says logs let you look back at what happened and judge the impact. It also advises protecting logs so that it is hard for an attacker to hide their tracks.[5]
If you let an agent work in your inbox
What could happen: the agent sends a wrong email to a customer, and the records show it as sent by you.
Check this: ask whether the agent uses its own identity or simply borrows yours.
If you manage a team that uses agents
What could happen: an agent deletes a shared file, and nobody can say which person set it going.
Check this: make sure each agent has a named owner and that its requests are recorded.
If you are new to IT work
What could happen: you are asked to investigate, but the agent's actions were never logged at all.
Check this: find out where agent records are kept and how long they are stored.
Next: Logging for Beginners
What does it look like?
Here are two made-up records of the same action. An agent changed a supplier's bank details in a finance system.
Example only. All values are made up.
# Record A: the agent borrowed a person's account
time=09:14 user=j.example action=update_supplier_bank (1)
# Record B: the agent has its own identity
time=09:14 actor=invoice-agent-EXAMPLE (2)
on_behalf_of=j.example (3)
request=REQ-0000-FAKE (4)
action=update_supplier_bank
- Only a person is named. Nobody can tell whether they or the agent made the change.
- In a real file, this line would contain the name of the agent that took the action.
- In a real file, this line would contain the name of the person or team the agent was working for.
- A reference to the original request, so a reviewer can see what was asked.
Why this is risky: with Record A, the person may be blamed for a change the agent made. If an attacker tricked the agent, the clue is hidden too.
The safer way: Record B names both parties. Some systems already have fields for this. Amazon's cloud records can carry the original identity behind a request.[2] Google's cloud records can list the chain of identities that acted through a service account.[3]
How does it work?
Here is how a well-recorded agent action usually flows.
- The request. A person asks the agent to do a task for them, such as "pay this invoice from our supplier".
- The hand-over. The person's rights are handed over in a limited way. This is called delegation: the agent acts for the person but keeps its own name. A web standard for swapping access passes has a field for exactly this, naming the party now acting.[1]
- The action. The agent signs in as itself and uses a tool, such as the finance system.
- The record. The tool writes a log line naming the agent, the person it acted for, the action and the time.
- The review. Later, someone can search the records and rebuild the whole story of what happened, step by step.
The risky shortcut is called impersonation. Here the agent simply uses the person's own account. The same standard explains that with impersonation, the other side treats the actor as if it were the person.[1] So the records name only the person.

Big platforms are adding this kind of detail. Microsoft's identity service, for example, lets admins filter sign-in records to show only agents.[4] Features differ between products, so ask what yours records.
A worked example
Zane Erikson runs the accounts team at a fictional furniture maker. The team uses an AI agent to match invoices and schedule payments.
One Monday, a supplier rings. Its payment went to a bank account it does not recognise. Zane asks Cyrus Pereira, who looks after the firm's systems, to find out what happened.
Cyrus opens the finance system's records. The change to the supplier's bank details is listed under the name of Nils Ueda, a clerk. Nils is shocked. He says he never touched that supplier.
Cyrus remembers that the agent was set up to use Nils's account, because that was quicker at the time. So the record cannot show who really made the change. It could have been Nils, the agent, or someone who tricked the agent with a fake invoice.
Cyrus looks at the agent's own task list and finds a fake invoice that asked for new bank details. The agent had followed it. The record had pointed at the wrong person.
The team makes three changes. The agent gets its own identity, so its actions carry its own name. Each task now records which person asked for it. Bank detail changes now need a person to approve them.
Zane apologises to Nils. The new records mean the next question will take minutes to answer, not a whole morning.
Myths and mistakes
| What people think | What is true |
|---|---|
| The agent uses my account, so its actions are recorded. | They are recorded as yours. Nobody can tell your actions from the agent's. |
| The chat history is the audit trail. | A chat shows what was said. The systems the agent touched hold the record of what it did. |
| Logs are only for the IT team. | Logs protect staff too. A clear record shows who did what and who did not. |
| We can add logging later. | Records that were not written at the time cannot be rebuilt afterwards. |
| Anyone with access should be able to edit the logs. | Logs should be hard to change, so an attacker cannot cover their tracks.[5] |
What can I do this week?
- List the AI agents your team uses and what each one can change.
- Ask whether each agent has its own identity or borrows a person's account.
- Check that the records show which person asked for each agent task.
- Find out where the records are kept, who can change them and how long they are stored.
Checklist
- Every AI agent has its own identity, not a shared or borrowed account.
- Every agent has a named owner.
- Records show the agent, the person it acted for, the action and the time.
- Each action can be linked back to the original request.
- Records are kept somewhere the agent itself cannot change or delete.
- Records are kept long enough to look back over months, not days.
- Risky actions, such as payments, need a person to approve them, and the approval is recorded.
Common questions
Is an AI agent audit trail different from an ordinary log?
Partly. It uses the same logs, but it must answer one extra question: who was the agent working for? An ordinary log usually names one identity. An agent record should name the agent and the person or team behind the request, so both can be held to account.
Why not just let the agent use my account?
Because the records would then show everything as done by you. If the agent makes a mistake or is tricked, it looks like your mistake. A separate identity for the agent, with limited rights handed over by you, keeps the two apart.
Who is responsible when an agent gets it wrong?
Usually the organisation, and the person who owns the agent. Clear records help to show whether the agent followed a real request, a fake one or no request at all. Rules on this are still developing, so check your own policies and any advice for your sector.
How long should agent records be kept?
Long enough to investigate a problem found late. The UK's national cyber security body suggests keeping the most important logs for at least six months. Incidents can go unnoticed for a long time.[5] Your sector may need longer.
Can an agent delete its own records?
It should not be able to. Keep records in a separate place that the agent has no right to change. Then, even if the agent is misused, the record of what it did stays available for review.
Where next?
Ready for the detail? Read the practitioner guide: How Non-Human Identities Appear in Cloud and SaaS Audit Logs. It goes further into the exact record fields each cloud platform uses, how to search them and how to spot a machine identity in the logs.
Also useful:
- AI Agent Attribution and Non-Repudiation
- Agent Observability vs Audit Logging
- AI Agents for Beginners
- Non-Human Identities for Beginners
- NHI Foundation Level Training
Related NHI Mgmt Group resources: Agent Activity Timeline Reconstruction from Tool Calls and Identity Logs · AI Agent Audit Log Schema Template · Delegation Chains and Attenuated Authority for AI Agents
Key terms
- Audit trail
- A dated record of activity that lets a reviewer work out who did what, where and when.
- AI agent identity
- The digital identity an AI agent uses to prove who it is to other systems.
- Non-human identity (NHI)
- A digital identity, or the credential behind it, that represents a machine, application, automated process, service or AI agent, so it can authenticate, carry out tasks and connect to other systems without a person.
- Delegation
- Handing limited authority from one identity to another, so work can be done for you while each keeps its own name.
- Impersonation
- Acting as another identity, so other systems treat the actor as if it were that identity.
- Attribution
- Working out which identity is responsible for an action.
- Non-repudiation
- Being able to show what an identity did, when, and under whose authority, so it cannot be credibly denied.
Sources and further reading
- RFC 8693: OAuth 2.0 Token Exchange. IETF, January 2020. https://www.rfc-editor.org/rfc/rfc8693.html, accessed 28 Nov 2026.
- CloudTrail userIdentity element. AWS CloudTrail User Guide, Amazon Web Services. https://docs.aws.amazon.com/awscloudtrail/latest/userguide/cloudtrail-event-reference-user-identity.html, accessed 28 Nov 2026.
- AuditLog type reference (AuthenticationInfo). Google Cloud Logging documentation, Google. https://docs.cloud.google.com/logging/docs/audit/api/ref/rest/Shared.Types/AuditLog, accessed 28 Nov 2026.
- Sign-in and audit logs for agents. Microsoft Entra Agent ID documentation, Microsoft Learn. https://learn.microsoft.com/en-us/entra/agent-id/sign-in-audit-logs-agents, accessed 28 Nov 2026.
- 10 Steps to Cyber Security: Logging and monitoring. National Cyber Security Centre (UK). https://www.ncsc.gov.uk/collection/10-steps/logging-and-monitoring, accessed 28 Nov 2026.