Skip to main content

What is Function Calling?

Function calling enables your Voice AI agents to execute real-time actions during live conversations. Instead of just responding with text, your agent can transfer calls, book appointments, fetch data from APIs, or trigger any custom workflow.
Tools Tab showing Function Tools for LLM Models with Choose functions dropdown, Add function button, and Add Transfer Call option
Function calling follows OpenAI specifications, so you can use existing function schemas with Bolna.

Built-in Function Tools

Bolna provides ready-to-use tools for common use cases. Select them from the “Choose functions” dropdown - no coding required.
Choose functions dropdown showing Check slot availability, Book appointments, Transfer call to human agent, and Add your own custom function options

How It Works

1

LLM Reads Function Definition

The LLM sees your function’s name and description to understand what the function does
2

Decides When to Call

Based on conversation context, the LLM decides if this function should be triggered
3

Extracts Parameters

The LLM collects required parameter values from the conversation with the caller
4

Bolna Executes API Call

Bolna makes the HTTP request to your API endpoint with the extracted parameters
5

Response Feeds Back

The API response is returned to the LLM, which continues the conversation naturally
The description is everything. The LLM relies heavily on your description to know when to call the function. A vague description = unreliable triggering.

Context Variables

The following variables are available in the conversation context and can be passed to function parameters:
VariableDescription
{agent_id}The id of the agent
{call_sid}Unique id of the phone call (from Twilio, Plivo, etc.)
{from_number}Phone number that initiated the call
{to_number}Phone number that received the call
Custom variablesAny variable you define in the agent prompt
Variables defined in your agent prompt are automatically substituted in function parameters. Learn more in Using Context Variables.

Next Steps