How It Works
When a conversation node has functions attached, the LLM receives both the node instruction and the list of available functions. During the conversation, the LLM determines when a function should be called based on context, extracts the required parameters, and invokes the function — all while maintaining the dialogue with the user.- Multiple functions can be added to a single conversation node
- The agent can continue talking while a function executes
- Function results are available to the LLM for generating follow-up responses
Node Functions vs Function Nodes
Node functions and function nodes serve different purposes:| Function Node | Node Functions | |
|---|---|---|
| Execution | Deterministic — executes on node entry | LLM-driven — called when the LLM decides it’s appropriate |
| Functions per node | One | Multiple |
| Conversation | Not intended for dialogue | Full dialogue with functions available |
| Best for | Always-execute actions (e.g., always look up order on entry) | Context-dependent actions during dialogue (e.g., look up order only if user asks) |
Add Functions
Select a conversation node
Click on a conversation node to open its settings panel on the right side.
Add a function
In the settings panel, find the Tools section and click + Add to add a new function.Select the function type from the dropdown menu.
Configure the function
Configure the function based on its type. See Available Function Types below for configuration details for each type.
Available Function Types
| Function Type | Description | Configuration Guide |
|---|---|---|
| Custom Function | Make HTTP requests to your external APIs | Custom Function |
| Check Calendar Availability | Query available time slots via Cal.com | Check Availability |
| Book Appointment | Book calendar events via Cal.com | Book Calendar |
| End Call | Terminate the call | End Call |
| Transfer Call | Transfer to a phone number | Transfer Call |
| Transfer Agent | Transfer to another Retell agent | Transfer Agent |
| Press Digit | Send DTMF tones | Press Digit |
| Send SMS | Send a text message | Send SMS |
| Extract Dynamic Variable | Extract variables from the conversation | Extract Dynamic Variable |
| MCP Tool | Call tools on your MCP server | MCP Node |
Execution Speech Settings
Each function has settings that control what the agent says while the function is running and after it completes.Speak During Execution
When enabled, the agent says a message while the function is executing (e.g., “One moment, let me check that for you.”). Recommended when your function takes over 1 second (including network latency) to complete, so the agent remains responsive. You can configure how the message is generated:- Prompt: The LLM dynamically generates what to say based on a description you provide.
- Static Text: The agent speaks the exact text you provide.
Speak After Execution
When enabled, the agent calls the LLM after the function returns a result, so it can speak about the outcome to the user. Turn this off if you want to run the function silently (e.g., logging data to your server without informing the user).- Speak During Execution is available on: Custom Function, End Call, Transfer Call, Transfer Agent, and MCP Tool.
- Speak After Execution is available on: Custom Function and MCP Tool.
Best Practices
- Be explicit in your node instruction about when each function should be called. The LLM uses the instruction and function descriptions to decide when to invoke a function.
- Use function nodes for guaranteed execution. If a function must always run at a certain point in the flow (e.g., always fetch user data before greeting), use a function node instead.
- Avoid adding too many functions to a single node. Adding many functions can make it harder for the LLM to choose the right one. If you have many functions, consider splitting them across multiple conversation nodes.