This project is a prototype of an AI-powered travel assistant capable of answering travel-related queries while leveraging external tools through LLM tool-calling. The interface is built with Gradio, and the assistant can orchestrate multiple tools to retrieve real-world information.
Supported LLM providers
- OpenAI (
openailibrary) - OpenRouter (
requestslibrary)
Integrated tools
- Internal database tool (Excel-based)
- External weather API (Open-Meteo)
- Local MCP flight search server (AviationStack) built from scratch
The assistant interacts with three different categories of tools, all implemented from scratch, illustrating common patterns used in LLM-based agent systems.
The assistant can retrieve travel information from an internal Excel file (destinations_infos.xlsx). The dataset contains fields such as:
destinationcountrykeywordsbest_season
This Excel file is used as a simple internal structured data source, but the architecture allows replacing it with other sources such as:
- a SQL database
- a vector database
- an internal REST API
- a larger structured dataset
The goal is to illustrate how an agent can query internal structured knowledge.
The assistant can retrieve live weather information using the Open-Meteo API. Open-Meteo is particularly useful because the API is free, requires no authentication, and provides a large set of weather endpoints. The current implementation retrieves:
- Current weather conditions
- Past weather data (3 days)
- Forecast data (3 days)
A weather plot is generated dynamically and displayed in the interface.
A local MCP server is implemented to expose a flight search tool using the AviationStack API. For now, the MCP server exposes the following tool:
search_flights: retrieves scheduled flights between two airports (IATA codes) for today and tomorrow. Access to future flight data requires a paid plan.
⚠️ Note (February 2026): In this project the MCP server is implemented mainly for demonstration purposes. Since the server is built from scratch and used by a single agent, MCP does not provide a major advantage compared to exposing the tool through a traditional REST API (for example using FastAPI). MCP becomes more relevant when a team develops and maintains an MCP server that exposes a set of tools, and multiple users can connect their agents to that server. In that scenario, agents can dynamically discover and use the available tools without having to implement them locally in their own codebase. As of early 2026, there are still relatively few publicly available and free MCP servers that can be directly integrated into agent systems.
Animation_speed2.mp4
This project is intended as a base architecture for a more advanced travel assistant. Several extensions can be implemented:
- Extend the Open-Meteo integration to support additional endpoints such as hourly forecasts, precipitation data, climate statistics, or historical weather.
- Extend the AviationStack integration to include flight status, airport information, airline metadata, or route tracking (note that this requires a paid plan).
- Replace the Excel database with a more scalable backend such as SQL, a document store, or a vector database.
- Add new travel-related tools such as hotel search, tourist attraction discovery, visa requirements, currency conversion, or public transportation data.
- Dynamically enable or disable tools through a configuration file.
- Add additional LLM providers as long as they support tool-calling / function-calling methods.
Choose one of the following options:
-
Clone the repository:
git clone https://github.com/Lahdhirim/GENAI-travel-agent-gradio.git cd GENAI-travel-agent-gradio -
Create a virtual environment and install dependencies:
python -m venv venv source venv/bin/activate pip install -r requirements.txt -
Create a .env file in the project root:
OPENAI_API_KEY=your_openai_key # or if using OpenRouter OPENROUTER_API_KEY=your_openrouter_key # AviationStack API key AVIATIONSTACK_API_KEY=your_aviationstack_key
-
Start the MCP flight server:
python src/services/mcp_flight_server.py
-
Start the Gradio application:
python app.py
-
Open the interface in your browser:
http://localhost:7860
-
Clone the repository:
git clone https://github.com/Lahdhirim/GENAI-travel-agent-gradio.git cd GENAI-travel-agent-gradio -
Create a .env file in the project root:
OPENAI_API_KEY=your_openai_key # or if using OpenRouter OPENROUTER_API_KEY=your_openrouter_key # AviationStack API key AVIATIONSTACK_API_KEY=your_aviationstack_key
-
Build and start the services:
docker compose up --build
-
Open the interface in your browser:
http://localhost:7860
