🎙️ Self-Improving Podcast

A daily podcast that generates itself — and improves itself based on your feedback.

Fork this val, add your API keys, and you have a personal daily audio briefing that gets better over time.

How it works

  1. generate-daily.ts runs on a schedule (interval)
  2. It checks for any unprocessed feedback and feeds it to the AI agent
  3. The agent can edit the val's own source code (e.g. add new data sources, change the script format)
  4. Then generate-podcast.ts fetches live data and generates a TTS episode via ElevenLabs
  5. The episode is stored as a blob and served via feed.ts as an RSS feed

Subscribe in your podcast app. Leave feedback via the web form. The AI agent processes it before the next episode.

Files

FileTypeWhat it does
generate-daily.tsintervalCron trigger — processes feedback, then generates today's episode
generate-podcast.tsscriptFetches data sources, builds script, calls ElevenLabs TTS
feed.tshttpRSS feed, episode audio serving, feedback form (/feedback)
podcast-player.tshttpSimple web audio player
agent.tsscriptSelf-improving AI agent — reads own source, calls Claude, applies code edits
cover-art.tshttpPodcast cover art
changelog.mdfileLog of all agent-applied changes
feature-ideas.mdfileFuture ideas

Built-in data sources

Out of the box, the podcast script includes:

  • Weather — via Open-Meteo (free, no API key). Default: New York. Edit WEATHER_LOCATIONS in generate-podcast.ts to change.
  • Prediction markets — via Polymarket Gamma API (free, no API key). Empty by default — uncomment or add event slugs in POLYMARKET_EVENTS.

Want more? Just submit feedback like "Add top Hacker News stories" or "Include Bitcoin price" and the agent will wire it up.

Setup

  1. Fork this val
  2. Add environment variables:
KeyDescription
ELEVEN_LABS_API_KEYElevenLabs text-to-speech API key
ANTHROPIC_API_KEYAnthropic API key for Claude (used by agent)
TOWNIE_TOKENVal Town API token with write access (used by agent to edit its own files)
  1. Update agent.ts — change VAL_UUID to your forked val's UUID
  2. Set the interval schedule on generate-daily.ts (e.g. daily at 7am)
  3. Subscribe to the RSS feed URL in your podcast app (see below)

Listening

Your feed URL is the endpoint for feed.ts — copy it from the Val Town dashboard.

Apple Podcasts (iPhone / iPad)

  1. Open the Podcasts app
  2. Tap Library at the bottom
  3. Tap the (three dots) in the top-right
  4. Tap Follow a Show by URL
  5. Paste your feed URL → tap Follow

Apple Podcasts (Mac)

  1. Open Podcasts (or iTunes on older macOS)
  2. Click FileAdd a Show by URL…
  3. Paste your feed URL → click Follow

Overcast (iOS)

  1. Tap the magnifying glass icon
  2. Tap Add URL
  3. Paste your feed URL

Pocket Casts

  1. Go to the Discover tab
  2. Paste your feed URL into the search bar
  3. Tap Subscribe

Podcast Addict (Android)

  1. Tap +RSS feed
  2. Paste your feed URL

Spotify

⚠️ Spotify does not support subscribing to private/custom RSS feeds. You'd need to submit your podcast publicly through Spotify for Creators, which isn't really the point here. Use one of the apps above instead.

Feedback loop

  1. Visit /feedback on the feed endpoint (linked in each episode description)
  2. Submit text feedback — it's saved as a blob instantly
  3. Next time generate-daily.ts runs, the agent reads all unprocessed feedback
  4. The agent calls Claude with the full val source + your feedback
  5. Claude outputs edit blocks → agent applies them via the Val Town API
  6. Changes are logged in changelog.md
  7. The (potentially updated) generate-podcast.ts runs to create that day's episode

Customization

Edit the constants at the top of each file:

  • generate-podcast.tsWEATHER_LOCATIONS, POLYMARKET_EVENTS, ELEVENLABS_VOICE_ID
  • feed.tsPODCAST_TITLE, PODCAST_DESCRIPTION, PODCAST_AUTHOR

Or just submit feedback and let the agent do it for you!

Blob storage layout

self-improving-podcast/
  episodes/       — MP3 files (2026-03-25-1711234567890.mp3)
  feedback/       — Feedback JSON blobs (timestamp.json)
  agent-runs/     — Agent execution logs