Agentic Smart Ticket Booking Assistant is an AI-powered travel planner that behaves like a decision-making AI agent rather than a simple chatbot.
It understands natural language travel requests, dynamically selects travel APIs/tools, and returns the best travel options with reasoning explanations.
The system demonstrates a modern AI agent architecture using:
- LLM reasoning
- dynamic tool calling
- memory retrieval
- multi-step planning
- ethical guardrails
- explainable decision traces
The system behaves like an autonomous agent:
- Understands vague user goals
- Extracts structured travel intent
- Chooses tools dynamically
- Plans multi-step travel searches
Supports multiple travel modes:
- Flights
- Trains
- Buses
Users can specify preferred transport:
USER : Find me the cheapest train to Delhi tomorrow
Supports full travel planning:
- departure journey
- return journey
- preferred return transport
- fallback transport mode
- arrival time constraints
EXAMPLE : Fly to Delhi tomorrow and return by train before 10pm
Travel tools are executed concurrently using asyncio, making the system fast and scalable.
- Flight Search
- Train Search
- Bus Search
All run simultaneously.
The assistant remembers user preferences.
Example:
- User: I prefer trains
- Later: Book travel to Delhi
The agent prioritizes train options.
Prevents unethical requests such as:
- booking tickets with fake identities
- fraudulent travel activity
- misuse of booking systems
Blocked queries are logged for auditing.
The agent explains its decision process.
EXAMPLE :
- Agent extracted: Mumbai → Delhi
- Outbound search: 5 options found
- Return filtered to arrivals before 21:00
- Fallback mode used: Bus
┌───────────────┐
│ User Query │
└───────┬───────┘
│
▼
┌────────────────────┐
│ Agent Node (LLM) │
│ Intent Extraction │
└─────────┬──────────┘
│
▼
┌────────────────────┐
│ Ethics Gate │
└─────────┬──────────┘
│
▼
┌─────────────────────┐
│ Clarification Logic │
└─────────┬───────────┘
│
▼
┌─────────────────────┐
│ Tool Node │
│ (Travel Search) │
└─────────┬───────────┘
│
┌───────────────┼───────────────┐
▼ ▼ ▼
┌───────────┐ ┌───────────┐ ┌───────────┐
│ Flight │ │ Train │ │ Bus │
│ Tool │ │ Tool │ │ Tool │
└─────┬─────┘ └─────┬─────┘ └─────┬─────┘
│ │ │
└───────────────┴───────────────┘
Parallel Execution
│
▼
┌─────────────────────┐
│ Result Processing │
│ Filtering & Fallback│
└─────────┬───────────┘
│
▼
┌───────────────────┐
│ Travel Options │
│ + Reasoning Trace │
└───────────────────┘
| Technology | Role |
|---|---|
| Python | Core backend |
| LangChain | Agent orchestration |
| Groq | High-speed LLM inference |
| Llama 3.3 70B | Natural language reasoning |
| Asyncio | Parallel API execution |
| SQLite | Audit logging |
| dotenv | Environment configuration |
git clone : https://github.com/AyushAI/Agentic-Smart-Ticket-Booking-Assistance-System.git
python -m venv venv
source venv/bin/activate # Mac/Linux
venv\Scripts\activate # Windows
pip install -r requirements.txt
Create .env
GROQ_API_KEY=your_groq_api_key
streamlit run app.py
Planned enhancements:
- real airline APIs (Amadeus / Skyscanner)
- hotel booking integration
- price prediction models
- personalized travel recommendations
- multi-city trip planning
- Streamlit web interface
- voice assistant integration
Ayush Wase
AI Engineer | Data Analyst | Machine Learning Developer
Interested in:
- AI agents
- LLM systems
- data science
- ML engineering
If you found this project useful:
⭐ Star the repository
🍴 Fork it
🚀 Contribute to improve it
MIT License


