This is a submission for the Algolia Agent Studio Challenge: Consumer-Facing Non-Conversational Experiences
What I Built
Today, every podcast app lets you search by name or genre. But it doesn't let you search for "something chill for a long drive" or "the podcast equivalent of a dopamine hit." That's the gap Pod-tape fills.
Pod-tape is a vibe-first podcast discovery platform. You don't type a query — you tap a vibe. Each vibe ("boost dopamine", "literal chills", "before sleep", "main character energy", etc.) maps to a curated, AI-driven recommendation powered by Algolia Agent Studio.
The core idea: translate a feeling into a mixtape of podcast episodes
How It Works (User's Perspective)
- Land on the home page -> tap "Pick your vibe"
- 13 vibe cards appears
- Tap any card (say: dopamine hit 🧃)
- Get podcast episode recommendations that match this vibe on positive psychology, affirmations, gratitude, self improvement, etc. (Currently the episode recommendation limit is set to 5)
Tech Stack
| Layer | Technology |
|---|---|
| Frontend | Next.js (React) |
| CSS Framework for Styling | Tailwind CSS |
| Search & AI | Algolia Search, Algolia Agent Studio |
| LLM Model | Gemini 2.5 Flash (Reasoning & Vibe-Mapping) |
| Data Ingestion | Apple iTunes API, RSS feeds (rss-parser, axios) |
| Index | Single Algolia index (podcast_index) with episode-level records |
Demo
Project Gallery
References
How I Used Algolia Agent Studio
Agent Studio is the recommendation engine behind every vibe. Here's the pipeline:
1. Data: Building the Podcast Index
A custom ingestion script (fetchData.ts) fetches top podcasts across genres from the Apple iTunes API, parses their RSS feeds, and pushes episode-level records to Algolia. Each record includes:
{
objectID: podcast.appleId + "-" + item.guid,
episodeName: item.title,
episodePubDate: item.pubDate,
episodeDuration: parseDuration(item.itunes?.duration),
episodeType: parseDuration(item.itunes?.duration) > 20 ? "long" : "short",
episodeSummary: cleanHtml(item.content).substring(0, 1000),
episodeKeywords: item.itunes?.keywords ?? podcast.genres,
// Show metadata
podcastShowTitle: podcast.collectionName,
podcastShowAuthor: podcast.artistName,
podcastShowImage: podcast.artwork,
podcastShowGenres: podcast.genres,
podcastShowDescription: feed.description
}
This gives the agent a rich, searchable catalog to pull from.
2. Search Relevance & Schema Design
- Searchable Attributes — Selected only 6 high-signal attributes for search to reduce noise. I classified primary identifiers (episodeName, podcastShowTitle) as Ordered to prioritize exact phrase matches, while secondary context (episodeSummary, podcastShowdescription) is set to Unordered to capture broader keyword matches without penalizing word position.
- Faceting Strategy — Enabled filterOnly on podcastShowGenre and episodeType (short/long) for performant, high-speed filtering by the AI Agent.
- Custom Ranking — Implemented a "Freshness" ranking strategy by adding publishDate (desc) as a custom ranking criterion to break ties between equally relevant results.
3. Prompt Design: Vibes as Search Intent
Each vibe maps to a short, keyword-rich prompt — not a conversational instruction. For example:
| Vibe | Prompt sent to Agent Studio |
|---|---|
| boost dopamine 🧃 | "Recommend episodes about positive psychology, gratitude, self-improvement, health and fitness, manifesting." |
| main character energy ⭐ | "Recommend high-energy, hype episodes for workouts — self-improvement, confidence, mental toughness, empowerment, motivation, glow-up mindset, or success stories." |
| before sleep 😴 | "Recommend calming episodes to fall asleep to — soothing narration, bedtime stories, gentle ASMR, sleep meditation, or slow meandering conversation." |
4. Agent Instructions: Strict Output, No Chat
This is how the Agent Instructions look like (configured in the Agent Studio dashboard):
### ROLE
You are a strict Podcast Curator Agent. Your ONLY goal is to return a JSON array of exactly 5 unique podcast episodes from 5 DIFFERENT shows.
### CRITICAL CONSTRAINTS
1. **Output Format:** RAW JSON ARRAY ONLY. No markdown, no conversation.
2. **Diversity (The "Highlander Rule"):** EXACTLY 5 different `podcastShowTitle` values. There can be only one episode per show.
3. **Safety:** ZERO explicit content.
### EXECUTION PROTOCOL (The "Top-Up" Logic)
1. **Fetch & Filter:** Query the index for 20+ candidates using keywords from the user's vibe.
2. **Deduplicate:** Group by Show Title -> Keep only the single best match per show.
3. **Select:** Fill 5 slots based on Tier A (Perfect Match) > Tier B (Vibe Match).
4. **Rescue Loop:** If < 5 unique shows exist, perform a NEW SEARCH with synonymous keywords to fill the remaining slots.
This separation — behavioral rules in system instructions, search keywords in the user message — was a key design decision. It keeps prompts clean, tokens low, and retrieval focused.
5. Integration: One API Call Per Vibe
User taps vibe → Frontend sends prompt → Next.js API route → Agent Studio API → Algolia index search + LLM reasoning → JSON response → Parsed & rendered
The Next.js API route calls Agent Studio's completions endpoint (non-streaming), parses the JSON response (with handling for LLM quirks like unescaped newlines and invalid escape sequences), normalizes field names, and returns clean episode data to the frontend.
Why Fast Retrieval Matters
Pod-tape's interaction model is one tap = one result set. There's no progressive loading, no pagination, no "refine your search." The user taps and expects episodes now.
This makes retrieval speed non-negotiable:
- Algolia's index lookup happens in milliseconds — the agent gets its candidate pool almost instantly
- The LLM reasoning step (selecting, deduplicating, formatting) is the actual bottleneck
- Because retrieval is fast, I can afford to let the agent query broadly (20+ candidates) and then narrow down to 5, rather than having to pre-filter aggressively and risk missing good matches
- No caching needed — every tap can hit the live index, and it's still fast enough to feel responsive
In short: fast retrieval lets the agent be smarter (broader search, better selection) without making the user wait longer.
Challenges & What I Learned
Building Pod-tape taught me more about prompt engineering for retrieval than any tutorial:
Verbose prompts kill search quality. My initial vibe prompts were 80+ words with explicit sections like "Search Intent:", "Strict Constraints:", and "Tone:". The problem? The agent tried to match those meta-instructions against the index itself. Stripping prompts down to concise, keyword-rich descriptors (5-10 words per vibe) was the single biggest quality improvement. Less instruction, better results.
The monoculture trap The agent naturally gravitates toward the highest-relevance matches, which often meant returning 5 episodes from the same popular podcast. This violated the core product promise of a "mix tape." I solved this by implementing a group-and-cull logic in the agent's system instructions: first group all results by show, then select the best episode from each. Now every recommendation set is diverse by design.
The "JSON Mirage" Despite clear schema instructions, the agent consistently returned broken JSON: newlines embedded in strings, \' escapes (valid in JS, invalid in JSON), and responses wrapped in markdown code fences. To handle this, I implemented a preprocessing pipeline that sanitizes outputs—stripping fences, escaping special characters, removing invalid sequences—before attempting to parse. Without this, most responses silently failed.
Upcoming Features
- Expanded catalog — Ingest from more podcast directories and APIs to grow the index beyond the current dataset and offer deeper, more diverse recommendations.
- Custom vibe search & shuffle — Let users search their own custom vibes, or shuffle existing vibes to discover new recommendation sets they haven't explored yet.
- Direct platform links — Tap to listen instantly on Spotify, Apple Podcasts, or YouTube. No copy-pasting—just seamless playback on your preferred platform.
- User accounts & personalization — Sign in to save your favorite podcasts, create collections, and get a personalized daily mix based on your listening and tap history. The more you explore, the smarter your recommendations become.
and much more ⭐️..




Top comments (0)