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

# broadcast • AI Agent SDK

> broadcast: Broadcast an event to all connected clients.

# broadcast

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

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

Broadcast an event to all connected clients.

## Signature

```python theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
async def broadcast(event: GatewayEvent, exclude: Optional[List[str]]) -> None
```

## Parameters

<ParamField query="event" type="GatewayEvent" required={true}>
  The event to broadcast
</ParamField>

<ParamField query="exclude" type="Optional" required={false}>
  Optional list of client IDs to exclude
</ParamField>

## Source

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