> For the complete documentation index, see [llms.txt](https://docs.canso.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.canso.ai/ai-agents/concepts/broker.md).

# Broker

Broker is a key component in the Canso AI Agentic System that facilitates orchestration between the AI Agents and the [Canso Task Server](/ai-agents/concepts/task-server.md). It acts as an intermediary, receiving tasks from AI Agents and distributing them across task workers for processing.

![Role of the Broker](/files/X4FRWBAMTj2WxYVJNO8b)

> **Note**: Currently, only Redis is supported as a message broker. Support for RabbitMQ and Kafka will be added in future releases.

## Setting up the Broker

To set up the task server, define a YAML file:

```yaml
broker:
  type: redis
  name: my-redis
```

The table below explains the configuration attribues:

| Attribute | Description                 | Example             |
| --------- | --------------------------- | ------------------- |
| `type`    | Type of broker              | `redis`             |
| `name`    | Name of the broker instance | `agent-task-broker` |

Run the `gru` command to to set up the Broker:

```bash
gru component setup --cluster-name <cluster-name> --config-file config.yaml
```

## Tool Tips

* Go to [Introduction](/ai-agents/intro.md) ⬅️
* See [Task Server](/ai-agents/concepts/task-server.md) ➡️
* Learn about [Checkpoint DB](/ai-agents/concepts/db.md) ➡️
* Explore [Memory](/ai-agents/concepts/conversations.md) ➡
