Skip to content
A column of stacked plates with pink-lit seams sealed by an amber top.

Audit trails

Audit trails for AI agents: what an AI agent audit log has to prove

The short answer

An AI agent audit log is the record that proves what an agent did for your business: who asked, which agent acted, what it read, what it changed, and who approved it. Write each entry before the action runs, keep it where nobody can quietly edit it, and keep it long enough to answer an incident.

Written byAmelia GagneCo-founder and CEO, Kief Studio
Technical review byBrian GagneCo-founder and CTO, Kief Studio

Published

Activity log listing staff and team actions newest first, such as finished hand-offs, approvals and denials, each with a time stamp.
An AI agent audit log in practice: the activity log lists every action by the staff and the team, newest first, with approvals and denials beside the work.

What an AI agent audit log is for

When a person on your team sends the wrong file, you can ask them what happened. When an agent does it, the only witness is the record. That's the plainest way I know to explain why the log matters more for AI staff than it ever did for people.

An agent audit trail does three jobs. It lets you see what your agents are doing day to day. It lets you reconstruct an incident without guessing. And it ties every action that matters to a person who said yes, which is what accountability means once software is doing part of the work.

Most teams already have logs. They usually record that a server was reached or a file changed. An agent needs more than that, because the interesting questions are about intent and authority: who wanted this, which agent carried it out, and on whose approval.

A brass receipt printer on a walnut desk feeding out a long blank paper strip, its print head glowing amber.

What to record for every agent action

OWASP's Logging Cheat Sheet (opens in a new tab) says application logs must record when, where, who and what for each event, and it counts machine users alongside people. For agents, I'd break who and what into the pieces an investigator will ask for. Here's what a useful AI agent audit log captures for each action.

  • Who asked. The person, schedule or event that started the work, so every chain of actions has a beginning.
  • Which agent acted. Its own identity, never a shared login, so one agent's actions can't be confused with another's.
  • What it read. The emails, pages, files and tool results it used, with outside content marked as outside. That's where a prompt injection would have come from.
  • What it did. The tool it called, the record or address it touched, and what changed.
  • Who approved it. The name of the person who said yes, or the standing approval that covered it, and when that approval was given.
  • When, and in what order. A time for the request, the approval and the action, plus whether the action finished, failed or was refused.

Write the AI agent audit log entry before the action runs

The order matters. If the entry is written after the action, a crash or a cut connection in between leaves an action with no record. Write the intent first, run the action, then write the result against that entry. An intent with no result is a signal worth reading in its own right.

What to leave out

The same OWASP cheat sheet lists data that usually shouldn't go into logs directly, including authentication passwords, access tokens and session identifiers. Record that an agent used a credential and which one, never the credential itself. Personal information belongs in the log only when you need it to explain the action.

Write the intent

The entry is written before the action runs.

Run the action

The agent then carries out the action.

Write the result

The result is written against that same entry, and an intent with no result is a signal worth reading.

Six interlocking pieces form a sphere with an amber keystone at its center.

Tamper evident: a record nobody can quietly edit

An AI agent audit log that the agent itself can edit isn't evidence. OWASP's advice is to build in tamper detection so you know if a record has been modified or deleted, to copy log data to read-only media as soon as possible, and to record and monitor all access to the logs.

The joint guidance on event logging and threat detection (opens in a new tab), from Australia's cyber agency and international partners including CISA, the FBI and the NSA, lists secure storage and log integrity among its four key factors, next to a logging policy, centralized collection and a detection strategy.

In practice, three choices do most of the work. The agent writes to the log and can never read back, change or delete it. Each entry carries a cryptographic hash of the one before it, so a removed or altered entry breaks the chain where anyone can see it. And a copy lives somewhere the agent's credentials can't reach, which also protects it if an agent is compromised.

A chain of blocks with one pulled out leaving a pink gap, and a sealed amber copy out of reach behind it.

Log retention: how long to keep it

There's no single number for a small business, so I look at what the record has to support. A log you delete before anyone asks about the incident can't help you answer.

For a reference point, US federal agencies work under OMB's M-26-14 (opens in a new tab), dated May 22, 2026, which replaced the older M-21-31 and requires retained logs to stay actively searchable for at least 6 months and retrievable for a year after they're created. It doesn't bind a private business, and it shows how long investigators expect to be able to look back.

Massachusetts gives a second anchor. 201 CMR 17.00 (opens in a new tab) asks you to review the scope of your security measures at least annually, and that review is far more useful with a full year of records in front of you. Contracts and industry rules can ask for longer. Write the number down, and hold the AI agent audit log to it like any other business record.

An hourglass with pink dust falling into an amber-lit lower chamber.

Months after creation is highest in Retrievable at 12.

Minimum time US federal agencies must keep logs under OMB M-26-14. Source: OMB M-26-14
Months after creation
Actively searchable6
Retrievable12
Minimum time US federal agencies must keep logs under OMB M-26-14. Source: OMB M-26-14 (opens in a new tab)

Agent forensics: using the log in an incident

Agent forensics is the work of reconstructing what an agent did and why. NIST's Cybersecurity Framework 2.0 (opens in a new tab) describes the same work for any incident: analysis to establish what took place and the root cause (RS.AN-03), information correlated from multiple sources (DE.AE-03), and incident data whose integrity and provenance are preserved (RS.AN-07).

With a good agent audit trail, the first hour of an incident response goes in a clear order.

  • Find the first action that looks wrong, and read what the agent had just read before it.
  • Follow the chain back to who asked and forward to everything the agent touched afterwards.
  • Check each approval: was there a person's yes, a standing approval, or nothing?
  • Switch off that one agent's credentials, and leave the rest of the business running.
  • Record what you did during the investigation too. CSF 2.0 asks for that in RS.AN-06.

The AI agent audit log and a breach notice

Massachusetts' breach law, M.G.L. c. 93H (opens in a new tab), requires a business that owns or licenses the information to give notice as soon as practicable and without unreasonable delay to the attorney general, the director of consumer affairs and business regulation, and the residents affected. The notice to the state includes the nature of the breach, the number of Massachusetts residents affected, and the steps you've taken or plan to take.

Each of those answers comes out of the record. Without it, you'd be estimating how many residents were affected, and the state asks for the number.

  1. Find the first wrong action. Find the first action that looks wrong, and read what the agent had just read before it.
  2. Follow the chain. Follow the chain back to who asked and forward to everything the agent touched afterwards.
  3. Check each approval. Check whether there was a person's yes, a standing approval, or nothing.
  4. Switch off one agent. Switch off that one agent's credentials, and leave the rest of the business running.
  5. Record the investigation. Record what you did during the investigation too, as CSF 2.0 asks in RS.AN-06.
An amber beam traces a wandering pink trail back through dark pillars to its source.

AI accountability is a name next to every yes

I've watched the record change how owners feel about AI staff. Without it, the worry is vague: what is the AI doing when I'm not looking? With it, the worry becomes specific and answerable, because every action that sent, posted or spent has a name beside it. People delegate more to a system they can check.

That's why I treat the approver's name as the most important field in an AI agent audit log entry. An agent can be wrong, and the business still answers for it. AI accountability works when the record shows which person decided, at which moment, with what in front of them. My husband and co-founder Brian covers the attack side of this in prompt injection, and the log is where you'd find the trace of one.

A brass approval stamp resting on a blank card under an amber desk lamp, beside a tray of sealed letters edged in pink.

Where the AI agent audit log meets the standards

The standards you may already follow cover agents without naming them.

  • NIST CSF 2.0 asks that log records are generated and made available for continuous monitoring (PR.PS-04), that personnel activity and technology usage are monitored (DE.CM-03), and that software, runtime environments and their data are monitored (DE.CM-09).
  • 201 CMR 17.00 asks for reasonable monitoring of systems for unauthorized use of or access to personal information, regular monitoring that the security program is working, and documenting responsive actions taken in connection with any incident.
  • OWASP's Top 10 for Agentic Applications (opens in a new tab) lists ASI10 Rogue Agents and ASI03 Identity and Privilege Abuse. A log tied to one identity per agent is how you notice either one.
  • The UK NCSC's advice on adopting agentic AI (opens in a new tab) says to look for unusual or unexpected activity across tools, workflows and connected systems.
A records room of tall walnut shelves holding black archive boxes, with one box on the right sealed in brass under amber light.

How LTFI keeps the AI agent audit log

LTFI is the agentic business operating system Kief Studio makes and runs, and our own company runs on it. The record is part of the product, built in from the start.

  • The activity log records every action by the staff and the team in plain words, newest first, with who approved it.
  • Anything that sends, posts, publishes or spends waits in one queue for the person who owns it, so the approval is part of the record.
  • Standing approvals and past decisions sit under that queue, so it's clear who said yes to what.
  • Rules, permissions, credentials, deleting and money stay with people. An AI teammate can't change them.
  • Each company runs on its own dedicated server, managed, patched and watched by us.
Lower half of the Waiting on you queue with a spend request, a free site ready to publish, standing approvals and decision history.
Standing approvals and the history of past decisions, so every yes in the record has a name and a time.

What to do about your agent audit trail this month

Two lists: one for the person who owns the business, one for whoever runs its systems.

If you own the business

  1. Ask every AI tool you use to show you its log, and check that it names the approver.
  2. Decide how long you need to keep the record, and write the number down.
  3. Read the log once a week until you know what normal looks like.
  4. Name the person who opens the log first if something goes wrong.

If you run the systems

  1. Give every agent its own identity so each entry points to one agent.
  2. Write the intent before the action and the result after it, against the same entry.
  3. Make the log append-only for agents, chain the entries, and keep a copy the agents' credentials can't reach.
  4. Keep passwords, tokens and session identifiers out of the log, and record which credential was used instead.

Key takeaways

  • An AI agent audit log records who asked, which agent acted, what it read, what it did and who approved it.
  • Write each entry before the action runs, so an interrupted action still leaves a trace.
  • A record the agent can edit isn't evidence: make it tamper evident and keep a copy out of reach.
  • The same record answers an incident, a Massachusetts breach notice and the monitoring 201 CMR 17.00 asks for.

Where this lines up with the standards

The frameworks and rules this page maps to, with the exact item and what it asks of you.

FrameworkItemWhat it asks
NIST CSF 2.0PR.PS-04, DE.CM-03, DE.CM-09, RS.AN-06, RS.AN-07 (opens in a new tab)Generate logs for continuous monitoring, monitor activity, and preserve the integrity and provenance of incident records.
OWASP Logging Cheat SheetEvent attributes and protection (opens in a new tab)Record when, where, who and what, detect tampering, and keep secrets out of logs.
Joint agency logging guidanceEvent logging and threat detection (opens in a new tab)Set a logging policy, centralize collection, protect log integrity, and plan detection.
OWASP Top 10 for Agentic ApplicationsASI03 Identity and Privilege Abuse, ASI10 Rogue Agents (opens in a new tab)Tie actions to one identity per agent so privilege abuse and rogue agents show up.
Massachusetts201 CMR 17.00 and M.G.L. c. 93H (opens in a new tab)Monitor for unauthorized use, document incident response, and be able to report what a breach touched.

Key terms

How long US federal agencies must keep logs actively searchable under M-26-14Source: whitehouse.gov
6 months
How long those logs must stay retrievable after they're createdSource: whitehouse.gov
A year

Questions

Audit trails for AI agents

What should an AI agent audit log include?

Who asked for the work, which agent acted, what it read, what it did and changed, who approved it, and the time of each step. Leave passwords, tokens and session identifiers out.

How do you audit what an AI agent did?

Start from the action in question, read what the agent had just read, follow the chain back to who asked, and check whether a person approved it. That only works if each agent has its own identity and the log can't be edited.

How long should AI agent logs be kept?

Long enough to answer an incident and your annual security review, so at least a year for most small businesses. Under OMB's M-26-14, US federal agencies keep logs searchable for at least 6 months and retrievable for a year.

What makes an audit log tamper evident?

Agents can add entries but can't change or delete them, each entry is chained to the one before so gaps show, and a copy is kept where the agents' credentials can't reach.

Is an AI agent audit log required in Massachusetts?

201 CMR 17.00 doesn't name AI, but it asks for reasonable monitoring of systems for unauthorized use of personal information and for documenting how you respond to incidents. For agents, a complete AI agent audit log is how you show both.

Who is accountable when an AI agent makes a mistake?

The business is. That's why the approver's name belongs in every entry for an action that sends, posts, publishes or spends.

Keep reading

  • A heavy threshold gate lets one cleared path through while dozens of pink trails stop at it.

    Start here

    Agentic AI security

    Agentic AI security explained for owners: identity, least privilege, approvals and an audit trail for AI agents, from the team that runs them in Massachusetts.

    Brian Gagne

  • A pink stream of light is held at a round amber valve gate, waiting for a person's yes before anything leaves.

    Oversight

    Human approval for AI agents

    Human approval for AI agents that people actually read: which actions need a yes, how to avoid approval fatigue, and how standing approvals work.

    Amelia Gagne

  • Medallions tangled into one pink knot, and one free medallion with its own amber thread.

    Identity and access

    Agentic IAM

    Agentic IAM gives every AI agent its own identity, scoped short-lived credentials and authority it can trace to a person. How it works and where to start.

    Brian Gagne

  • A swarm of pink alert shards streams through a dark sorting lens, while one amber lever stays locked until a person decides.

    Operations

    The AI SOC

    An AI SOC lets agents triage, enrich and summarize alerts. Containment, lockouts, deleting data and closing incidents still need a person to approve them.

    Brian Gagne

  • A smoked translucent slab carries a hidden pink thread toward the agent's tools, and an amber ring stops it before it reaches them.

    Threats

    Prompt injection

    Prompt injection turns an email, a web page or a file into orders for your AI agents. Why it can't be trained away, and the controls that limit the damage.

    Brian Gagne

  • Reference

    Glossary

    An agentic AI glossary in plain words: AI agents, agentic IAM, non-human identities, prompt injection, shadow AI, MCP and more, each with a short definition.

Most MSPs are resellers. Kief Studio is the manufacturer.

A reseller sends your problem to the company that made the software. We are that company: we build LTFI and run it, so the people you talk to can change it. Book a walkthrough and see it on your own business.

Nothing plays until you press play.