https://retellai.com/?utm_source=discord&utm_medium=seo logo
I'm building a new agent
# ❓・ai-evy-support
c
@AI Evy I'm building a new agent... What would you recommend is best practise? It's going to be quite complex in the sense that it will handle cancellation, the process of the company etc. Conversational Flow with Global Nodes? Conversational Flow with Flex mode?
a
Thanks for tagging me @Ciaran. I'll look through relevant sources and get back to you shortly.
### Answer For a complex agent handling cancellations and company processes, Conversation Flow is the recommended approach. [(1) ]() Conversation Flow agents provide more fine-grained control over the conversation flow compared to Single/Multi Prompt agents, enabling you to handle more complex scenarios with predictable outcomes. This structured approach offers several key benefits for your use case: - **Structured conversations**: Define exact paths and transitions - **Predictable behavior**: Each node has specific logic and outcomes - **Complex scenario handling**: Support for conditional branching and state management Regarding Global Nodes: Global Nodes are particularly useful for your scenario. They allow users to skip or jump between nodes, which is especially helpful for inbound support cases without a rigid call structure. [(2) ]() For handling cancellations and various company processes, you should add key steps as global nodes to allow users to deviate from the defined flow. Best Practices for Your Complex Agent: 1. **Split complex tasks into multiple nodes**: If a node contains too many instructions, the agent might inconsistently follow them. Breaking them into separate nodes improves consistency. 2. **Use Components for reusable logic**: Components let you build reusable sub-flows and functions that sync automatically across all connected agents - perfect for shared logic like security checks or common processes. [(3) ]() 3. **Make node instructions flexible**: For scenarios where actual conversations don't match the flow graph, make node instructions more flexible and let the model handle details naturally. [(2) ](
com/build/conversation-flow/debug-guide) 4. **Add transition finetune examples**: Provide examples to help the model understand your expectations for node transitions. The documentation doesn't specifically mention "Flex mode" as a distinct feature, so I'd recommend focusing on Conversation Flow with Global Nodes and Components for your complex agent.
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
​ To learn more, see the sources I considered: [[1] Conversation Flow Overview](https://docs.retellai.com/build/conversation-flow/overview) [[2] Debug guide](https://docs.retellai.com/build/conversation-flow/debug-guide) [[3] 🚀 Conversation Flow Components are live!](https://community.retellai.com/t/conversation-flow-components-are-live/150) ​
c
@AI Evy If I components, they wont have access to global nodes outside so lets say I have a component for sign up and then a global node for the weather, I go into the component and then ask about the weather, the agent wouldn't know about that would they?
a
Thanks for the follow-up, @Ciaran. I'll get back to you soon.
### Answer You're correct to be concerned about this limitation. Based on the available documentation, Components cannot contain other Components [(1) ]() , but the documentation doesn't explicitly address whether Global Nodes from the main flow are accessible when inside a Component. However, there is a community feature request specifically asking for "component nodes with the ability to create global nodes" [(2) ]() , which suggests that currently Global Nodes defined in the main flow may not be accessible from within Components. Workaround Approaches: 1. **Define Global Nodes within the Component itself**: Since Components are self-contained sub-flows with their own nodes [(1) ]() , you could create a Global Node for weather inside your signup Component if that specific scenario is common. 2. **Use the main flow's Global Prompt**: The global prompt of the main Conversation Flow is applied to all component nodes implicitly , so you could potentially handle simple queries through the global prompt rather than relying on Global Nodes. 3. **Keep critical Global Nodes outside Components**: For universal scenarios like weather queries that should be accessible everywhere, you may need to handle them in the main flow before entering Components. This appears to be a known limitation, as the community has requested this feature. I'd recommend testing your specific scenario to confirm the behavior, and if it's a blocker, consider submitting feedback through the feature request channel.
​ To learn more, see the sources I considered: [[1] Components](https://docs.retellai.com/build/conversation-flow/components) [[2] Components Nodes as Global Nodes](https://community.retellai.com/t/components-nodes-as-global-nodes/223) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
c
@AI Evy How would you use go back condition? I.e: GLobal node about ordering. Transition is the user understands but what would you put for the go back condition? The user asks another question?
a
Thanks for the follow-up, @Ciaran. I'll get back to you soon.
### Answer The Go Back Condition determines when the conversation should return to where it left off after handling a Global Node. [(1) ]() For your ordering Global Node example, the Go Back Condition should define when the user is satisfied and ready to continue the main conversation. Here are practical examples: Good Go Back Conditions: - "User received the ordering information they needed" - "User changed their mind and wants to continue the call" - "User indicates they're ready to proceed" - "User confirms they understand the ordering process" The key is that the Go Back Condition should capture when the specific topic is resolved, not just when the user asks another question. How it works: 1. User triggers the Global Node (e.g., asks about ordering) 2. Agent handles the ordering inquiry 3. When the Go Back Condition is met, the agent returns to the previous node 4. Conversation continues from where it was interrupted Important considerations: You can enable Prevent Immediate Re-Trigger to pause the Global Node for a specified number of node steps after it's been triggered. This prevents conversation loops when the user's phrasing keeps matching the Global Node condition. The default is 3 node steps. Go Back Conditions support both prompt-based and equation-based conditions, and you can add multiple conditions and reorder them.
​ To learn more, see the sources I considered: [[1] Global Node](https://docs.retellai.com/build/conversation-flow/global-node) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
c
@AI Evy Lets say I have global nodes... I only want them accessible if variable is exists? You could do this via 2 agents... One to authenticate AND then pass onto another OR you just have logic split nodes as global nodes... I think the first option is the best here?
a
Thanks for the follow-up, @Ciaran. I'll get back to you soon.
### Answer You can conditionally control Global Node access using equation-based transition conditions within a single agent - you don't need two separate agents for authentication. How to implement conditional Global Node access: When you enable a Global Node, you must define the condition to transition into it. [(1) ]() You can use equation conditions to check if a variable exists before allowing access to the Global Node. Check if variable exists: You can use these equation conditions: -
{{variable_name}} exists
- Returns true if the variable is defined and has a value -
{{variable_name}} does not exists
- Returns true if the variable is undefined For your authentication scenario: Set up your Global Node's transition condition with an equation like:
Copy code
{{authenticated_user}} exists
This ensures the Global Node is only accessible after authentication is complete and the variable is set. Why single agent is better: Using one agent with conditional Global Nodes is more efficient than two agents because: - Maintains conversation context throughout - Simpler architecture to manage - No need for agent handoff logic - Variables persist across the entire conversation flow The equation-based conditions provide the control you need without the complexity of multiple agents.
​ To learn more, see the sources I considered: [[1] Step 3: Add transition conditions](https://docs.retellai.com/build/conversation-flow/transition-condition) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
c
@AI Evy So... I have a conversational node that's a global node with the text 'The user asks how we deliver' but I only want to be able to access this IF {{user_id}} exists?
a
Thanks for the follow-up, @Ciaran. I'll get back to you soon.
### Answer Yes, you can add an equation condition to your Global Node's transition condition to check if the
{{user_id}}
variable exists. [(1) ]() How to set it up: When you enable a Global Node, you must define the condition to transition into it. For your delivery Global Node, you need to add **two conditions**: 1. **Prompt condition**: "The user asks how we deliver" 2. **Equation condition**:
{{user_id}} exists
Implementation details: The equation condition
{{user_id}} exists
returns true if the variable is defined and has a value (even an empty string is considered having a value) . All equation conditions are evaluated first, and then the prompt conditions are evaluated. This means Retell will first check if
{{user_id}}
exists, and only if it does will it evaluate whether the user is asking about delivery. To add this in the dashboard: Click on your Global Node, then click the "+" button to add a transition condition. Choose "equation" and add
{{user_id}} exists
. You can change "ANY" to "ALL" to force all equations to be true instead of just one. This approach keeps everything in a single agent while ensuring the delivery information is only accessible after authentication sets the
{{user_id}}
variable.
​ To learn more, see the sources I considered: [[1] Step 3: Add transition conditions](https://docs.retellai.com/build/conversation-flow/transition-condition) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
c
@AI Evy But I can't use equation condition on a global node? Am I putting this in the condition? '{{user_id}} exists and the user asks how we deliver'?
a
Thanks for the follow-up, @Ciaran. I'll get back to you soon.
### Answer You're right to question this - based on the available documentation, Global Nodes only support prompt-based conditions for when they should be triggered. [(1) ]() According to the documentation, you configure a Global Node by setting "a condition for when the global node should be transitioned to" - the example given is a prompt like "When user indicates this is not a good time to continue". You cannot directly combine equation conditions with Global Node activation in the same way you can with regular node transitions. The condition field on a Global Node is prompt-based. Workaround options: 1. **Include the authentication check in the prompt itself**: Write your Global Node condition as: "The user asks how we deliver AND they are authenticated" - then in your earlier authentication flow, make sure the agent knows the user is authenticated through context. 2. **Use a regular node with equation-based transitions instead of a Global Node**: If you need strict variable checking, you may need to use standard nodes with equation conditions rather than Global Nodes. 3. **Handle authentication at the global prompt level**: Add instructions in your agent's global prompt that prevent discussing delivery details unless the user is authenticated. The Global Node feature is designed for universal scenarios that can be accessed from anywhere , but it doesn't currently support the same equation-based conditional logic that regular node transitions do.
​ To learn more, see the sources I considered: [[1] Global Node](https://docs.retellai.com/build/conversation-flow/global-node) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
c
@AI Evy So on my conversation cells and component cells (which are global nodes), I should just need to put 'the user wants to cancel and is authenticated' (basically adding 'and is authenticated' to each of the conditions)?
a
Thanks for the follow-up, @Ciaran. I'll get back to you soon.
### Answer Yes, adding "and is authenticated" to your Global Node conditions is a valid approach for prompt-based authentication checks. [(1) ]() When you configure a Global Node, you set a condition for when it should be transitioned to. In your case, the condition would be: "The user wants to cancel and is authenticated". Important considerations: You can add Global Node Examples to help the AI better understand when to jump to this global node. Click "+ Add" to create examples that demonstrate scenarios where the global node should or should not be activated. This is particularly useful for ensuring the agent correctly recognizes both parts of your condition - the cancellation request AND the authentication status. Additional safeguard: You should also leverage your global prompt to reinforce authentication rules. [(2) ]() Use the global prompt for your agent's overall personality, tone, and universal rules, while using conversation flow nodes for step-by-step logic. For example, add to your global prompt: "Never discuss cancellation or sensitive account actions unless the user is authenticated." This layered approach (prompt condition + global prompt rules + finetune examples) provides the most reliable authentication enforcement for your Global Nodes.
​ To learn more, see the sources I considered: [[1] Global Node](https://docs.retellai.com/build/conversation-flow/global-node) [[2] CONVERSATION FLOW AGENT - GLOBAL PROMPT](https://discord.com/channels/1186424376300679209/1371534043157500025) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
c
@AI Evy I still think having 2 agents for this makes more sense... 1 agent for authenticating the user and another handle all the queries the user might hav
a
Thanks for the follow-up, @Ciaran. I'll get back to you soon.
### Answer Your approach of using two agents is valid, but there are important considerations to weigh. Two-Agent Approach: The main challenge with splitting authentication and query handling across two agents is agent migration. According to community discussions, there's currently no built-in support for seamlessly transferring context or state between agents across different workspaces or configurations. [(1) ]() This means you'd need to handle the handoff logic yourself, potentially losing conversation context during the transition. Alternative: Flex Mode Given your complex use case with cancellations and various company processes, you might want to consider Flex Mode as an alternative to rigid conversation flow with authentication checks. [(2) ]() Flex Mode combines: - **Conversation Flow structure**: Clear visual business logic - **Single Prompt flexibility**: Natural handling of varied user behavior With Flex Mode, you can "easily switch context from different tasks" and "move on to the proper task if the user completed multiple tasks at the same time." This might better handle your authentication + query scenario within a single agent. Important Cost Warning: Flex mode can significantly increase LLM costs because all node instructions, transitions, and tool descriptions are compiled into a single prompt. When the combined prompt exceeds 3,500 tokens, token scaling billing rules apply, which can multiply costs several times over. Recommendation: If you proceed with two agents, ensure you have a robust handoff mechanism. If you want to keep everything in one agent with more flexibility than rigid conversation flow, explore Flex Mode - but monitor costs carefully and keep node instructions concise.
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
​ To learn more, see the sources I considered: [[1] Migrate agents across workspaces](https://community.retellai.com/t/migrate-agents-across-workspaces/532) [[2] Flex Mode](https://docs.retellai.com/build/conversation-flow/flex-mode) ​
c
@AI Evy I have a global conversation cell with the condition 'the user asks how we deliver', if I ask, the agent is just going back to begin?
a
Thanks for the follow-up, @Ciaran. I'll get back to you soon.
### Answer Based on the available information, if your agent is going back to the beginning after triggering the Global Node, you likely need to enable the "Go back to previous node" feature. [(1) ]() When you enable Go back to previous node, the conversation can return to where it left off after the Global Node is handled. Once enabled, a Go Back Condition section appears on the node where you define when the agent should navigate back. To fix your issue: 1. Enable "Go back to previous node" on your Global Node 2. Add a Go Back Condition such as "User received the delivery information they needed" or "User is ready to continue" Without this setting enabled, the Global Node won't know when or where to return to in the conversation flow. Additional tip: You can enable Prevent Immediate Re-Trigger to pause the Global Node for a specified number of node steps (defaults to 3) after it has been triggered. This prevents the conversation from looping when the user's phrasing keeps matching the Global Node condition.
​ To learn more, see the sources I considered: [[1] Global Node](https://docs.retellai.com/build/conversation-flow/global-node) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
c
@AI Evy Stop the agent from saying um?
a
Thanks for the follow-up, @Ciaran. I'll get back to you soon.
### Answer I don't have specific documentation about controlling filler words like "um" in Retell AI agents based on the available sources. However, the sources mention that Platform voices are fine-tuned specifically for conversational AI and "handle fillers, pacing, and conversational rhythm well" [(1) ]() . This suggests that voice selection may impact filler word usage. For more control over speech synthesis behavior, you might want to check the agent settings for voice configuration options or reach out to support for guidance on reducing filler words in your specific TTS provider. Check out these potentially useful sources: - [Platform voices]() - [Documentation]() - [Hire certified Retell partner]() Would you like me to try to provide a general answer based on common voice AI practices?
​ To learn more, see the sources I considered: [[1] Platform voices](https://docs.retellai.com/build/platform-voices) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
c
@AI Evy Testing agent via chat. I have an in call sms and it's actioned but it's sending a text to someone completely random?
a
Thanks for the follow-up, @Ciaran. I'll get back to you soon.
### Answer Based on the sources, when sending SMS during a call, the SMS destination needs to be configured correctly. [(1) ]() [(2) ]() By default, SMS is sent to the caller's number. However, you can configure it to send to a different number using either: 1. A static phone number 2. A dynamic variable (e.g.,
{{customer_phone}}
) To fix your issue: Check your SMS node or Send SMS tool configuration and verify the SMS destination setting. If you're using a dynamic variable like
{{customer_phone}}
, ensure that: [(3) ]() - The variable is being set correctly earlier in your flow - The variable contains the correct phone number format - The variable actually exists (you can use
{{variable_name}} exists
to check) Important note about chat testing: When testing via chat instead of an actual phone call, the system variables like
{{user_number}}
may not behave the same way as they would in a live phone call. The
{{user_number}}
variable represents the user's phone number (from_number for inbound, to_number for outbound) . To troubleshoot: 1. Check which destination is configured in your SMS node/tool 2. If using a dynamic variable, verify it's populated with the correct number 3. Test with an actual phone call rather than chat to ensure proper variable population Dynamic variables work in SMS configurations for both the content and destination. [(1) ]() [(2) ]()
​ To learn more, see the sources I considered: [[1] SMS Node](https://docs.retellai.com/build/conversation-flow/sms-node) [[2] Send SMS](https://docs.retellai.com/build/single-multi-prompt/send-sms) [[3] Dynamic Variables](https://docs.retellai.com/build/dynamic-variables) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
c
@AI Evy It's not, ignore me. I was looking at all messages on twilio. Thought we sent a text to someone random....
a
Thanks for the follow-up, @Ciaran. I'll get back to you soon.
### Answer No problem! Glad you figured it out. For future reference, when testing SMS functionality in Retell AI, remember that by default the SMS is sent to the caller's number. [(1) ]() [(2) ]() You can verify the destination in your SMS node configuration if you ever need to troubleshoot again. The SMS will be sent when entering the node, [(1) ]() and you can check the exact destination (whether it's using the default caller number or a custom static/dynamic variable) in the "Configure SMS destination" section of your SMS node settings. [(1) ]() [(2) ]()
​ To learn more, see the sources I considered: [[1] SMS Node](https://docs.retellai.com/build/conversation-flow/sms-node) [[2] Send SMS](https://docs.retellai.com/build/single-multi-prompt/send-sms) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
c
@AI Evy Can In Call SMS be actioned from a test chat? Not on call?
a
Thanks for the follow-up, @Ciaran. I'll get back to you soon.
### Answer Based on the available documentation, SMS nodes are designed to work during phone calls. [(1) ]() The SMS node sends messages when the agent enters that node, and by default sends to the caller's number. However, the documentation doesn't explicitly state whether SMS functionality works in test chat mode (Manual Chat or AI Simulated Chat) versus actual phone calls. The SMS feature requires phone numbers that have SMS enabled, including Retell Twilio numbers and custom telephony numbers that have passed A2P applications. Since test chat doesn't involve an actual phone call with a real caller number, the SMS destination variable may not populate correctly, which could cause issues with SMS delivery during chat testing. Recommendation: Test SMS functionality with actual phone calls rather than chat testing to ensure proper behavior and variable population (like
{{user_number}}
) . Check out these potentially useful sources: - [SMS Node]() - [Documentation]()
​ To learn more, see the sources I considered: [[1] SMS Node](https://docs.retellai.com/build/conversation-flow/sms-node) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.