Implementation Guide

Maintaining chain of custody when producing LLM logs to regulators

A defensible chain of custody for LLM logs means you can show who or what created each record, that it is complete and unaltered since capture, and who handled it until production.

Treat LLM logs as evidence, not telemetry

When LLM and AI agent logs are produced to a regulator, they function as evidence. A defensible chain of custody lets you demonstrate three things:

  • Who or what created each record.
  • That each record is complete and unaltered since capture.
  • Who handled each record until production.

In practice, that requires the following:

  • Runtime capture with consistent identifiers and timestamps.
  • Tamper-evident storage.
  • Retention and legal hold controls.
  • Logged access.
  • Documented redaction on copies.
  • A recorded handoff.

Custody lifecycle for an LLM log record

The sections that follow cover each stage in turn. The table summarizes the full lifecycle.

StageControl
1. CaptureRecord prompts, completions, tool calls, policy decisions, and identity context at the runtime layer.
2. ProtectHash, sign, timestamp, and store records in append-only form.
3. RetainApply retention schedules and suspend deletion under legal hold.
4. Control accessRestrict and log every read, export, and administrative action.
5. Redact and exportRedact copies, never originals, and generate a manifest.
6. Hand offDocument the transfer and verify integrity on receipt.

Identify log sources and the metadata needed to reconstruct activity

Start by identifying every system that holds relevant logs. For each one, determine whether you control retention, export, and legal hold, and document the systems where you do not.

Then confirm that the records can be tied together. You should be able to reconstruct a complete agent task from a single trace identifier, including:

  • Prompts and completions.
  • Tool calls.
  • Policy decisions.
  • Identity.

Consistent identifiers and timestamps across these records are what make that reconstruction, and attribution to a person or agent, possible.

Capture close to the event and make records tamper-evident

Capture

Record prompts, completions, tool calls, policy decisions, and identity context at the runtime layer, close to the event itself.

Protect

Hash, sign, timestamp, and store records in append-only form. You should be able to demonstrate that records were not altered between capture and production, using hashing, signing, or write-once storage.

Govern retention, legal hold, and access

Retain

Apply retention schedules, and suspend deletion under legal hold so that relevant records remain available for production.

Control access

Restrict and log every read, export, and administrative action on log stores. The access records should themselves be protected, so that the handling history is as reliable as the logs.

Redact, export, and hand off with documentation

Redact and export

Perform redaction on copies, never on originals. Document the redaction rules and approvals, and keep hashes of both the originals and the outputs. Generate a manifest for each production.

Hand off

Document the transfer and verify integrity on receipt. Each production should include a manifest and a signed record of handoff that someone else could verify.

Assess whether your logging architecture can support production

Use these questions to test your current architecture against the lifecycle above.

  • Can you reconstruct a complete agent task, including prompts, completions, tool calls, policy decisions, and identity, from one trace identifier?
  • Do you control retention, export, and legal hold for every system that holds relevant logs, and have you documented those that you do not?
  • Can you demonstrate that records were not altered between capture and production, using hashing, signing, or write-once storage?
  • Are all reads, exports, and administrative actions on log stores recorded and protected?
  • Is redaction performed on copies, with documented rules, approvals, and hashes of originals and outputs?
  • Does each production include a manifest and a signed record of handoff that someone else could verify?

Review your agent evidence trail

If you are evaluating how runtime governance, agent identity, and audit logging can contribute attributable records for AI agent activity, we can walk through your architecture.

Talk to an Expert