Identity Canonicalizer Protocol • AI Agent SDK

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

IdentityCanonicalizerProtocol

Defined in the protocols module.

AI Agent

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 `<lid>@lid vs <phone>@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

Source

View on GitHub

praisonaiagents/gateway/protocols.py at line 3001