# Correlation ID

**A correlation ID is a single identifier attached to one request and carried through every agent, tool call and approval it touches, so that all its ledger entries can be joined later.**

*Part of the [Learn hub](https://privycdp.org/learn) and the [customer data glossary](https://privycdp.org/learn/glossary).*

## What it means in practice

A correlation ID answers an auditor's first question: what happened to this request? Without it, each agent's record is a separate fragment, and someone has to piece the story together from timestamps.

The idea predates agents. The Correlation Identifier pattern in Enterprise Integration Patterns puts a unique ID on each request so that a reply can be matched to it [1](#source-1). The W3C Trace Context Recommendation does something similar for distributed tracing: its trace-id marks every system involved in one logical operation [2](#source-2).

On rails, the [Orchestrator](https://privycdp.org/ai/rails/orchestrator-agent) issues one correlation ID per request, and every step carries it. A ledger writer outside the agent records the ID with each entry, because agents do not write or edit their own record.

A correlation ID and a payload hash do different jobs. The ID says which request an action belongs to. The hash says exactly what was approved. A good [audit ledger](https://privycdp.org/learn/glossary/audit-ledger) entry holds both.

Generate the ID at random, and never build it from an email address or customer number. A hop that drops the ID breaks the chain, so test for this: audit coverage below 100% is a defect.

PrivyCDP's immutable audit ledger ties each AI-assisted action to the actor that authorised it, and a correlation ID answers a different question: which request the action belonged to.

**Example (government agency, illustrative):** one request passes from the [Segment Drafter](https://privycdp.org/ai/rails/agents/segment-drafter) to the [Journey QA Reviewer](https://privycdp.org/ai/rails/agents/journey-qa-reviewer), then to an approver and the [Audience Sync Steward](https://privycdp.org/ai/rails/agents/audience-sync-steward). Four ledger entries share one ID, so an auditor can read the whole path.

## Related terms

- [Audit ledger](https://privycdp.org/learn/glossary/audit-ledger): where the ID is recorded.
- [Orchestrator agent](https://privycdp.org/learn/glossary/orchestrator-agent): issues the ID.
- [Approval gate](https://privycdp.org/learn/glossary/approval-gate): one step the ID passes through.
- [Agent rail](https://privycdp.org/learn/glossary/agent-rail): each rail's entries carry it.

## Where it matters

- [What are AI agent rails?](https://privycdp.org/ai/rails/what-are-ai-agent-rails): one audit trail per job.
- [Audit evidence packs](https://privycdp.org/ai/rails/use-cases/audit-evidence-packs): how ledger entries answer an auditor.


Back to the [customer data glossary](https://privycdp.org/learn/glossary) or the [Learn hub](https://privycdp.org/learn).

By Art Kukharenko
Published: 2026-11-02
Updated: 2026-11-02

## FAQ

### Is a correlation ID the same as a trace ID?

They are close relatives. A W3C trace-id serves engineers tracing a technical operation. A correlation ID follows one business request, including waits for people. You can reuse a trace ID if it survives those waits.

### Who creates the correlation ID?

The first system that receives the request, usually the Orchestrator or a workflow engine. Agents receive it and pass it on, and they should not be able to change it.

## Sources

1. Enterprise Integration Patterns, Correlation Identifier: https://www.enterpriseintegrationpatterns.com/patterns/messaging/CorrelationIdentifier.html
2. W3C, Trace Context (23 November 2021): https://www.w3.org/TR/trace-context/


## Further reading

- [AI Agents for Marketing Operations: The Playbook on Rails](https://privycdp.org/ai/rails/functions/marketing-operations)
- [Audience Sync Steward: An AI Agent for Approved Audience Syncs](https://privycdp.org/ai/rails/agents/audience-sync-steward)
- [Journey QA Reviewer: An AI Agent That Checks Journeys Before Launch](https://privycdp.org/ai/rails/agents/journey-qa-reviewer)
- [AI Agent Rails: An Operating Model for Running Agents on Customer Data](https://privycdp.org/ai/rails)
- [AI Agent Rail Card Template: YAML, Spreadsheet and JSON Schema](https://privycdp.org/tools/agent-rail-card)
