Tools & Functions
While the System Prompt gives your assistant a brain and a voice, Tools give it hands. Tools allow the AI to perform actions during the call, such as checking a calendar, sending an SMS, or looking up customer data.
How Function Calling Works
Caller AI uses "Function Calling" (or Tool Use) logic. The flow works like this:
- Listening: The user says "I want to book an appointment for tomorrow."
- Reasoning: The AI analyzes the prompt and realizes it needs to check availability.
- Tool Selection: The AI triggers the `checkCalendar` tool.
- Execution: Caller AI runs the tool in the background (via API).
- Response: The AI receives the data (e.g., "Slots available: 2 PM, 4 PM") and speaks it to the user.
Built-in System Tools
Caller AI comes with several pre-configured tools that you can enable with a single click in the dashboard.
End Call
Function: `endCall`
Allows the AI to hang up the phone gracefully when the conversation is over.
Function: `endCall`
Allows the AI to hang up the phone gracefully when the conversation is over.
Transfer Call
Function: `transferCall`
Forwards the current call to a specified phone number (e.g., human support tier).
Function: `transferCall`
Forwards the current call to a specified phone number (e.g., human support tier).
Press Digits
Function: `pressDigits`
Allows the AI to navigate IVR menus (e.g., "Press 1 for Sales") if it calls another automated system.
Function: `pressDigits`
Allows the AI to navigate IVR menus (e.g., "Press 1 for Sales") if it calls another automated system.
Defining a Tool
When you add a tool, you must provide a Name and a Description. The Description is the most important part—it tells the AI when to use the tool.
Example Configuration
Tool Name: CheckInventory
Description: Use this tool whenever the customer asks if a specific product is in stock. Do not guess; always check the database first.
Parameters: { "product_name": "string" }
Description: Use this tool whenever the customer asks if a specific product is in stock. Do not guess; always check the database first.
Parameters: { "product_name": "string" }
Latency Considerations
Using tools introduces a small delay while the system fetches data. To hide this latency:
- Enable "Wait Messages": The AI can say "Let me check that for you..." while the tool is loading.
- Optimize APIs: Ensure any custom webhooks you connect respond in under 2 seconds.