1:1 mentoring with Big Tech AI engineers
System Design

Audit & Compliance

The audit record for an agent: what one step must record, why reconstruction beats replay, how a hash chain and a locked copy make tampering visible, how to keep records without keeping the person, what retention really requires, and what the log costs.

Last updated

Production12 min readFirst readMulti-Tenant IsolationPII Detection

After this section you can

  • Specify the record one agent step writes, and say why reconstruction beats replay
  • Explain what a hash chain catches, what it misses, and where its head must live
  • Price the log at your request rate, and set retention by regime
16

Audit & Compliance

The record each step writes, where a hash chain's head must live, and what the log costs.

Key idea

An audit log is evidence, not telemetry. It must say who did what, for whom, with which model, and nobody, including you, can change it without the change showing.

One write path, one locked copy, three readers
ONE WRITE PATH, LEFT TO RIGHT Agent step one tool call Audit record hashes, not secrets Locked copy head anchored outside 1 · append 2 · write first Monitors SIEM Auditor Only the locked copy is evidence.

Blue: the agent's action. Purple: the record. Teal: the locked copy. Green: readers of copies. The figure pans on a phone.

Related

More in System Design

Get full access to all 149 sections with code examples, diagrams, and interactive animations.

Unlock Premium