Security
Audit logs for AI actions
Who asked, which agent acted, what it did, with which data — reconstructable later.
What it is and why it exists
When an agent takes an action, you need a tamper-evident record linking user, agent, run, model version, prompt version, tool call, arguments, approval and result. It underpins incident response, compliance and customer trust.
Quick prototype
print() statements.
In production, at scale
Structured, append-only audit events separate from debug traces, PII-aware, retained per policy, queryable by user and run, and exportable for customers’ security teams.
Vendors and tools
| OpenTelemetry + a log store | Structured events |
|---|---|
| SIEMs (Splunk, Datadog) | Security monitoring |
On AWS: CloudTrail for AWS API calls; CloudWatch Logs / S3 with Object Lock for append-only retention; Bedrock model invocation logging.
How it fails
- Only debug traces that get sampled and deleted
What the interviewer asks next
Traces vs audit logs?
Traces are for debugging and performance — sampled, verbose, short-lived. Audit logs are for accountability — complete for actions, minimal, retained and protected.