> ## 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.

# canonicalize • AI Agent SDK

> canonicalize: Return the stable canonical id for a raw platform address.

# canonicalize

Method

> This is a method of the [**IdentityCanonicalizerProtocol**](https://praison.ai/docs/sdk/reference/praisonaiagents/classes/IdentityCanonicalizerProtocol.md) class in the [**protocols**](https://praison.ai/docs/sdk/reference/praisonaiagents/modules/protocols.md) module.

Return the stable canonical id for a raw platform address.

## Signature

```python theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
def canonicalize(platform: str, raw_user_id: str) -> str
```

## Parameters

**platform** `str` *required*

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

**raw\_user\_id** `str` *required*

The raw address as delivered on the wire.

### Returns

**Returns** `str`

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

## Source

> [card] [View on GitHub](https://github.com/MervinPraison/PraisonAI/blob/main/src/praisonai-agents/praisonaiagents/gateway/protocols.py#L3015)
>
> `praisonaiagents/gateway/protocols.py` at line 3015


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.