The API Tool enables your TailorTalk AI agent to interact with external RESTful services by configuring endpoints, headers, parameters, and request bodies. This empowers your agent to fetch real‑time data or send information to other systems, enhancing automation and personalization.

API Name:
A friendly label for the endpoint (e.g., Current Weather, Order Submission).
Request Type:
Choose GET to retrieve data or POST to submit data.
URL:
The full endpoint URL (e.g., https://api.openweathermap.org/data).
Headers:
Define any HTTP headers as key‑value pairs, such as Authorization: Bearer <token> or custom keys.
Parameters / Body:
| Property | Description |
|---|---|
| Name | Field name (e.g., q, units, apikey) |
| Type | Data type (int or str) |
| Required | Whether the field is mandatory |
| Description | Brief explanation of the field’s purpose |
Description (Optional):
A longer note to help other developers or agents understand this API’s role.
Some APIs answer with far more than your agent needs — hundreds of rows, or rows carrying dozens of fields each. Everything the API returns stays in the agent's context for the rest of the conversation, which makes replies slower and more expensive. Turn on Filter the API response and write one expression naming what to keep.
Write it against the API's own response, beginning at that API's top-level keys.
When the agent calls the tool it sees {"results": ...} around the data — but that wrapper is added after filtering, so an expression starting with results. will match nothing.
Expressions are JMESPath, the same language the AWS CLI uses for its --query option. Suppose the API returns:
{
"payload": {
"result": [
{ "name": "Cotton Tee", "sellingPrice": 899, "mainImage": "a.jpg", "description": "..." },
{ "name": "Denim Cap", "sellingPrice": 499, "mainImage": "b.jpg", "description": "..." }
],
"total": 42
},
"configs": { "currency": "INR" }
}
| Expression | The agent receives |
|---|---|
payload.total | 42 |
payload.result[].name | ["Cotton Tee", "Denim Cap"] |
payload.result[0].name | "Cotton Tee" |
payload.result[].{name: name, price: sellingPrice} | [{"name": "Cotton Tee", "price": 899}, …] |
payload.result[?sellingPrice < `500`].name | ["Denim Cap"] |
The { ... } form selects any number of fields, from anywhere in the response, and lets you rename them as you go:
{
products: payload.result[].{name: name, price: sellingPrice, image: mainImage},
total: payload.total,
currency: configs.currency
}
Renaming is worth doing. price reads more clearly to the agent than sellingPrice, and short names cost fewer tokens.
[] means "every item in this list". Without it, payload.result.name looks for a field called name on the list itself, and finds nothing.| Request Type | Use Case |
|---|---|
| GET | Fetch data (e.g., weather, user info) |
| POST | Submit data (e.g., create order) |
Product Catalog Lookup:
Fetch detailed product specs, pricing tiers, and availability in real time when customers ask about features or stock.
Pricing & Quotations:
Generate customized quotes by pulling pricing rules, discounts, and tax rates, then return a formatted proposal.
Inventory Checks:
Verify item availability across warehouses or stores before committing to orders or deliveries.
Order Creation & Tracking:
Place orders on behalf of customers and retrieve shipment status updates to keep prospects informed.
Upsell & Cross‑sell Suggestions:
Call recommendation engines to surface complementary products based on customer interests or purchase history.
By configuring the API Tool with these sales‑focused endpoints, your TailorTalk agent can drive more effective, personalized engagements, streamlining everything from discovery to close.