| name | flights |
| description | Search flights, airfare, routes; book via Trip.com or Duffel. |
Flights
Search via Google Flights CLI.
When to use which:
- Trip.com (primary): supports ALL airlines including Wizz Air and Ryanair. Browser automation via the browser skill's stealth Camoufox browser. Use this by default.
- Duffel (fallback): API-based, faster and more reliable when the airline is supported. Does NOT support Wizz Air or Ryanair. Use for easyJet, Vueling, BA, and other GDS-connected airlines.
User Preferences
Configure these based on your user's preferences:
- Origin: User's home city/airport(s)
- Priority: cheapest price (or as configured)
- Class: Economy (default)
- Seat selection: as preferred
- Stops: any (cheapest usually wins)
Search Commands (Google Flights)
Search flights on a specific date
flights search JFK LAX 2026-04-15
flights search JFK,EWR,LGA LAX 2026-04-15
flights search JFK LAX 2026-05-01 --return-date 2026-05-05
flights search JFK LAX 2026-04-20 --stops 0
flights search JFK LAX 2026-04-20 --max-results 5
Find cheapest dates in a date range
flights dates JFK LAX --from 2026-05-01 --to 2026-05-31
flights dates JFK,EWR LAX --from 2026-05-01 --to 2026-06-30
flights dates JFK LAX --from 2026-05-01 --to 2026-07-01 --round-trip --duration 5
Find cheapest flights across multiple origins
The cheapest command searches all London airports by default (see Setup to configure your home airports):
flights cheapest LAX
flights cheapest LAX --from 2026-05-01 --to 2026-07-31
flights cheapest LAX --round-trip --duration 4 --top 15
Booking via Trip.com (Primary)
Use a subagent for Trip.com booking. Browser work fills context fast, so launch a background subagent with all necessary details and let it run.
Credentials
Store these in your password manager (e.g. Keeper):
- Trip.com account: your login credentials
- Payment card: your credit/debit card details
- Passenger personal info: passport number, DOB, nationality
Trip.com Booking Flow (5 steps)
Pre-flight: Launch browser
browser launch
Step 1: Search
- Navigate to
https://www.trip.com/flights/
- Enter origin/destination airport codes, date, one-way
- Click search, wait for results to load
- Select the target flight from results (match by airline, time, price)
- Click through to booking page
- Quirk: no CAPTCHAs typically encountered during the booking flow
Step 2: Login (if needed)
- Trip.com may prompt for login. Use email login
- It sends a 6-digit verification code to email
- Retrieve code from your email inbox
- Enter code to log in
- Login is sometimes dismissible. Guest checkout also works but saved passengers won't be available
Step 3: Passenger Details
- If logged in, Trip.com shows saved passengers. Select the correct passenger
- If manual entry, fill: given name, family name, gender (combobox, click to open, then click gender), DOB (3 separate fields: day/month/year), nationality (autocomplete, type and select), passport number, passport expiry
- Country code for phone: dropdown, scroll or type to find the correct code
- Quirk: gender field is a combobox, not a dropdown. Click the field, wait for options, click the value
- Quirk: DOB is 3 separate input fields (DD, MM, YYYY), not a single date picker
- Quirk: nationality is an autocomplete. Type first few letters, wait, select from dropdown
Step 4: Seat Selection + Extras
- Skip seat selection (click "skip" or "no thanks" or equivalent)
- Skip all extras/add-ons (baggage, insurance, etc.) unless the user wants them
Step 5: Payment
- ~13 minute payment timer starts on the payment page. Don't linger
- If logged in and card is saved, it may pre-fill card details (card details persist between bookings when logged in)
- Otherwise enter: card number, expiry (MM/YY), CVC
- Click pay/confirm
- 3DS: may trigger depending on card/airline. Check email for verification if needed
- Wait for confirmation page and capture booking number
Post-Booking Checklist
- Capture booking confirmation number from the confirmation page
- Create calendar event (use flight time in local airport timezone)
- Set 24h-before check-in reminder via
tasks remind
- Report booking details to user: airline, flight number, route, times, price, booking ref
Subagent Template for Trip.com Booking
When booking, launch a subagent with this info:
Book flight on Trip.com:
- Route: [ORIGIN] -> [DESTINATION]
- Date: [DATE]
- Target flight: [AIRLINE] [FLIGHT_NUM] dep [TIME]
- Passenger: [NAME] (get details from Keeper or provide directly)
- Payment: [CARD] from Keeper or provided details
- Trip.com login: [CREDENTIALS from Keeper or config]
- Email verification codes: retrieve via email skill (inbox, Trip.com sender)
- Follow the 5-step flow above, then the Post-Booking Checklist above
Booking via Duffel API (Fallback)
Note: Requires a funded Duffel balance before live bookings. Check balance before attempting.
Search bookable offers
flights offer JFK LAX 2026-04-16
flights offer JFK LAX 2026-05-01 --return-date 2026-05-05
flights offer JFK LAX 2026-06-01 --passengers 2 --max-connections 0
Book a flight
flights book <offer_id> --passenger-id <pas_id> --profile myprofile
Other Duffel commands
flights orders
flights order <order_id>
flights cancel <order_id>
flights passenger list
flights passenger show myprofile
Duffel Booking Flow
flights offer [ORIGIN] [DEST] [DATE] -> get offer_id + passenger_ids
- Review price, times, baggage
flights book <offer_id> --passenger-id <pas_id> --profile myprofile
- Confirm -> booking reference returned
Important: Offers expire (~30 min). Always search fresh before booking.
Parameters Reference
| Flag | Description | Default |
|---|
--stops | ANY, 0 (non-stop), 1, 2 | ANY |
--cabin | ECONOMY, PREMIUM_ECONOMY, BUSINESS, FIRST | ECONOMY |
--sort | CHEAPEST, DURATION, DEPARTURE_TIME, ARRIVAL_TIME | CHEAPEST |
--max-results | Max results per origin | 10 (search), 20 (dates) |
--round-trip | Search round-trip dates | false |
--duration | Trip length in days (round-trip) | 3 |
--top | Results for cheapest command | 10 |
--max-connections | Max connections for Duffel offers (-1=any, 0=direct) | -1 |
--passengers | Number of adult passengers for Duffel | 1 |
Setup
Install with:
cd ~/agent/skills/flights/cli && uv tool install --editable --force --reinstall .
Duffel API token stored at ~/.config/duffel/token. Passenger profiles at ~/.config/duffel/passengers.json.
To configure your home airports for the cheapest command, edit LONDON_AIRPORTS in cli/src/flights_cli/cli.py (rename it to something like HOME_AIRPORTS) and set your preferred departure airports.
Gotchas
- Google Flights destination must be single IATA code. Multi-origin works, multi-destination does NOT
- Prices from Google Flights are in USD; Trip.com and Duffel prices depend on currency/locale/IP
Saved Profiles
Use flights passenger save to create reusable passenger profiles:
flights passenger save myprofile \
--given-name "First" --family-name "Last" \
--born-on YYYY-MM-DD --email user@example.com --phone +1234567890
Then reference with --profile myprofile when booking.