Skip to content

Built-in Channels

SMSChannel

SMSChannel(channel_id, *, provider=None, from_number=None)

Create an SMS transport channel.

EmailChannel

EmailChannel(channel_id, *, provider=None, from_address=None)

Create an Email transport channel.

AIChannel

AIChannel(channel_id, provider, system_prompt=None, temperature=0.7, max_tokens=1024, max_context_events=50)

Bases: Channel

AI intelligence channel that generates responses using an AI provider.

on_event async

on_event(event, binding, context)

React to an event by generating an AI response.

Skips events from this channel to prevent self-loops.

deliver async

deliver(event, binding, context)

Intelligence channels are not called via deliver by the router.

WebSocketChannel

WebSocketChannel(channel_id)

Bases: Channel

WebSocket transport channel with connection registry.

register_connection

register_connection(connection_id, send_fn)

Register a WebSocket connection.

unregister_connection

unregister_connection(connection_id)

Unregister a WebSocket connection.

WhatsAppChannel

WhatsAppChannel(channel_id, *, provider=None)

Create a WhatsApp transport channel.

MessengerChannel

MessengerChannel(channel_id, *, provider=None)

Create a Facebook Messenger transport channel.

HTTPChannel

HTTPChannel(channel_id, *, provider=None)

Create an HTTP webhook transport channel.