From the course: Building AI Agents with AutoGen

Unlock this course with a free trial

Join today to access over 24,900 courses taught by industry experts.

Add web search ability to the research assistant

Add web search ability to the research assistant - Autogen Tutorial

From the course: Building AI Agents with AutoGen

Add web search ability to the research assistant

Large language models usually do not have access to the internet, but we'll get up-to-date information if our AI agents had access to the web. So in this lesson, we'll take our agent capabilities to the next level by adding web search functionality. So we'll create a research assistant that can search the internet to answer our questions. And for this, we'll need an external search API. The search API that we're using is Tavily. So make sure that you have installed these two packages. AutoGen is already installed, and Tavily Python is an SDK that Tavily offers. So we'll install this. I already have this installed. Next, we are importing the Tavily client from Tavily, which offers search APIs for LLMs. We have our assistant agent user proxy agent, config_list, register_function which are required for us to register our tool. So import the required libraries, configure the large language model. The next step is to set up our Tavily web search tool. Here, you'll need to get a Tavily API…

Contents