Skip to content

Control and proof

AI agent audit log

An AI agent audit log is a record of every action an agent took: which credential ran it, what it did, in which system, with what outcome and cost, and why, kept so a person can reconstruct and verify events later.

Updated Also called Agent audit trail, MCP audit logging, Agent ledger5 sources checked

What it is

Application logs are for debugging. An audit log is evidence. For AI agents it answers the questions an operator, an auditor or a customer will ask after the fact: who did this, through which credential, in which system, when, what came back, what it cost, and what the agent was trying to do.

The MCP tools specification asks clients to log tool usage for audit. OWASP's agent cheat sheet says to log all agent decisions, tool calls and outcomes, and to keep audit trails for compliance and forensics. NIST SP 800-92 covers the general practice of security log management.

Why it matters

Agents act at machine speed across many systems. Without one record you cannot tell which agent changed a record, explain a vendor bill, or show an auditor that a payment was approved. Token passthrough makes it worse: the MCP security guidance notes that when a server forwards a client's token, downstream logs show the wrong identity.

How it works

A useful entry holds:

  • the credential (which agent) and the connection (which account at the vendor);
  • the action, with a hash of its inputs and output;
  • the outcome, error code and cost;
  • the time;
  • the intent, one sentence from the agent saying why;
  • any approval, with who decided.

The log should be written by the platform that executes calls, not by each client, and made tamper-evident.

Example

"Key triage-bot, connection Autotask production, service.ticket.create, succeeded, 1 upstream call, 09:14:07, intent: the customer reported the backup failure by email this morning."

Common pitfalls

  • Logs only in the client. Each client logs differently, or not at all.
  • Secrets and personal data in plain text. OWASP says to redact credentials and personal data from logs.
  • No reason recorded. Without intent, a correct action and a manipulated one look the same.
  • Mutable storage. A table anyone with database access can edit is not evidence.

How actionlake handles it

The actionlake server writes one ledger row per run, whatever client the agent used. Every do and ask call must include an intent. The row holds identifiers, input and output hashes, cost and outcome; request and response bodies are kept separately as run traces (secrets removed, sealed under the tenant's key) for your plan's window, then deleted. Rows are hash-chained and the chain head is sealed daily. The record of the action is permanent; the agent's intent text is cleared after 90 days, while hashes, ids, cost and outcome stay. Each run can be verified on its page in the console; the console's CSV export carries the table, not the hashes. See the trust page, and the guide audit logs for AI agents for the full checklist.

Questions

What should an AI agent audit log contain?

Which credential acted, which system and account, the action with hashes of its inputs and output, the outcome, the cost, the time, the agent's stated reason, and any approval.

Is an MCP client's log enough for audit?

Rarely. Each client logs differently, and none sees calls made from other clients. Record calls where they execute, on the server or gateway.

How long should agent audit logs be kept?

As long as your regulators and contracts require. Keep the record of each action longer than raw request and response bodies, which often contain personal data.

Sources

  1. Server features: Tools (2025-11-25)Model Context Protocol · checked 22 October 2026
  2. AI Agent Security Cheat SheetOWASP Cheat Sheet Series · checked 22 October 2026
  3. MCP Security Cheat SheetOWASP Cheat Sheet Series · checked 22 October 2026
  4. SP 800-92, Guide to Computer Security Log ManagementNIST · checked 22 October 2026
  5. Security Best Practices (2025-11-25)Model Context Protocol · checked 22 October 2026

All 30 glossary terms

Connect an agent. Start free.

100,000 calls free every month. No card. Hard caps on every key.