You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix: Prevent flight rebooking by adding booking confirmation message (#549)
This PR addresses an issue where the agent could attempt to rebook a
flight immediately after a successful booking.
## Problem
Previously, after the `insert_ticket` tool successfully executed, a
confirmation message was not added to the agent's conversation history
from our custom node. This lack of explicit confirmation left the agent
without the necessary context to know the booking was complete. As a
result, the agent could incorrectly infer that the booking task had
failed and attempt to perform the booking again.
## Solution
This PR modifies the custom node to add a success message to the agent's
conversation history immediately after the `insert_ticket` tool
completes successfully. This message explicitly confirms that the flight
has been booked, providing the agent with the proper context to conclude
the booking process and not attempt a rebooking.
This PR also makes the booking success/decline messages consistent
between LangGraph and UI chat history. This is so that after a page
refresh, the messages remains consistent on the Chat UI.
0 commit comments