# Broker

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

![Role of the Broker](https://4002575704-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FcE4BqP2R5KBg2It3L34D%2Fuploads%2Fgit-blob-36880d599830592f3b2db73b858e4632e543afdd%2Fbroker.png?alt=media)

> **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](https://docs.canso.ai/ai-agents/intro) ⬅️
* See [Task Server](https://docs.canso.ai/ai-agents/concepts/task-server) ➡️
* Learn about [Checkpoint DB](https://docs.canso.ai/ai-agents/concepts/db) ➡️
* Explore [Memory](https://docs.canso.ai/ai-agents/concepts/conversations) ➡
