How do you do audit logging for LLM agent decisions in a regulated environment?hard

Type
conceptual
Topic
do-you-do-audit-logging-for-llm-agent-decisions-in-a-regul
Frequency
common
Tags
ai-agents, how, you, audit, logging, for
Answer

Every LLM call logs: input (system prompt + messages), output, model ID, timestamp, token count, latency, run ID.

Explanation

Every LLM call logs: input (system prompt + messages), output, model ID, timestamp, token count, latency, run ID. Stored immutably in S3 with object lock. Structured as JSON for queryability via Athena. Agent-level: log each tool call (name, args, result) and reasoning steps. Correlation ID traces a request across all agents. Also log which human approved any HITL decision.

Follow-upCan you give a production example?