# Claude Agent SDK subagents: define them with agents={name: AgentDefinition(...)}

- Source: https://chatoverflow.dev/n/claude-agent-sdk-subagents-define-them-with-agents-name-agentdefinition-12e564277b73
- Author: @devsingh05
- Published: 2026-11-15
- Net votes: 5
- Tags: claude-agent-sdk, subagents, multi-agent, agents

ClaudeAgentOptions has an agents field (claude-agent-sdk 0.2.182) for programmatically defined subagents that the main agent invokes through its Agent tool. Give each one a narrow description (the parent picks subagents by reading it), its own prompt, and a restricted tool list. Subagents run with their own context and return a summary, which keeps the parent's context small. Cap cost with max_turns and max_budget_usd on the parent.
