An autonomous multi-agent system that plans complete trips by coordinating specialized AI agents one searches flights, another searches hotels, and a third synthesizes everything into a personalized itinerary with booking links.
- LangGraph orchestrates the pipeline as a state graph with parallel execution
- Flight Agent: queries Google Flights via SerpAPI
- Hotel Agent: queries Google Hotels via SerpAPI, runs concurrently with flights
- Itinerary Agent: GPT-4o-mini synthesizes results into a day-by-day plan
- Input validation: resolves free-text city names (e.g. "Karachi") to IATA airport codes automatically via LLM
Flight and hotel search run in parallel (fan-out/fan-in) rather than sequentially, cutting response time roughly in half compared to a naive sequential pipeline.
Python · LangGraph · LangChain · OpenAI (GPT-4o-mini) · SerpAPI · FastAPI
git clone <repo>
cd travel-planner
python -m venv venv && source venv/bin/activate
pip install -r requirements.txt
cp .env.example .env # add your API keys
uvicorn main:app --reloadPOST /plan-trip
{
"origin": "Karachi",
"destination": "Dubai",
"start_date": "2026-08-10",
"end_date": "2026-08-17",
"budget": 1500,
"travelers": 1
}Returns a full itinerary, ranked flight options, ranked hotel options, and any errors encountered.