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.
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.
Related terms
- Tamper-evident ledgerA tamper-evident ledger is an append-only record in which each entry stores a cryptographic hash of its own contents together with the previous entry's hash, so any later edit, deletion or reordering breaks every hash after it and becomes detectable.
- Human-in-the-loop approvalHuman-in-the-loop approval is a control that pauses an AI agent's action until a named person approves or rejects it, so high-impact or irreversible actions never run on the model's judgement alone.
- AI agent permissionsAI agent permissions are the rules that decide which systems, actions and data an agent's credential may reach, and least privilege for agents means granting only the actions a task needs and enforcing that limit outside the model.
- Upstream callAn upstream call is one HTTP request that actionlake sent to a vendor's API on your behalf and that returned a definitive, attributable response; it is the unit actionlake meters and bills.
- Agent spending capAn agent spending cap is a hard limit on how much a single AI agent credential may spend or call in a period, checked before each request is sent, so that a looping or misbehaving agent stops at the limit instead of after it.
Sources
Connect an agent. Start free.
100,000 calls free every month. No card. Hard caps on every key.