Subagent
A subagent is an agent assigned by another agent to perform a delegated part of a larger task under its coordination or authority.
Build a Multi-Agent System (from Scratch)
A subagent is an agent dispatched by another agent to work on a subtask contributing to an overall task.
- How it is used
- Uses delegated agents to isolate and specialize subtasks within a coordinated multi-agent system.
- How deep it goes
- Implements registry-based dispatch, argument validation, agent construction, result handling, and coordinator integration.
- Examples
- Uses specialized food searches and concurrent Hailstone sequence tasks to illustrate delegation and aggregation.
- What you can do after
- Build it from scratch using subagent specifications, a dispatch tool, and coordinator integration.
Read how Build a Multi-Agent System (from Scratch) explains subagent →
Vibe Engineering
A subagent is a specialized AI assistant that independently performs a delegated task with its own context, prompt, tools, and permissions.
- How it is used
- Uses specialized subagents to delegate tasks without carrying forward a growing conversation.
- How deep it goes
- Explains fresh-context execution and persisted project state, but does not detail subagent configuration or implementation.
- Examples
- Illustrates a research subagent and fresh task agents in GSD, with plans and validation contracts stored in .planning/.
- What you can do after
- Evaluate subagent delegation against compaction by considering context isolation and the need for explicit, persisted task state.
Claude at Work
A subagent is an agent assigned work by another agent, typically operating in a separate context.
- How it is used
- Delegates research, planning, and review to separate sessions while keeping the main conversation focused.
- How deep it goes
- Explains invocation, permission checks, context isolation, agent roles, and result handoff, then demonstrates coordinated parallel planning.
- Examples
- Uses component test delegation and six parallel slice planners coordinated through shared contracts and subsequent reviews.
- What you can do after
- Apply it via Claude Code to delegate tasks with explicit prompts and coordinate parallel planning and review.
Agent Design Patterns
An agent that operates under the coordination or supervision of another agent.
- How it is used
- Uses subagents as task specialists coordinated by a supervisor or selected by a router for incoming requests.
- How deep it goes
- Shows supervised composition in a Python listing and outlines router components, but does not provide a router implementation.
- Examples
- Uses a mortgage-analyst team and support-line dispatch to illustrate supervision and specialist selection.
- What you can do after
- Build it from scratch by registering specialist ReAct agents under a supervisor, or evaluate routing as an alternative delegation design.
Designing AI Agents
An agent assigned a bounded portion of a larger task or delegated plan.
- How it is used
- Delegates bounded execution while a primary agent retains the shared goal and integration authority.
- How deep it goes
- Specifies handoff fields, exception reporting, runtime boundaries, manager responsibilities, and operational metrics.
- Examples
- Illustrates dependent research, implementation, and verification tasks, and a bug fix that isolates search and test output.
- What you can do after
- Evaluate when delegation benefits outweigh coordination costs using task success, latency, token cost, and debugging effort.
Grokking AI Applications
A specialized agent that performs a delegated part of a larger task under the coordination of another agent.
- How it is used
- Uses specialized agents to divide complex workflows while a coordinator routes tasks among them.
- How deep it goes
- Explains roles, delegation, focused tools, and hierarchical composition, but defers detailed implementation to later treatment.
- Examples
- Uses customer-success, project-management, and compliance-review coordinators with domain-specific assistants.
- What you can do after
- Build modular agent workflows by assigning narrow responsibilities and composing subagents under a coordinator.
Context Engineering
A subagent is an agent assigned a subordinate task within a larger agent-driven process.
- How it is used
- Isolates context by delegating bounded subtasks to separate agents within a larger agent-driven process.
- How deep it goes
- Specifies task boundaries, inputs, tools, output contracts, and dependency ordering, but leaves detailed state-object design elsewhere.
- Examples
- Assigns research, coding, testing, security review, or data analysis to separate subagents.
- What you can do after
- Build it from scratch by assigning a bounded concern, limited input and tools, and an explicit result contract.
Also covered in
What to know first
- context windowA context window is a bounded span of sequence elements or contextual information that a model or processing operation can consider together.
- promptA prompt is text or other input supplied to an AI model to provide instructions, context, or other information that guides its response or generated output.
- AI agentAn AI agent is a computational system that uses artificial intelligence to interpret information and select or perform actions toward goals while interacting with an environment.
- code reviewCode review is the systematic examination of source code or proposed changes to assess correctness, quality, risks, or conformance to requirements or standards.
Related concepts
- Claude Codeused by · Claude Code is Anthropic’s command-line AI coding agent for inspecting and modifying codebases and carrying out software-development tasks through natural-language interaction and tools.
- context windowuses · A context window is a bounded span of sequence elements or contextual information that a model or processing operation can consider together.
- coordinator agentused by · A coordinator agent directs work in a multi-agent system by assigning tasks to subordinate agents and receiving their results.
- routerused by · A router is a component that directs an incoming request or task to a destination or processing path according to routing criteria.
- A2A agentcontrasts with · An A2A agent is an agent accessible to other agents through the Agent2Agent protocol without exposing its internal processes.
- agent skilluses · An agent skill is a reusable package of instructions, capabilities, or resources that guides an AI agent in carrying out a task or workflow.
Questions about subagent
What is subagent?
A subagent is an agent assigned by another agent to perform a delegated part of a larger task under its coordination or authority.
Which Manning books explain subagent?
Build a Multi-Agent System (from Scratch), Vibe Engineering, Claude at Work, Agent Design Patterns, Designing AI Agents, Grokking AI Applications and Context Engineering.
What should I know before learning subagent?
Manning books that teach subagent usually introduce context window, prompt, AI agent and code review first.
What is the difference between subagent and A2A agent?
A subagent is an agent assigned by another agent to perform a delegated part of a larger task under its coordination or authority. An A2A agent is an agent accessible to other agents through the Agent2Agent protocol without exposing its internal processes.
These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.






