File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 206206 "pages" : [
207207 " tools/tools" ,
208208 " tools/langchain_tools" ,
209+ {
210+ "group" : " External Tools" ,
211+ "icon" : " subscript" ,
212+ "pages" : [
213+ " tools/external/serp-api" ,
214+ " tools/external/brave-search" ,
215+ " tools/external/google-trends"
216+ ]
217+ },
209218 " tools/duckduckgo_tools" ,
210219 " tools/arxiv_tools" ,
211220 " tools/calculator_tools" ,
Original file line number Diff line number Diff line change 1+ ---
2+ title : " BraveSearch Tool"
3+ description : " Guide for using the BraveSearch tool with PraisonAI agents."
4+ icon : " magnifying-glass"
5+ ---
6+
7+ ## Overview
8+
9+ The BraveSearch tool is a tool that allows you to search the web using the BraveSearch API.
10+
11+ ``` bash
12+ pip install langchain-community google-search-results
13+ ```
14+
15+ ``` bash
16+ export BRAVE_SEARCH_API=your_api_key_here
17+ export OPENAI_API_KEY=your_api_key_here
18+ ```
19+
20+ ``` python
21+ from praisonaiagents import Agent, PraisonAIAgents
22+ from langchain_community.tools import BraveSearch
23+ import os
24+
25+
26+ def search_brave (query : str ):
27+ """ Searches using BraveSearch and returns results."""
28+ api_key = os.environ[' BRAVE_SEARCH_API' ]
29+ tool = BraveSearch.from_api_key(api_key = api_key, search_kwargs = {" count" : 3 })
30+ return tool.run(query)
31+
32+ data_agent = Agent(instructions = " Search about AI job trends in 2025" , tools = [search_brave])
33+ editor_agent = Agent(instructions = " Write a blog article" )
34+ agents = PraisonAIAgents(agents = [data_agent, editor_agent])
35+ agents.start()
36+ ```
37+
38+ Generate your BraveSearch API key from [ BraveSearch] ( https://brave.com/search/api/ )
Original file line number Diff line number Diff line change 1+ ---
2+ title : " Google Trends Tool"
3+ description : " Guide for using the Google Trends tool with PraisonAI agents."
4+ icon : " arrow-trend-up"
5+ ---
16
7+ ## Overview
8+
9+ The Google Trends tool is a tool that allows you to search the web using the Google Trends API.
10+
11+ ``` bash
12+ pip install langchain-community google-search-results
13+ ```
14+
15+ ``` bash
16+ export SERPAPI_API_KEY=your_api_key_here
17+ ```
218
319``` python
4- import os
5- from langchain_community.tools.google_trends import GoogleTrendsQueryRun
620from langchain_community.utilities.google_trends import GoogleTrendsAPIWrapper
721from praisonaiagents import Agent, PraisonAIAgents
822
9- # Set your SerpApi API Key
10- os.environ[" SERPAPI_API_KEY" ] = " your_serpapi_key_here"
11-
12- # Initialize the Google Trends API Wrapper and Tool
13- google_trends_api_wrapper = GoogleTrendsAPIWrapper()
14- google_trends_tool = GoogleTrendsQueryRun(api_wrapper = google_trends_api_wrapper)
15-
16- # Define your agents with appropriate tools
1723research_agent = Agent(
1824 instructions = " Research trending topics related to AI" ,
19- tools = [google_trends_tool ]
25+ tools = [GoogleTrendsAPIWrapper ]
2026)
2127
2228summarise_agent = Agent(
2329 instructions = " Summarise findings from the research agent" ,
2430)
2531
26- # Instantiate and start your PraisonAIAgents
2732agents = PraisonAIAgents(agents = [research_agent, summarise_agent])
2833agents.start()
2934```
Original file line number Diff line number Diff line change 1+ ---
2+ title : " SerpAPI Tool"
3+ description : " Guide for using the SerpAPI tool with PraisonAI agents."
4+ icon : " searchengin"
5+ ---
6+
7+ ## Overview
8+
9+ The SerpAPI tool is a tool that allows you to search the web using the SerpAPI.
10+
11+ ``` bash
12+ pip install langchain-community google-search-results
13+ export SERPAPI_API_KEY=your_api_key_here
14+ export OPENAI_API_KEY=your_api_key_here
15+ ```
16+
17+ ``` python
18+ from praisonaiagents import Agent, PraisonAIAgents
19+ from langchain_community.utilities import SerpAPIWrapper
20+
21+ data_agent = Agent(instructions = " Search about AI job trends in 2025" , tools = [SerpAPIWrapper])
22+ editor_agent = Agent(instructions = " Write a blog article" )
23+
24+ agents = PraisonAIAgents(agents = [data_agent, editor_agent])
25+ agents.start()
26+ ```
You can’t perform that action at this time.
0 commit comments