AI agent audit trail for a security agent
Question Q09 asks whether a disputed agent change can be rebuilt from a log the agent cannot edit. MITRE ATLAS mitigation AML.M0024 names what to record: intermediate steps, data access, tool use and the agent's identity. This page gives a full example entry, five questions that test it, and a retention date worked out. Read 19 Nov 2026.
What the guidance asks for
Checklist question Q09 reads: "Is every step the agent takes (inputs, intermediate decisions, tool calls with parameters, data touched, identity used) logged somewhere the agent cannot edit?" It rests on MITRE ATLAS mitigation AML.M0024, AI Telemetry Logging: "When deploying AI agents, implement logging of the intermediate steps of agentic actions and decisions, data access and tool use, installation commands, and identity of the agent." (MITRE ATLAS data)
Two more lines bear on it. Anthropic: "Prioritize transparency by explicitly showing the agent's planning steps." (Building effective agents) OWASP lists logging among measures that "will not prevent Excessive Agency, but can limit the level of damage": "log and monitor the activity of LLM extensions and downstream systems to identify where undesirable actions are taking place, and respond accordingly." (LLM06:2025)
One complete entry
The entry below records one dependency fix, including a call the harness blocked until a person approved. It shows the level of detail Q09 needs; field names are this page's, not a standard's. For standard span names and which content fields are opt-in, see what to keep in agent run logs.
Illustrative entry, one change, values invented for the format: { "run_id": "run-20261112-0417", "started": "2026-11-12T09:14:03Z", "ended": "2026-11-12T09:21:48Z", "agent": "dep-fix-agent", "agent_version": "1.8.2", "model": "claude-sonnet-5-5", "prompt_version": "p-2026-11-01", "trigger": {"source": "ticket SEC-4821", "received": "2026-11-12T09:14:00Z", "input_hash": "sha256:9f2c..."}, "input": {"finding": "examplelib 2.4.1 in service payments-api", "fixed_in": "2.4.7"}, "steps": [ {"n": 1, "t": "09:14:11", "decision": "read manifest before proposing a version", "reason": "fixed_in is 2.4.7; manifest pins 2.4.x"}, {"n": 2, "t": "09:14:12", "tool": "repo.read_file", "params": {"path": "requirements.txt"}, "result": "ok, 41 lines", "identity": "svc-depfix-agent"}, {"n": 3, "t": "09:15:20", "tool": "web.fetch_url", "params": {"url": "https://example.org/examplelib/releases/2.4.7"}, "result": "ok, 1 page, no API change listed", "identity": "svc-depfix-agent"}, {"n": 4, "t": "09:16:40", "decision": "bump to 2.4.7; no API change in release notes", "reason": "same minor version"}, {"n": 5, "t": "09:17:02", "tool": "repo.open_pull_request", "params": {"branch": "depfix/SEC-4821", "files": 1}, "result": "PR 1932 opened", "identity": "svc-depfix-agent"}, {"n": 6, "t": "09:18:30", "tool": "ci.read_status", "params": {"pr": 1932}, "result": "tests passed, run 77310", "identity": "svc-depfix-agent"}, {"n": 7, "t": "09:19:05", "tool": "repo.merge_pull_request", "params": {"pr": 1932}, "result": "BLOCKED: approval required", "identity": "svc-depfix-agent"}, {"n": 8, "t": "09:21:30", "tool": "repo.merge_pull_request", "params": {"pr": 1932}, "result": "merged, commit c41e9b0", "identity": "svc-depfix-agent"} ], "data_read": ["requirements.txt (step 2)", "release notes for examplelib 2.4.7 (step 3)"], "approval": {"required_by": "tool rating: write, reversible", "approver": "owner-payments", "decision": "approved", "t": "09:21:10"}, "agent_claim": "PR 1932 merged, examplelib 2.4.7 in payments-api", "downstream_refs": {"git_merge_commit": "c41e9b0", "ci_run": 77310}, "independent_check": {"run_id": "verify-20261112-1000", "t": "2026-11-12T10:00:12Z", "identity": "svc-verify-job", "queried": "git ref main; resolved lockfile of payments-api", "result": "match: c41e9b0 is on main; examplelib 2.4.7 resolved"} }
| Fields | What they let a reviewer prove | Clause |
|---|---|---|
| trigger, input | What the decision was based on, and that the ticket text was recorded as received | ATLAS: "intermediate steps of agentic actions and decisions" |
| decision and reason (steps 1 and 4) | The path to the outcome, not only the outcome | ATLAS; Anthropic "planning steps" |
| tool, params, result (steps 2, 3 and 5 to 8) | The exact change requested and what came back, including the release notes read in step 3 and the refusal in step 7 | ATLAS: "data access and tool use" |
| data_read | What was in the agent's context (the manifest and the release notes), to check against the data the agent was approved to read | ATLAS: "data access" |
| identity | The account to look up in the downstream system's own log | ATLAS: "identity of the agent" |
| approval | Who allowed the write, by which rule, and when | Checklist Q05 (this page's addition) |
| downstream_refs, independent_check | Keys to match the log with the real system, and a check the agent did not run, with its result | Checklist Q10 (this page's addition) |
Five questions to answer from the log alone
Choose one real change from last week, give a reviewer who did not build the agent only the log, and ask the five questions below. The answers shown are from the example entry.
| Question | Answer from the example | Fields used |
|---|---|---|
| What input led to the change? | Ticket SEC-4821, received 09:14:00Z, examplelib 2.4.1 in payments-api | trigger, input |
| Why this fix? | Release notes for 2.4.7 were read at step 3 and listed no API change; same minor version (steps 3 and 4) | steps 1, 3 and 4 |
| What exactly did the agent do, and with which account? | Opened PR 1932 as svc-depfix-agent; the merge was blocked at 09:19:05 (step 7) and ran at 09:21:30 (step 8), after approval | steps 5, 7 and 8, identity |
| Who approved, and when? | owner-payments at 09:21:10, under the rule for write-and-reversible tools | approval |
| Does the real system agree? | Yes. Git shows merge commit c41e9b0 and CI run 77310 under the same account, and the verify job at 10:00:12Z found c41e9b0 on main and examplelib 2.4.7 resolved in the payments-api lockfile | downstream_refs, independent_check |
Compare the log time and account with the downstream system's own audit entry; the two should agree within clock skew. Time the exercise. This page suggests 30 minutes as a bar for one change; a reconstruction that needs the vendor or the agent's builder means the log is not yours, which is a finding under supplier controls when buying. Confirm separately that the agent's credential has no write or delete right on the log store. The log records the agent's claims; whether the change is true is the job of verify after each change.
Making the log store agent-proof
Q09 asks for a log "the agent cannot edit". Two controls give that. First, the agent's credential has write-only access to the log destination, with no right to delete, overwrite or change retention settings. Second, the store itself refuses deletion for the retention period, whoever asks. Amazon S3 Object Lock is one documented way. In compliance mode, "a protected object version can't be overwritten or deleted by any user, including the root user in your AWS account"; the mode cannot be changed and the retention period cannot be shortened (AWS, S3 Object Lock).
Settings for the example log bucket: Object Lock enabled when the bucket is created; default retention mode Compliance; default retention period set in days or years (the two units the bucket property accepts); the agent's role allowed s3:PutObject on the log prefix and nothing that touches retention or deletion, notably not s3:PutObjectRetention or s3:BypassGovernanceRetention, the permissions AWS lists for changing locks. Governance mode would let a user with the bypass permission delete entries, so it does not meet Q09 if the agent could ever hold that permission. Other stores have equivalents; the test is the same: attempt a delete and an overwrite as the agent's identity and confirm both are refused.
How long to keep entries
Keep each entry until the later of the next audit close and six months after the entry. The rule and the record classes it applies to are on what to keep in agent run logs. Two sources sit behind the six months. NIST SP 800-53 control AU-11 leaves the period to you: "Retain audit records for [Assignment: organization-defined time period]" "to provide support for after-the-fact investigations of incidents" (text via csf.tools). The EU AI Act sets a floor of "at least six months" for high-risk systems (Article 19), and that floor applies only from 2 Dec 2027 (Annex III) or 2 Aug 2028 (Annex I).
Worked example with an assumed audit calendar: the audit year is 1 Jan to 31 Dec 2026 and the auditor finishes sampling by 31 Mar 2027. A change made on 2 Jan 2026 must still be readable on 31 Mar 2027, which is 453 days later; six months after it is 2 Jul 2026, so the audit governs. A change made on 31 Dec 2026 is 90 days from audit close, but six months after it is 30 Jun 2027, 181 days, so the six-month rule governs. Set the Object Lock default retention to 460 days, which covers the oldest entry, and extend the retention of an individual entry where the six-month date falls later. Replace the dates with your own audit and dispute calendar.
What vendors say they record
Published statements, alphabetical, read 19 Nov 2026. They are the vendors' own descriptions.
- Astelia: "every step lands in the execution log, and every decision in the audit log." (Astelia)
- Cogent: "every agent action is logged with its reasoning." (Cogent)
- Pixee: each triage decision "is persisted with a timestamp, the classification outcome (true positive, false positive, won't fix), and the LLM justification" for it. (Pixee docs)
- Sysdig: "Every action is recorded along with the reasoning behind it." (Sysdig)
None of the four quotations says who can edit the log or how long it is kept, which are the two things the example above makes you check. The harness logging page shows what common harnesses record by default.
Sources
- MITRE ATLAS mitigations, ATLAS data release 5.6.0, AML.M0024, read 19 Nov 2026
- Anthropic, Building effective agents, read 19 Nov 2026
- OWASP, LLM06:2025 Excessive Agency, read 19 Nov 2026
- NIST SP 800-53 Rev. 5, AU-11 Audit Record Retention (csf.tools copy), read 19 Nov 2026
- EU AI Act, Article 19 Automatically generated logs (artificialintelligenceact.eu), read 19 Nov 2026
- Astelia, Closing the exposure loop (vendor), read 19 Nov 2026
- Cogent, Cyber defense factory (vendor), read 19 Nov 2026
- Pixee docs, Compliance (vendor), read 19 Nov 2026
- Sysdig, Agentic AI (vendor), read 19 Nov 2026
- AWS, Amazon S3 Object Lock (documentation), read 19 Nov 2026
Last reviewed 19 Nov 2026