Agents · 5 min read · Nov 17, 2026

The audit trail an AI agent's email needs

By Lockally Team

Short answer: a log of what an agent sent is not enough. An agent’s audit trail should record every read as well as every send, which agent did it, which mailbox, conversation and message it touched, whether a draft was held and why, who approved or rejected it, and how long the record is kept. Reads matter most of all, because the way data leaves through an agent is usually what it reads, not what it sends.

Why isn’t the sent folder enough?

Because the sent folder answers one question, “what went out?”, and an agent raises five.

When a person sends a wrong email, you ask them what happened. When an agent does, there is nobody to ask. The record is the only witness, so it has to answer the questions you would have asked the person:

  • What did it look at before it acted?
  • Which agent was it, if you run more than one?
  • Did a rule stop it, and which rule?
  • Did a person approve this, and who?
  • Is this a one-off, or has it been doing this for weeks?

A sent folder answers none of these. It also mixes the agent’s mail with everything else in the mailbox, and anyone with access to the mailbox can delete from it.

Why should reading an email be logged?

Because reading is how an agent moves data. When an agent reads a message, its content goes into the model’s context, and from there it can end up in a reply, a summary, a ticket or another system. A support agent that opens a payroll attachment has already done the risky part, whether or not it sends anything.

Logging reads lets you answer the question regulators and customers ask after an incident: “which of my messages did your software see?” Without it, the honest answer is “we don’t know”, which means “assume all of them”.

It is also the best early warning you have. An agent reading outside its job is a sign of a bad prompt, a too-wide grant or an injection attempt, days before it sends anything wrong.

What should each entry record?

One row per action, with enough on it to stand alone:

FieldThe question it answers
The action (read, draft, approve, send)What happened?
The agent’s key or identityWhich agent was it?
The mailbox, conversation and messageWhat did it touch?
The recipientsWho did it write to?
Why a draft was held or blockedDid a rule fire, and which?
The person who approved or rejectedWho took responsibility?
The timeIn what order did it happen?

Two details are easy to miss. First, record the reason a draft was held, not only that it was held: “new recipient” and “card number in the body” call for different fixes. Second, record who approved. “Approved by a human” is not an audit entry; “approved by Ada at 14:02” is.

Who did it, the agent or the support team?

Keep them apart. Your provider’s staff sometimes need to work inside your account to help you. Their actions belong in the record, but they must never be written as yours or your agent’s, or the log stops being evidence. Lockally staff working in your account under support access are never recorded as you.

How long should the log be kept?

Long enough to cover the questions you will be asked, and no longer than you can justify. Pick a period, publish it in your data processing terms, and enforce it. A log kept forever is a liability; a log deleted after a week is useless for any investigation that starts with “last quarter”.

We keep agent audit records for 12 months, the period our data processing agreement states for administrative access logs.

What can’t the log tell you?

Be clear about the edges, so nobody mistakes the log for more than it is:

  • The model’s reasoning. The log shows what the agent did, not why the model chose it. Keep your own prompt and model logs for that.
  • What happens outside email. If the agent copies a message into a CRM, the email log ends at “read the message”.
  • Whether a clean send was the right call. A reply that trips no rule goes out without a person, and the log records the send, not the judgment. Read a sample of those sends too.

How do you review it in practice?

Daily for the first weeks, weekly once the agent is settled. Filter to one agent and look for three patterns: reads outside its job, the same hold reason again and again, and sends no person reviewed. Each one points at a fix: a narrower grant, a rule or prompt to tune, or a draft-only key.

What does Lockally record?

Every agent action, reads included, is written to the audit log in the console:

  • Listed inboxes
  • Listed conversations
  • Read a conversation
  • Read a message
  • Opened an attachment
  • Looked up a contact
  • Marked a message read
  • Proposed a draft
  • Approved, rejected or cancelled a draft
  • Sent a message or replied

Each entry records the API key that acted, or the person who approved in the console; the mailbox, conversation and message; and the recipients, and the reasons a draft was held or blocked.

To set an agent up so this log stays boring, read how to give an AI agent email access with a person in control. For the wider picture, see email for the agent era, the definition of agentic email, or connect an agent from Agents and MCP.

Lockally is encrypted email with your domain, on every plan.