Durability propagates across the entire agent tree with no per-sub-agent
wiring. A coordinator agent built with create_deep_agent(..., subagents=[...])
delegates to its sub-agents through the built-in task tool. Deep Agents builds
each sub-agent as a separate graph, but they inherit the parent's model object
by default — so because the plugin makes that one model object durable, every
sub-agent's model call also becomes a deepagents.invoke_model activity
automatically.
In this sample the coordinator delegates deep investigation to a researcher
sub-agent and then synthesizes a final answer. Both the coordinator's and the
researcher's LLM calls run as durable activities.
create_deep_agent(subagents=[...])with a delegatedresearcher- Durability inheritance: sub-agent model calls route through activities with no extra wiring
Prerequisites: Python >= 3.11 with the suite setup
applied (interim plugin install), an ANTHROPIC_API_KEY in your
environment, and a running Temporal dev server (temporal server start-dev).
The experimental plugin is not in the
deepagentsgroup — install it as shown in the suite README and run with--no-sync, or a bareuv run/uv syncre-syncs the environment and uninstalls it.
# Terminal 1
uv run --no-sync deepagents_plugin/subagents/run_worker.py
# Terminal 2
uv run --no-sync deepagents_plugin/subagents/run_workflow.py| File | Description |
|---|---|
workflow.py |
SubagentsWorkflow: a coordinator with a researcher sub-agent |
run_worker.py |
Adds DeepAgentsPlugin, starts the worker |
run_workflow.py |
Executes the workflow and prints the result |