Agentic Workflow Patterns
5 min read Quiz at the end
Sequential, parallel, supervisor, reflection, and debate patterns — match pattern to task structure.
Agentic Workflow Design Patterns
| Pattern | Description | When to Use |
|---|
| Sequential | A->B->C linear pipeline | Fixed step tasks |
| Parallel | A+B+C concurrent agents | Independent subtasks |
| Supervisor | Manager delegates to workers | Complex task routing |
| Reflection | Agent critiques own output | Quality improvement |
| Debate | Agents argue different positions | Decision making |
| MapReduce | Split task, agents run in parallel, merge | Large data processing |
| Retry | Agent retries with feedback on failure | Reliability |
# Parallel agent pattern
import asyncio
async def parallel_research(topics: list[str]) -> list[str]:
"""Research multiple topics concurrently."""
tasks = [research_agent(topic) for topic in topics]
results = await asyncio.gather(*tasks, return_exceptions=True)
return [r if not isinstance(r,Exception) else str(r) for r in results]
# Supervisor pattern
def supervisor_agent(complex_task: str) -> str:
subtasks = planner.split_task(complex_task)
results = [worker.execute(t) for t in subtasks]
return synthesiser.combine(results)
Topic Quiz · 1 questions
Test your understanding before moving on
1. What is the supervisor pattern in multi-agent systems?
💡 The supervisor receives a complex goal, breaks it down, and routes subtasks to the most appropriate agent.