LangChain

Managed Deep Agents - Tools

Published 2026-08-19 · Duration 6:21

Summary

This video details how to extend the functionality of a managed deep agent by implementing custom tools. Tools allow agents to interact with external systems (like databases or proprietary APIs) beyond built-in capabilities. Custom tools are defined as standard Python/TypeScript functions decorated with `@tool` and require detailed docstrings, which guide the Large Language Model (LLM) on how and when to use them.

Download summary

Key takeaways

  1. Purpose of Tools

    Tools give agents capability by allowing interaction with the outside world, such as looking up data in databases or taking actions via external APIs. Built-in tools (e.g., web search) are provided by the underlying model, while custom tools address specific organizational needs.

  2. Defining Custom Tools

    In Python, a custom tool is defined as a function decorated with `@tool` from `LangChain tools`. The function's name becomes the tool name, its parameters are what the LLM must fill out, and the docstring serves as the primary description for the agent.

  3. Integration Process 2:00

    To use a custom tool, define it in a separate file (e.g., `tools/lookup.py`), and then import and pass the function reference into the agent definition script.

Technical details

  • Tool Definition Requirements 0s

    A custom tool requires three elements: 1) The `@tool` decorator (from `LangChain tools`), 2) A function signature defining necessary parameters, and 3) A comprehensive docstring. This docstring is crucial as it informs the LLM about the tool's purpose and required inputs.

  • Tool Implementation Example 150s

    The process involves creating a function (e.g., `lookup_customer`) in a dedicated file, decorating it with `@tool`, and then importing this function into the main agent script to expose its capabilities.

  • Agent Execution Flow 210s

    When an agent is run (e.g., using `MDA dev`), it automatically lists all available tools, including built-in ones (like File Workspace Tools) and custom ones (like the CRM tool). The LLM uses the provided description and parameters to correctly invoke the function.

Mentioned resources

Channel & topics

Watch on YouTube · Back to latest

This independent, AI-assisted summary is provided for commentary and informational purposes. It may contain errors or omit important context. Please watch the original video for the creator's complete presentation. Video, thumbnail, and related copyrights belong to their respective owners.