Hierarchical Crew
The Hierarchical Crew component brings together a team of AI agents and gives them a list of tasks, like a team with a manager in charge. The manager decides which agent does each task, reviews what they deliver and puts together the final answer. Tasks are not assigned to an agent in advance: the manager does the assigning.
Use it when the work has several parts and it is not clear in advance who should do each one, or when you want someone to supervise and validate the work of the others.
When to use it
- Prepare a sales proposal with a team of researcher, writer and reviewer, letting the manager coordinate.
- Handle a complex customer query that may need different specialists.
- Produce an analysis where some parts depend on what others find.
- Check the quality of several agents’ work before giving an answer.
Configuration
| Connection | What to connect |
|---|---|
| Agents | The team members: one or more CrewAI Agent. |
| Tasks | The team’s tasks: one or more Hierarchical Task. |
| Model | An AI model component that acts as the team manager. |
| Manager | Instead of a model, a CrewAI Agent that acts as the manager, with its own role and goal. |
Connect Model or Manager: the team needs a manager to work.
Advanced options
| Field | What it does |
|---|---|
| Memory | The team keeps a shared memory across tasks. Default: off. |
| Cache | Reuses a tool’s result when it is asked exactly the same thing again. Default: on. |
| Max RPM | Maximum number of requests per minute the team makes to the AI model. Default: 100. |
| Verbose | Level of detail of the execution record. Default: 0. |
| Share Crew | Shares information about the team’s run with the CrewAI service. Default: off. Leave it off. |
| Function Calling LLM | Connection for an AI model the agents use to call their tools. If you connect nothing, each agent uses its own. |
Output
Output: the text with the team’s final answer. Connect it to a Chat Output to show it, or to any component that takes text, such as a document generator.
Example
Inmobiliaria Sol del Este wants to prepare sales sheets for its flats. It creates three agents (a neighbourhood researcher, a writer and a style reviewer), two tasks (“Describe the services around Calle Alcalá 120” and “Write an appealing 150-word sales sheet”) and connects an AI model to Model. The manager hands out the tasks, asks for revisions if needed and returns the finished sheet.
Good practices
- Write tasks with a clear expected output: it is what the manager uses to decide whether the work is done.
- If you always know which agent does each task, use a Sequential Crew: it is more predictable.