References: Subagents and Claude Managed Agents
Source material
Section titled “Source material”Source curriculum (structural mirror, cited as further study):• Anthropic Academy (https://anthropic.skilljar.com/): "Introduction to Subagents" + the Agent SDK + Claude Code 101 / Claude Code in Action courses License: Anthropic Academy course content is account-gated; Clawdemy structurally mirrors the Academy's lesson progression as inspiration and cites it as further study. Every substantive claim in this lesson is verifiable against the public Anthropic documentation.
Primary public-doc anchors (every substantive claim verifiedagainst):• Anthropic, "Subagents in the SDK" (Claude Agent SDK): the verbatim definition, four benefits, three creation paths, AgentDefinition fields, inheritance rules, parent-to-subagent channel, and Python + TypeScript examples https://code.claude.com/docs/en/agent-sdk/subagents• Anthropic, "Claude Managed Agents overview" (the verbatim positioning, four core concepts, five-step flow, built-in tool set, data-retention posture) https://platform.claude.com/docs/en/managed-agents/overview• Anthropic, "Get started with Claude Managed Agents" (the three endpoints POST /v1/agents + /v1/environments + /v1/sessions, the event-stream shape, code examples in eight languages, the agent_toolset_20260401 toolset) https://platform.claude.com/docs/en/managed-agents/quickstart• Anthropic, "Claude Code subagents" (the filesystem-based subagent definition path used inside Claude Code) https://code.claude.com/docs/en/sub-agents• Anthropic, "Dynamic workflows" (the Workflow tool for coordinating dozens to hundreds of subagents outside the per-turn context) https://code.claude.com/docs/en/workflows• Anthropic engineering, "Building Effective AI Agents" (the L9 patterns this lesson realizes; cross-referenced) https://www.anthropic.com/engineering/building-effective-agents
Verbatim claims sourced from the public docs:• Subagent definition: "Subagents are separate agent instances that your main agent can spawn to handle focused subtasks. Use subagents to isolate context for focused subtasks, run multiple analyses in parallel, and apply specialized instructions without bloating the main agent's prompt" (Subagents in the SDK)• Context isolation: "Each subagent runs in its own fresh conversation. Intermediate tool calls and results stay inside the subagent; only its final message returns to the parent" (Subagents in the SDK)• Channel constraint: "The only channel from parent to subagent is the Agent tool's prompt string, so include any file paths, error messages, or decisions the subagent needs directly in that prompt" (Subagents in the SDK)• Managed Agents positioning: "Pre-built, configurable agent harness that runs in managed infrastructure. Best for long-running tasks and asynchronous work" (Managed Agents overview)• Managed Agents value: "Claude Managed Agents provides the harness and infrastructure for running Claude as an autonomous agent. Instead of building your own agent loop, tool execution, and runtime, you get a fully managed environment where Claude can read files, run commands, browse the web, and execute code securely" (Managed Agents overview)• Beta header: "All Managed Agents endpoints require the managed-agents-2026-04-01 beta header. The SDK sets the beta header automatically" (Managed Agents overview)• Data-retention posture: "Claude Managed Agents is stateful by design ... not currently eligible for Zero Data Retention or HIPAA Business Associate Agreement (BAA) coverage" (Managed Agents overview)
Required attribution: "Based on the structure of the Anthropic Academy 'Introduction to Subagents' + 'Building with the Claude API' courses (https://anthropic.skilljar.com/) and Anthropic engineering, 'Building Effective AI Agents' (Erik S. and Barry Zhang, 2024-12-19). This lesson is an independent structural mirror in original prose; every substantive claim is verified against the public Anthropic Claude Agent SDK documentation at https://code.claude.com/docs/en/agent-sdk/ and the public Claude Managed Agents documentation at https://platform.claude.com/docs/en/managed-agents/. Anthropic does not endorse it."Read this next
Section titled “Read this next”- Anthropic, “Subagents in the SDK”. The canonical reference for the Agent SDK subagent primitive. Covers the full AgentDefinition shape, the resumption pattern, the troubleshooting guide, and the Workflow tool’s pointer for large-fan-out cases.
- Anthropic, “Claude Managed Agents overview”. The product overview: the four core concepts, the Messages-API-vs-Managed-Agents decision framing, the supported tool set, the data-retention posture, the self-hosted-sandbox pointer.
- Anthropic, “Get started with Claude Managed Agents”. The hands-on walkthrough: code examples in eight SDKs, the three endpoints, the SSE event stream, the agent_toolset_20260401 tool type. The fastest path from zero to a first session.
- Anthropic engineering, “Building Effective AI Agents”. The L9 patterns essay; Subagents directly realize patterns 3 (parallelization), 4 (orchestrator-workers), and 6 (autonomous agent).
Going deeper
Section titled “Going deeper”A short, durable list. Each link is a specific next step inside Track 22.
- Lesson 12 of this track, “Shipping a Claude application.” Where whichever primitive you chose here (self-built L8 loop, Subagents fan-out, or Managed Agents) goes to production: cost monitoring on usage + usage.iterations, eval-set discipline, the rollout checklist, the per-feature data-retention check.
- Track 20 (AI Agents and Tool Use): the full track-level treatment of agent design, harness engineering, and operational discipline. T22 L11 here is the Anthropic-specific instance; T20 covers the broader design principles.
Adjacent tracks (the natural next destinations)
Section titled “Adjacent tracks (the natural next destinations)”- Track 20 (AI Agents and Tool Use): pick this if you want full track-level depth on agent design and harness engineering. The Subagents + Managed Agents primitives this lesson covers fit inside the broader treatment T20 develops over ten lessons.
- Track 21 (LLM Ops and Production): pick this if you want the provider-agnostic view of operational discipline for agents. The eval-set discipline this lesson defers to L12 is from T21 L7 “LLMOps.”
Where this connects inside the track
Section titled “Where this connects inside the track”The two primitives the rest of T22 builds toward:
- Lesson 1 (first call): the messages.create call is what every Subagent and every Managed Agents session ultimately runs internally. The iterate-the-content-array discipline applies to the events Managed Agents streams back.
- Lesson 3 (model selection): the per-Subagent model field is L3’s mix-and-match applied per-step. The effort dial on AgentDefinition.effort is L3’s effort parameter.
- Lesson 4 (custom client tools): Subagents inherit (or restrict) the parent’s tool set from L4.
- Lesson 5 (server tools + Anthropic-schema clients): Managed Agents’ agent_toolset_20260401 is the productionized version of L5’s bash, text_editor, web search, web fetch, plus file operations.
- Lesson 6 (MCP): Subagents take mcpServers in AgentDefinition; Managed Agents takes MCP servers in the agent definition. Same MCP from L6.
- Lesson 7 (prompt caching + context management): Managed Agents includes built-in prompt caching and compaction (the docs say so explicitly). Subagent context isolation means the parent does not pay for the subagent’s intermediate work, which is a complementary cost lever.
- Lesson 8 (agent loop): Subagents run inner L8-style loops. Managed Agents IS an L8-style loop, Anthropic-hosted and productionized.
- Lesson 9 (six patterns): Subagents realize patterns 3 (parallelization), 4 (orchestrator-workers), and 6 (autonomous agent) directly. Managed Agents fits pattern 6 with the harness lifted.
- Lesson 10 (Agent Skills + Claude Code): Subagents take skills in AgentDefinition (L10’s preload pattern, per-subagent). Claude Code’s filesystem-based agents at .claude/agents/ are the filesystem variant of this lesson’s programmatic AgentDefinition.
- Lesson 12 (next, shipping): cost monitoring, eval-set, rollout checklist, data-retention posture per primitive.