How ronnyml/ai-travel-agent works
AI Travel Agent turns a destination search into a live, structured travel guide: the frontend starts a session, shows agent progress and streamed content, then presents the completed guide and supports follow-up questions. The README documents research, photo gathering, synthesis, persistence, and follow-up capabilities; unsampled implementation details are represented only where the documented architecture supports them.
Main entry points: api.ts API client · travel.py Travel sessions · supervisor.py Pipeline supervisor · Session.tsx Live progress
Components 28
Frontend experience
- Destination search
frontend/src/components/SearchBar.tsx - Session launcher
frontend/src/hooks/useTravel.ts - API client
frontend/src/lib/api.ts - Session state
frontend/src/store/session.ts - Live progress
frontend/src/pages/Session.tsx - Event stream
frontend/src/hooks/useSSE.ts - Guide page
frontend/src/pages/Guide.tsx - Guide sections
frontend/src/components - Follow-up chat
frontend/src/components/FollowUpChat.tsx
Session and guide API
- API application
backend/app/main.py - Travel sessions
backend/app/api/travel.py - Guide and follow-up
backend/app/api/guides.py - Travel events
backend/app/core/events.py
Research and guide generation
- Pipeline supervisor
backend/app/agents/supervisor.py - Web research
backend/app/agents/search_agent.py - Photo gathering
backend/app/agents - Guide synthesis
backend/app/agents/synthesis_agent.py - Photo service
backend/app/services/photos.py
Retrieval and persistence
- Category retrieval
backend/app/rag/retriever.py - Text embeddings
backend/app/rag/embeddings.py - Supabase access
backend/app/db/client.py
External services
- Supabase pgvector
- Tavily search
- Voyage AI
- Claude
- Unsplash photos
- Picsum fallback
Other components
- Traveler
Connections 33
- Traveler → Destination search: enters destination
- Destination search → Session launcher: submits search
- Session launcher → API client: starts session
- Session launcher → Session state: sets session state
- API client → Travel sessions: requests session
- Travel sessions → Pipeline supervisor: launches pipeline
- API application → Travel sessions: registers routes
- API application → Guide and follow-up: registers routes
- Pipeline supervisor → Web research: dispatches research
- Pipeline supervisor → Photo gathering: dispatches photos
- Pipeline supervisor → Guide synthesis: dispatches synthesis
- Web research → Tavily search: searches web
- Photo gathering → Photo service: gets photos
- Guide synthesis → Claude: generates guide
- Guide synthesis → Category retrieval: retrieves context
- Category retrieval → Text embeddings: embeds queries
- Text embeddings → Voyage AI: requests vectors
- Category retrieval → Supabase access: matches chunks
- Supabase access → Supabase pgvector: queries and stores
- Photo service → Unsplash photos: searches photos
- Photo service → Picsum fallback: falls back to
- Travel sessions → Travel events: emits progress
- Travel sessions → Event stream: streams events
- Live progress → Event stream: opens stream
- Event stream → Session state: adds events
- Live progress → API client: checks session
- Live progress → Guide page: navigates when ready
- Traveler → Follow-up chat: asks follow-up
- Follow-up chat → API client: sends question
- API client → Guide and follow-up: loads guide or asks
- Guide and follow-up → Supabase access: reads and writes guide
- Guide page → API client: loads guide
- Guide page → Guide sections: renders guide