punk8357
01/28/2026, 1:06 AMAI Evy
01/28/2026, 1:06 AMAI Evy
01/28/2026, 1:06 AMAI Evy
01/28/2026, 1:06 AMAI Evy
01/28/2026, 1:06 AMpunk8357
01/28/2026, 1:07 AMAI Evy
01/28/2026, 1:07 AMAI Evy
01/28/2026, 1:07 AMAI Evy
01/28/2026, 1:07 AMcollected_dynamic_variables which contains last_node_name. [(1) ]()
For example, in the call response:
json
"collected_dynamic_variables": {
"last_node_name": "Test node"
}
This means you can use the Get Call or Update Call API endpoints to retrieve the call object and check the last_node_name field to see which node the conversation is currently at or was last at.
However, the sources don't document a real-time streaming or webhook mechanism that pushes node transition events as they happen. You would need to poll the API to check the current state.
Check out these potentially useful sources:
- [Update Call]()
- [Node Overview]()
- [Contact Sales]()
Would you like a general answer on common patterns for real-time event streaming in similar systems?AI Evy
01/28/2026, 1:07 AMpunk8357
01/28/2026, 1:08 AMAI Evy
01/28/2026, 1:08 AMAI Evy
01/28/2026, 1:08 AMcollected_dynamic_variables field is described as "Dynamic variables collected from the call" and is available after the call ends. [(1) ]() , [(2) ]()
The documentation shows this example structure:
json
"collected_dynamic_variables": {
"last_node_name": "Test node"
}
[(1) ]() , [(2) ]()
Unfortunately, the sources only explicitly document last_node_name as an example of what appears in collected_dynamic_variables. The documentation doesn't provide a comprehensive list of all possible fields that can be collected.
The contents of collected_dynamic_variables depend on what dynamic variables you define and collect within your Conversation Flow nodes. Any variables you configure to be collected during the conversation would appear here.
For chats, the same field exists with the same behavior—dynamic variables collected from the chat, only available after the chat ends. [(3) ]() , [(4) ]()
Check out these potentially useful sources:
- [Get Call]()
- [Node Overview]()
- [Contact Sales]()
Would you like a general answer on how dynamic variable collection typically works in conversation flow systems?AI Evy
01/28/2026, 1:08 AMAI Evy
01/28/2026, 1:08 AMpunk8357
01/28/2026, 1:09 AMAI Evy
01/28/2026, 1:09 AMAI Evy
01/28/2026, 1:09 AMlast_node_name is automatically populated by default or requires manual configuration.
The documentation only shows last_node_name as an example value within `collected_dynamic_variables`:
[(1) ]() , [(2) ]()
json
"collected_dynamic_variables": {
"last_node_name": "Test node"
}
[(1) ]() , [(2) ]()
The sources describe collected_dynamic_variables as "Dynamic variables collected from the call. Only available after the call ends."
However, the documentation does not explicitly state:
- Whether last_node_name is a system-provided default field
- Whether you need to configure it manually in your Conversation Flow
- How the value gets assigned
This detail about whether it's automatic or requires setup isn't covered in the API reference documentation I have access to.
Check out these potentially useful sources:
- [Node Overview]()
- [Conversation Flow Overview]()
- [Contact Sales]()
Would you like me to try to provide a general answer based on common patterns for dynamic variable collection in conversation systems?AI Evy
01/28/2026, 1:09 AMAI Evy
01/28/2026, 1:09 AMpunk8357
01/28/2026, 1:10 AMAI Evy
01/28/2026, 1:10 AMAI Evy
01/28/2026, 1:10 AMwait for result is off and speak during execution is **off**: the agent transitions immediately after the function gets invoked (right upon entering the node)
- If wait for result is **on**: the agent transitions once the function result is ready
So the function call itself is deterministic—it fires when the node is entered. The AI doesn't decide whether to call it; that's guaranteed by the flow structure. You control the flow by connecting nodes and setting transition conditions.
To tell the user the result, attach a Conversation Node after the Function Node since Function Nodes aren't intended for conversation.AI Evy
01/28/2026, 1:10 AMAI Evy
01/28/2026, 1:10 AMpunk8357
01/28/2026, 1:11 AMAI Evy
01/28/2026, 1:11 AMAI Evy
01/28/2026, 1:11 AMAI Evy
01/28/2026, 1:11 AMAI Evy
01/28/2026, 1:11 AMpunk8357
01/28/2026, 1:12 AMAI Evy
01/28/2026, 1:12 AMAI Evy
01/28/2026, 1:12 AMAI Evy
01/28/2026, 1:12 AMAI Evy
01/28/2026, 1:12 AMAI Evy
01/28/2026, 1:29 AMpunk8357
01/28/2026, 1:29 AMAI Evy
01/28/2026, 1:29 AMskip response turned on) before the Call Transfer Node.
[(2) ]()
Recommended flow structure for error handling:
- Function Node → (on error condition) → Conversation Node (with skip response enabled, containing your error message) → Call Transfer Node
The Conversation Node with skip response enabled will speak the message and then automatically transition to the next node (the Call Transfer Node) once the agent finishes speaking.
[(3) ]()AI Evy
01/28/2026, 1:29 AMAI Evy
01/28/2026, 1:29 AMpunk8357
01/28/2026, 2:54 AMAI Evy
01/28/2026, 2:54 AMAI Evy
01/28/2026, 2:54 AMAI Evy
01/28/2026, 2:54 AM{{variable_name}} syntax
Important limitation to be aware of: Based on community reports, there's a known limitation where full JSON objects from one function node aren't always reliably reused as arguments in later function calls. The workaround is to persist data in flow/global state or flatten the object, and explicitly bind that variable in the later function's parameter mapping rather than relying on the LLM to pass it.
[(3) ]()
For telling the user the result, attach a Conversation Node after the Function Node—since Function Nodes aren't intended for having conversations with the user, you'll need that separate node to communicate the data back.
[(1) ]()AI Evy
01/28/2026, 2:54 AMpunk8357
01/28/2026, 2:56 AMAI Evy
01/28/2026, 2:56 AMAI Evy
01/28/2026, 2:56 AM{{variable_name}} syntax, and the agent can use that data when speaking to the user.
[(2) ]()
The Function Node is designed to execute and pass results forward—it's not intended for having a conversation with the user. That's why you attach a Conversation Node afterward to communicate the data back to the user.AI Evy
01/28/2026, 2:56 AMAI Evy
01/28/2026, 2:56 AMpunk8357
01/28/2026, 6:25 PMAI Evy
01/28/2026, 6:25 PMAI Evy
01/28/2026, 6:25 PMjavascript
import Retell from 'retell-sdk';
const client = new Retell({
apiKey: 'YOUR_RETELL_API_KEY',
}) ;
await client.agent.delete('oBeDLoLOeuAbiuaMFXRtDOLriTJ5tSxD') ;
The endpoint is:
- DELETE /delete-agent/{agent_id}
Required parameters:
- agent_id (string, required) : Unique id of the agent to be deleted. Deletes all versions of the agent.
Authorization: Include your API key in the header as "Bearer YOUR_API_KEY"
A successful deletion returns a 204 No Content response.
After deleting, you can call the Create Agent endpoint to make a new agent. Note that the Create Agent API will generate a new `agent_id`—there isn't a direct "overwrite" or "update in place" option via Create Agent. If you need to preserve the same agent_id, you'd want to use the Update Agent endpoint instead.
Check out these potentially useful sources:
- [Delete Agent]()
- [Update Agent]()AI Evy
01/28/2026, 6:25 PMAI Evy
01/28/2026, 6:25 PM