Skip to content

Lesson 7 of 7 · 5 min read

Audit Logs for Agent Actions

A trace and an audit log record overlapping events for different readers. The trace is for engineers: every span, full content where permitted, mutable storage, retention measured in weeks. The audit log is for investigators, auditors and regulators: one append-only record per security-relevant event (an action proposed, a policy decision, an approval, a side effect, a credential use), each carrying who acted, under whose delegated authority, which policy version decided, and a causal link to the event that led to it. Tamper evidence comes from a hash chain with each entry committing to the previous one, a keyed signature over each entry, and periodic anchoring of the chain head somewhere the operators cannot rewrite. Content is minimised: hashes and identifiers of arguments and results, never raw customer data or secrets, so the log can be retained for years and shown to a third party. The log is written by the harness at the policy and tool boundaries, never by the model.

Premium lessonReviewed By the AIAgentInterviews editorial team
Get full Premium access · $25

All 19 topics with every worked answer, all lessons and courses, the full practice bank, and anything new that appears during your access.

6 months · One payment · No auto-renewal

Practise it as an interviewer asks it

Related lessons