Skip to content

Added state changing tools (booking, cancel), and flight cancelation with waive_fee policies#86

Open
charlesmeng18 wants to merge 4 commits intomasterfrom
charlesmeng18/flight-cancel-with-policy
Open

Added state changing tools (booking, cancel), and flight cancelation with waive_fee policies#86
charlesmeng18 wants to merge 4 commits intomasterfrom
charlesmeng18/flight-cancel-with-policy

Conversation

@charlesmeng18
Copy link
Contributor

Add Flight Cancellation with Fee-Waiver Policy

Summary

Adds flight booking and cancellation capabilities to the airline agent, including a fee-waiver eligibility policy for cancellations.

Changes

  • Added cancel_flight method to BookingTools with optional waive_fee parameter
  • Exposed booking tools in agent toolset: book_flights, get_booking, get_my_bookings, cancel_flight
  • Added fee-waiver eligibility policy to agent instructions:
    • Death/Bereavement: actual death events involving customer, family members, or people close to them
    • Serious Illness/Medical Emergency: medical situations preventing travel, requiring mentions of actual medical events, hospital visits, or doctor's orders
    • Agent instructed to ask for cancellation reason when not provided
    • Guardrails to prevent waiving fees for emotional distress, financial hardship, or vague statements
  • Updated agent description to indicate it can "book flights and manage reservations"

Files Changed

  • src/airline_agent/tools/booking.py
  • src/airline_agent/constants.py

@charlesmeng18
Copy link
Contributor Author

charlesmeng18 commented Dec 1, 2025

Here isa running list of examples where the tool call, with using the waive_fee flag, should be guardrailed:

@charlesmeng18 charlesmeng18 marked this pull request as ready for review December 1, 2025 20:03
@charlesmeng18
Copy link
Contributor Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

Comments