Reference · Glossary

CrewAI

Last updated

A framework for assembling a **"crew" of role-based agents** (e.g. researcher, writer, editor) that hand work to each other in a defined process — sequential or manager-led — to finish one larger task.

#When to use

Tasks that naturally split into specialist roles with a clear handoff order, like research → draft → review, where each agent gets a focused prompt and toolset.

#When not to

A single well-scoped task one agent (or even one prompt) can do — multiple roles add coordination overhead without adding capability.

#Example

from crewai import Agent, Task, Crew
researcher = Agent(role="Researcher", goal="Find key facts about the topic")
writer = Agent(role="Writer", goal="Draft a clear summary from the research")
crew = Crew(agents=[researcher, writer], tasks=[
    Task(description="Research RAG evaluation methods", agent=researcher),
    Task(description="Write a 200-word summary", agent=writer),
])
print(crew.kickoff())