-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Expand file tree
/
Copy pathtavily-search.py
More file actions
18 lines (15 loc) · 643 Bytes
/
tavily-search.py
File metadata and controls
18 lines (15 loc) · 643 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
from praisonaiagents import Agent, PraisonAIAgents
from langchain_community.tools import TavilySearchResults
def search_tool(query: str):
tool = TavilySearchResults(
max_results=5,
search_depth="advanced",
include_answer=True,
include_raw_content=True,
include_images=True
)
return tool.run(query)
data_agent = Agent(instructions="I am looking for the top google searches on AI tools of 2025", tools=[search_tool])
editor_agent = Agent(instructions="Analyze the data and rank the tools based on their popularity")
agents = PraisonAIAgents(agents=[data_agent, editor_agent])
agents.start()