Custom assistant with Caddey
Learn how to leverage Caddey's API to access and execute a range of tools.
This guide is designed for developers looking to create a custom chat agent—not tied to a specific platform—that can query and execute tools using Caddey’s API. Whether you’re building a web-based chatbot, a customer support assistant, or an internal automation tool, these steps will help you seamlessly integrate Caddey capabilities into your custom solution.
Prerequisites
- Caddey Account: Ensure you have an active Caddey account.
- Caddey Agent: Create an agent in the Caddey dashboard and copy its API key (displayed once after creation).
- Development Environment: Basic familiarity with API integration and your assistant’s configuration.
Step 1: Create a Caddey Agent
-
Log in to Caddey:
Visit app.caddey.ai and log into your account. -
Navigate to the Agents Section:
From the dashboard, click on the Agents tab. -
Add a New Agent:
Click Add Agent, enter the required details (agent name and description), and save. -
Copy the API Key:
Once the agent is created, copy its API key as it will be needed for authentication.
Step 2: Configure Your Custom Assistant
-
Integrate the API Key:
In your custom assistant’s configuration file or settings, add the Caddey agent API key.
Use the headerX-API-KEY
with the API key value to authenticate your API requests. -
Import the API Schema:
Retrieve the API schema by accessing:
https://api.caddey.ai/v3/api-docs/tools
This schema defines key endpoints such as:- GET
/tools/query
– To list available tools. - POST
/tools/{toolId}/execute
– To execute a specific tool with JSON input.
- GET
-
Configure Endpoints:
Set up your custom assistant to interact with these endpoints, ensuring that all API calls include the proper authentication header.
Step 3: Test the Integration
- Query Available Tools:
- Send a GET request to
/tools/query
and verify the returned list of tools.
- Send a GET request to
- Execute a Tool:
- Select a tool and send a POST request to
/tools/{toolId}/execute
with the required parameters. - Ensure the tool executes successfully and returns the expected output.
- Select a tool and send a POST request to
Step 4: Finalize and Deploy
-
Review Configurations:
Double-check all settings and verify that API requests are properly authenticated. -
Deploy Your Assistant:
Once testing is successful, deploy your custom assistant with the Caddey integration enabled. -
Monitor and Update:
Continuously monitor the integration and update your configurations as necessary.
Additional Resources
Need assistance? Visit the Support Section.