https://retellai.com/?utm_source=discord&utm_medium=seo logo
Leave a sub-state to go back to the main state.
# ❓・bug-report
u
I have a main state with a bunch of objectives to complete and a few sub-states directly under it, that the LLM can use to fulfill the objectives. When a sub-state is completed (its own objectives are complete), return to the calling state to continue the execution? It seems to be stuck in the sub-state right now.
n
Have you created an edge from the sub-state to the main state and mentioned when to transition to the main state in the prompt of the sub state?
u
Yes I have but that didn't help. The conversation became stuck and never moved back up to the parent
My agent is architectured like a regular app with the main state running the main convo and calling sub-states to accomplish specific tasks. All examples I'm seeing of multi-prompt agents appear to have more of a linear approach with one state feeding into the next. It does work better that way. So maybe it's an unsupported pattern.
n
Not sure if you solved it @user8923 but I have done a setup for an e commerce bot where there is a parent state and 3 children states where the conversation needs to keep going back and forth from parent to child state and so on. You have to correctly make the edges and define a clear transition block in each of the parent and child states.
Maybe if you depth of states is more then it might not work perfectly