Inspiration

What if a recommendation surprised you rather than simply confirmed what you already liked?

PLOT TWIST began with the feeling that discovery can become repetitive: another familiar sound, another similar film, another book that fits the same pattern. We wanted to use the things you love as a doorway into something unexpected. The aim is discovery that feels surprising and still gives you a thread to follow.

What it does

PLOT TWIST is a live AI discovery agent across music, film and books. Search for and select starting points you love, distinguish things you already know from things you dislike, and choose how far you want to wander. Those selections become the agent's brief; writing a prompt is optional.

The agent uses Qloo to explore real catalogue candidates and builds a three-stop cultural journey. Keep a book while asking it to take the music further, or mark an item as familiar or not for you, then revise the journey. Kept discoveries stay in place and excluded items cannot return.

An expandable “How this journey was built” view shows the submitted brief, actual Qloo searches, candidate counts and the retrieval source of each pick. It separates Qloo retrieval evidence from the agent's short editorial interpretation.

How we built it

The interface uses React, TypeScript and Vite, with a Node.js and Express backend and Zod validation. Qloo search resolves catalogue entities, and Qloo's Insights API provides recommendation candidates. An OpenAI model uses bounded tool calling to choose categories, taste signals and ranking windows. It can inspect results, make another search, or use a retrieved discovery as a bridge into another category before selecting the final journey.

The backend validates tool arguments and accepts only candidate IDs actually returned by Qloo or explicitly kept by the user. It enforces exclusions, kept items, timeouts and query budgets independently of the model. A run is limited to six model turns and six Qloo queries. API keys stay on the server.

The app is deployed on Render, with a public MIT-licensed GitHub repository and automatic deployment after GitHub checks pass. Agent discovery is the default; the Qloo baseline and fixed demo are separately labelled modes. Agent failures do not silently become demo results. Feedback stays within the current page session.

Challenges we ran into

One malformed optional tag in a music response initially caused validation to reject the entire category despite a successful Qloo response. We fixed the adapter to discard malformed optional tags while preserving strict validation of entity IDs and titles, and added regression coverage.

The larger challenge was making the agent useful: giving it real decisions about what to explore next while keeping selections grounded and feedback reliable. “More adventurous” changes the retrieval strategy; it is not a measured novelty score or a guarantee of what a person will find surprising. Cultural affinity also does not prove artistic influence.

Accomplishments that we're proud of

The public app has completed live journeys and a feedback revision using both Qloo and OpenAI. In one test, a Fela Kuti starting point produced Mulatu Astatke, Timbuktu and Brave New World. Keeping the book and asking for more adventurous music produced William Onyeabor and Hunger while retaining the same book. Familiar and disliked starting-point exclusions were respected, and the explanation recorded the actual searches.

The project passes 49 automated tests, lint, type checks and a production build. These checks cover orchestration, validation, feedback, errors and hosting safeguards. The live tests establish that those runs worked; broader recommendation-quality evaluation is still ahead.

What we learned

A successful API response still needs careful handling of optional catalogue metadata. A simple search-and-select interface can give an agent a rich brief without making users learn prompting. Trust also depends on showing what was actually retrieved and clearly labelling interpretation.

What's next for PLOT TWIST

Refine the interface through real use, test more starting points and adventure levels, and compare the agent with the Qloo baseline for relevance, useful surprise and explanation trust. We also want to improve resilience and clarity while preserving a stable, accessible judging version.

Try it yourself

  1. Open the live app. No login is required. The free Render service may take about a minute to wake after inactivity.
  2. Leave Agent discovery selected. Search for Fela Kuti and select the artist under I love this.
  3. Choose The scenic route, then Find my plot twist. Review the music, film and book discoveries and expand the journey explanation.
  4. Choose Keep this for the book and More adventurous for music, then Revise my journey. The book remains while the agent explores a new direction. Results can vary between runs.
  5. Use Edit my taste to try different favourites, familiar items, dislikes or optional context.

Public source code and setup instructions

Built With

Share this project:

Updates

Submission history