# 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) ➡


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.canso.ai/ai-agents/concepts/broker.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
