
Add a Custom Function Tool with Bolna Voice AI Agents in Playground
You can design your own functions and use them in Bolna. Custom functions follow the OpenAI specifications. You can paste your valid JSON schema and define your own custom function.

Screenshot of custom function call integration in Bolna Voice AI
Steps to write your own custom function
- Make sure the
key
is set ascustom_task
. - Write a good description for the function. This helps the model to intelligently decide to call the mentioned functions.
- All parameter properties must be mentioned in the value param as a JSON and follow Python format specifiers like below
Param | Type | Variable |
---|---|---|
user_name | str | %(user_name)s |
user_age | int | %(user_age)i |
cost | float | %(cost)%f |
More examples of writing custom function calls
Custom function for a GET request
Custom function for a GET request
GET
custom function:Custom function for a POST request
Custom function for a POST request
POST
custom function:Using variables and dynamic context
All variables that are part of the agent prompt if included in custom function will be substituted automatically with their appropriate values. The model won’t enquire for these values since they’re already available. You can check the following demonstration.Next steps
Ready to implement custom functions in your voice AI agents? Configure your functions in the Playground Functions tab or use the Agent API for programmatic integration. For related capabilities:- Learn about context variables to pass dynamic data to your functions
- Explore call transfer functions for routing to human agents
- Set up calendar integrations for appointment booking
- View all function calling options