Skip to content

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

ConnectionWhat to connect
AgentsThe team members: one or more CrewAI Agent.
TasksThe team’s tasks: one or more Hierarchical Task.
ModelAn AI model component that acts as the team manager.
ManagerInstead 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

FieldWhat it does
MemoryThe team keeps a shared memory across tasks. Default: off.
CacheReuses a tool’s result when it is asked exactly the same thing again. Default: on.
Max RPMMaximum number of requests per minute the team makes to the AI model. Default: 100.
VerboseLevel of detail of the execution record. Default: 0.
Share CrewShares information about the team’s run with the CrewAI service. Default: off. Leave it off.
Function Calling LLMConnection 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.