> ## Documentation Index
> Fetch the complete documentation index at: https://praison.ai/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Identity Canonicalizer Protocol • AI Agent SDK

> IdentityCanonicalizerProtocol: Reconcile a raw platform address to one stable canonical id.

# IdentityCanonicalizerProtocol

> Defined in the [**protocols**](../modules/protocols) module.

<Badge color="blue">AI Agent</Badge>

Reconcile a raw platform address to one stable canonical id.

Consulted as the *first* step of identity resolution (before the session /
memory / pairing / allowlist keys are derived) so that alternate address
forms of the same person — e.g. WhatsApp's `&lt;lid&gt;@lid` vs
`&lt;phone&gt;@s.whatsapp.net` — resolve to a single principal.

Implementations MUST be deterministic and safe: return `raw_user_id`
unchanged whenever no reconciliation is known, so an adapter that cannot
map a given address never corrupts identity (fail-open to today's
behaviour). With no canonicalizer registered, resolution is unchanged.

## Methods

<CardGroup cols={2}>
  <Card title="canonicalize()" icon="function" href="../functions/IdentityCanonicalizerProtocol-canonicalize">
    Return the stable canonical id for a raw platform address.
  </Card>
</CardGroup>

## Source

<Card title="View on GitHub" icon="github" href="https://github.com/MervinPraison/PraisonAI/blob/main/src/praisonai-agents/praisonaiagents/gateway/protocols.py#L2096">
  `praisonaiagents/gateway/protocols.py` at line 2096
</Card>
