Integrate any system with custom function
Custom functions allow you to extend your agent’s capabilities by integrating external APIs, providing additional knowledge, or implementing custom logic.
Custom Functions Overview
You can create custom functions that will be called by the LLM when needed. When called, Retell sends a POST request to your specified URL with the function name and parameters.
Add custom function in dashboard
Click ”+ Add” in the tools section and select “Custom Function” from the dropdown menu.
Configure function details
Add a name and description for the custom function. The name should be unique and separated with underscore.
For example:
- Name:
get_weather
- Description:
Get the weather for a city
Add endpoint URL
Add the URL where Retell will send the POST request to execute your custom function.
Define parameters
Define the parameters for the custom function using JSON schema format. For guidance, refer to:
Example parameter schema:
Configure speech behavior
Set up how the agent should handle speech during and after function execution:
- Speak during execution: Enable if the agent should speak while the function runs
- Enable for user-facing actions (e.g., getting weather information)
- Disable for background tasks (e.g., attaching notes to call)
- Speak after execution: Enable if the agent should provide feedback after the function completes
Troubleshooting
If you failed to save the custom function, it is likely because the parameters are not valid.
One common mistake is not adding "type": "object",
to the top level of the JSON schema. We recommend clicking one of the examples and update accordingly.
Verifying Request is from Retell
To verify that the request is coming from Retell, you can check the X-Retell-Signature
header.
The value is a encrypted request body using your secret key.
100.20.5.228
Was this page helpful?