Squash-merge verified routing remediation at exact head 690f9c14b0. Required validate and paired evaluation checks passed; advisory droid review had no blocking findings.
Build role-based multi-agent systems with CrewAI. Agents with Role/Goal/Backstory, task design, crew composition (sequential or hierarchical), tool integration, callbacks, and production deployment. Use when orchestrating multi-agent teams or comparing agent frameworks. Do not use this skill for unrelated requests; route to the nearest named specialist.
CrewAI is a framework for role-based multi-agent orchestration. Unlike LangGraph's low-level state-machine graphs, CrewAI provides a higher abstraction: agents are defined as Roles with Goals and Backstories, crews are composed with built-in sequential or hierarchical workflows, and inter-agent delegation is built into the framework.
Core Paradigm
fromcrewaiimportAgent,Task,Crew,Processfromcrewai.toolsimporttool@tool("search")defsearch_web(query:str)->str:"""Search the web for information."""returnf"Results for: {query}"researcher=Agent(role="Senior Researcher",goal="Find accurate information on any topic",backstory="Expert researcher with 10 years of experience",tools=[search_web],verbose=True,)writer=Agent(role="Technical Writer",goal="Write clear reports from research findings",backstory="Experienced technical writer",verbose=True,)research_task=Task(description="Research the topic thoroughly",expected_output="A detailed research brief",agent=researcher,)write_task=Task(description="Write a report based on research",expected_output="A well-structured report",agent=writer,)crew=Crew(agents=[researcher,writer],tasks=[research_task,write_task],process=Process.sequential,verbose=True,)result=crew.kickoff()
Core Principles
Agents are Roles, not functions. Role + Goal + Backstory defines the agent's identity. Strong role definitions reduce hallucination.
Tasks declare what, not how. Description + expected_output defines the task. The agent figures out execution.
Sequential is for pipelines, Hierarchical is for complexity. Sequential runs tasks in order. Hierarchical uses a manager agent to delegate and validate.
Manager LLM is required for Hierarchical. Without manager_llm, hierarchical process fails silently.
Delegation loops are real.allow_delegation=True without max_iter bounds can cause infinite handoffs.
Tool errors don't raise. A failed tool call marks the task as failed but doesn't raise an exception. Check task output.