### 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) ](
) .