🗓️ 21032026 2100

AGENT AS TOOL PATTERN

Primary agent maintains full control and state, using sub-agents as stateless tools

How It Works

  1. Primary agent owns the entire workflow and state
  2. Calls sub-agents as stateless functions — they execute a specific task and return results
  3. Primary agent decides what to do next based on returned results
  4. Sub-agents have no awareness of the broader workflow

Key Difference from Coordinator

CoordinatorAgent as Tool
ControlDelegates control to sub-agentsPrimary agent retains full control
StateSub-agents may manage their own stateSub-agents are stateless
AnalogyManager delegating workCraftsman using tools

When to Use

  • Primary agent needs fine-grained control over workflow progression
  • Workflow state must be centrally managed (e.g., decisions depend on accumulated context)
  • Sub-agent outputs need to be composed or transformed before the next step

Trade-offs

ProsCons
Centralized state = easier to reason about overall flowPrimary agent becomes a bottleneck
Fine-grained decision making between stepsSimilar structural complexity to coordinator
Sub-agents are simpler (stateless, single-purpose)Primary agent prompt can grow complex

References