Start by giving your tool a clear, descriptive name that reflects its purpose. This name will appear in the tools list and when assigning it to agents.
Naming Requirements:
Next, add a detailed description explaining what the tool does. This is crucial because:
Write your description as if explaining when and how the AI should use this tool, including potential triggers and actions.
Good description examples:
Define how your tool will connect to the external system:
Choose the appropriate method for your API request:
Enter the complete API endpoint URL. You can use variable placeholders (enclosed in curly braces) that will be populated at runtime.
Example: https://api.myclinic.com/patients/{patientId}/appointments
Variables in the URL path will be replaced with actual values during execution.
Decide how the agent should handle the tool's execution:
Toggle 'Asynchronous Execution' on if you want the agent to continue the conversation while the tool executes in the background.
Many APIs require specific HTTP headers to be sent with each request:
To add a header:
You can add as many headers as needed for your specific API requirements.
For POST and PUT requests, you'll typically need to send data in the request body:
Enter the JSON structure that your API expects. You can include variables that will be replaced with actual values.
Example:
Your JSON might look like this:
During a conversation, the agent will replace these placeholder variables with actual values collected from the caller or from context.
Define variables that your tool will use by setting up parameters the agent can extract from the conversation:
These variables will be dynamically filled with data gathered during the conversation and inserted into your API request (URL, headers, or body).
Securely connecting to external APIs is vital. Navigate to the 'Authentication' section to set up the appropriate method:
Refer to the 'Configuring Tool Authentication' guide for detailed setup instructions for each method.