Managed Deep Agents is in public beta on LangSmith Cloud.
A subagent runs inside the agent’s graph. Managed Deep Agents builds each async subagent as its own graph in the same deployment. Both kinds work in the agent’s sandbox. For how subagents work in the open source Deep Agents SDK, see Subagents and Async subagents.
Async subagents require
managed-deepagents>=0.10.0.Declare a subagent
Add subagent definitions tosubagents in the agent definition. Each one needs a name and a description; the agent uses the description to decide when to delegate. To make a subagent async, add async to its definition:
- Subagent
- Async subagent
agent.py
Subagents
The agent runs a subagent with thetask tool and waits for its answer. The subagent runs inside the agent’s graph and works in the agent’s sandbox.
Every agent also gets a general-purpose subagent for delegated work that doesn’t match a declared subagent. See The general-purpose subagent.
What a subagent inherits
A subagent starts from the agent’s configuration and replaces what its definition sets:
A subagent in fork mode starts with a copy of the agent’s conversation and also uses the agent’s instructions, middleware, skills, and memory. See Choose a launch mode.
Async subagents
The agent starts an async subagent withstart_async_task and keeps working while the subagent runs on its own thread. The subagent reports back when it finishes.
How async subagents run
Each async subagent appears in the deployment as its own graph, named after the agent and the subagent, such asresearch-assistant--researcher. Managed Deep Agents finds async subagents by reading your agent file when it builds, not by running it. Write each one directly in subagents or in a variable, with a fixed name and async value. An async subagent built by a function or a loop gets no graph, and the agent fails to start. A graph factory can declare async subagents too, as long as it returns the agent definition directly.
Agents served by mda dev or a deployment also get an async version of the general-purpose subagent, so the agent can run delegated work in the foreground or in the background.
The agent manages async subagents with these tools:
The tools come with the async
general-purpose subagent, so every agent served by mda dev or a deployment has them. Agents run with mda eval don’t.
Get notified when a subagent finishes
Async subagents report back on their own, whether the agent is busy, idle, or waiting on an approval. The agent doesn’t need to poll withcheck_async_task:
Each result is reported once. Before each model call, the agent makes one status check per unfinished task, capped at 5 seconds.
If a subagent pauses for approval, the agent sees its task as
waiting until someone answers on the subagent’s thread. See Answer approvals in channels.
Configure an async subagent
Do not setgraph_id, url, headers, or runnable: Managed Deep Agents builds and launches the graph itself. These options pass through to Deep Agents:
For how each option behaves, see Async subagents.
What an async subagent inherits
An async subagent inherits from the agent the same way a subagent does. In fork mode, it starts with a copy of the agent’s conversation but keeps its own prompt, tools, and middleware, so it usually doesn’t reuse the agent’s prompt cache.Share the sandbox and trace
An async subagent starts on a new thread, separate from the agent’s. Because the agent starts it as the same user, it shares the agent’s sandbox. With private threads, a run of the subagent from a different user gets its own sandbox. When it shares the sandbox, it uses the agent’s files as they are and only refreshes connector credentials. If the agent hasn’t used its sandbox yet, the subagent creates it, and the agent uses the same sandbox later. When tracing is on, an async subagent’s run appears under the agent’s run in LangSmith.Answer approvals in channels
When an agent runs in a channel, its async subagents report to the same channel thread:- The user asks the agent for work in a channel thread, and the agent starts an async subagent.
- If the subagent pauses for approval, Slack shows the request in the thread, and answering it there resumes the subagent. Other channels don’t post the request; resume the subagent’s thread as you would any interrupt, in Studio or through the API.
- When the subagent finishes, the agent gets its result and replies in the thread: in its current run if it’s still working, or in a new run if it’s idle. Turning off parent notifications stops the new run.
Evaluate an agent
mda eval runs without an Agent Server, so it can’t evaluate an agent that declares async subagents. Evaluated agents also don’t get the async general-purpose subagent or the async task tools.
See also
Connect these docs to your agent of choice via MCP for real-time answers.

