Skip to content

Hierarchical Crew

This component in Nappai lets you create and manage teams of AI agents that work together on tasks, following a clear organizational structure. It’s like assigning roles and responsibilities within a team to ensure tasks are completed efficiently.

Relationship with CrewAI

This component uses the CrewAI library to manage the hierarchical structure and collaboration between your AI agents. CrewAI handles the complex coordination behind the scenes, allowing you to focus on defining the team and its tasks.

Inputs

  • Agents: A list of the individual AI agents you want to include in your team. You can add multiple agents to work together.
  • Tasks: A list of the tasks you want your team to complete. Each task needs to be clearly defined.
  • Manager LLM (Optional): A large language model (LLM) that can help manage and coordinate the team’s work. This is optional; the component can function without it.
  • Manager Agent (Optional): A specific AI agent that acts as the team leader, coordinating the other agents. This is also optional.

Outputs

This component doesn’t have direct output variables you’ll see in the dashboard. Instead, it creates a configured “Crew” object internally. This object manages the team’s work and ensures tasks are completed according to the hierarchical structure you’ve defined. The results of the team’s work will be visible through the other components connected to this one.

Usage Example

Imagine you need to analyze a large dataset, summarize the findings, and then create a presentation. You could:

  1. Add Agents: Include agents specialized in data analysis, summarization, and presentation creation.
  2. Add Tasks: Define tasks like “Analyze Dataset,” “Summarize Findings,” and “Create Presentation.”
  3. Configure Hierarchy: Set up the agents and tasks in a hierarchy, perhaps with the analysis agent feeding its results to the summarization agent, and the summarization agent feeding its output to the presentation agent.
  4. Run the Crew: Nappai will then manage the workflow, ensuring each agent completes its assigned task in the correct order.

Templates

This component is used in the following Nappai templates:

  • Complex Agent
  • Hierarchical Tasks Agent

The Hierarchical Crew component often works with other components in Nappai, such as:

  • Various AI Agents: These are the individual workers within your hierarchical team.
  • Task Definition Components: These components help you define the specific tasks for your agents.

(Note: A full list of related components is provided in the technical documentation, but a simplified list is provided here for clarity.)

Tips and Best Practices

  • Clearly define your tasks and the expected output for each.
  • Choose agents with the appropriate skills for each task.
  • Consider using a Manager LLM or Agent for complex workflows to improve coordination.
  • Start with a simple hierarchy and gradually increase complexity as needed.

Security Considerations

Ensure that the AI agents and LLMs you use are from trusted sources and configured with appropriate security settings. Review the security settings of any connected components to maintain data privacy and integrity.