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

python
def canonicalize(platform: str, raw_user_id: str) -> str

Parameters

ParamField str

The platform name (e.g. `"whatsapp"`).

ParamField str

The raw address as delivered on the wire.

Returns

ResponseField str

The reconciled canonical id, or `raw_user_id` unchanged when no reconciliation is known.

Source

View on GitHub

praisonaiagents/gateway/protocols.py at line 3015