About the project
Inspiration Most trip-planning programs do a reasonable job in providing guidance on "what to do," but they are not as effective at handling specific contingency plans. airline delays, flight missed connections, sudden itinerary changes, ground transportation problems, other passangers dropping out—for all of these problems, the traveler finally finds themselves in a hustle-driven race to come up with alternatives, sometimes in stressful conditions and with very little time to spare.
The idea originated from asking
Looking at the original goal, I realized that I wanted to create an intelligent system to do the task of a travel agent- to not just prepare an itinerary for the traveler to follow, but to take charge of the trip itself.
What I Learned: These are some of the key lessons I took away from doing this project: The real challenge was building autonomous systems, not intelligent ones. The most difficult aspect was pulling together booking, payment, monitoring, rebooking, and notify into one completely closed loop.
Sysadmin (I'd rather be writing software) is actually much harder: State context > prompts. in a real-world agent requires persistent state (state of trips, rebookings, monitoring, payments, etc); new line of interaction without the ability to "persist".
Automation entails elegant fallbacks. Most "automated" systems had one or more of "rebook flight API", "book taxi API", "charge credit card API", or "ask user for OAuth" in the middle of a purported "automatic" process. That's an elegant system design challenge (and something I already enjoy, to be honest).
UX is part of the AI. Alerts, receipts, visual status-monitoring is often more important.
How I Built It
The system is a modular multi-agent architecture:
- AI planning agent
- I call a large language model to generate a multi-modal itinerary that is human and machine readable (JSON with meta, actions)
It identifies special trip types (e.g. conference trips) and modifies schedules accordingly.
Budget & scoring engine
Tracks expenses throughout the trip to calculate usage:
I generate alerts when usage is too high and offer cost savings
I provide scores for different attractions with a custom weighted aggregation based on interests.
Virtual payment system
I implement invoice creation, idempotent checkout, and automated receipt generation.
It handles both single-item payments and Pay everything together.
Sends HTML receipts via email.
Monitoring & rebooking agent
I monitor airport delays and cancellations
Based on rule-based heuristics, I decide whether to rebook flights:
I search, score and optimize alternatives and generate rebooking advices.
Ride-hailing
I compare Uber, Lyft, (DiDi if in China) prices
Generate ride deep links to book rides.
I schedule airport rides automatically around flight schedules.
Frontend & persistence
I use Streamlit for the frontend with a glossy glass-morphism style.
I allow Guest mode (no login) and Login mode (trip perist).
I preserve trips, payments, alerts and presence in a light-weight sqlite database.
What I struggled with
Real airline APIs are very limited. Actual "one-click rebooking" and actual ride-hailing API calls are a long way off. So I designed a system which could be API enabled when APIs become available - but was realistic for a hackathon.
Machine produces the same result as a person. Ensuring that payments and monitoring actions don't double produced when someone hits refresh or reattempts required the clever use of idempotence keys, and saved state.
Finding the sweet spot between automation and user approval. The machine is an incredibly powerful conjure, but needs to be very clear to the user what it's automatic and what they should still do.
Creating a demoable insight in minutes. Designing a process such as "Plan Pay Monitor Rebook" for demo was critical.
Outcome The end product is a “self-driving" travel agent that automatically:
- Plans full vacations
- Opens budget levels
- Managing payments (via card or PayPal)
- Monitoring the flights in real time
- Advising and re-booking the flights accordingly (auto-planning again)
- Manages ground transportation
The novelty in all this, of course, is not that we're modifying a travel planning system but that we're shifting this responsibility away from the customer and managing their travel for them.
Log in or sign up for Devpost to join the conversation.