canonicalize • AI Agent SDK
canonicalize: Return the stable canonical id for a raw platform address.
canonicalize
Method
</div>
This is a method of the IdentityCanonicalizerProtocol class in the protocols module.
Return the stable canonical id for a raw platform address.
Signature
def canonicalize(platform: str, raw_user_id: str) -> strParameters
ParamField
strThe platform name (e.g. `"whatsapp"`).
ParamField
strThe raw address as delivered on the wire.
Returns
ResponseField
strThe reconciled canonical id, or `raw_user_id` unchanged when no reconciliation is known.
Source
View on GitHubpraisonaiagents/gateway/protocols.py at line 3015