Add Web Search to Managed Deep Agents for free with One MCP Config
Read the Portuguese translation →
Author: LangChain · Watch on YouTube
Video authored by the channel shown, not by IANIA; all rights belong to the creator. Transcript and summary generated automatically; the original-language content is preserved.
Original language: English
Original video: Add Web Search to Managed Deep Agents for free with One MCP Config · Channel: LangChain · 03:36 · Watch on YouTube
Topics: AI agents, RAG, search and information retrieval, AI safety
Summary
Section titled “Summary”The video demonstrates how to add web search to a managed deep agent by configuring an MCP connection to LangSmith’s managed tool server. A research agent that initially relies on its documentation search can use web search to supplement gaps, such as industry guidance on audit log retention. The video shows deploying the updated agent and inspecting its tool calls in LangSmith Studio. It also cautions that web search broadens what an agent can do, so appropriate guardrails should be in place.
Key points
Section titled “Key points”- Web search lets an agent combine external research with information from its existing tools and skills.
- For a managed deep agent, search can be enabled by configuring an MCP connection to the LangSmith platform.
- The search server is added in the agent’s tools/mcp.py file using the provided declaration.
- The managed Parallel MCP server is already authenticated, so no additional authentication is needed.
- Web search can fill gaps in an agent’s provided documentation, such as missing industry expectations for audit log retention.
- After adding web search, the agent can be deployed to LangSmith and tested in LangSmith Studio.
- Studio lets users inspect tool calls, though end users may not see them unless they are exposed.
- Agents with web search need sufficient instructions and guardrails because the tool expands their capabilities.
Chapters
Section titled “Chapters”| Start | Chapter | Summary |
|---|---|---|
| 00:00 | Adding web search to a managed agent | Nathan introduces web search for managed deep agents and explains that it can be set up through an MCP connection to LangSmith. |
| 00:30 | Configuring the search server | A research agent’s documentation search provides incomplete audit log retention information, motivating the addition of a web search tool. |
| 01:32 | Testing web search in the agent | The agent uses web search alongside its documentation tool to augment its answer, and the video proceeds to deploy it to LangSmith. |
| 02:34 | Inspecting the deployed agent | In LangSmith Studio, the agent combines search tools and Parallel web search, with tool calls available for inspection. |
| 03:05 | Results and guardrails | The agent’s answer combines a common baseline with web findings, and the video emphasizes setting guardrails for web-enabled agents. |
Quotes
Section titled “Quotes”Web search can allow your agent to conduct external research — 00:00
this does not need any additional authentication. — 01:32
we can also monitor the tool calls because we’re inside of Studio — 02:34
you should be aware with your instructions file and other controls that you have sufficient guardrails — 03:05
Concepts and entities
Section titled “Concepts and entities”Deep Agent, MCP, LangChain, LangSmith, LangSmith Studio, Parallel, search docs, tools/mcp.py
Full transcript (original language)
Section titled “Full transcript (original language)”00:00 Hey, I’m Nathan. I’m in product here at LangChain and today we’re going to talk about adding web search to your managed deep agent. Web search can allow your agent to conduct external research and add that to information that you’ve already built in with your existing set of tools and skills. LangChain provides built-in search using parallel as part of the LangSmith platform. So, setting up search for your managed deep agent is as easy as configuring an MCP connection to the LangSmith platform. Let’s jump in. The best place to get started adding web search to your agent is with our documentation. You likely already have a workspace ID and an API key configured in your project and the Next step is
00:30 just going to be to configure the search server. And to do so, you’ll add the search server into your tools/mcp.py. I have here an agent that I’ve been working on which is a research agent. And let’s say I ask it about audit log retention. What this will do is it will use the tools that I have available, in this case search docs. It can find some information about audit trails and audit log retention based on the documentation that I’ve provided to the agent, but it may not be able to provide a complete answer. So, this found some information. It doesn’t have the industry
01:01 expectations for audit log retention. It only provides operational retention, etc. This is an agent that might be able to perform a little bit better if we add a web search tool where it can compare information that it has on the open internet with information that exists within its set of tools. So, let’s add in that server. So, we can add our MCP file and we’ll grab the declaration from here. And we don’t need to make any changes here. You’ll see this server is hosted within the LangSmith managed tool server and from here it’s the parallel MCP server that’s part of the managed
01:32 tool system. And because they’re already authenticated, this does not need any additional authentication. So, if we open up a fresh chat and we ask the same question that we asked before, the agent now has access to web search and it can use that to augment its answer beyond just the search docs information. So, it’s going to find information inside of our search docs tool, but it’s also going to reach out to the web using this web search toolkit and it can use this to add additional information and context to the response the agent provides. All right, so here it’s
02:04 summarizing the findings that it produced and it found some information about audit log retention. It found that the corpus doesn’t contain retention guidance, but it’s using information from the external web search. Now that we have the web search added, we can deploy the agent to LangSmith with the deploy command. All right, and once this completes deploying, we’ll take a look at how the agent looks. Let’s take a look at the published agent inside of LangSmith Studio. We can ask the same question here to the agent in production and we’ll see how the agent responds. In this case, we can also monitor the tool
02:34 calls because we’re inside of Studio, but depending on your environment, your end users may not see the tool calls unless you expose them. So it’s going to invoke the search tools functionality. It’s also going to use search docs, part of our toolkit inside of this agent, and it’s also going to use parallel web search. And we can inspect the content of these tool calls. Here it’s performing a set of search queries that are related to our original question that I didn’t ask directly, but the agent was able to pick these up and pass these into the search tool to find information beyond the specific string that I’m asking for. And it can use the
03:05 responses here to build a response like we saw in development. All right, so here’s the answer. The answer looks very similar to what we saw we were working locally. It gives the common baseline. It tells us that there is no single answer, but it gives us some information based on the web search. One thing to note with web search tools is that giving your agent to web search means it’s capable of tasks beyond maybe what it’s originally intended for. So you should be aware with your instructions file and other controls that you have sufficient guardrails around the tooling inside your agent. So that’s a quick introduction to web search using
03:36 parallel search as part of the LangSmith managed tool server. Highly recommend adding web search to all of your agents that you’re building as it really expands the capabilities of the agent at hand. Happy building.