Agent Creation Patterns
These patterns address a fundamental question: how should agents be structured?
Every agentic system starts with a decision about scope, authority, and coordination. A single agent handling everything is the simplest architecture — but it breaks down as tasks grow in complexity. When that happens, you need to decide how agents relate to each other: through fixed roles, hierarchical delegation, or peer-to-peer handoffs.
The patterns below move from simple to complex. Start with the simplest pattern that solves your problem.
Patterns
| Pattern | Description | Agents | Coordination |
|---|---|---|---|
| Single Agent | One agent handles the entire task end-to-end | 1 | None |
| Role-Based Agent | Fixed behavioral roles — plan, execute, review | Few | Router assigns by role |
| Hierarchical Agent | Tree structure with parent-child delegation | Many | Top-down supervision |
| Swarm Agent | Peer agents coordinating through handoffs | Many | Emergent, peer-to-peer |
How to Choose
Start with Single Agent if the task fits in one context window and doesn't need separated reasoning phases. Most prototypes should start here.
Move to Role-Based when you notice a single agent conflating planning with execution, or when you need independent review and critique of outputs.
Move to Hierarchical when tasks require multi-level decomposition — a manager breaks work into subtasks, each of which may need further breakdown.
Move to Swarm when no single agent can predict what expertise is needed, and you want agents to self-organize through handoffs rather than top-down control.