Skip to main content
Managed Deep Agents support the normal Deep Agents tools configuration surface. Define LangChain tools in your project, import them into agent.py, and pass them to define_deep_agent.
Managed Deep Agents is in public beta and available on LangSmith Cloud in the US region only.

Project structure

Keep the agent entry point at the project root and authored tools under tools/:

Add authored tools

Use authored tools for business logic, private APIs, database access, and other code that belongs in your agent project. Managed Deep Agents copies the source into the compiled build and passes the tools to Deep Agents. For more about LangChain tool definitions, see Tools.

Add a tool module

tools/customer.py

Attach tools to the agent

Import the tools into the project-root agent entry and pass them in the tools list.
agent.py
mda dev and mda deploy copy the project files into the compiled build. Your imports should work the same way they do in a normal local Python project. Use clear, unique tool names to avoid collisions.

Human-in-the-loop

Pause the agent before sensitive tool calls so a person can approve, edit, or reject them. Set interrupt_on in the agent definition, and optionally set permissions to gate tool and filesystem access.
agent.py
The interrupt_on field applies the same interrupt behavior as LangChain’s human-in-the-loop middleware. For decision types (approve, edit, reject), conditional interrupts, and permission rules, see the Deep Agents Human-in-the-loop and Permissions guides.

Respond to an interrupt

When a run hits an interrupt, it pauses and waits for a human response before continuing.
  • During local development, mda dev runs the agent in LangSmith Studio, which surfaces the interrupt so you can inspect the pending tool call and resume the run.
  • On a deployed agent, resume the paused run through the LangGraph server API with a Command(resume=...) payload. See Human-in-the-loop using server API.
During public beta, Managed Deep Agents is CLI-first and programmatic invocation is not yet documented. To resume runs programmatically from your own application, contact your LangChain team.
Human-in-the-loop needs durable thread state to pause and resume. The managed runtime owns the checkpointer, so no extra setup is required.

Use secrets and context

Tools can read deployment secrets from environment variables. Put local values in .env for mda dev; mda deploy forwards non-reserved .env values as hosted deployment secrets. For per-run values such as request metadata or feature flags, use the normal LangChain runtime context patterns for tools. See how to access context from within your tools.