Travel-Agent is a multi-agent travel planning system built with LangGraph, FastAPI, and Groq. It takes a single natural-language request (e.g. "Plan a 7 day Japan trip from Bangladesh under 2 lakhs") and orchestrates a pipeline of specialized agents to fetch live flight data, search for hotels, build a day-by-day itinerary, and generate a polished final travel plan — complete with conversation memory and PDF export.
Live demo: https://travel-agent-vytt.onrender.com
- Multi-agent pipeline (LangGraph
StateGraph) — flight agent → hotel agent → itinerary agent → final response agent - Live flight data via AviationStack, with natural-language route parsing (city/country/IATA → route)
- Hotel & destination search via Tavily
- LLM-generated itinerary and final plan via Groq (Llama 3.3 70B)
- Persistent conversation memory — each trip planning session is checkpointed in PostgreSQL via
langgraph-checkpoint-postgres, so follow-up messages retain context - Clean, responsive UI — glassmorphism design, markdown rendering, and one-click PDF export of the generated plan
- Dockerized for easy deployment (currently deployed on Render)
User query
│
▼
┌─────────────┐ ┌────────────┐ ┌──────────────────┐ ┌───────────────┐
│ Flight Agent│ ──▶ │ Hotel Agent│ ──▶ │ Itinerary Agent │ ──▶ │ Final Agent │
│ (AviationStack) │ (Tavily) │ │ (Groq LLM) │ │ (Groq LLM) │
└─────────────┘ └────────────┘ └──────────────────┘ └───────────────┘
│
▼
Final formatted plan
(Trip Summary, Flights, Hotels,
Itinerary, Budget, Recommendations)
State is shared across all four nodes via a typed TravelState, and the entire run is checkpointed to Postgres so a thread_id can be reused for multi-turn conversations.
|
|
Orchestration
|
LangGraph
|
|
LLM
|
Groq (Llama 3.3 70B via
langchain-groq
)
|
|
Web search
|
Tavily
|
|
Flight data
|
AviationStack
|
|
Backend
|
FastAPI + Uvicorn
|
|
Persistence
|
PostgreSQL (LangGraph checkpointer)
|
|
Frontend
|
HTML / CSS / vanilla JS, Marked.js, html2pdf.js
|
|
Deployment
|
Docker, Render
|
.
├── app.py # FastAPI app & routes
├── backend.py # LangGraph graph, agents, and Postgres checkpointer
├── tools/
│ ├── flight_tool.py # AviationStack integration + NL route parsing
│ └── tavily_tool.py # Tavily search wrapper
├── templates/
│ └── index.html
├── static/
│ ├── script.js
│ └── style.css
├── requirements.txt
├── Dockerfile
└── .dockerignore
git clone https://github.com/<your-username>/travel-agent.git
cd travel-agentpython -m venv myenv
source myenv/bin/activate # Windows: myenv\Scripts\activatepip install -r requirements.txtCreate a .env file in the project root:
GROQ_API_KEY=your_groq_api_key
TAVILY_API_KEY=your_tavily_api_key
AVIATION_API_KEY=your_aviationstack_api_key
DATABASE_URL=postgresql://user:password@host:port/dbname
DEFAULT_ORIGIN_IATA=DAC|
|
GROQ_API_KEY
|
✅
|
Groq API key for LLM calls
|
|
TAVILY_API_KEY
|
✅
|
Tavily API key for hotel/web search
|
|
AVIATION_API_KEY
|
✅
|
AviationStack API key for live flight data
|
|
DATABASE_URL
|
✅
|
PostgreSQL connection string (Render, Supabase, Neon, etc.)
|
|
DEFAULT_ORIGIN_IATA
|
❌
|
Fallback departure airport code if none is detected (default:
DAC
)
|
uvicorn app:app --reloadVisit http://127.0.0.1:8000
docker build -t travel-agent .
docker run -p 8000:8000 --env-file .env travel-agentRuns the full agent pipeline for a user query.
Request body:
{
"message": "Plan a 5 day Dubai trip from Dhaka with flights and hotels.",
"thread_id": null
}Response:
{
"success": true,
"thread_id": "user_a1b2c3d4",
"answer": "## Trip Summary\n...",
"flight_results": "...",
"hotel_results": "...",
"itinerary": "...",
"llm_calls": 3
}Pass the returned thread_id on subsequent requests to continue the same conversation with memory.
Basic health check endpoint ({"status": "ok"}).
- AviationStack provides live/status flight data only, not ticket prices — budget figures in the itinerary are LLM-estimated, not real fares. For real pricing, integrate a fare API (e.g. Amadeus, Skyscanner).
- Route/location parsing in
flight_tool.pyis regex/alias-based and may misparse unusual phrasing. - No authentication/rate limiting — intended as a demo/portfolio project, not production-hardened.
- Real-time fare pricing integration
- Streaming agent progress to the frontend (SSE/WebSocket)
- LLM-based location/intent extraction to replace regex parsing
- Rate limiting & caching layer (Redis)
- Automated tests + CI pipeline
- User authentication & saved trip history
Built with FastAPI, LangGraph, Groq, PostgreSQL, Tavily, and AviationStack.