Skip to content
Last Dictionary

subagent

nounAlso: sub-agent, child agent, worker agent

In plain wordsA helper AI agent that a main agent starts to handle one piece of a job; it works in its own separate workspace and reports back a short summary when it is done.

  1. An AI agentAI agent, n.: An AI system that does not just answer but acts: given a goal, it decides on steps, uses tools such as a browser or code editor, checks the results and keeps going until the job is done. invoked by another agent to carry out a delegated subtask, usually with its own system prompt, a restricted tooltool, n.: Any outside capability an AI model is allowed to use — a web search, a calculator, a code runner, a database or an app — described to the model so it can ask for it by name. set and permissionspermission system, n.: The rules that decide what an AI agent may do on its own, what it must ask a person about first, and what it may never do — like a phone's settings for which apps can use the camera., and a fresh context windowcontext window, n.: How much an AI model can read and keep in view at once: the instructions, the conversation so far and any attached documents. Text that does not fit has to be cut, summarized or left out.. The parent passes a task description; the subagent runs its own agent loopagent loop, n.: The repeating cycle at the heart of an AI agent: the model decides what to do next, software carries it out, the result is shown to the model, and the cycle repeats until the task is finished. and returns only a condensed result, so the search results, logs and file contents it read do not crowd the parent's context. Subagents provide parallelism (several explore different leads at once), specialization (a read-only code searcher, a reviewer, a test writer) and cheaper execution on smaller models. Costs include extra tokens, detail lost in the hand-back summary, and coordination errors such as duplicated or conflicting work, so harnesses typically cap nesting depth. In Claude Code, for example, a subagent is a Markdown file whose YAML header sets its name, description, tools and model.

    Spin up a subagent to search the logs so the main session's context stays clean.

Origin

Hierarchical delegation is old in multi-agent systemmulti-agent system, n.: A setup in which several AI agents, each with its own role or point of view, work together — or compete — on a problem, passing messages and results among themselves. research. For language-model agents the word spread in 2025 with orchestrator–worker research systems — Anthropic's June 2025 post described a lead agent spawning subagents — and with coding harnesses: Claude Code added user-defined subagents on 24 July 2025 (version 1.0.60), and other coding agents adopted similar features.

Usage note

Differs from a handoffhandoff, n.: The moment one AI agent passes a conversation or task to another, better-suited agent — like a call-center operator transferring you to the right department., in which control passes to another agent; a subagent works for its caller and returns. Simon Willison dropped 'a goal set by a user' from his agent definition partly because subagents pursue goals set by another model.

Related

See also
  • orchestrator–worker patternorchestrator–worker pattern, n.: A way of organizing AI teamwork, like a newsroom: an editor AI decides which stories a big assignment needs, sends reporter AIs to cover them at the same time, and turns what they file into one report.
  • multi-agent systemmulti-agent system, n.: A setup in which several AI agents, each with its own role or point of view, work together — or compete — on a problem, passing messages and results among themselves.
  • handoffhandoff, n.: The moment one AI agent passes a conversation or task to another, better-suited agent — like a call-center operator transferring you to the right department.
  • context engineeringcontext engineering, n.: Managing an AI model's reading material: choosing, trimming and arranging the instructions, documents, tool results and memories it is given on every turn, so that it has what the task needs and little else.
  • harnessharness, n.: The software around an AI model that gives it instructions and tools, carries out its actions and decides when it stops. The model is the engine; the harness is the rest of the car.
  • agent loopagent loop, n.: The repeating cycle at the heart of an AI agent: the model decides what to do next, software carries it out, the result is shown to the model, and the cycle repeats until the task is finished.
Contrast with
  • handoffhandoff, n.: The moment one AI agent passes a conversation or task to another, better-suited agent — like a call-center operator transferring you to the right department.

Sources

  1. Anthropic (2025). How we built our multi-agent research system. Anthropic Engineering. anthropic.com/engineering/multi-agent-research-system
  2. Anthropic. Create custom subagents. Claude Code documentation. code.claude.com/docs/en/sub-agents

Mentioned in

deep researchdeep research, n.: An AI feature that spends minutes rather than seconds on a question — planning, running dozens of web searches, reading many sources — and then writes a long report with citations., agentagent, n.: Something that acts. In AI, a program that observes its situation and takes actions toward a goal: a game-playing learner, a software helper, or a chatbot that uses tools to complete tasks., agent loopagent loop, n.: The repeating cycle at the heart of an AI agent: the model decides what to do next, software carries it out, the result is shown to the model, and the cycle repeats until the task is finished., agent skillagent skill, n.: A packaged how-to guide for an AI agent — written steps, sometimes with small programs and examples attached — that sits unread until a job of that kind comes up, when the agent opens it., Claude CodeClaude Code, prop. n.: A coding assistant from Anthropic that works as an agent: given a programming task, it explores the project, changes the code and runs programs to check its work, from the web, a desktop app, an editor or a terminal., context engineeringcontext engineering, n.: Managing an AI model's reading material: choosing, trimming and arranging the instructions, documents, tool results and memories it is given on every turn, so that it has what the task needs and little else., context poisoningcontext poisoning, n.: When a mistake or a planted falsehood gets into an AI's working notes or memory and the AI keeps relying on it, so the error grows over later steps., context rotcontext rot, n.: The way an AI model becomes less reliable as you give it more and more text to read, even when the answer is in there somewhere., harnessharness, n.: The software around an AI model that gives it instructions and tools, carries out its actions and decides when it stops. The model is the engine; the harness is the rest of the car., multi-agent systemmulti-agent system, n.: A setup in which several AI agents, each with its own role or point of view, work together — or compete — on a problem, passing messages and results among themselves., orchestrationorchestration, n.: Coordinating several AI calls, tools or agents so each does its part in the right order and their results are combined into one finished piece of work, as a conductor directs an orchestra., orchestrator–worker patternorchestrator–worker pattern, n.: A way of organizing AI teamwork, like a newsroom: an editor AI decides which stories a big assignment needs, sends reporter AIs to cover them at the same time, and turns what they file into one report., handoffhandoff, n.: The moment one AI agent passes a conversation or task to another, better-suited agent — like a call-center operator transferring you to the right department., hookhook, n.: A user-supplied script or check that runs automatically at set moments in an AI agent's work — before a command, after a file edit, when it tries to stop — enforcing rules the AI cannot skip., LLM observabilityLLM observability, n.: Recording and inspecting what an AI application actually did on each request — prompts sent, documents found, tools used, answers given, time and cost — so problems can be found and fixed., Ralph Wiggum loopRalph Wiggum loop, n.: A blunt way of using AI coding assistants: feed the same instructions to the AI again and again in an endless loop until the software gets built., recursive language modelrecursive language model, n.: A way of running an AI language model so it can handle enormous documents by writing small programs to search and split them, and calling copies of itself on the pieces.