An AI agent acts, the user confirms

In a travel app, the user asks the assistant to change a trip, for example to move it to Friday, and the AI agent replies with a plan, a question back, or a reason it can't help with a link to the change form. A plan opens a confirmation with the new flight, hotel nights and price difference; Edit goes back to the chat with the plan to change, and Cancel drops it. Only Confirm changes the booking: it charges the card on file, shows the new trip and emails the itinerary, or brings back a new price to confirm if the fare changed meanwhile.

13 screens and steps18 arrows0 warnings

What UJN shows here Point at a note to see its part of the drawing

An AI agent acts, the user confirms  AGENT_CHANGEThe assistant plans a change to a trip; nothing is booked until the user confirms the planStart Assistant button on a tripStartAssistant button on a tripTrip assistant (View) Ask for a change in your own words Route: /trips/:id/assistantViewTrip assistantAsk for a change in your own words/trips/:id/assistantWork out a plan (Action)ActionWork out a planAI agent (System, external) Reads trips and fares, books nothing Host: agent.ai.exampleSystem, externalAI agentReads trips and fares, books nothingagent.ai.exampleThe assistant asks (Modal) A question with quick repliesModalThe assistant asksA question with quick repliesConfirm the change (Modal) What changes and the price differenceModalConfirm the changeWhat changes and the price differenceThe assistant can't do this (Modal) Says why and offers the change formModalThe assistant can't do thisSays why and offers the change formChange a trip (Journey) The form, by hand Journey: CHANGE_TRIPJourneyChange a tripThe form, by handCHANGE_TRIPChange the booking (Action) Charges the card on fileActionChange the bookingCharges the card on fileBooking service (System) Host: booking.travel.exampleSystemBooking servicebooking.travel.exampleSend the new itinerary (Message) Channel: emailMessageSend the new itineraryemailTrip changed (View) New times and receipt Route: /trips/:idViewTrip changedNew times and receipt/trips/:idEnd, success Trip moved, itinerary emailedEnd, successTrip moved, itinerary emailedNo label Navigation from from_trip to Trip assistantSend Navigation from Trip assistant to Work out a planSendplan ready Navigation from Work out a plan to Confirm the change Payload: {flight, hotel_nights, price_difference}plan ready{flight, hotel_nights, price_difference}cannot do it Negative from Work out a plan to The assistant can't do thiscannot do itUse the change form Navigation from The assistant can't do this to Change a tripUse the change formEdit Return from Confirm the change to Trip assistant Payload: {flight, hotel_nights, price_difference}Edit{flight, hotel_nights, price_difference}Cancel Return from Confirm the change to Trip assistantCancelConfirm Navigation from Confirm the change to Change the booking Payload: {flight, hotel_nights, price_difference}Confirm{flight, hotel_nights, price_difference}changed Navigation from Change the booking to Send the new itinerarychangedNo label Navigation from Send the new itinerary to Trip changedDone Navigation from Trip changed to doneDoneNo label Navigation, call from Work out a plan to AI agent Payload: {request, trip}{request, trip}asks back Navigation from Work out a plan to The assistant asks Payload: {question}asks back{question}No label Navigation, call from Change the booking to Booking service Payload: {flight, hotel_nights, price_difference}{flight, hotel_nights, price_difference}No label Return, reply from AI agent to Work out a plan Payload: {reply}{reply}Answer Return from The assistant asks to Work out a plan Payload: {answer}Answer{answer}No label Return, reply from Booking service to Change the booking Payload: {booking_ref}{booking_ref}fare changed Failed return from Change the booking to Confirm the change Payload: {price_difference}fare changed{price_difference}
The source (39 lines)
agent-confirm.puml
@startujnrender { direction: down; arrow_spacing: 24 }journey AGENT_CHANGE "An AI agent acts, the user confirms"description: "The assistant plans a change to a trip; nothing is booked until the user confirms the plan"unique_id_friendly: agent_change start from_trip { description: "Assistant button on a trip" }view chat { title: "Trip assistant"; description: "Ask for a change in your own words"; route: /trips/:id/assistant }action plan { title: "Work out a plan" }system agent { type: external; title: "AI agent"; host: agent.ai.example; description: "Reads trips and fares, books nothing" }view question { type: modal; title: "The assistant asks"; description: "A question with quick replies" }view confirm { type: modal; title: "Confirm the change"; description: "What changes and the price difference" }view cant_do { type: modal; title: "The assistant can't do this"; description: "Says why and offers the change form" }ref change_form { journey: CHANGE_TRIP; title: "Change a trip"; description: "The form, by hand" }action apply { title: "Change the booking"; description: "Charges the card on file" }system booking { title: "Booking service"; host: booking.travel.example }action notify { type: message; title: "Send the new itinerary"; channel: email }view changed { title: "Trip changed"; description: "New times and receipt"; route: /trips/:id }end done { type: success; description: "Trip moved, itinerary emailed" } from_trip --> chatchat --> plan : [Send]plan -right-> agent { payload: [request, trip] }agent ..> plan { payload: [reply] }plan --> confirm : plan ready { payload: [flight, hotel_nights, price_difference] }plan -left-> question : asks back { payload: [question] }question ..> plan : [Answer] { payload: [answer] }plan -x-> cant_do : cannot do itcant_do --> change_form : [Use the change form]confirm ..> chat : [Edit] { payload: [flight, hotel_nights, price_difference] }confirm ..> chat : [Cancel]confirm --> apply : [Confirm] { payload: [flight, hotel_nights, price_difference] }apply -right-> booking { payload: [flight, hotel_nights, price_difference] }booking ..> apply { payload: [booking_ref] }apply --> notify : changedapply .x.> confirm : fare changed { payload: [price_difference] }notify --> changedchanged --> done : [Done]@endujn