Governed Agents Guide

Reference · Records

What an AI Agent Audit Trail Must Record

A log helps a developer debug. An audit trail lets a stranger reconstruct what the agent did, under whose authority, and what changed.

What this page is. A synthesis of the NIST SP 800-53 Rev. 5 audit and accountability controls, NIST SP 800-92 on log management, the OWASP Logging Cheat Sheet, AICPA Trust Services Criteria CC7.2 and CC7.3, and ISO/IEC 27001:2022 controls A.8.15 to A.8.17. The field schema is our recommendation; the controls are the standards'.

What it is not. An audit opinion or a universal requirement. NIST SP 800-53 is a control catalog; it binds a private company when a contract, regulation, or its own risk decision says so. Your auditor and your client agreement govern.

01The short answer

An audit trail for an agent has to answer five questions without the person who built it in the room: who or what triggered the run, what the agent read, what it decided, what it did, and what changed. If the record cannot answer those, it is a log, not evidence.

The difference is not volume. It is structure, attribution, protection, retention, and export. A console that shows activity for thirty days is a debugging aid. An audit trail is a record you can hand to a reviewer, a client, or an incident investigator and have them reach the same conclusion you did.

02What the standards ask

Three bodies of guidance do most of the work. None of them is AI-specific; that is the point. An agent is a system that logs, and the same controls apply.

SourceControlWhat it asks
NIST SP 800-53 Rev. 5AU-2 Event LoggingIdentify the event types the system must log, and coordinate the list across the organization.[1]
NIST SP 800-53 Rev. 5AU-3 Content of Audit RecordsRecord what happened, when, where, the source, the outcome, and the identity involved.[1]
NIST SP 800-53 Rev. 5AU-6 Audit Record Review, Analysis, and ReportingReview and analyze records for signs of inappropriate activity, and report the findings.[1]
NIST SP 800-53 Rev. 5AU-8 Time StampsUse internal clocks and an authoritative time source to stamp records.[1]
NIST SP 800-53 Rev. 5AU-9 Protection of Audit InformationProtect audit information and tools from unauthorized access, modification, and deletion.[1]
NIST SP 800-53 Rev. 5AU-11 Audit Record RetentionRetain records for a defined period that meets legal, regulatory, and organizational needs.[1]
NIST SP 800-53 Rev. 5AU-12 Audit Record GenerationGenerate records for the defined event types, with the defined content, at the defined time.[1]
AICPA TSC (2022)CC7.2Monitor system components for anomalies and analyze whether they represent security events.[4]
AICPA TSC (2022)CC7.3Evaluate security events and take action where they could or did cause a failure.[4]
ISO/IEC 27001:2022A.8.15 LoggingProduce, store, protect, and analyze event logs.[5]
ISO/IEC 27001:2022A.8.16 Monitoring activitiesMonitor networks, systems, and applications for anomalous behavior and act on the results.[5]
ISO/IEC 27001:2022A.8.17 Clock synchronizationUse approved time sources and keep clocks synchronized.[5]

NIST SP 800-92 adds the operational layer: log management is a lifecycle, not a file. It covers generation, transmission, storage, analysis, disposal, and the protection of the logs themselves.[2] The OWASP Logging Cheat Sheet adds the application-level detail: what to log, what not to log, and how to protect the record.[3]

03The fields

This is our recommended schema, grouped by the question it answers. It is designed to satisfy AU-3's content requirement and to make CC7.2 and CC7.3 testable. It is not a mandate from any of the standards.

GroupFieldWhy it matters
Who and whenEvent time, UTC, RFC 3339Orders the trail and survives time-zone disputes. AU-8.
Run or session IDReconstructs one execution end to end.
Trigger: person, schedule, or eventThe accountability anchor. Without it, the action belongs to nobody.
Agent name and versionAttributes behavior to a build, not a brand.
Model, provider, and versionShows what saw the data, and lets you reproduce the decision.
What it readInput reference and hashThe document or message ID, not the full content. The hash proves the input did not change.
Retrieved source IDsWhich records the agent used, so the answer can be traced.
What it didTool name and target systemWhat action was attempted, and where.
Arguments, redacted or hashedEnough to reconstruct the call without storing secrets or full PII.
Policy decision and rule IDAllow, deny, or requires approval, and the rule that produced it.
Outcome and downstream changeSuccess, denied, or error; the record ID and a before/after hash where something changed.
How sensitiveData classificationThe sensitivity of the data touched, so access and retention can follow it.

Two fields are easy to leave out and expensive to add later: the trigger identity and the policy rule. The first makes the action attributable; the second makes the decision reviewable. A log with a tool call but no trigger and no rule is an activity feed.

04A sample record

Illustrative, not a real record. The shape is the point: the content is referenced and hashed, the decision cites a rule, and the approval is in the record rather than in a chat thread.

{
  "ts": "2026-11-30T14:02:11Z",
  "run": "r-4821",
  "trigger": {"type": "user", "id": "jsmith"},
  "agent": {"name": "invoice-matcher", "version": "2.3.1"},
  "model": {"provider": "pinned", "version": "2026-10"},
  "input": {"doc": "invoice-INV-1042", "sha256": "9f2c…"},
  "sources": ["po-8821", "vendor-master-114"],
  "tool": {"name": "ledger.post", "target": "quickbooks"},
  "arguments": {"invoice": "INV-1042", "amount": "4120.00", "account": "6100"},
  "policy": {"decision": "requires_approval", "rule": "AP-17"},
  "approval": {"by": "controller:lee", "ts": "2026-11-30T14:01:58Z", "scope": "post"},
  "outcome": {"status": "success", "record": "je-5521", "before": null, "after": "a71e…"},
  "classification": "confidential"
}

A reviewer can answer the five questions from this record alone: who triggered it, what it read, what it decided, what it did, and what changed. That is the test.

05Tamper evidence

AU-9 is the control that turns a log into evidence: the record and the tools that produce it must be protected from unauthorized access, modification, and deletion.[1] For an agent, that means the agent's own identity should not be able to edit or delete its record. Practical measures:

OWASP's guidance is blunt about the threat: logs are a target. An attacker who can write to them can cover their tracks, and an attacker who can read them can exfiltrate secrets. The controls are the same as any sensitive store: restrict, encrypt, monitor, and test.[3]

06Retention

AU-11 requires a defined retention period; it does not prescribe one.[1] The period comes from the client agreement, the audit period, and any legal or regulatory requirement. A SOC 2 examination typically looks back over a period; a client contract may require longer; a regulation may require a specific minimum. The number is a decision, not a default.

What matters is that the decision is written down, enforced, and verifiable. “We keep logs” is not a policy. A dashboard with a thirty-day window is not a record. Deletion should be logged and testable, and legal holds should override the schedule.

07What not to log

An audit trail that stores everything creates a second copy of the sensitive data it was meant to protect. OWASP lists what should usually be removed, masked, hashed, or encrypted before it reaches a log: access tokens, session identifiers, passwords, encryption keys, bank and card data, sensitive personal data, and data of a higher classification than the log store is allowed to hold.[3]

For an agent, the practical rule is: log the reference, the hash, the decision, and the outcome; keep the full content under the same access and retention boundary as the data it contains, if you keep it at all. That is why the sample record above has `"doc": "invoice-INV-1042"` and a hash, not the invoice text.

08The one-day test

This is our exercise, not a NIST requirement. Pick one agent and one day. Then answer, from the record alone:

  1. Who or what triggered the run?
  2. What did the agent read, and can you prove the input did not change?
  3. Which records did it retrieve?
  4. What did it decide, and which rule allowed or denied the action?
  5. What tool did it call, in which system, with what arguments?
  6. Who approved the action, and when?
  7. What changed downstream, and can you show before and after?
  8. Where is the record held, and how long will it be kept?

If any answer is missing, the corresponding control cannot be evidenced for that day. The finding is not that the agent behaved badly; it is that the record cannot prove it behaved well. Fix the missing link before the auditor asks for it.

09Failure modes

10FAQ

Is chat history an audit trail?

No. It shows a conversation. It does not show which record changed, which rule allowed it, who approved it, or what the downstream system recorded.

Must we log the full prompt?

Not necessarily. Log a reference and a hash, the rule applied, and the decision. If you need the content, store it under the same access and retention boundary as the data it contains.

Does NIST SP 800-53 apply to a private company?

Not by itself. It is a control catalog used by U.S. federal agencies and widely adopted elsewhere. It applies when a contract, regulation, or your own risk decision makes it apply.[1]

How long should we keep the trail?

There is no universal period. It comes from the client agreement, the audit period, and any legal or regulatory requirement. Write it down, enforce it, and make deletion verifiable.

Do we need a SIEM?

No. A structured, access-controlled, tamper-evident store with a tested export can satisfy the controls. A SIEM helps with correlation and review; it is not the requirement.

What about the model provider's logs?

They are evidence about the provider's system. They do not show your trigger identity, your policy rule, your approval, or the record that changed in your downstream system. You need your own trail.

The control-mapping checklist · v2.0

Map the record to the control

The checklist pairs each SOC 2 criterion and ISO/IEC 27001:2022 control with what an agent must demonstrate and the evidence to keep. The audit-trail rows are in section D, logging and monitoring.

One email with the checklist, then one check-in from a real person. No list. Or read it now, no email required. Privacy.

11Sources

  1. NIST, SP 800-53 Rev. 5 — Security and Privacy Controls for Information Systems and Organizations (September 2020, updated December 2020; Release 5.2.0, August 2025), Audit and Accountability family, AU-1 to AU-16. csrc.nist.gov/pubs/sp/800/53/r5/upd1/final
  2. NIST, SP 800-92 — Guide to Computer Security Log Management (September 2006). csrc.nist.gov/pubs/sp/800/92/final
  3. OWASP, Logging Cheat Sheet. cheatsheetseries.owasp.org/cheatsheets/Logging_Cheat_Sheet.html
  4. AICPA, 2017 Trust Services Criteria (With Revised Points of Focus — 2022), CC7.2 and CC7.3. Download the criteria
  5. ISO, ISO/IEC 27001:2022 — Information security management systems — Requirements, Annex A controls A.8.15, A.8.16, A.8.17. iso.org/standard/27001

Next: Prompt injection for business owners · SOC 2 for AI agents · The control-mapping checklist