🌐 API Tool
The API Tool lets you connect your AI agent to any external API, enabling it to fetch, update, or interact with data in real time. This is useful for integrating your own application endpoints, third-party services, or any RESTful API directly into your agent’s conversations.
How to Use the API Tool
To add an API endpoint, provide at least the following:
- Title: A unique name for the API endpoint within your agent.
- Description: Briefly describe the purpose of the endpoint.
- URL: The full URL of the API endpoint.
- Method: The HTTP method (GET, POST, PUT, DELETE, PATCH).
You can also configure:
- Request Headers: Add custom headers (e.g., for authentication).
- Query Parameters: Add parameters to the URL.
- Request Body: Add a body for POST, PUT, or PATCH requests.
Supported HTTP Methods
- GET
- POST
- PUT
- DELETE
- PATCH
Warning: Mutation calls (POST, PUT, PATCH, DELETE) should be used with caution. Jhunkoo.ai provides no guarantee of data integrity, idempotency, or rollback for such operations. Use them only if you understand the risks and have appropriate safeguards in your API.
Example
Suppose you want your agent to fetch a list of products from an e-commerce API. You can configure the API Tool like this:
{
"title": "Get Products",
"description": "Fetches the list of products.",
"url": "https://fakestoreapi.com/products",
"method": "GET"
}
When a user asks for products, the agent will call this endpoint and use the response in its answer.
Security Note: Never expose sensitive API keys or credentials in public endpoints. Use authentication headers and environment variables where possible.
If you have questions or need help, please contact [email protected].