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

# Set Inbound Handler • AI Agent SDK

> set_inbound_handler: Register the coroutine invoked for each relayed inbound message.

# set\_inbound\_handler

<div className="flex items-center gap-2">
  <Badge color="purple">Method</Badge>
</div>

> This is a method of the [**RelayTransport**](../classes/RelayTransport) class in the [**protocols**](../modules/protocols) module.

Register the coroutine invoked for each relayed inbound message.

## Signature

```python theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
def set_inbound_handler(handler: Callable[['GatewayMessage'], Awaitable[None]]) -> None
```

## Parameters

<ParamField query="handler" type="Callable" required={true}>
  No description available.
</ParamField>

## Source

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