Skip to main content

Overview

Collaboration in CrewAI enables agents to work together as a team by delegating tasks and asking questions to leverage each other’s expertise. When allow_delegation=True, agents automatically gain access to powerful collaboration tools.

Quick Start: Enable Collaboration

How Agent Collaboration Works

When allow_delegation=True, CrewAI automatically provides agents with two powerful tools:

1. Delegate Work Tool

Allows agents to assign tasks to teammates with specific expertise.

2. Ask Question Tool

Enables agents to ask specific questions to gather information from colleagues.

Collaboration in Action

Here’s a complete example showing agents collaborating on a content creation task:

Collaboration Patterns

Pattern 1: Research → Write → Edit

Pattern 2: Collaborative Single Task

Hierarchical Collaboration

For complex projects, use a hierarchical process with a manager agent:

Best Practices for Collaboration

1. Clear Role Definition

2. Strategic Delegation Enabling

3. Context Sharing

4. Clear Task Descriptions

Troubleshooting Collaboration

Issue: Agents Not Collaborating

Symptoms: Agents work in isolation, no delegation occurs

Issue: Too Much Back-and-Forth

Symptoms: Agents ask excessive questions, slow progress

Issue: Delegation Loops

Symptoms: Agents delegate back and forth indefinitely

Advanced Collaboration Features

Custom Collaboration Rules

Monitoring Collaboration

Memory and Learning

Enable agents to remember past collaborations:
With memory enabled, agents learn from previous collaborations and improve their delegation decisions over time.

Next Steps

  • Try the examples: Start with the basic collaboration example
  • Experiment with roles: Test different agent role combinations
  • Monitor interactions: Use verbose=True to see collaboration in action
  • Optimize task descriptions: Clear tasks lead to better collaboration
  • Scale up: Try hierarchical processes for complex projects
Collaboration transforms individual AI agents into powerful teams that can tackle complex, multi-faceted challenges together.