0
State machine design for a multi-turn conversational agent with recovery
Design an explicit state machine for a conversational agent handling {{conversation_flow, e.g. a booking flow}}. I want the actual state diagram in text form, not prose advice. Requirements:
1. List every state (not just the happy path: include states like 'awaiting clarification', 'user changed their mind mid-flow', 'external system unavailable').
2. For each state, list valid transitions out of it and the trigger for each (a specific user intent or system event, not 'if appropriate').
3. Define what happens when the user says something that doesn't map to any expected transition from the current state (the agent must not silently ignore it or restart the whole flow, it should attempt to interpret intent and either transition correctly or ask a targeted clarifying question).
4. Define at least one 'user changes their mind' path per major state (e.g. user wants to change the date after confirming it) and whether that requires re-validating downstream state that depended on it.
5. Define a timeout/abandonment state and what, if anything, gets persisted versus discarded if the user disappears mid-flow.
Flow description: conversation_flow
External systems involved: external_systems