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 public beta and available on LangSmith Cloud in the US region only.
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
Put custom tool code undertools/ in your project and import it from the agent entry. For the full project layout, see Project structure.
Attach tools to the agent
Import the tools into the project-root agent entry and pass them in thetools list.
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 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.
When the project declares identity, tools and middleware receive a frozen runtime.identity envelope for the authenticated caller. Prefer that over client-supplied configurable keys for user ids.
For other 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.

