📋Field ManualAI
Core PatternLast updated: January 29, 2026

Agent Orchestration Patterns

Task decomposition strategies, failure handling, and a production playbook for multi-agent systems. Synthesized from Anthropic, OpenAI, Microsoft, and CrewAI — validated through real autonomous agent operations.

Key Takeaway

Effective multi-agent orchestration is about choosing the right coordination pattern for the right problem, not maximizing agent count. Start with the simplest design (often a single augmented LLM), add agents only when measurably needed, and treat sub-agent prompts with the same rigor as API contract design.

The Core Question: When to Split

Split a task into multiple agents when any of these conditions hold:

  1. Context window overflow — too much information for a single prompt
  2. Different capabilities needed — research vs code generation vs validation
  3. Independent subtasks — pieces that don't depend on each other (parallelizable)
  4. Specialization improves quality — a focused prompt outperforms a kitchen-sink prompt
  5. Different model tiers needed — cheap model for classification, expensive for generation

Don't split when:

  • A single well-crafted prompt handles it reliably
  • Splitting adds coordination overhead that exceeds the quality gain
  • Subtasks are tightly coupled requiring constant back-and-forth
  • You're splitting "because agents are cool" rather than because it helps
"We recommend finding the simplest solution possible, and only increasing complexity when needed. This might mean not building agentic systems at all." — Anthropic, Building Effective Agents (2024)

Five Decomposition Strategies

Strategy 1: Functional Decomposition (by capability)

Split based on what each agent does. The most common and intuitive approach.

Task: "Research a topic and write a report"
→ Agent A: Researcher (web search, source evaluation)
→ Agent B: Writer (synthesis, formatting)
→ Agent C: Editor (quality check, fact verification)

When to use: Tasks with clearly separable phases requiring different skills. Most business workflows (research → analyze → produce) fit this pattern naturally.

Strategy 2: Data Decomposition (by input partition)

Split the same work across different data slices. All agents do the same thing, different inputs.

Task: "Analyze these 50 files for security vulnerabilities"
→ Agent 1-5: Each analyzes 10 files
→ Aggregator: Combines findings

When to use: Embarrassingly parallel workloads — file analysis, batch processing, data extraction across many sources.

Strategy 3: Perspective Decomposition (by viewpoint)

Multiple agents examine the same input from different angles.

Task: "Evaluate this code PR"
→ Agent A: Security reviewer
→ Agent B: Performance reviewer
→ Agent C: Maintainability reviewer
→ Aggregator: Unified review

When to use: When multiple expert perspectives improve confidence. Particularly effective for review, evaluation, and risk-assessment tasks.

Strategy 4: Stage Decomposition (by pipeline stage)

Linear pipeline where each stage transforms output for the next.

Task: "Generate a contract from client specs"
→ Stage 1: Template selection (specs → template)
→ Stage 2: Clause customization (template → draft)
→ Stage 3: Compliance review (draft → reviewed)
→ Stage 4: Final formatting (reviewed → contract)

When to use: Tasks with clear sequential dependencies where each stage's output is a well-defined input to the next.

Strategy 5: Recursive Decomposition (fractal breakdown)

The orchestrator agent can spawn sub-agents that can themselves spawn sub-sub-agents. Fractal structure for complex problems.

Task: "Build a complete web application"
→ Agent: Architecture (decomposes into modules)
  → Agent: Frontend (decomposes into components)
    → Agent: Header component
    → Agent: Dashboard component
  → Agent: Backend (decomposes into services)
    → Agent: Auth service
    → Agent: Data service

When to use: Large, complex tasks where the full decomposition isn't known upfront. Use with caution — costs compound exponentially.

Six Failure Patterns (and How to Recover)

FailureSymptomRecovery
Context LossAgent produces irrelevant output, ignores prior contextInclude key context excerpts directly in task spec, don't rely on agent re-reading files
Infinite LoopsAgent retries without progress, token count explodesSet explicit retry limits (max 3), include "if stuck, report what you tried"
Goal DriftAgent optimizes for sub-goals that diverge from main objectiveInclude success criteria in task spec, use checkpoints for long tasks
Resource ExhaustionToken budget exceeded, sub-agents spawning sub-agentsSet token budgets per task, limit recursion depth, prefer flat over deep
Format MismatchOne agent's output doesn't match next agent's expected inputDefine explicit input/output schemas, include format examples
Coordination DeadlockAgents waiting on each other in circular dependencyMap dependencies before spawning, avoid circular graphs, use timeouts

The 10-Rule Production Playbook

  1. Start with one agent. Add more only when you hit a measurable wall.
  2. Treat task specs like API contracts. Ambiguity in → garbage out.
  3. Include environment context. OS, tools, constraints, known quirks — every time.
  4. Define "done" before starting. Observable, verifiable success criteria.
  5. Prefer flat over deep. One orchestrator + N workers beats deep nesting.
  6. Budget tokens explicitly. Set limits. Sub-agents compound costs exponentially.
  7. Don't delegate what you've already loaded. If you read all the files, just do the work.
  8. Use the right model tier. Haiku for classification, Sonnet for generation, Opus for judgment.
  9. Include failure protocols. What should the agent do when stuck? Report, not loop.
  10. Capture learnings. Every orchestration decision improves the next one — if you write it down.

Choosing the Right Pattern

PatternBest ForAvoid WhenCoordination Cost
FunctionalMulti-phase workflows (research → write → review)Phases are tightly coupledMedium
DataBatch processing, parallel analysisItems have interdependenciesLow
PerspectiveReviews, evaluations, risk assessmentOne correct answer existsLow-Medium
StageClear sequential pipelinesStages need to backtrackMedium
RecursiveComplex, unknown-scope problemsBudget is limited, scope is clearHigh

FAQ

What are the best AI agent orchestration frameworks?

The leading AI agent orchestration frameworks in 2026 are Anthropic's Claude (tool use + computer use), OpenAI's Agents SDK, LangGraph, CrewAI, and Microsoft AutoGen/MagenticOne. The best choice depends on your coordination pattern and use case. For CLI-based orchestration, Anthropic's patterns work particularly well because Claude excels at complex reasoning and following detailed system prompts.

How many agents should I use for a task?

Start with one. Seriously. The most common mistake in agent orchestration is over-decomposition — splitting tasks that a single well-crafted prompt handles perfectly. Add a second agent only when you can measure the improvement. In practice, most tasks are best handled by 1-3 agents; systems with 5+ agents should be reserved for genuinely complex workflows.

How do I prevent token waste in multi-agent systems?

Three strategies: (1) Include environment context and key file excerpts directly in task specs — don't force agents to rediscover what you already know. (2) Set explicit token budgets and retry limits per agent. (3) Apply the delegation decision tree: only delegate when the context transfer cost is less than the execution cost of doing it yourself.