A multi-agent travel planning system built with LangChain + LangGraph + RAG + Vectorless RAG + Guardrails + Evals, running locally on Ollama, with a Streamlit UI.
Given a destination, number of days, budget, and preferences (e.g. "beaches and food, no water sports"), a LangGraph supervisor coordinates three specialized agents:
- Booking agent — a ReAct agent with
search_flights/search_hotelstools that decides what to look up and picks a flight + hotel that fit the budget and preferences, not just the cheapest option (Vectorless RAG — SQL search, tool-driven) - Activity agent — a ReAct agent with a
search_activitiestool that retrieves and curates activity/food recommendations from local travel-guide docs, respecting excluded activities (RAG — vector search, tool-driven) - Budget critic — reviews the drafted itinerary and gives specific, actionable feedback (not just pass/fail) that steers the next attempt if the plan needs revision, up to a retry limit (LangGraph conditional loop)
A hard numeric budget check always backstops the critic's LLM judgment, and separate input/output guardrails check the request and final plan for safety/constraint violations. The whole pipeline can be scored against a test set of scenarios (Evals).
trip-planner-agent/
├── app.py # Streamlit UI (run this)
├── graph.py # LangGraph supervisor (booking agent → activity agent → generate → budget critic → finalize)
├── agents.py # Booking agent, activity agent, budget critic (ReAct agents + reasoning)
├── tools.py # LangChain tool wrappers around rag.py / vectorless_rag.py
├── rag.py # Vector RAG over travel guide markdown docs
├── vectorless_rag.py # SQL-based retrieval over flights/hotels
├── guardrails.py # Input + output guardrail checks
├── evals.py # Eval harness with test scenarios
├── setup_data.py # Creates the mock SQLite DB + sample travel guides
├── requirements.txt
└── data/
├── travel.db # created by setup_data.py
└── travel_guides/*.md # sample docs for RAG
-
Install Ollama and pull the models used:
ollama pull llama3 ollama pull nomic-embed-text
-
Install Python dependencies:
cd trip-planner-agent pip install -r requirements.txt -
Generate the mock data (SQLite DB + sample travel guide docs):
python setup_data.py
-
Run the app:
streamlit run app.py
-
Run evals (separately, from the command line):
python evals.py
- Swap
llama3/nomic-embed-textfor any Ollama models you already have pulled — just update the model names ingraph.py,rag.py. - The SQLite flights/hotels data and the travel guide markdown docs are all placeholder/mock data — replace with real data or a real API as a next step.
guardrails.pyuses simple rule-based checks to keep the demo fast/offline. Swap in an LLM-as-judge guardrail for stricter checking.