When to reach for it
- Compliance or debugging demands traceability.
- Agents trigger external actions.
- Quality or security analyses must be possible.
/pattern/audit-trail/
Decisions, tool calls, inputs, outputs, and approvals are written to an append-only, tamper-evident record, so every action a run took can be reconstructed and attributed after the fact.
In practiceAfter a disputed wire transfer, a bank's audit trail surfaces the exact tool call and reasoning that approved it, letting the security team trace accountability and close the gap.
Without itWithout an audit trail, a post-incident investigation has no record of which agent took which action, making root-cause analysis and compliance reporting impossible.
When to reach for it
When it backfires
The tradeoff
Traceability is achieved against privacy, storage, and governance overhead.
Every decision and action leaves a traceable entry.
The audit trail logs the tool call and response but not the prompt that triggered it. Root-cause analysis is impossible.
Fix · Log the full prompt, model config, and system instructions alongside every action. Treat the prompt as part of the decision record.
The audit trail captures API keys or user PII in plain text. Compliance review becomes a data breach.
Fix · Redact secrets and PII at ingestion. Store raw inputs in a separate secure vault with access controls.
Next pattern
Search patterns, frameworks, and pages.