A single agent juggling "research this, then write about it, then fact-check it" tends to blur all three jobs together in one undifferentiated context. Multi-agent frameworks split that into distinct roles that hand off work explicitly — CrewAI's take on this models each agent with a role, a goal, and a backstory, then assigns tasks across the crew.
Assembling a crew
1. Define each agent's role explicitly. A "researcher" agent and a "writer" agent get different goals and backstories, which shapes how each approaches its assigned tasks.
2. Define tasks, not just agents. Each task specifies what output is expected and which agent is responsible — this is what creates the actual handoff between agents.
3. Run the crew and let tasks flow between agents. A sequential process runs tasks in order, passing each task's output as context to the next.
# A two-agent CrewAI crew: researcher hands off to writer
from crewai import Agent, Task, Crew, Process
researcher = Agent(
role="Researcher",
goal="Find accurate, current facts about the given topic",
backstory="An analyst who cross-checks every claim before reporting it.",
)
writer = Agent(
role="Writer",
goal="Turn research findings into a clear summary",
backstory="A writer who never states a fact the research didn't provide.",
)
research_task = Task(
description="Research the current state of local LLM deployment tools.",
agent=researcher,
expected_output="A bullet list of key findings with sources.",
)
write_task = Task(
description="Write a short summary based on the research findings.",
agent=writer,
expected_output="A 3-paragraph summary.",
)
crew = Crew(agents=[researcher, writer], tasks=[research_task, write_task], process=Process.sequential)
result = crew.kickoff()
| Framework | Model | Status |
|---|---|---|
| CrewAI | Role-based crew, explicit task assignment | Actively maintained |
| AutoGen | Conversational, agents decide when to speak | Maintenance mode — merged into Microsoft Agent Framework |
The role-based structure is what makes a multi-agent crew debuggable — when something goes wrong, you can point to which agent's task produced the bad output, instead of untangling a single model's mixed-up reasoning about three jobs at once.
Practical Challenge
Extend the crew above with a third "fact-checker" agent whose task takes the writer's output and flags any claim not present in the researcher's findings.
Concept Check
Sources & Further Reading
- CrewAI (GitHub) — the open-source multi-agent framework used in this article's example.
- Microsoft AutoGen (GitHub) — referenced for context on its current maintenance-mode status.
AI