| Name | Type |
|---|---|
| name | str |
| description | str |
| tools | NotRequired[Sequence[BaseTool | Callable | dict[str, Any]]] |
| model | NotRequired[str | BaseChatModel] |
| middleware | NotRequired[list[AgentMiddleware]] |
| interrupt_on | NotRequired[dict[str, bool | InterruptOnConfig]] |
| skills | NotRequired[list[str]] |
| permissions | NotRequired[list[FilesystemPermission]] |
| response_format | NotRequired[ResponseFormat[Any] | type | dict[str, Any]] |
| system_prompt | NotRequired[str] |
| mode | NotRequired[Literal['isolated', 'fork']] |
Specification for a declarative subagent.
By default the subagent is isolated: it receives only the delegated task
description. Setting mode="fork" makes it continue the parent's
conversation instead.
mode="fork" is experimental and may change in a future release.
When using create_deep_agent, subagents automatically receive
a default middleware stack before any custom middleware specified in
this spec.
name and description are required; all other fields are optional.
See the individual attributes for configuration details.