Coder Social home page Coder Social logo

cloud-cooked's Introduction

cooked

Inspiration

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.

What it does

  1. Enter in your flight number

  2. We call fetch.ai's DELTA-V Chat API with the prompt in cloud-cooked/convex/actions.ts

  3. 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
  4. The alternate plan is displayed to the user.

  5. 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).

How we built it

  • 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

Challenges we ran into

  • Finding good APIs for data
  • Dealing with DELTA-V API expiration

Accomplishments that we're proud of

  • 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

What we learned

  • Prompt engineering
  • Advanced Tailwind classes
  • Convex and fetch.ai concepts

What's next

  • Getting flight delay prediction working with a weather/airport delay agent
  • Getting non-flight alternatives working with a public transit/train agent

For developers

Getting started

  1. Install dependencies: bun install
  2. Start Next.js dev server: bun dev
  3. Start Convex dev server: bunx convex dev

Debugging

  • 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 the dev environment)

cloud-cooked's People

Contributors

nathanhleung avatar cartercote avatar shrey150 avatar tyang21 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.