Create a Tool
How to create Tools.
Last updated
How to create Tools.
Last updated
Integrating external APIs into your Caleida AI Agent with the help of Tools can significantly enhance its capabilities. In this guide, we'll walk through a practical use case of integrating the Cats API, which provides information about random cat breeds. In this way it will be super easy to understand the configuration of a Tool
Note: If you subscribe to the annual AI Plus Agent plan or higher, our team can assist you with configuring Caleida to suit your business needs. 🍀
Objective: Integrate the Cats API to enable your AI agent to fetch information about different cat breeds. This integration will allow users to request data about cat breeds, including descriptions, directly through the AI agent.
Tool Creation
Example Use Case
Testing the Integration
Activating the Tool
Step-by-Step Guide:
Navigate to the Tools Section:
Select the Tools card on your dashboard’s sidebar.
Create a New Tool:
Click on the Create New Tool button.
Configure the Tool:
Auth Toggle (Optional):
Purpose: Decide if authentication is needed you can provide the auth key and the value. For the Cats API, authentication is not required.
Name of the Tool (Required):
Purpose: Name of he tool will help to distinguish between multiple tools on the list so make sure to add a meaning full name eg: "cats_api" for easy identification.
Request Method (Required):
Purpose: This will be a method (Currently we support GET, POST) of request that the tool is going to use in this example**,** Select GET as the method for retrieving data.
Endpoint (Required):
Purpose: This will be the API endpoint that the tool is going to interact with, In this example, Enter the Cats API endpoint URL: https://api.thecatapi.com/v1/breeds
.
Description (Required):
Purpose: Describe the tool’s function, e.g., "Fetches information about various cat breeds"
Add Parameters (Based on type currently supporting STRING, BOOLEAN, INTEGER, and FLOAT
):
Purpose: Add any required parameters. For example:
Name: limit
Description: Limits the number of breeds returned.
Default Value: 5
Required Toggle: Optional, depending on your needs.
Save Button:
Purpose: Click "Save" to save the tool configuration.
Scenario: A user wants to know about a random cat breed.
Request: The AI agent uses the Cats API tool to make a GET request to the endpoint https://api.thecatapi.com/v1/breeds
with the parameter limit=5
.
Expected Response: The API returns a list of cat breeds with details including breed names.
Example Response:
After completing the setup and saving your tool, a "Test Tool" button will appear in the footer of the drawer. Clicking this button opens a testing block specifically designed for the tool you’ve just created. This feature allows you to verify the integrity and functionality of the tool before activating it for use with your AI agent.
Steps to Test the Tool:
Locate the Test Tool Button:
After saving the tool, scroll to the footer of the drawer where you will find the Test Tool button.
Click the Test Tool Button:
Clicking this button will open the testing block, providing an interface to interact with the tool and verify its behavior.
Interact with the Testing Block:
The testing block allows you to input test parameters and make requests to the tool’s API endpoint. This interaction helps ensure that the tool operates as expected and returns the correct data.
Review Test Results:
Examine the responses returned by the tool in the testing block. Check for accuracy, completeness, and any potential issues. If the tool does not perform as intended, review your configuration settings and make necessary adjustments.
Adjust Configuration if Needed:
If any discrepancies or issues are found during testing, modify the tool’s configuration settings accordingly. Save any changes and re-test the tool to ensure that the adjustments have resolved the issues.
Confirm Integrity:
Once the tool has passed testing and returned the expected results consistently, you can confidently activate it. This step ensures that the tool is fully operational and integrated correctly into your AI agent.
By following these steps, you ensure that your tool functions correctly and integrates seamlessly with your AI agent, providing a reliable and effective addition to your Caleida platform setup.
Once you are confident that the tool is set up correctly, you can activate it from the Tools list. Simply click the switch next to the tool's name to enable it.
After activation, the tool is ready for testing with the agent. To perform a test:
Navigate to the Dashboard Navbar:
Locate and click on the Test Agent button.
Input a query related to the tool’s functionality. For example, you might ask, "Give me information about a random cat breed."
By following these steps, you can verify that the tool performs as expected and integrates smoothly with your AI agent. This final test ensures that everything is functioning correctly before full deployment.
That concludes the tutorial for setting up your Tools. Remember, if you have any questions, you can contact the Caleida team at support@caleida.io.
Conduct Your Test: