Subagent

From llmref.wiki
Subagent — A specialized agent invoked by an orchestrator agent to execute a discrete subtask within a larger workflow.

Overview

A subagent is an agent designed to handle a narrow, well-defined portion of work as part of a larger multi-agent orchestration. Rather than operating as a standalone system, a subagent is invoked by a parent orchestrator agent, which decomposes complex problems into simpler subtasks and routes them to the appropriate specialist.

The architectural pattern reflects a separation of concerns: the orchestrator handles planning, routing, and state management, while subagents focus solely on execution within their domain. This design enables improved reliability, modularity, and resource efficiency compared to monolithic agentic systems that attempt to handle all task variants internally.

Subagents may be implemented with identical or different underlying foundation models, fine-tuned weights, prompts, or tool integrations. The orchestrator maintains visibility into subagent results and may use LLM-as-judge evaluation, human feedback, or automated evaluation to assess whether a subtask was completed successfully before proceeding.

How it works

In a typical multi-agent workflow:

1. An orchestrator receives a user query or goal. 2. The orchestrator decomposes the goal into subtasks and determines which subagent(s) are best suited to each. 3. For each subtask, the orchestrator invokes a subagent, passing relevant context, prior results, and memory as needed. 4. The subagent executes its specialized function—which may involve retrieval-augmented generation, chain-of-thought reasoning, tool use, or self-evaluation—and returns a result. 5. The orchestrator collects results from all subagents, evaluates them (optionally using a critic agent for quality assurance), and either returns the final response or routes to further subagents for refinement.

Subagents may themselves be composite, invoking lower-level subagents. This hierarchical structure is common in systems designed to handle high task complexity while maintaining interpretability.

Communication between orchestrator and subagent typically occurs via structured context passing, shared memory stores, or knowledge graphs. The subagent's response often includes metadata (confidence scores, source attribution, intermediate reasoning) that aids orchestration decisions.

Distinction from related terms

Term Distinction
Agent vs. Agentic AI A subagent is always agentic (exhibiting iterative goal-seeking behavior). "Agent" is broader and may describe non-iterative tools. "Agentic AI" describes the operational style (planning, tool use, reflection), while "subagent" describes the structural role (invoked by a parent).
Multi-agent orchestration Multi-agent orchestration is the framework in which subagents operate. A subagent is a participant in an orchestration system; orchestration is the coordination pattern.
Critic agent A critic agent evaluates the output of other agents and typically reports to an orchestrator. A subagent executes a primary task. A critic subagent is a specialized subagent type whose subtask is evaluation.
Agentic workflow An agentic workflow is the sequence of steps an agent takes to solve a problem. A subagent is an architectural component that may follow one or more agentic workflows.
Retrieval-augmented generation (RAG) RAG is a technique (often used within subagents) for augmenting responses with external knowledge. A subagent is an architectural role; RAG is a capability. A subagent may use RAG, but RAG is not inherently agentic.

Examples

  • Question-answering over multiple data sources: An orchestrator receives a query about a company's quarterly earnings. It invokes a subagent specialized in financial document retrieval, another for competitor analysis, and a third for regulatory filings. Each subagent returns structured results; the orchestrator synthesizes them into a single response with source attribution.
  • ReAct-based web research: An orchestrator decomposes a research goal into subtasks. A search subagent formulates query rewrites and retrieves web results via an crawler. A reading comprehension subagent extracts relevant passages with semantic search. A synthesis subagent integrates findings and identifies potential hallucinations before returning results.

See also

References