How It Works
When you create a custom HTTP tool, you configure:- URL — the API endpoint your agent will call
- Method — GET, POST, PUT, PATCH, or DELETE
- Headers — authentication tokens, API keys, or custom headers
- Body — the JSON request body, with parameters the agent fills in
- Description — a plain-language explanation of when the agent should use this tool
- Parameters — the inputs the agent needs to provide (e.g., order ID, customer email)
Setting Up an HTTP Tool
- Go to the Tools tab on your agent in the dashboard
- Click Add Tool
- Fill in the request details:
Example: Order Status Lookup
| Field | Value |
|---|---|
| Name | Look up order status |
| Description | Use this tool to check the status of a customer’s order. Use it when the customer asks about their order or provides an order number. |
| Method | POST |
| URL | https://api.yourcompany.com/orders/lookup |
| Headers | Authorization: Bearer your-api-key |
| Body | {"order_id": "{{order_id}}"} |
Example: Schedule Appointment
| Field | Value |
|---|---|
| Name | Schedule appointment |
| Description | Use this tool to book an appointment for the customer. Use it after collecting the customer’s preferred date and time. |
| Method | POST |
| URL | https://api.yourcompany.com/appointments |
| Headers | Authorization: Bearer your-api-key |
| Body | {"customer_name": "{{name}}", "date": "{{date}}", "time": "{{time}}"} |
Example: CRM Contact Lookup
| Field | Value |
|---|---|
| Name | Look up contact |
| Description | Use this tool to look up the customer in the CRM by phone number. Use it at the start of the call to identify the caller. |
| Method | GET |
| URL | https://api.yourcompany.com/contacts?phone={{phone_number}} |
| Headers | Authorization: Bearer your-api-key |
Response Handling
When the API responds, the agent reads the response body and uses the information to continue the conversation naturally. For example, if the order status API returns:Extraction Fields
You can define extraction fields on a tool to pull specific values out of the API response. This is useful when you want the agent to focus on particular pieces of data rather than interpreting the entire response.Testing Tools
You can test your HTTP tools directly from the dashboard before using them in live calls. This lets you verify that the request format, authentication, and response handling work correctly.Best Practices
- Write clear descriptions — the description is how the agent knows when to use the tool. Be specific about the trigger (“when the customer provides an order number”) rather than vague (“for order-related queries”).
- Return concise responses — only include the data the agent needs to communicate. Large payloads slow down the conversation.
- Use HTTPS — always use encrypted endpoints to protect data in transit.
- Handle errors in your API — return clear error messages so the agent can communicate what went wrong.
- Scope tools to nodes — in flow-based agents, assign each tool only to the nodes where it is relevant. This prevents the agent from using a tool at the wrong stage.