# What is Subagent? Also called child agent, worker agent. A subagent is an agent instance created by another agent to carry out a bounded part of a larger task and return a result to its caller. It usually receives its own instructions, tool set, and context window, and its intermediate steps stay hidden from the parent, which observes only the returned output. Subagents exist mainly to manage context. A long investigation can consume far more input than a single context window holds, so the parent delegates the reading and searching to a subagent and receives a short summary instead of the raw material. The parent's own context stays small, which keeps its reasoning focused and its costs bounded across a long session. A subagent is defined by four things: the instructions it is given, the tools it may call, the model that runs it, and the shape of the result it must return. Restricting tools is a common safety measure, since a research subagent that can only read is incapable of writing files or sending messages even if its instructions are manipulated. The main cost is information loss. Whatever the subagent chose not to include in its summary is unavailable to the parent, and the parent cannot easily tell the difference between a thorough search that found nothing and a shallow one. Vague delegation instructions produce vague summaries, so the returned format is usually specified explicitly. Subagents may run sequentially or in parallel. Parallel fan out suits independent read only work such as searching several directories at once. It suits shared writes poorly, because two subagents editing the same resource have no shared view of each other's changes and will silently conflict. ## Key points - Isolates a subtask in its own context window - Parent sees the summary, not the intermediate steps - Tool restriction is the usual safety boundary - Parallel fan out fits independent read only work - Summarization loses detail the parent cannot recover ## In practice A parent agent asked to audit a codebase for unused configuration spawns four read only subagents, one per top level directory. Each greps its directory, reads candidate files, and returns a list of suspect keys with file paths and line numbers. The parent receives four short lists instead of thousands of lines of source, merges them, removes duplicates, and produces a single report without ever loading the files itself. ## Related terms - [Multi-Agent System](/en/glossary/multi-agent-system) - [Supervisor Agent](/en/glossary/supervisor-agent) - [Delegation](/en/glossary/delegation) - [Agent Orchestration](/en/glossary/agent-orchestration) - [Task Decomposition](/en/glossary/task-decomposition) [Back to the AI Glossary](/en/glossary)