Skip to content

Hierarchical Crew

The Hierarchical Crew component lets you set up a group of AI agents that collaborate in a top‑down structure. You define the agents, the tasks they need to finish, and optionally a manager agent or a special language model. When you run the workflow, the component builds the crew, assigns the tasks, and runs everything automatically.

How it Works

The component builds a Crew object from the CrewAI library.

  • It takes the list of agents you provide and the list of hierarchical tasks.
  • It can use a special manager agent that oversees the whole team, or a manager language model that helps the manager decide what to do.
  • The crew runs in hierarchical mode, meaning the manager gives high‑level instructions and the lower‑level agents carry them out.
  • Optional settings such as max RPM (requests per minute), memory, cache, share crew, and verbose control how the crew behaves and how much information it keeps or logs.

No external APIs are called directly by this component; it relies on the CrewAI library and any language models you connect to it.

Inputs

  • Agents: A list of AI agents that will work together.
  • Function Calling LLM: Turns the ReAct CrewAI agent into a function‑calling agent, allowing it to call external APIs or services.
  • Manager: An optional top‑level agent that oversees the whole crew.
  • Model: An optional language model used by the manager agent.
  • Tasks: A list of hierarchical tasks that the crew should accomplish.
  • Max RPM: The maximum number of requests per minute the crew can make.
  • Memory: How much past conversation the agents remember.
  • Share Crew: If set to true, the crew can be shared with other users or components.
  • Cache: If true, the component caches results to speed up repeated runs.
  • Verbose: If true, the component outputs detailed logs during execution.

Outputs

  • Output: A Message object that contains the final result of the crew’s work. This can be passed to other components or displayed in the dashboard.

Usage Example

  1. Create agents

    • DataCleaner – cleans raw data.
    • DataValidator – checks data quality.
    • Manager – coordinates the two agents.
  2. Define tasks

    • CleanData – assigned to DataCleaner.
    • ValidateData – assigned to DataValidator.
    • ReviewResults – assigned to Manager.
  3. Configure the Hierarchical Crew

    • Drag the Hierarchical Crew component onto the canvas.
    • Connect the agents list, tasks list, and the manager agent.
    • Optionally set Max RPM to 60 and enable Cache.
  4. Run

    • Click “Run” and watch the manager give instructions while the agents perform their tasks.
    • The final cleaned and validated data appears in the Output message.
  • Agent – defines a single AI agent.
  • HierarchicalTask – defines a task that can be broken into subtasks.
  • Crew – the underlying library object that manages agents and tasks.
  • LanguageModel – a model that can be used for the manager or function calling.

Tips and Best Practices

  • Keep the number of agents moderate; too many can slow down the crew.
  • Use clear, concise task descriptions so agents understand what to do.
  • Enable Cache when running the same workflow repeatedly to save time.
  • Set Max RPM according to your API limits to avoid throttling.
  • Turn on Verbose only when debugging; it can produce a lot of logs.

Security Considerations

  • Any text sent to a language model may leave the local environment; ensure compliance with your data‑privacy policies.
  • Use secure connections (HTTPS) when the component interacts with external APIs via function calling.
  • Review the permissions of the manager agent to avoid unintended actions.