Guide for using the Google Serper Search tool with PraisonAI agents.
pip install langchain-community python-dotenv
export SERPER_API_KEY=your_api_key_here
export OPENAI_API_KEY=your_api_key_here
from praisonaiagents import Agent, PraisonAIAgents
from langchain_community.utilities import GoogleSerperAPIWrapper
import os
from dotenv import load_dotenv
load_dotenv()
os.environ['SERPER_API_KEY'] = os.getenv('SERPER_API_KEY')
search = GoogleSerperAPIWrapper()
data_agent = Agent(instructions="Suggest me top 5 most visited websites for Dosa Recipe", tools=[search])
editor_agent = Agent(instructions="List out the websites with their url and a short description")
agents = PraisonAIAgents(agents=[data_agent, editor_agent])
agents.start()