Call any HTTP API from an Agent. External tools map Agent parameters to URL, headers, and body templates.
- Click Tools in the sidebar
- Click Create Tool
- Select External (HTTP API)
- Configure:
- Name: Unique identifier (e.g.,
lookup_customer)
- Description: What the tool does and when to use it
- URL: API endpoint
- Method: GET, POST, PUT, DELETE, PATCH (default is POST)
- Headers: Authentication and content type
- Parameters: Define inputs
- Click Create
Configuring the HTTP request
URL
Use {{parameterName}} template variables for dynamic values:
GET requests: Parameters not substituted into the URL are automatically packed into the query string.
Add authentication and content type:
Default content type is application/json if not specified.
Request body
For POST, PUT, and PATCH requests, define the body as JSON with template variables:
Template values are JSON-stringified automatically, so strings, numbers, and objects all interpolate correctly into valid JSON. If no body template is provided, the tool sends all parameters as a JSON object.
Managed secrets
Store credentials securely with {{secret:NAME}} references. Secrets resolve at runtime and are never exposed to Agents or returned in responses:
Add secrets in Settings → Secrets, then reference them by name in headers, URL, or body.
Defining parameters
Map each parameter to a {{variable}} in the request URL, headers, or body:
- Click + Add Parameter
- Configure:
- Name: Must match template variable name
- Type:
string, number, boolean, object, array
- Description: Clear explanation for the Agent
- Required: Whether the parameter is mandatory
- Default: Fallback value if not providedExample: For URL
https://api.example.com/customers/{{customerId}}, add parameter customerId (string, required).
Response handling
The tool returns the HTTP response body to the Agent. If the API returns a non-2xx status, the tool fails and the Agent receives the status code and response body as an error.
Ensure your API returns structured JSON that Agents can work with. Example response:
The Agent receives this object and can reference fields like response.name or response.tier.
Authentication
Basic auth
If your API requires Basic Auth, base64-encode username:password and send it in the header:
Use managed secrets for the credentials value.
OAuth tokens
Error handling
External tools can fail if:
- API is unreachable
- Authentication fails (401, 403)
- Rate limits exceeded (429)
- Invalid parameters (400)
- Server errors (500+)If the API returns a non-2xx status, the tool fails and the Agent receives the status code and response body as an error. The Agent can retry with different parameters or fall back to another tool.
- Click Test on the tool page
- Provide sample parameter values
- Click Run Test
- Review the HTTP request sent
- Check the response received
- Iterate until working correctly
Customer lookup
Create support ticket
Product search
Best practices
- Clear descriptions. Help Agents understand when to use the tool.
- Validate responses. Ensure API returns usable JSON.
- Handle rate limits. Document limits in tool description.
- Meaningful errors. Return error messages Agents can understand.
- Test against the live API with real credentials before attaching the tool to an Agent.
- Document side effects. Note if tool creates or modifies data.
- Use managed secrets. Never hardcode credentials in tool configs.
Next steps
- Creating custom tools — JavaScript and Python-based tools
- Agent tools — how Agents select and invoke tools
- What are Tools? — conceptual background