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

# Relay Transport • AI Agent SDK

> RelayTransport: Protocol for an out-of-process platform-connector relay.

# RelayTransport

> Defined in the [**protocols**](https://praison.ai/docs/sdk/reference/praisonaiagents/modules/protocols.md) module.

AI Agent

Protocol for an out-of-process platform-connector relay.

A concrete implementation (e.g. a `WebSocketRelayTransport` in the
praisonai wrapper) lets a connector that holds the platform socket
forward normalised inbound :class:`GatewayMessage` events to the gateway
and accept outbound sends/interrupts back down. The gateway treats the
relay like any other adapter (same inbound routing, admission control,
delivery) but the connection lives elsewhere.

Lifecycle::

caps = await transport.connect()            # handshake → capabilities
transport.set\_inbound\_handler(on\_message)   # wire inbound events in
...                                          # events relayed in/out
await transport.go\_dormant()                 # pause, keep connection
await transport.disconnect()                 # tear down

## Methods

> [card] [connect()](https://praison.ai/docs/sdk/reference/praisonaiagents/functions/RelayTransport-connect.md)
>
> Establish the relay and complete the handshake.

> [card] [set\_inbound\_handler()](https://praison.ai/docs/sdk/reference/praisonaiagents/functions/RelayTransport-set_inbound_handler.md)
>
> Register the coroutine invoked for each relayed inbound message.

> [card] [send\_outbound()](https://praison.ai/docs/sdk/reference/praisonaiagents/functions/RelayTransport-send_outbound.md)
>
> Relay an outbound message to `target` via the connector.

> [card] [go\_dormant()](https://praison.ai/docs/sdk/reference/praisonaiagents/functions/RelayTransport-go_dormant.md)
>
> Pause inbound dispatch without dropping the connection.

> [card] [disconnect()](https://praison.ai/docs/sdk/reference/praisonaiagents/functions/RelayTransport-disconnect.md)
>
> Tear down the relay connection.

## Source

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


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