Publish To Channel • AI Agent SDK
publish_to_channel: Publish an event to all subscribers of a channel.
publish_to_channel
Async
Method
</div>
This is a method of the PushChannelProtocol class in the protocols module.
Publish an event to all subscribers of a channel.
Signature
async def publish_to_channel(channel_name: str, event: GatewayEvent, exclude: Optional[List[str]]) -> intParameters
ParamField
strTarget channel
ParamField
GatewayEventThe event to deliver
ParamField
OptionalOptional client IDs to skip
Returns
ResponseField
intNumber of clients the event was sent to
Source
View on GitHubpraisonaiagents/gateway/protocols.py at line 1896