Managed Deep Agents is in public beta and available on LangSmith Cloud in the US region only.
tools/, import them into the agent entry, and pass them to the agent definition:
tools/ as well, so the tools/mcp.ts file name is reserved for that declaration.
Add a tool
Use authored tools for business logic, private APIs, database access, and other code that belongs in your agent project.1
Define a tool module
tools/customer.ts
2
Attach the tool to the agent
Import the tool into the project-root agent entry and pass it in the Your imports should work the same way they do in a normal local TypeScript project.
tools list:agent.ts
3
Add human-in-the-loop (Optional)
Pause the agent before sensitive tool calls so a person can approve, edit, or reject them.Set The
interruptOn in the agent definition, and optionally set permissions to gate tool and filesystem access:agent.ts
interruptOn 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.To resume a paused run, see Respond to an interrupt.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.
Deployment
mda dev and mda deploy copy project files into the compiled build, including modules under tools/. Tools are not synced to Context Hub; they ship with the agent code.
When to use tools
For more information, see Project structure.
Respond to an interrupt
When a run hits an interrupt, it pauses and waits for a human response before continuing.-
During local development,
mda devruns 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 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.
Use tools that require authentication
If a tool requires an API key or OAuth token, use a connection to resolve the credential at runtime. See Manage connections.Access runtime context
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.Connect these docs to Claude, VSCode, and more via MCP for real-time answers.

