Player not loading? Watch on YouTube
This tutorial extends the Managed Deep Agents quick start with a custom customer lookup function. The demonstration uses Python; the speaker says TypeScript users can follow the same approach with a function in their project. It assumes the earlier quick start is complete, including its built-in web search tool.
The walkthrough explains how a LangChain tool decorator exposes a function to an AI agent. The function name becomes the tool name, its parameters define the arguments the model supplies, and its docstring describes how to use it. The speaker identifies the docstring as a requirement and explains how parse_docstring=True supplies parameter descriptions to the model.
The example places lookup_customer in a tools directory, imports it into agent.py, and passes it to define_deep_agent. Running MDA dev opens LangSmith Studio, where the presenter asks the agent to list its tools and retrieve customer 123. The function returns a fixed enterprise-plan response, which lets the presenter test the tool call and its arguments.
The final section examines a trace of the model call to check the tool description and customer ID argument. The speaker suggests reviewing those descriptions when the model uses a tool incorrectly. The quick-start agent's built-in search tool uses OpenAI's API.