Agentic patterns for Claude Code, mapped to Anthropic's "Building Effective Agents" taxonomy.
From a single augmented call to coordinated multi-agent fleets — every pattern with a diagram, a decision rule, and a link to the authoritative doc.
Foundations · Workflows · Autonomous · Orchestration · Implementation · Guides · Reference
%%{init: {'theme': 'base', 'themeVariables': {'lineColor': '#898781', 'fontFamily': 'system-ui, -apple-system, Segoe UI, sans-serif'}}}%%
mindmap
root((Agentic Systems))
Foundations
Augmented LLM
Workflows
Baseline
Prompt Chaining
Routing
Parallelization
Orchestrator-Workers
Evaluator-Optimizer
Autonomous Agent
The Alternative
Multi-Window
Orchestration
Workflow Tool
Agent Teams
Background Agents
Forks
Monitors
Worktrees
Checkpointing
Implementation
Subagent
Slash Command
Skill
Hook
|
The building block for everything
Predefined orchestration — code controls the path
Dynamic autonomy — the LLM controls the path
|
Current Claude Code coordination tooling
Claude Code components & architecture
|
%%{init: {'theme': 'base', 'themeVariables': {'lineColor': '#898781', 'fontFamily': 'system-ui, -apple-system, Segoe UI, sans-serif'}}}%%
flowchart LR
classDef decision fill:#fff7e6,stroke:#eda100,stroke-width:2px,color:#0b0b0b
classDef main fill:#eef4fd,stroke:#2a78d6,stroke-width:2px,color:#0b0b0b
classDef sub fill:#efedf9,stroke:#4a3aa7,stroke-width:2px,color:#0b0b0b
classDef tool fill:#f4f4f2,stroke:#898781,stroke-width:2px,color:#0b0b0b
START((Task)):::decision --> DEST{Destructive?}:::decision
DEST -->|Yes| WIZ[Wizard]:::tool
DEST -->|No| COMP{Complex?}:::decision
COMP -->|No| BASE[Baseline]:::tool
COMP -->|Yes| PRED{Predictable steps?}:::decision
PRED -->|No| AGENT[Autonomous]:::sub
PRED -->|Yes| WORK{Need specialists?}:::decision
WORK -->|No| CHAIN[Chain]:::main
WORK -->|Yes| ORCH[Orchestrator]:::main
| Situation | Use |
|---|---|
| Simple task (1 step) | Baseline |
| Sequential (2–4 steps) | Prompt Chaining |
| Categorize inputs | Routing |
| Independent subtasks | Parallelization |
| Multiple specialists | Orchestrator-Workers |
| Quality iteration | Evaluator-Optimizer |
| Open-ended / unknown steps | Autonomous Agent |
| Deterministic fan-out over a work-list | Workflow Tool |
| Messaging peers + shared task board | Agent Teams |
| Destructive operations | Wizard |
| Long-running (>10 min) | Multi-Window Context |
%%{init: {'theme': 'base', 'themeVariables': {'lineColor': '#898781', 'fontFamily': 'system-ui, -apple-system, Segoe UI, sans-serif'}}}%%
flowchart LR
classDef workflowBox fill:#eef4fd,stroke:#2a78d6,stroke-width:2px,color:#0b0b0b
classDef agentBox fill:#efedf9,stroke:#4a3aa7,stroke-width:2px,color:#0b0b0b
classDef control fill:#f4f4f2,stroke:#898781,stroke-width:2px,color:#0b0b0b
subgraph WORKFLOWS["WORKFLOWS"]
direction TB
W1[Baseline]
W2[Prompt Chaining]
W3[Routing]
W4[Parallelization]
W5[Orchestrator-Workers]
W6[Evaluator-Optimizer]
end
subgraph AGENTS["AUTONOMOUS AGENT"]
direction TB
A1[The Alternative]
A2[Multi-Window variant]
end
CODE[Code controls]:::control --> WORKFLOWS
WORKFLOWS --> LLM[LLM controls]:::control
LLM --> AGENTS
WORKFLOWS:::workflowBox
AGENTS:::agentBox
Key distinction: workflows have predefined paths (code controls). Agents decide their own path (the LLM controls).
The common belief that "subagents cannot spawn subagents" is false in current Claude Code.
%%{init: {'theme': 'base', 'themeVariables': {'lineColor': '#898781', 'fontFamily': 'system-ui, -apple-system, Segoe UI, sans-serif'}}}%%
flowchart LR
classDef user fill:#f9f9f7,stroke:#52514e,stroke-width:2px,color:#0b0b0b
classDef main fill:#eef4fd,stroke:#2a78d6,stroke-width:2px,color:#0b0b0b
classDef sub fill:#efedf9,stroke:#4a3aa7,stroke-width:2px,color:#0b0b0b
classDef good fill:#e7f6e7,stroke:#0ca30c,stroke-width:2px,color:#0b0b0b
classDef error fill:#fbeaea,stroke:#d03b3b,stroke-width:2px,color:#0b0b0b
U1[User]:::user -->|request| MA[Main Agent]:::main
MA -->|spawn| SA1["general-purpose — has Agent tool"]:::sub
MA -->|spawn| SA2["Explore / Plan — no Agent tool"]:::sub
SA1 -->|result| MA
SA2 -->|result| MA
MA -->|response| U2[User]:::user
SA1 -.->|"can spawn — discipline choice"| SA3[nested]:::good
SA2 x--x|"cannot — no Agent tool"| SA4[blocked]:::error
A subagent can spawn further subagents — if and only if its tool grant includes the
Agenttool. The defaultgeneral-purposehas it (a real post-mortem saw 3 agents fan out to 15); the read-onlyExploreandPlandon't. Nesting is a discipline choice, not a platform ban. The three coordination models — subagent tree, agent teams, and the Workflow tool — are mapped in Orchestration.
.
├── README.md # You are here
│
├── foundations/ # Core concepts
│ └── augmented-llm.md
│
├── workflows/ # Predefined orchestration
│ ├── 00-baseline.md
│ ├── 01-prompt-chaining.md
│ ├── 02-routing.md
│ ├── 03-parallelization.md
│ ├── 04-orchestrator-workers.md
│ └── 05-evaluator-optimizer.md
│
├── agents/ # Autonomous Agent (the alternative)
│ ├── autonomous.md
│ └── multi-window.md
│
├── orchestration/ # Current Claude Code coordination tooling
│ ├── workflow-tool.md
│ ├── agent-teams.md
│ ├── background-agents.md
│ ├── forks.md
│ ├── monitors.md
│ ├── worktrees.md
│ └── checkpointing.md
│
├── implementation/ # Claude Code specifics
│ ├── components/ # Subagent, Command, Skill, Hook, …
│ └── architecture/ # 5-layer system
│
├── guides/ # Selection & use cases
│ └── use-cases/ # Six validated examples
│
└── reference/ # Glossary, standards, frontmatter, env vars
| Resource | Link |
|---|---|
| Building Effective Agents | anthropic.com/engineering |
| Claude Code Docs | code.claude.com/docs |
| Agent SDK | code.claude.com/docs/en/agent-sdk |
| Anthropic Cookbook | github.com/anthropics/anthropic-cookbook |
Contributions welcome. See CONTRIBUTING.md.
Requirements: official sources · code examples · mermaid diagrams following the Visual Standards · established page format.