Skip to content

Commit 28e3116

Browse files
Merge pull request #419 from asiffarhankhan/main
Add SearchAPI, YouSearch, TavillySearch tools
2 parents 6feab62 + f97a952 commit 28e3116

File tree

3 files changed

+84
-0
lines changed

3 files changed

+84
-0
lines changed
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
---
2+
title: "SearchApi Tool"
3+
description: "Guide for using the SearchApi tool with PraisonAI agents."
4+
icon: "searchengine"
5+
---
6+
7+
## Overview
8+
9+
The SearchApi tool is a tool that allows you to search the web using the SearchApi.
10+
11+
```bash
12+
export SEARCHAPI_API_KEY=your_api_key_here
13+
```
14+
15+
```python
16+
from praisonaiagents import Agent, PraisonAIAgents
17+
from langchain_community.utilities import SearchApiAPIWrapper
18+
19+
data_agent = Agent(instructions="I am looking for the top google searches of 2025", tools=[SearchApiAPIWrapper])
20+
editor_agent = Agent(instructions="Analyze the data and derive insights")
21+
22+
agents = PraisonAIAgents(agents=[data_agent, editor_agent])
23+
agents.start()
24+
```
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
---
2+
title: "TavilySearch Tool"
3+
description: "Guide for using the TavilySearch tool with PraisonAI agents."
4+
icon: "searchengine"
5+
---
6+
7+
## Overview
8+
9+
The TavilySearch tool is a tool that allows you to search the web using the TavilySearch.
10+
11+
```bash
12+
pip install "langchain-community>=0.2.11" tavily-python
13+
export TAVILY_API_KEY=your_api_key_here
14+
```
15+
16+
```python
17+
from praisonaiagents import Agent, PraisonAIAgents
18+
from langchain_community.tools import TavilySearchResults
19+
20+
def search_tool(query: str):
21+
tool = TavilySearchResults(
22+
max_results=5,
23+
search_depth="advanced",
24+
include_answer=True,
25+
include_raw_content=True,
26+
include_images=True
27+
)
28+
return tool.run(query)
29+
30+
data_agent = Agent(instructions="I am looking for the top google searches on AI tools of 2025", tools=[search_tool])
31+
editor_agent = Agent(instructions="Analyze the data and rank the tools based on their popularity")
32+
33+
agents = PraisonAIAgents(agents=[data_agent, editor_agent])
34+
agents.start()
35+
```

docs/tools/external/you-search.mdx

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
---
2+
title: "YouSearchAPI Tool"
3+
description: "Guide for using the YouSearchAPI tool with PraisonAI agents."
4+
icon: "searchengine"
5+
---
6+
7+
## Overview
8+
9+
The YouSearchAPI tool is a tool that allows you to search the web using the YouSearchAPI.
10+
11+
```bash
12+
pip install langchain-community
13+
export YDC_API_KEY=your_api_key_here
14+
```
15+
16+
```python
17+
from praisonaiagents import Agent, PraisonAIAgents
18+
from langchain_community.utilities.you import YouSearchAPIWrapper
19+
20+
data_agent = Agent(instructions="Gather the weather data for Barcelona", tools=[YouSearchAPIWrapper])
21+
editor_agent = Agent(instructions="Breifly describe the weather in Barcelona")
22+
23+
agents = PraisonAIAgents(agents=[data_agent, editor_agent])
24+
agents.start()
25+
```

0 commit comments

Comments
 (0)