https://retellai.com/?utm_source=discord&utm_medium=seo logo
how do edges work in multi-prompt agents
# ❓・ai-evy-support
v
@AI Evy how do edges work in multi-prompt agents?
a
Thanks for tagging me @Vaughan. I'll look through relevant sources and get back to you shortly.
### Answer In multi-prompt agents, edges define the transition logic between states—they specify the conditions for moving from one state to another. [(1) ]() Each state in a multi-prompt agent includes: - A focused prompt for that conversation phase - State-specific functions (only relevant tools available in that state) - **Transition logic**: Clear conditions for moving between states - Context preservation: Variables and information flow between states How to use edges: You can't jump to a node using just the prompt—you have to use the edges to define transitions. [(2) ]() For example, you might set a path condition like: > "Transition if the user wants to check availability, make a booking, reserve a studio, or asks if a studio is free." Tips for reliable transitions: 1. In your state prompt, explicitly instruct the agent to transition, e.g.,
"transition to state 'classify_caller'"
2. Use strong, explicit language in prompts to trigger transitions reliably, such as: > "Immediately and reliably initiate the transfer. You must invoke the [function] at this point without fail. This is critical and non-negotiable." [(3) ]() 3. Asking for user confirmation before transitioning can improve reliability.
​ To learn more, see the sources I considered: [[1] Single/Multi Prompt Agent Overview](https://docs.retellai.com/build/single-multi-prompt/prompt-overview) [[2] Multi prompt agent not always transitioning to the next state](https://discord.com/channels/1186424376300679209/1412769473227657329) [[3] Multi prompt agent not always transitioning to the next state](https://discord.com/channels/1186424376300679209/1303504848196472893) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.