A production-ready Multi-Agent AI System built with LangGraph that automatically plans your complete trip — flights, hotels, itinerary and a final travel plan — using 4 specialized AI agents working together.
✈️ Flight Agent — Real-time flight data via AviationStack API- 🏨 Hotel Agent — AI-powered hotel search via Tavily
- 🗓️ Itinerary Agent — Day-by-day itinerary using Groq LLM (Llama 3.3 70B)
- 🧠 Final Agent — Combines everything into a polished travel plan
- 💾 Long-Term Memory — Conversation history stored in PostgreSQL
- 🚀 FastAPI Backend — REST API with
/api/healthand/api/planendpoints - 🎨 React Frontend — Modern UI built with Vite + React 19
- 🐳 Docker Ready — One command to run backend + database
User Request (React Frontend)
│
▼
FastAPI Backend (server.py)
│
▼
LangGraph Pipeline (main.py)
│
┌─────┴──────────────────────────┐
│ │
▼ │
[1] Flight Agent │
→ AviationStack API │
│ │
▼ │
[2] Hotel Agent │
→ Tavily Search API │
│ │
▼ │
[3] Itinerary Agent │
→ Groq LLM (Llama 3.3 70B) │
│ │
▼ │
[4] Final Agent │
→ Groq LLM (Llama 3.3 70B) │
│ │
└─────────────────────────┘
│
▼
PostgreSQL (Memory / Checkpointing)
│
▼
Response → React Frontend
| Technology | Purpose |
|---|---|
| LangGraph | Multi-agent graph orchestration |
| LangChain | LLM toolkit and message handling |
| Groq | Ultra-fast LLM inference platform |
| Llama 3.3 70B | Open-source LLM by Meta (via Groq) |
| Tavily | AI-optimized web search API |
| AviationStack | Real-time flight data API |
| Technology | Purpose |
|---|---|
| FastAPI | REST API framework |
| Uvicorn | ASGI server |
| Pydantic | Request/Response validation |
| Python-dotenv | Environment variable management |
| Technology | Purpose |
|---|---|
| PostgreSQL 15 | Persistent memory storage |
| psycopg | Python PostgreSQL driver |
| LangGraph PostgresSaver | Conversation checkpointing |
| Technology | Purpose |
|---|---|
| React 19 | UI framework |
| Vite | Build tool and dev server |
| React Markdown | Render LLM responses as formatted text |
| Technology | Purpose |
|---|---|
| Docker | Containerization |
| Docker Compose | Multi-container orchestration |
AI_Agent/
├── AiTools/ # Backend (FastAPI + LangGraph)
│ ├── main.py # LangGraph graph + 4 agent definitions
│ ├── server.py # FastAPI REST API server
│ ├── requirements.txt # Python dependencies
│ ├── Dockerfile # Backend Docker image
│ ├── docker-compose.yml # Postgres + Backend orchestration
│ ├── check_health.py # Health verification script
│ ├── .env.example # Template for environment variables
│ └── tools/
│ ├── flight_tool.py # AviationStack API wrapper
│ └── tavily_tool.py # Tavily Search API wrapper
│
└── frontend/ # React Frontend
├── src/
│ ├── App.jsx # Main application component
│ ├── App.css # Component styles
│ └── index.css # Global styles
├── index.html
├── package.json
└── vite.config.js
The fastest way to get the backend + database running:
# 1. Clone the repo
git clone https://github.com/Katari-8055/TravelAI.git
cd TravelAI
# 2. Create your .env file
cp AiTools/.env.example AiTools/.env
# Fill in your API keys in AiTools/.env
# 3. Start backend + postgres with Docker
cd AiTools
docker compose up -d --build
# 4. Verify everything is healthy
python check_health.pypython -m venv venv
# Activate on Windows
venv\Scripts\activate
# Activate on Mac/Linux
source venv/bin/activatecd AiTools
pip install -r requirements.txtInstall PostgreSQL: https://www.postgresql.org/download/
Then create the database:
CREATE DATABASE langgraph_memory;cp AiTools/.env.example AiTools/.envEdit AiTools/.env with your actual keys:
GROQ_API_KEY=your_groq_api_key
TAVILY_API_KEY=your_tavily_api_key
AVIATIONSTACK_API_KEY=your_aviationstack_api_key
DATABASE_URL=postgresql://postgres:postgres@localhost:5433/langgraph_memorycd AiTools
uvicorn server:app --host 0.0.0.0 --port 8000 --reloadcd frontend
npm install
npm run dev| Key | Where to Get |
|---|---|
GROQ_API_KEY |
https://console.groq.com |
TAVILY_API_KEY |
https://tavily.com |
AVIATIONSTACK_API_KEY |
https://aviationstack.com |
| Endpoint | Method | Description |
|---|---|---|
/api/health |
GET | Check if backend and database are running |
/api/plan |
POST | Generate a complete travel plan |
/docs |
GET | Interactive Swagger API documentation |
curl -X POST http://localhost:8000/api/plan \
-H "Content-Type: application/json" \
-d '{
"user_query": "Plan a 7-day trip to Tokyo under 2 Lakhs",
"thread_id": "my_session"
}'{
"status": "success",
"flight_results": "Airline: Japan Airlines\nDeparture: Indira Gandhi...",
"hotel_results": "1. **Park Hyatt Tokyo**\n https://...",
"itinerary": "Day 1: Arrival in Tokyo...",
"final_response": "Here is your complete 7-day Tokyo travel plan...",
"llm_calls": 2,
"agent_logs": [...]
}After running docker compose up -d:
cd AiTools
python check_health.pyExpected output:
============================================================
AiTools -- Docker Health Check
============================================================
Checking: Backend -- FastAPI
[OK] status='ok'
Checking: PostgreSQL -- via Backend health response
[OK] database='PostgreSQL Docker'
------------------------------------------------------------
Result: 2 passed | 0 failed
------------------------------------------------------------
*** All services are UP and HEALTHY! ***
Backend API --> http://localhost:8000
API Docs --> http://localhost:8000/docs
PostgreSQL --> localhost:5433
Calls the AviationStack API to fetch real-time flight data. Extracts airline name, departure/arrival airports, and flight status. Stores results in the shared LangGraph State.
Uses Tavily Search API (AI-optimized web search) to find the best hotels for the destination. Returns top 5 results with titles, URLs, and summaries.
Sends flight + hotel data to Groq LLM (Llama 3.3 70B) with a prompt to act as an expert travel planner. Generates a detailed day-by-day itinerary based on all collected data.
Takes all collected information and generates a final polished travel plan using Groq LLM. This is the response shown to the user.
Every conversation is saved to PostgreSQL using LangGraph's PostgresSaver checkpointing. The thread_id parameter allows users to continue past conversations with full context.
Plan a complete 7-day Japan trip under 2 lakhs with flights and hotels
Plan a 5-day Paris luxury trip with 5-star hotels
Budget trip to Bangkok for 6 days
Weekend trip to Dubai — best hotels and attractions
- Keep your
.envfile private — never commit it to git - Use
.env.exampleas a template to share required keys - The
travel_plans/folder is gitignored (generated output) - Regenerate your API keys if they were accidentally exposed
MIT License — feel free to use and modify.