Relay Transport • AI Agent SDK

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

RelayTransport

Defined in the protocols 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

Source

View on GitHub

praisonaiagents/gateway/protocols.py at line 6645