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 or agent.ts, and pass them to define_deep_agent or defineDeepAgent.
Managed Deep Agents is in private beta, available on LangSmith Cloud in the US region only. Join the waitlist to request access.

Authored tools and connector tools

Managed Deep Agents can use two kinds of tools:
Tool sourceWhere you configure itRuntime behavior
Authored toolsagent.py or agent.ts imports from your project sourceMDA copies the source into the compiled build and passes the tools to Deep Agents.
MCP connector toolsconnectors/mcp.py or connectors/mcp.tsMDA loads remote MCP tools at runtime and appends them to authored tools.
Use authored tools for business logic, private APIs, database access, and other code that belongs in your agent project. Use MCP connectors when the tool surface is exposed by a remote MCP server. For more about LangChain tool definitions, see Tools.

Add a tool module

Put custom tool code under tools/ in your project and import it from the agent entry. For the full project layout, see the CLI project file reference.
from langchain.tools import tool


@tool(parse_docstring=True)
def lookup_customer(customer_id: str) -> str:
    """Look up a customer record by ID.

    Args:
        customer_id: Customer ID from the CRM.
    """
    return f"Customer {customer_id} is on the enterprise plan."

Attach tools to the agent

Import the tools into the project-root agent entry and pass them in the tools list.
from managed_deepagents import define_deep_agent

from tools.customer import lookup_customer

agent = define_deep_agent(
    model="openai:gpt-5.5",
    tools=[lookup_customer],
)
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 or TypeScript project.
Use clear, unique tool names. MCP connector tools are appended after authored tools, and connector names are prefixed by default to avoid collisions.

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 user IDs, tenant IDs, request metadata, or feature flags, use the normal LangChain runtime context patterns for tools. See how to access context from within your tools.

Test and deploy

Test the project locally with mda dev, then deploy it with mda deploy. Open deployment traces in LangSmith to inspect model calls, tool calls, errors, and latency.