A production-ready multi-agent system built for learning and customization. This repo demonstrates three essential AI engineering patterns that students can study, modify, and adapt for their own use cases.
- π€ Multi-Agent Orchestration: 4 specialized agents running in parallel using LangGraph
- π RAG (Retrieval-Augmented Generation): Vector search over curated data with fallback strategies
- π API Integration: Real-time web search with graceful degradation (LLM fallback)
- π Observability: Production tracing with Arize for debugging and evaluation
- π οΈ Composable Architecture: Easily adapt from "trip planner" to your own agent system
Perfect for: Students learning to build, evaluate, and deploy agentic AI systems.
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β User Request β
β (destination, duration, interests) β
ββββββββββββββββββββββββββββββββββ¬βββββββββββββββββββββββββββββββββ
β
ββββββββββββββΌβββββββββββββ
β FastAPI Endpoint β
β + Session Tracking β
ββββββββββββββ¬βββββββββββββ
β
ββββββββββββββΌβββββββββββββ
β LangGraph Workflow β
β (Parallel Execution) β
ββββββββββββββ¬βββββββββββββ
β
ββββββββββββββββββββββββββΌβββββββββββββββββββββββββ
β β β
ββββββΌββββββ βββββββΌβββββββ ββββββββΌββββββ
β Research β β Budget β β Local β
β Agent β β Agent β β Agent β
ββββββ¬ββββββ βββββββ¬βββββββ ββββββββ¬ββββββ
β β β
β Tools: β Tools: β Tools + RAG:
β β’ essential_info β β’ budget_basics β β’ local_flavor
β β’ weather_brief β β’ attraction_prices β β’ hidden_gems
β β’ visa_brief β β β’ Vector search
β β β (90+ guides)
β β β
ββββββββββββββββββββββββββΌβββββββββββββββββββββββββ
β
ββββββΌββββββ
βItinerary β
β Agent β
β(Synthesis)β
ββββββ¬ββββββ
β
ββββββββββββββΌβββββββββββββ
β Final Itinerary β
β + Tool Call Metadata β
βββββββββββββββββββββββββββ
All agents, tools, and LLM calls β Arize Observability Platform
-
Setup & Run (15 min)
- Clone repo, configure
.envwith OpenAI key - Start server:
./start.sh - Test API:
python "test scripts/test_api.py"
- Clone repo, configure
-
Observe & Understand (30 min)
- Make a few trip planning requests
- View traces in Arize dashboard
- Understand agent execution flow and tool calls
-
Experiment with Prompts (30 min)
- Modify agent prompts in
backend/main.py - Change tool descriptions
- See how it affects outputs
- Modify agent prompts in
-
Enable Advanced Features (20 min)
- Set
ENABLE_RAG=1to use vector search - Add
TAVILY_API_KEYfor real-time web search - Compare results with/without these features
- Set
-
Add Custom Data (45 min)
- Add your own city to
backend/data/local_guides.json - Test RAG retrieval with your data
- Understand fallback strategies
- Add your own city to
-
Create a New Tool (1 hour)
- Add a new tool (e.g.,
restaurant_finder) - Integrate it into an agent
- Test and trace the new tool calls
- Add a new tool (e.g.,
-
Change the Domain (2-3 hours)
- Use Cursor AI to help transform the system
- Example: Change from "trip planner" to "PRD generator"
- Modify state, agents, and tools for your use case
-
Add a New Agent (2 hours)
- Create a 5th agent (e.g., "activities planner")
- Update the LangGraph workflow
- Test parallel vs sequential execution
-
Implement Evaluations (2 hours)
- Use
test scripts/synthetic_data_gen.pyas a base - Create evaluation criteria for your domain
- Set up automated evals in Arize
- Use
Students have successfully adapted this codebase for:
-
π PR Description Generator
- Agents: Code Analyzer, Context Gatherer, Description Writer
- Replaces travel tools with GitHub API calls
- Used by tech leads to auto-generate PR descriptions
-
π― Customer Support Analyst
- Agents: Ticket Classifier, Knowledge Base Search, Response Generator
- RAG over support docs instead of local guides
- Routes tickets and drafts responses
-
π¬ Research Assistant
- Agents: Web Searcher, Academic Search, Citation Manager, Synthesizer
- Web search for papers + RAG over personal library
- Generates research summaries with citations
-
π± Content Planning System
- Agents: SEO Researcher, Social Media Planner, Blog Scheduler
- Tools for keyword research, trend analysis
- Creates cross-platform content calendars
-
ποΈ Architecture Review Agent
- Agents: Code Scanner, Pattern Detector, Best Practices Checker
- RAG over architecture docs
- Reviews PRs for architectural concerns
π‘ Your Turn: Use Cursor AI to help you adapt this system for your domain!
- Requirements
- Python 3.10+ (Docker optional)
- Configure environment
- Copy
backend/.env.exampletobackend/.env. - Set one LLM key:
OPENAI_API_KEY=...orOPENROUTER_API_KEY=.... - Optional:
ARIZE_SPACE_IDandARIZE_API_KEYfor tracing.
- Install dependencies
cd backend
uv pip install -r requirements.txt # faster, deterministic installs
# If uv is not installed: curl -LsSf https://astral.sh/uv/install.sh | sh
# Fallback: pip install -r requirements.txt- Run
# make sure you are back in the root directory of ai-trip-planner
cd ..
./start.sh # starts backend on 8000; serves minimal UI at '/'
# or
cd backend && uvicorn main:app --host 0.0.0.0 --port 8000 --reload- Open
- Frontend: http://localhost:3000
- API: http://localhost:8000
- Docs: http://localhost:8000/docs
- Minimal UI: http://localhost:8000/
Docker (optional)
docker-compose up --buildbackend/: FastAPI app (main.py), LangGraph agents, tracing hooks.frontend/index.html: Minimal static UI served by backend at/.optional/airtable/: Airtable integration (optional, not on critical path).test scripts/:test_api.py,synthetic_data_gen.pyfor quick checks/evals.- Root:
start.sh,docker-compose.yml,README.md.
- Backend (dev):
uvicorn main:app --host 0.0.0.0 --port 8000 --reload - API smoke test:
python "test scripts"/test_api.py - Synthetic evals:
python "test scripts"/synthetic_data_gen.py --base-url http://localhost:8000 --count 12
- POST
/plan-tripβ returns a generated itinerary. Example body:{"destination":"Tokyo, Japan","duration":"7 days","budget":"$2000","interests":"food, culture"} - GET
/healthβ simple status.
- If
ARIZE_SPACE_IDandARIZE_API_KEYare set, OpenInference exports spans for agents/tools/LLM calls. View at https://app.arize.com.
The local agent can use vector search to retrieve curated local experiences from a database of 90+ real-world recommendations:
- Enable: Set
ENABLE_RAG=1in your.envfile - Requirements: Requires
OPENAI_API_KEYfor embeddings - Data: Uses curated experiences from
backend/data/local_guides.json - Benefits: Provides grounded, cited recommendations with sources
- Learning: Great example of production RAG patterns with fallback strategies
When disabled (default), the local agent uses LLM-generated responses.
See RAG.md for detailed documentation.
Tools can call real web search APIs (Tavily or SerpAPI) for up-to-date travel information:
- Enable: Add
TAVILY_API_KEYorSERPAPI_API_KEYto your.envfile - Benefits: Real-time data for weather, attractions, prices, customs, etc.
- Fallback: Without API keys, tools automatically fall back to LLM-generated responses
- Learning: Demonstrates graceful degradation and multi-tier fallback patterns
Recommended: Tavily (free tier: 1000 searches/month) - https://tavily.com
- π― Start Simple: Get it running, make some requests, view traces
- π Explore Code: Read through
backend/main.pyto understand patterns - π οΈ Modify Prompts: Change agent behaviors to see what happens
- π Enable Features: Try RAG and web search
- π‘ Build Your Own: Use Cursor to transform it into your agent system
- 401/empty results: Verify
OPENAI_API_KEYorOPENROUTER_API_KEYinbackend/.env - No traces: Ensure Arize credentials are set and reachable
- Port conflicts: Stop existing services on 3000/8000 or change ports
- RAG not working: Check
ENABLE_RAG=1andOPENAI_API_KEYare both set - Slow responses: Web search APIs may timeout; LLM fallback will handle it
- This repo includes
render.yaml. Connect your GitHub repo in Render and deploy as a Web Service. - Render will run:
pip install -r backend/requirements.txtanduvicorn main:app --host 0.0.0.0 --port $PORT. - Set
OPENAI_API_KEY(orOPENROUTER_API_KEY) and optional Arize vars in the Render dashboard.