A team reports that after an agent autonomously modified several files and created a pull request, they cannot determine which specific tool calls the agent made, in what order, or what parameters were passed. A compliance review requires full traceability of all agent actions. Which approach best provides the required audit trail?
Select an answer to reveal the explanation.
Short Explanation and Infographic
Traceability for AI agents means being able to answer three questions for every action: what was called, with what inputs, and what happened? Repository webhooks only capture the results (the commits and PRs), not the reasoning or the tool parameters that led to them. PR description summaries are LLM-generated prose that may be incomplete or imprecise. Real audit trails require structured, machine-readable logs at the tool-call level — written to append-only storage so they cannot be altered after the fact.
Full explanation below image
Full Explanation
Traceability and accountability in agentic systems require that every tool invocation be recorded in a way that allows after-the-fact reconstruction of exactly what the agent did. This is distinct from observing the outputs of the agent's actions (commits, PRs, file changes) — it means recording the agent's decision process and the specific API calls it made.
A proper audit trail for agentic tool use should capture, at a minimum: - Tool name: which MCP server tool was invoked. - Input parameters: the exact arguments passed (e.g., which file was edited, what text was written). - Timestamp: when the call was made. - Outcome: success/failure, return value or error message. - Run context: which agent session and workflow run triggered the call.
This log should be written to an append-only store (such as an immutable object storage bucket, a write-once logging service, or a signed audit log) to prevent tampering.
Why the other options are wrong:
Option A — Human review of PRs is a governance control that catches problems before merging but does not provide a technical audit trail. After review, there is still no record of which tool calls were made. Human review and audit logging are complementary; one is a gate, the other is a record.
Option C — GitHub repository webhooks capture repository-level events (pushes, PR creation, reviews) generated by the agent's actions, but they do not capture the agent's internal tool call sequence. A webhook tells you 'the agent pushed to branch X,' not 'the agent called the write-file tool with parameters {path: X, content: Y} at time Z.' The tool-level detail required for compliance is not present in webhook payloads.
Option D — PR description summaries are generated by the LLM and are inherently prose summaries, not structured audit records. They may omit steps, use imprecise language, or be manipulated by the model's interpretation of what is worth mentioning. They are also stored in the PR itself, which can be edited after the fact. These are useful for human readability but do not satisfy compliance requirements for complete, tamper-evident audit trails.