How They Work
Creating a Function Tool
- Navigate to the Tools section in your dashboard
- Click Create Tool
- Select API Request as the tool type
- Configure the tool:
Basic Configuration
- Name: A clear name the LLM uses to understand when to call the tool (e.g.,
check_order_status) - Description: Explain what the tool does — the LLM uses this to decide when to invoke it
- URL: The API endpoint to call
- Method: GET, POST, PUT, PATCH, or DELETE
Parameters
Define the parameters the agent should extract from the conversation and pass to the API:Authentication
- None: No authentication headers.
- Bearer Token: Prepends
Bearerto the provided string and sends it in theAuthorizationheader. - Token: Prepends
Tokento the provided string. - Basic Auth: Enter a Username and Password; the system automatically Base64-encodes them into a single string (
user:pass) and sends it as aBasicauth header. - Custom Headers: Manually define any other header name and value pair.
Asynchronous Execution (Async)
Toggle the Async setting to control how the agent waits for a response:- Async OFF (Synchronous): The agent waits for the API response before proceeding. Use this when the agent needs the response data to decide what to say next or how to route the flow.
- Async ON (Asynchronous): The agent sends the request and immediately continues the conversation or moves to the next node without waiting. Use this for “fire-and-forget” actions like sending an SMS, starting a background export, or other slow background processes.
Timeout
Set a maximum wait time for the API response (in milliseconds). If the API doesn’t respond in time, the tool call fails gracefully.Using Function Tools
In Single Prompt Agents
The agent decides when to call the tool based on the conversation and the tool’s description. The API response (string or JSON) is sent back to the LLM, which uses it naturally in its next reply. Example: A customer asks “Where’s my order?” → Agent callscheck_order_status with the order ID → API returns tracking info → Agent relays the information conversationally.
In Flow Agents
Function tools are used via Tool Nodes. You can:- Extract specific values from the response using output mapping
- Route the conversation based on extracted values using transitions
- Use extracted data in subsequent nodes via variables
Examples
Order Status Lookup
Appointment Booking
Customer Lookup
Best Practices
- Write clear descriptions — the LLM relies on the description to know when to call the tool
- Keep parameters minimal — only ask for what the API needs
- Set reasonable timeouts — long API calls create silence in the conversation
- Handle errors in your API — return helpful error messages the agent can relay to the user
- Use HTTPS — all tool URLs should use secure connections