AI Agent Governance

AI Agent Audit Trail: What to Record and Why

For the process or security owner who must reconstruct an agent run after the fact: a compact event schema, a worked record and tests for whether the trail is usable.

Uli PrantzBuilds and operates all-agents
Published
Key takeaways

Key takeaways

  • A useful audit trail reconstructs one run in order. A pile of application logs with no shared run identifier is searchable but not replayable.
  • Record observed facts and decision artifacts: identity, inputs, policy version, tool request, authorization result, approval and outcome. Do not treat private model reasoning as the record.
  • Store proposed and executed actions separately. The difference shows whether a person, policy or retry changed what finally happened.
  • Protect the record itself with restricted write paths, timestamps, retention rules and integrity checks. Logging into a mutable business table does not create trustworthy evidence.
  • Test the trail with a cold replay: give a person who did not operate the run only its records and ask them to explain the action, authority and outcome.
An AI agent audit trail is the ordered record of who or what started a run, which identity and policy governed it, what inputs and tools it used, which actions it proposed, how authorization and human approvals resolved, what executed, and what outcome followed. Every event needs the same run identifier and a reliable time. The goal is to reconstruct authority and effects, not to store every internal token a model produced.

The six questions a useful trail answers

Traditional audit guidance already expects timestamps, actor or process identifiers, event descriptions and invoked access-control rules. Agent runs add a moving plan and tool calls, but they do not repeal that foundation. NIST's 2026 identity concept paper also separates identification, authorization, delegation, logging and data provenance. Preserve those boundaries in the record.

Six replay questions and the minimum event fields that answer them.
QuestionMinimum fields
What run is this?run ID, parent run, workflow and procedure version, start and end time
Who had authority?initiator, agent identity, delegated user, permission policy version
What did it know?input references, source versions, retrieval IDs and data classification
What did it try?step ID, proposed tool, arguments or payload hash, policy decision
What did a person decide?request ID, exact proposal, approver identity, decision, edits and time
What changed?executed action, external receipt, before/after reference, error and rollback

Use one event envelope across every component

Logs become an audit trail only when events can be joined. An orchestrator log, an identity-provider log and a SaaS change history with three unrelated identifiers force an investigator to guess. Pass a stable run ID and step ID through every call, then store the provider's receipt beside them.

Keep the envelope boring. Event ID, run ID, step ID, event type, observed time, actor, policy version, payload reference and integrity metadata are enough. Put event-specific detail inside the payload. Stable fields make queries possible while the payload can evolve.

A proposed supplier-record updateSimulated example data
event_id: evt_0186
run_id: run_2048
step_id: update_supplier
event_type: approval.decided
observed_at: 2026-07-29T16:42:18Z
actor: user_finance_reviewer_17
proposal_id: prop_932
proposal_hash: sha256:7b...
decision: edited_and_approved
policy_version: ap-controls-4.2
next_event: tool.execution_requested

Record the proposal, authorization and execution separately

One “tool called” event hides the most useful differences. The agent may have proposed an action the policy denied. A reviewer may have edited the amount. A retry may have found the first attempt already succeeded. Use separate events so the trail shows those branches.

  1. 01Proposal createdAI judgment
    Store the intended tool, normalized arguments, evidence references and proposal hash.
  2. 02Authorization evaluatedCode
    Store allow, deny or approval-required, plus the policy version and matched rule.
  3. 03Approval resolvedHuman approval
    Store the exact proposal shown, identity, decision, edits, expiry and any comment.
  4. 04Execution attemptedCode
    Store the idempotency key, request reference, response or error, and retry number.
  5. 05Outcome verifiedCode
    Store the external receipt or read-back that proves the intended state exists.

Record decision artifacts, not private chain-of-thought

An audit trail needs enough context to explain an action. That does not mean retaining hidden model reasoning. Record the sources consulted, extracted facts, rule or rubric applied, structured recommendation, confidence where it has a defined use, and the final proposal. Those are inspectable artifacts.

Free-form reasoning can be inconsistent, sensitive and difficult to validate. If the business needs an explanation, generate a bounded rationale from cited inputs and label it as an output. Do not confuse that narrative with proof that the underlying process was correct.

Protect the trail, then test it with a cold replay

Audit records can contain personal data, confidential prompts and business payloads. NIST's monitoring report calls out the tension directly: teams need visibility, while privacy and contractual commitments can limit access to activity logs. Store references or hashes where the full payload belongs in a more restricted system, and define retention per data class.

  • Restrict append rights and separate them from ordinary business-record editing.
  • Use a trustworthy clock and preserve original event order as well as observed order.
  • Detect missing sequences, duplicate event IDs and changes to retained records.
  • Document who may search, export and delete records, with those actions logged too.
  • Test restoration and readability before the first incident, not during it.
The cold-replay testSimulated example data
Give a completed run export to someone who did not operate it. Ask them to identify the initiator, authority, sources, proposed action, policy result, human changes, executed effect and final receipt. Any answer that requires opening Slack or asking the original operator is a missing field or broken join.

Once the trail replays cleanly, connect it to the reliability review. The same events should support incident diagnosis, approval quality checks and policy review rather than three separate logging systems.

Limitations and when not to use this

  • An audit trail records what systems observed. It cannot prove that an omitted event never occurred, so coverage and missing-event monitoring are part of the control.
  • More logging is not automatically better. Minimize sensitive payloads, define lawful retention, restrict access and use references where the source system already holds the authoritative record.
  • Hashes and append-only storage can expose later modification; they do not establish that the original event was truthful or that an action was authorized.

Sources

  1. Protecting CUI: audit record contentNIST Accessed 29 July 2026
  2. Software and AI Agent Identity and Authorization concept paperNIST NCCoE Accessed 29 July 2026
  3. Challenges to the monitoring of deployed AI systemsNIST Accessed 29 July 2026

Run a cold replay

Choose one completed run, export only its event records, and ask a colleague to identify who authorized the final action and which policy version allowed it.

Run a cold replay
About the author

Uli Prantz

Builds and operates all-agents

Uli Prantz builds all-agents, the process-automation platform this site documents. He writes about the operational side of automating recurring business work: where deterministic code beats model judgment, where it does not, and where a human still has to approve.

Bring one process. We will scope it in 30 minutes.

You leave the call knowing whether it is a fit, what can become code and what still needs a person.

Book a discovery call