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

# create Pub Sub • TypeScript AI Agent SDK

> createPubSub: API reference for createPubSub

# createPubSub

<div className="flex items-center gap-2">
  <Badge color="teal">Function</Badge>
</div>

> This function is defined in the [**events**](../modules/events) module.

## Signature

```python theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
def createPubSub() -> EventEmitterPubSub
```

### Returns

<ResponseField name="Returns" type="EventEmitterPubSub">
  The result of the operation.
</ResponseField>

## Uses

* `EventEmitterPubSub`

## Source

<Card title="View on GitHub" icon="github" href="https://github.com/MervinPraison/PraisonAI/blob/main/src/praisonai-ts/src/events/index.ts#L182">
  `src/events/index.ts` at line 182
</Card>

***

## Related Documentation

<CardGroup cols={2}>
  <Card title="JS PubSub" icon="tower-broadcast" href="/docs/js/pubsub" />
</CardGroup>
