Legend
01/28/2026, 3:23 AMAI Evy
01/28/2026, 3:23 AMAI Evy
01/28/2026, 3:24 AMAI Evy
01/28/2026, 3:24 AM{{session_duration}}) for transitions in Flex Mode is not recommended. The documentation explicitly states:
> "Only use Prompt edge, avoid using Equation edge as LLM is really bad at interpret equation conditions. You might see very weird behaviors." [(1) ]()
In Flex Mode, all nodes get compiled into a single structured prompt, and the agent navigates tasks dynamically based on natural language conditions rather than programmatic equation checks.
Recommended approach:
Instead of relying on {{session_duration}} with an equation edge, you should:
1. Use a Prompt edge with explicit, observable conditions written in natural language
2. Write crisp, clear transition instructions in your node prompts that describe when to move to the next task
If you need strict, time-based sequencing, consider keeping that portion of your flow in rigid mode (standard conversation flow) rather than Flex Mode, since Flex Mode is designed for flexible navigation where customers may jump between topics. [(2) ]()AI Evy
01/28/2026, 3:24 AMAI Evy
01/28/2026, 3:25 AMLegend
01/28/2026, 3:25 AMAI Evy
01/28/2026, 3:25 AM{{session_duration}} >= 240 (4 minutes in seconds) equation edge in the standard conversation flow portion, not inside the Flex Mode component. This way the equation logic runs in rigid mode where it functions reliably.
Conceptual Flow:
- Standard Flow Entry Node → connects to your Flex Mode Component (handles flexible conversation)
- Flex Mode Component → has an outgoing edge back to standard flow
- Standard Flow Node with an Equation Edge checking {{session_duration}} >= 240 → transitions to your target node when the condition is met
Important Caveats:
- Equation edges should be avoided inside Flex Mode since "LLM is really bad at interpret equation conditions" and you may see unexpected behaviors.
- Be explicit on transitions: write crisp, observable conditions.
- If you use Flex Mode for more than 20 nodes, performance might degrade and hallucination risk increases—splitting into smaller components is recommended.
I don't have a documented example of this exact hybrid setup in the sources. You may want to reach out for more tailored guidance:
- [Contact Sales]()
- [Retell AI GitHub]()
Would you like me to provide a general answer on how conAI Evy
01/28/2026, 3:25 AMAI Evy
01/28/2026, 3:25 AMAI Evy
01/28/2026, 3:25 AMLegend
01/28/2026, 6:23 AM{{session_duration}} is greater or equal to 30 seconds and caller has not been informed that the call will cut soon due to durationAI Evy
01/28/2026, 6:23 AMAI Evy
01/28/2026, 6:24 AM{{session_duration}} is greater or equal to 30 seconds is essentially an equation-based condition written in natural language. In Flex Mode, the LLM interprets all node instructions dynamically, and it struggles to reliably evaluate numeric comparisons like this.
Recommended approach:
If you need time-based transitions, keep that logic outside of Flex Mode in the standard conversation flow portion, where you can use a proper Equation Edge that evaluates {{session_duration}} >= 30 programmatically.
For the Flex Mode component itself, write node instructions in a concise manner focused on conversational tasks, and use Prompt edges with crisp, observable conditions based on what the caller says or *does*—not on numeric variable evaluations.
If you absolutely need this behavior within Flex Mode, consider having a separate standard flow node with an Equation Edge that checks the session duration and then transitions to your target node outside the Flex Mode context.AI Evy
01/28/2026, 6:24 AMAI Evy
01/28/2026, 6:24 AMLegend
01/28/2026, 6:25 AM{{session_duration}} is greater or equal to 30 seconds and caller has not been informed that the call will cut soon due to duration
Because it's not working for me.AI Evy
01/28/2026, 6:25 AMAI Evy
01/28/2026, 6:26 AM{{session_duration}} is greater or equal to 30 seconds) with a conversational state check (caller has not been informed...) . Global node conditions work best when they describe observable conversational triggers.
What to try:
1. Use a proper Equation Edge for the numeric comparison rather than writing it as natural language in the transition condition. The condition field for global nodes expects a prompt-style description of when the transition should happen based on conversation context.
2. Separate the logic:
- Create an Equation Edge that checks {{session_duration}} >= 30
- Use the global node's condition to describe the conversational trigger (e.g., "When the agent needs to inform the caller about call duration limits")
3. Add transition finetune examples to help the model understand when to trigger the global node. You can add example conversations showing when the agent should and should not jump to the global node. [(2) ]()
Debugging steps:
- Review your transition conditions to ensure they precisely match your intended triggers [(3) ]()
- Consider adding finetune examples to help the model understand your expectations
- Check if the condition is too complex—try breaking it down into simpler conditions
I don't have explicit documentation showing the exact syntax for combining equation checks with global node conditions in rigid mode. You may want to test using a pure Equation Edge for the time check separately.AI Evy
01/28/2026, 6:26 AMAI Evy
01/28/2026, 6:26 AMLegend
01/28/2026, 6:32 AMAI Evy
01/28/2026, 6:32 AMAI Evy
01/28/2026, 6:32 AM{{session_duration}} >= 240 (or whatever threshold) . This equation edge can then transition to a conversation node that informs the caller. Equation edges are evaluated programmatically, not by the LLM.
2. If you must use a global node, write the condition to match something the caller says or does, not a time-based trigger. For example:
- When the caller asks how much time is left on the call
But this won't help you proactively warn them.
The core issue: Global node conditions check the conversation context to determine when to transition. They don't evaluate {{session_duration}} as a numeric comparison—that requires an Equation Edge outside the global node mechanism.
For time-based proactive behavior, use an Equation Edge on a standard node, not a global node condition.AI Evy
01/28/2026, 6:32 AMAI Evy
01/28/2026, 6:32 AMLegend
01/28/2026, 6:35 AMAI Evy
01/28/2026, 6:35 AMAI Evy
01/28/2026, 6:35 AM{{session_duration}} >= 240
5. Connect this equation edge to your target node (the one that warns the caller about call duration)
Example equation syntax from the documentation:
- {{current_time}} > 9 AND {{current_time}} < 18
Note that comparison operators like >=, >, < require numerical input and will evaluate to false if the input is not a number.
Important: You can only use variables that are passed in as dynamic variables for equation conditions. Since {{session_duration}} is a built-in dynamic variable, this should work in rigid mode.AI Evy
01/28/2026, 6:35 AMAI Evy
01/28/2026, 6:35 AMLegend
01/28/2026, 4:52 PMAI Evy
01/28/2026, 4:52 PMAI Evy
01/28/2026, 4:52 PM{{session_duration}} >= 30, you're defining when to transition—but you also need to define where to transition to by connecting that edge to another node.
What to do:
1. Connect the equation edge from your component to the target node you want to transition to (the node that warns the caller about call duration)
2. Make sure the target node exists outside your Flex component in the rigid portion of your flow
Without a connected destination, the condition may evaluate as true but the agent has nowhere to go, so no transition happens.AI Evy
01/28/2026, 4:52 PMAI Evy
01/28/2026, 4:52 PMLegend
01/28/2026, 4:53 PMAI Evy
01/28/2026, 4:53 PMAI Evy
01/28/2026, 4:53 PMAI Evy
01/28/2026, 4:53 PMAI Evy
01/28/2026, 4:53 PMAI Evy
01/28/2026, 4:55 PMLegend
01/28/2026, 4:55 PMAI Evy
01/28/2026, 4:56 PMWhen the current task is complete
- When the caller has finished their request
- When the agent has addressed the caller's question
The key is to write crisp, clear conditions that describe when the conversation within the component has reached a natural stopping point. [(2) ]()
Your setup should be:
1. Inside the component: Connect your internal nodes to the Exit Component node using Prompt edges with conversational conditions
2. Outside the component (rigid flow) : Place your equation edge {{session_duration}} >= 30 on the Component node itself, which then transitions to your target warning node
The equation condition on the outside of the component (in rigid mode) will evaluate programmatically. But the transitions inside the Flex component need to use Prompt edges since the LLM struggles with equation conditions in Flex Mode.AI Evy
01/28/2026, 4:56 PMAI Evy
01/28/2026, 4:56 PMLegend
01/28/2026, 5:29 PMAI Evy
01/28/2026, 5:29 PMAI Evy
01/28/2026, 5:30 PM{{session_duration}} >= 30
2. Connect that equation edge directly to your warning node
The equation edge on the Component node in rigid mode should evaluate programmatically and interrupt/transition out of the component when the condition is met—regardless of what's happening inside the Flex component.
For the Exit Component node inside your Flex component: Use a generic conversational condition like:
- When the conversation has naturally concluded
- When the caller indicates they are done
This handles normal exits. Your time-based equation edge on the outside of the component should handle the forced mid-conversation transition.
If this still isn't working, the issue may be that equation edges on Component nodes don't interrupt active Flex conversations mid-flow. I don't have explicit documentation confirming whether equation edges can forcibly interrupt a Flex component mid-conversation. You may need to reach out for clarification:
- [Contact Sales]()
- [Retell AI GitHub]()AI Evy
01/28/2026, 5:30 PMAI Evy
01/28/2026, 5:30 PMLegend
01/28/2026, 5:49 PMAI Evy
01/28/2026, 5:49 PMAI Evy
01/28/2026, 5:49 PM{{session_duration}} may not be available as a dynamic variable that equation conditions can evaluate unless it's explicitly passed in or configured as a default dynamic variable.
Things to check:
1. Verify session_duration is defined — Check if session_duration is set up in your default_dynamic_variables configuration or passed in when the call starts.
[(2) ]()
2. Transition timing — For Conversation Nodes, transitions happen "when user is done speaking" or "when Skip Response is enabled and agent finishes speaking."
[(3) ]() The equation won't evaluate continuously—it evaluates at transition points.
3. Numerical input requirement — The comparison operators require numerical input and "will always evaluate to false if the input is not a number."
[(1) ]()
I don't have explicit documentation confirming that session_duration is automatically available as a dynamic variable for equation conditions. You may need to verify this with support:
- [Contact Sales]()
- [Retell AI GitHub]()AI Evy
01/28/2026, 5:49 PMAI Evy
01/28/2026, 5:49 PMLegend
01/28/2026, 5:53 PMAI Evy
01/28/2026, 5:53 PMAI Evy
01/28/2026, 5:54 PMAI Evy
01/28/2026, 5:54 PMAI Evy
01/28/2026, 5:54 PM