Audit trail build sequence
- CaptureChoose one point that sees all provider traffic.
- NormalizeMap provider formats into one event schema.
- CorrelateLink requests, tool calls, and agent steps.
- ProtectRedact, restrict access, set retention, and secure integrity.
- VerifyTest coverage and tamper detection on a schedule.
What a unified audit trail is and why provider logs are not enough
A unified audit trail is a single, provider-agnostic record of AI activity. Events from OpenAI, Anthropic, and Gemini are captured at one point you control and written in one normalized schema, so identity, policy, model, tool calls, and outcome can be reviewed consistently rather than reconciled across separate provider formats.
Each provider describes requests and responses in its own format. Mapping those formats into one event schema is what allows a single question, such as who did what, with which model, under which policy, to be answered the same way for every provider.
Choose the capture point first
Record events at one point that you control and that sees all provider traffic. A gateway or runtime enforcement layer is preferred, enriched with application context so that each event carries more than the raw request and response.
Define a minimal normalized event schema
Write every event in a single normalized schema covering identity, policy, model, tool calls, and outcome. The categories and fields below form a minimal schema.
| Category | Fields to record |
|---|---|
| Identity | Human user, service, or agent ID, agent version, tenant, session, and authentication method. |
| Request and model | Event ID, timestamp, provider, endpoint, model requested, model reported in the response, key parameters, and reported token counts. |
| Policy | Policy version, rules evaluated, decision (allow, deny, modify, or require approval), and approver reference where relevant. |
| Tool calls | Tool name, target server or system, arguments or their hash, provider call ID, normalized call ID, approval reference, and result status. |
| Data | Classification labels, data sources accessed, redactions applied, and a reference or hash for stored content. |
| Outcome | Final status, error, finish reason, latency, provider response ID, and any action taken. |
Correlate events across providers and agent workflows
Link requests, tool calls, and agent steps with shared trace identifiers. Recording both the provider call ID and a normalized call ID for each tool call lets one agent workflow be followed end to end, even when it spans more than one provider.
Handle sensitive content, retention, and integrity
Redact and protect stored content. Record the redactions applied, keep a reference or hash for stored content, restrict access to the trail, set retention, and secure the integrity of the records so that alteration or deletion can be detected.
Verify completeness and tamper resistance
Test regularly that the records are complete and tamper-resistant. Work through the following checks on a schedule.
- Block direct egress to provider endpoints and confirm no application or agent bypasses the capture point.
- Send known test requests through each provider and each agent path, and confirm exactly one event with all required fields.
- Reconcile event counts and token usage against provider usage reports on a regular cadence.
- Pick random requests and reconstruct identity, model, policy version, tools, data, and outcome within a defined time.
- Alter or delete a test record and confirm the integrity check detects it.
- Alert on logging failures, and decide per workflow whether the request should fail open or fail closed.