And now for something completely different.

Last time it was monitoring — metrics, dashboards, alerts. Serious infrastructure business. This time I wanted to see what happens when you put an AI agent on Bitfrost and give it something genuinely frivolous to do: build YouTube playlists.

The Idea

The workflow is simple. You type one line:

Docker Basics | Docker tutorial for beginners

Left of the pipe is the playlist name. Right is the search topic. Hit enter. A few seconds later a private YouTube playlist exists, populated with real videos, curated by Claude.

No clicking around YouTube. No copying video IDs. Just a line of text and a result.

The Stack

  • n8n — workflow automation, runs as a Docker container on Bitfrost
  • Claude (via Anthropic API) — picks the best videos from search results
  • YouTube Data API v3 — searches YouTube and creates the playlist
  • Google OAuth2 — lets n8n act on the YouTube account

Everything runs on Bitfrost 24/7, just like the monitoring stack.

How It Works

The workflow has six nodes chained together:

  1. Chat Trigger — accepts the input line
  2. Split Input — separates playlist name from search query on the | character
  3. YouTube Search — calls the YouTube API and fetches 15 real videos
  4. AI Agent (Claude) — picks the best 5–7 based on title, channel and relevance
  5. Create Playlist — creates the named playlist on YouTube
  6. Add Videos — loops through Claude’s picks and adds them one by one

The key insight is that Claude never invents video IDs — it only picks from the real results returned by YouTube Search. No hallucination possible.

Lessons Learned

OAuth and local hostnames don’t mix. Google refuses redirect URIs pointing at private IPs or bare hostnames like bifrost. The fix is an SSH tunnel — forward port 5678 to localhost and do the OAuth dance from there.

The YouTube Search API returns whatever it wants. Category filters help, but results can still be noisy. The system prompt matters — telling Claude to prefer structured learning content over clickbait makes a real difference.

Keep it simple. The first version used Tavily for web search, timed out after five minutes, and hallucinated video IDs. Replacing it with a direct YouTube API call made the whole thing faster, cheaper and more reliable.

The Result

Type a topic, get a playlist. It takes about ten seconds. The n8n workflow lives on Bitfrost, runs whenever called, and costs a few cents in API credits per playlist.

Useful? Marginally. Fun to build? Absolutely.


Next up: wiring Claude into something that actually matters on Bitfrost — automated summaries of Grafana alerts, maybe. But that’s a story for another post.