In short.
The Pydantic AI Harness Subagents guide explains delegation for Python developers building AI applications, with the main constraint that child agents have separate conversations and need self-contained task briefs. SubAgents provides a named delegation tool, model routing and configurable budgets; optional task management adds background work, messaging, persistence and remote workers. Separate conversations still share dependencies and workspace access by default. The guide documents substantial exceptions around failure handling and durable workflows, and warns that its 0.x API may change between minor releases. Runtime correctness, performance, security enforcement and costs were not assessed.
Researched and written by an AI model and checked by a second AI model. How it works
Coverage is the complete selected documentation page at [https://pydantic.dev/docs/ai/harness/subagents/index.md], including its examples, configuration, API reference, deprecation notices, security boundaries and durability restrictions. Linked documentation, implementation code, provider information and the credited community repository are excluded. Installation, runtime behavior, model availability, security enforcement, recovery, performance and costs were not tested or independently verified.
The overview
identity
This is the Subagents documentation page for Pydantic AI Harness at [https://pydantic.dev/docs/ai/harness/subagents/index.md]. It explains the SubAgents capability and SubAgent configuration objects through a feature guide, examples and an API reference.
The page links to its implementation at [https://github.com/pydantic/pydantic-ai/tree/main/src/pydantic_ai_harness/pydantic_ai_harness/subagents/]. That linked implementation is outside the selected evidence.
assessment
The guide is useful when a Pydantic AI application needs specialist agents with separate conversations and explicit controls over delegation. It explains both the basic handoff and operational concerns such as timeouts, crashes, cancellation and recovery.
Its strongest contribution is the detail about integration boundaries. Developers can see which tools, settings, dependencies and usage limits carry into a child run. The page provides no comparative measurements establishing better answers, lower latency or reduced spending.
users
The clearest audience is Python developers already using Pydantic AI. Beginners can start with the researcher-and-writer example, but will need to understand agent configuration, model access and tool permissions.
Experienced developers get guidance on routing tasks between models, loading repository agent definitions, selecting workspaces, managing persistent conversations and integrating Temporal or DBOS. Remote-worker adoption also requires application-level transport and access-control design.
capabilities
SubAgents exposes named child agents through delegate_task. It supports per-delegate request/token limits, timeouts, call limits and failure controls. An optional model menu lets the parent choose an allowed model configuration for each delegation.
Additional options include delegating to a fresh run of the same agent, loading Markdown or TOML agent definitions, creating agents during a run, and emitting typed lifecycle events. TaskControl adds background tasks, questions, steering, cancellation and resumption. DelegationTasks supports managed sessions and saved histories; remote agents run through SubAgentWorker and an application-provided transport.
Using it
requirements
The examples require Python code using pydantic_ai and pydantic_ai_harness, together with a configured model. Explicit delegates need unique resolved names and must use the parent's dependency type. Installation commands, minimum Python and package versions, provider authentication steps and hardware requirements are not established here.
Disk-loaded agents require a workspace and a tool_resolver to receive tools named in their definitions. TaskControl and DelegationTasks require asyncio; the guide says AnyIO's Trio backend is unsupported. For remote execution, the page identifies the transport as the trust boundary and advises putting authentication, authorization and network binding there. If a worker dies without reporting, the delegating run waits until cancelled unless the transport's receive raises an error when the worker is gone.
mechanism
The parent receives a roster of available agents and calls delegate_task with an agent name and a self-contained task. The selected child starts its own run without the parent conversation. Its output normally returns as str(result.output), so consumers receive text rather than the original structured output object.
Local children receive the parent's dependencies and normally inherit its workspace. Explicit children use their own tools. With include_self=True, a fresh run receives the tools, instructions and capabilities bound to the Agent; additions supplied only to the parent's run call do not carry over. Ordinary delegation defaults to max_depth=3, counting the top-level run.
setup
The basic pattern is to create named Agent objects with useful descriptions, attach each role's required tools, wrap them in SubAgent entries, and add SubAgents to the parent Agent's capabilities. The parent can then delegate a task using the registered name.
Add usage_limits, timeout_seconds and max_calls to individual delegates as needed. Enable TaskControl for background management. Repository definitions are optional: agent_folders='agents' discovers definitions under the workspace's .agents/agents, .claude/agents and .codex/agents directories. Without a tool_resolver, tools listed in those files are ignored.
example
The opening example registers a researcher and a writer, then asks an orchestrator to research TLS history and produce a one-paragraph summary. It illustrates specialization through named delegates. The researcher would need suitable research tools configured separately; its description alone does not provide them.
Because children cannot see the parent conversation, a useful writing handoff would include the research notes, requested audience and paragraph constraint. This is an illustrative adaptation of the documented mechanism. Nothing was executed, and no resulting research or writing quality was observed.
Assessment & evidence
limitations
Separate conversation histories do not provide complete security isolation. Dependencies and workspace access are shared by default, and arbitrary Python tools can bypass workspace read-only restrictions. Remote transport access can grant the ability to invoke served agents and read their results.
Timeouts and delegate-specific budget exhaustion return steering messages. Unexpected crashes abort the parent by default; contain_errors=True converts eligible crashes into bounded retries. Shared usage exhaustion and specified control-flow exceptions bypass containment. A child stopping for deferred approval cannot be approved or resumed through ordinary delegation.
Durable execution imposes substantial feature restrictions. Child-workflow delegation rejects several options, including model menus and task control, and resets depth tracking across workflow boundaries. Task control under Temporal or DBOS also loses interactive features such as questions and resumption.
One per-delegate budget example omits explicit agent names despite the page's stated naming requirement. Ensure every explicit delegate has a unique resolved name when adapting it. Also, SubAgents cannot be serialized through the agent-spec mechanism.
reasoning
The architectural tradeoff is between focused conversations and complete handoffs. A child can concentrate on a smaller task, while the parent must supply the facts and constraints that would otherwise be available in conversation history.
Sharing dependencies and workspaces reduces integration plumbing while increasing the importance of tool permissions. Delegating to self preserves bound guardrails and tools, but also carries capabilities that may be unsuitable for a particular subtask. These documented boundaries make the design most plausible for work that can be described independently; actual quality and efficiency require application-specific evaluation.
alternatives
The page describes hand-written delegation as an alternative that requires separate agent tools plus dependency and usage plumbing. Within SubAgents, explicit agents suit fixed specialist roles, include_self starts another conversation with the same bound agent, and disk definitions store roles in repository files.
The credited community package is linked at [https://github.com/vstorm-co/subagents-pydantic-ai]. Its current compatibility, maintenance and feature parity are not established by this page. No independent comparison with other orchestration libraries is provided.
evidence
The evidence is the complete documentation page at [https://pydantic.dev/docs/ai/harness/subagents/index.md], captured on 15 November 2026, including the guide, examples, configuration, notices and API reference.
Linked pages and repository contents are excluded. The evidence documents intended behavior without execution results, independent corroboration or benchmarks.
Access & freshness
costs
Library charges, provider prices and total operating costs are unknown. The page supplies no priced example or measured savings. A model menu enables routing choices, but does not establish their financial benefit.
Ordinary delegation shares parent usage by default. Setting a child's usage_limits gives that delegation separate accounting, with usage added to the parent afterward when forwarding is enabled. Managed sessions instead share live accounting and inherit parent ceilings; concurrent sibling activity can reach a child's calculated ceiling earlier.
These controls bound requests or tokens rather than establishing a monetary cap. The child-workflow mode has an important exception: parent usage accounting is unreliable for delegates, and parent usage limits do not bound their work.
rights
The page credits task control, remote agents and dynamically created agents as a port of Vstorm's subagents-pydantic-ai community package, identified there as MIT licensed.
That statement applies to the credited community package. The selected page does not establish the licence for this documentation, Pydantic AI Harness as a whole, or every included example. Broader reuse and redistribution permissions remain unknown.
freshness
The page warns that Pydantic AI Harness APIs may change between minor releases during 0.x development, with deprecation warnings and release-note migration guidance. It marks inherit_tools and several older event names or fields as deprecated.
The capture does not establish an exact package release or the page's last substantive update. Examples use different model identifiers across the guide and API reference; their availability and compatibility are unverified. Later changes are unknown.
actions
Start with named delegates and a task whose inputs, constraints and expected output can be written in full. Give each delegate the required tools, then configure call, request/token and timeout limits. Confirm which settings are bound to the Agent and which exist only on a parent run.
Before adopting background, remote or durable execution, evaluate cancellation, worker loss, partial tool effects, recovery and usage enforcement in the intended deployment. Review transport access controls and workspace restrictions. For existing integrations, check deprecated options and serialized event-key changes against the relevant release guidance.
