Subagent
Delegates a self-contained task to a child agent that runs in its own context and returns a final report. Use it when a subtask would otherwise flood the parent’s context with intermediate work and you only need the conclusion. The model writes the task each time it calls the tool; the child cannot ask follow-up questions, so the task must include all the context it needs.
The make_subagentmakeSubagentinstructions, tools, model, and context. The parent also passes a task to the child.
By default, the child sees only the task (context=Fixed("none")context: new Fixed('none')context to a Choice over "none", "all" (full history including tool calls), and "no_tools" (text turns only). When a non-"none" option is available, the model can also pass last_messages to limit how many parent messages to share.
Supported in: Python, TypeScript (Node.js, browsers).
Quickstart example:
import { Agent } from '@strands-agents/sdk'import { subagent } from '@strands-agents/sdk/vended-tools/subagent'
const agent = new Agent({ systemPrompt: 'You are a manager.', tools: [subagent],})await agent.invoke('Research the latest TypeScript 5.x features and summarize them.')from strands import Agentfrom strands.vended_tools.subagent import subagent
agent = Agent( system_prompt="You are a manager.", tools=[subagent],)agent("Research the latest Python 3.13 features and summarize them.")Example — full control with make_subagentmakeSubagent
import { Agent } from '@strands-agents/sdk'import { Choice, Option, Preset } from '@strands-agents/sdk/multiagent'import { makeSubagent } from '@strands-agents/sdk/vended-tools/subagent'
const subagent = makeSubagent({ presets: { researcher: new Preset({ instructions: 'You research topics thoroughly.', description: 'deep research on a topic', }), reviewer: new Preset({ instructions: 'You review code for correctness and style.', description: 'code review', }), }, model: new Choice([ new Option('fast', 'global.anthropic.claude-sonnet-4-6', 'quick tasks'), new Option('deep', 'global.anthropic.claude-opus-4-6-v1', 'hard problems'), ]), context: new Choice(['none', 'all', 'no_tools']), tools: new Choice(['read', 'shell', 'write'], true), maxDepth: 3,})const agent = new Agent({ tools: [subagent] })await agent.invoke('Review the changes in src/main.ts for correctness.')from strands import Agentfrom strands.multiagent.spec import Choice, Option, Presetfrom strands.vended_tools.subagent import make_subagent
subagent = make_subagent( presets={ "researcher": Preset( instructions="You research topics thoroughly.", description="deep research on a topic", ), "reviewer": Preset( instructions="You review code for correctness and style.", description="code review", ), }, model=Choice([ Option("fast", "global.anthropic.claude-sonnet-4-6", "quick tasks"), Option("deep", "global.anthropic.claude-opus-4-6-v1", "hard problems"), ]), context=Choice(["none", "all", "no_tools"]), tools=Choice(["read", "shell", "write"], multiple=True), max_depth=3,)agent = Agent(tools=[subagent])agent("Review the changes in src/main.py for correctness.")Full API reference: TypeScript