https://retellai.com/?utm_source=discord&utm_medium=seo logo
<@1145576664366055464> In a multi-state agent, if ...
# ❓・ai-evy-support
h
@AI Evy In a multi-state agent, if a user goes down one path and during that path they ask a question that would need to lead them down another path, how do they get switched to the new path?
a
Thanks for tagging me @hoverlover.. I'll look through relevant sources and get back to you shortly.
### Answer In a multi-state agent, users can be switched to different paths through transition conditions and global nodes [(1) ]() . For Conversation Flow Agents: You can handle path switching using global nodes - when enabled, you define conditions to transition into these nodes from any current state . Global nodes are useful for handling scenarios like objection handling that can occur from any point in the conversation . Transition Conditions: You can define transition conditions using either: - Prompt conditions evaluated by the LLM (e.g., "User said something about booking a meeting") - Equation conditions that are hardcoded mathematical evaluations When a user says something that triggers a global node condition, the agent will transition to that global node regardless of their current path . If what the user said can be handled by a global node, the agent will transition to the global node; otherwise, the agent will stay in the current node . For Multi-Prompt Agents: You define state transition logic in your prompts, specifying when to transition to different states based on user responses [(2) ]() . For example, you can include instructions like "if users say 'yes' to the question, transition to
your_next_state
state" . The key is setting up comprehensive transition conditions that cover the various scenarios where users might need to switch paths, ensuring your agent doesn't get stuck in one path when the user's needs change [(1) ]() .
​ To learn more, see the sources I considered: [[1] Step 3: Add transition conditions](https://docs.retellai.com/build/conversation-flow/transition-condition) [[2] Build a multi-prompt agent](https://docs.retellai.com/build/single-multi-prompt/write-multi-prompt) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.