Overview
Run a short Browser Use script with your own model and a local Chrome to search flight sites for replacement options after a cancellation and return a typed list you check before rebooking yourself.
Problem or Objective
- Which agents compare flights, fares and hotels against your rules?
- Which agents can operate a web browser for you?
More in Travel and Bookings
AI Agents and Models
Tools and Integrations
- Tools
- Browser Use · Python · Google Chrome
- Prerequisites
- Python 3.11 or newer, the Browser Use library, an API key for a supported model, and Chrome or Chromium installed locally.
How It Works
Install the Browser Use Python library (Python 3.11 or newer) and set an API key for the model you use. Write a short script that creates an Agent with a task such as: search the airline's site and one flight search site for flights from the original origin to the destination on the same or next day, and return each option's flight numbers, times, stops, fare and seats shown. Use a fresh local browser, and define an output schema so the result comes back as a structured list rather than free text. Tell the agent not to sign in, select a fare or start a booking. Run it, read the list, open the most promising options yourself, and rebook through the airline's own site, app or phone line, where you can also ask about rebooking at no charge for the cancelled flight.
Implementation Workflow
Steps assembled from the agents, tools and prompt of this entry. Adapt them to your own setup.
- Choose the agentSet up Browser Use.
- Connect the toolsConnect the tools this workflow relies on: Browser Use, Python, Google Chrome.
- Check the prerequisitesPython 3.11 or newer, the Browser Use library, an API key for a supported model, and Chrome or Chromium installed locally.
- Gather your detailsCollect what the prompt asks for: Cancelled flight, Origin airport, Destination airport, Original travel date, Airline website, Flight search site, Earliest departure, Latest departure.
- Run the starter promptPaste the starter prompt below into Browser Use and adapt it to your case.
- Check against the documentationCompare what you get with the documentation at github.com before you rely on it.
Practical Starter Prompt: Find replacement flights for my review
Fill the fields to adapt the prompt. Empty fields stay as visible [placeholders].
My flight [Cancelled flight] from [Origin airport] to [Destination airport] on [Original travel date] was cancelled. Search [Airline website] and [Flight search site] for flights on that route departing between [Earliest departure] and [Latest departure]. For each option, return the flight numbers, departure and arrival times, stops, fare shown and seats shown, and the page link. Do not sign in, select a fare, enter personal details or start a booking. Return the list for my review; I will rebook with the airline myself.Review the options, confirm availability and fare on the airline's own site, and rebook through the airline yourself; only the airline's confirmation and booking reference count.
Expected Results and Benefits
This is a suggested workflow, not a reported result. The points below are what the cited documentation says the tools can do.
This is a suggested workflow, not a reported outcome. The Browser Use README says the agent carries out a task in a real browser, can drive a fresh local Chrome with your own model, and can return typed results through an output schema. The README does not mention airlines or flight searches, and fares and seat counts change quickly, so the list only reflects what the sites showed during the run.
Limitations and Considerations
The agent's list is not a booking: only the airline's own confirmation, with a booking reference you can look up, shows that you are rebooked. Many airlines rebook cancelled passengers directly, sometimes at no extra cost, so check their page or call them before paying for a new ticket. Check each site's terms on automated access, and do not use features meant to get around bot checks. Do not give the agent your airline login or payment details. Model calls cost money per run. Results depend on your setup and were not independently reproduced by Top 200 Repos.
GitHub Repositories
AI Agent Repository
Source code of the agent that does the work.
Related Videos
About browser-use/browser-use
Browser Use Agent Tutorial: Automate Web Tasks with AI (opens in a new tab)
Published by the project’s official channel.
Watch on YouTube (opens in a new tab)Independent creators. Listing a video implies no endorsement, sponsorship or partnership.
Sources
- Navigate the web like a human does. (opens in a new tab)
Project documentation · github.com · Undated · Source checked 25 Nov 2026, 11:57 UTC
What this source supports
- Browser Use is the open-source browser agent: give it a task and the model does it in a real browser by writing Python.
- The Python library needs Python 3.11 or newer; Browser('chromium') drives a fresh local Chrome, Chromium or Edge with its own temporary profile, and an Agent can use your own model such as ChatOpenAI, ChatAnthropic or ChatGoogle.
- Typed results: Agent(task, output_model_schema=MyModel) returns result.structured_output.
