After missing many flights of our own and having friends deal with the situation of missing/cancelled/delayed flights interfering with plans, we decided to build cooked.
When a flight is missed or delayed, the possible alternatives are very open-ended, and traditional travel search engines aren't sufficient. Under the constraints of a missed/delayed flight situation, the scope of possibile options expands to the extent that an AI-agent model might actually be the best solution โ a dynamic tool that can think of options like driving to nearby airports, taking public transit or buses, or even repositioning to a completely new city.
-
Enter in your flight number
-
We call fetch.ai's DELTA-V Chat API with the prompt in
cloud-cooked/convex/actions.ts
-
Given agents that we've already set up on fetch.ai's agentverse, we ask DELTA-V to respond to our prompt, finding you alternative routings for your flight including buses, trains, public transit, etc. There is no coding needed on our end besides the prompt โ DELTA-V automatically determines the best agents to complete the task, then queries the APIs it needs to come up with a plan.
- Agent code is in
agents/
folder
- Agent code is in
-
The alternate plan is displayed to the user.
-
If the user likes the alternate plan, we have another prompt that is sent to DELTA-V which allows the user to book all the tickets (stretch goal).
- fetch.ai to determine which agents to use
- Convex to keep track of fetch.ai DELTA-V chatbot sessions on a per-tab basis
- Next.js/Vercel for hosting
- Figma to design the frontend
- Tailwind to style the frontend
- Finding good APIs for data
- Dealing with DELTA-V API expiration
- Very nice looking frontend, with design files in Figma
- We were able to write a relatively stable wrapper around the DELTA-V API with nice abstractions to make accessing messages easier
- Diverse set of agents able to complete a wide variety of tasks
- Well-engineered prompt for DELTA-V
- Prompt engineering
- Advanced Tailwind classes
- Convex and fetch.ai concepts
- Getting flight delay prediction working with a weather/airport delay agent
- Getting non-flight alternatives working with a public transit/train agent
- Install dependencies:
bun install
- Start Next.js dev server:
bun dev
- Start Convex dev server:
bunx convex dev
- If the call to fetch.ai fails, you probably need to get a new authentication token. Log out and log back into the fetch.ai API docs, then copy the JWT and replace the
FETCH_AI_AUTH_TOKEN
environment variable in Convex (in thedev
environment)