Create Custom Tools
Step 1: Install the praisonai
Package
First, you need to install the praisonai
package. Open your terminal and run the following command:
Step 2: Create the InternetSearchTool
Next, create a file named tools.py
and add the following code to define the InternetSearchTool
:
Step 3: Define the Agent Configuration
Create a file namedagents.yaml
and add the following content to configure the agent:
Step 4: Run the PraisonAI Tool
To run the PraisonAI tool, simply type the following command in your terminal:Prerequisites
Ensure you have theduckduckgo_search
package installed. If not, you can install it using:
Other information
TL;DR to Create a Custom Tool
- Add
- InternetSearchTool
in the agents.yaml file in the tools section. - Create a file called tools.py and add this code tools.py
Pre-requisite to Create a Custom Tool
agents.yaml
file should be present in the current directory.
If it doesn’t exist, create it by running the command praisonai --init research about the latest AI News and prepare a detailed report
.
Step 1 to Create a Custom Tool
Create a file called tools.py in the same directory as the agents.yaml file.Step 2 to Create a Custom Tool
Add the tool to the agents.yaml file as show below under the tools section- InternetSearchTool
.