general-purpose subagent.
Managed Deep Agents is in public beta on LangSmith Cloud and Bring Your Own Cloud (BYOC). Use Managed Deep Agents CLI and SDK v0.10 or later for BYOC.
This Python example requires
managed-deepagents>=0.10.4 and the matching mda CLI.

Declare the subagents
Start with a project from the quickstart and replace the agent definition:agent.py
Write the instructions
Replaceinstructions.md:
instructions.md
start_async_task. Tasks run in separate threads and notify the lead as each one finishes.
Try it
Run the agent withmda dev or deploy it. In a new conversation, describe an incident and paste logs, recent changes, and related issues. Confirm that the lead starts all three tasks at once and combines their findings.
Fan out dynamically
When the number of parallel tasks depends on the request (such as one investigation per affected service), you do not need to declare subagents up front. Every deployed ormda dev agent includes a built-in general-purpose subagent that inherits the lead’s model, tools, and skills.
Instruct the lead to launch multiple general-purpose tasks in one turn, using start_async_task for background runs or task to wait for all results:
instructions.md
description.
Extend the pattern
- Add read-only tools or MCP servers so the subagents pull live logs, changes, and issues.
- Add a Slack channel so people can start an investigation by mentioning the agent.
- Add more async subagents, such as one for metrics, and name them in
instructions.md.
See also
- Subagents: configure delegation and subagent access.
- Async subagents: manage background tasks.
Connect these docs to your agent of choice via MCP for real-time answers.

