liveBook · Manning

Subagent

As explained in Context Engineering

A subagent is an agent assigned a subordinate task within a larger agent-driven process.

A subagent handles a bounded task within a larger agent-driven process. It keeps its own context window, instructions, tool calls, observations, and reasoning path; a coordinator provides limited input and receives a compact result, not the full trajectory. section 7.5.2

Design the boundary around one concern:

  • Give the subagent a narrow task, minimum necessary input, limited tools, and an explicit output contract. section 7.5.2
  • Order dependent subtasks explicitly to avoid inconsistent intermediate states; account for the added coordination cost. section 7.5.2
  • Use subagents to isolate context; state partitioning selects fields for prompts, while environment sandboxing keeps runtime state outside prompt memory. section 7.5.2

How Context Engineering covers it

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.
How it connects
Connects subagents to coordinator agents, context windows, state partitioning, and environment sandboxing.

Also explained in

Compare how 7 books explain subagent →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Context Engineering. The section links point to the parts of the book it draws on.