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.
generate-daily.tsruns on a schedule (interval)- It checks for any unprocessed feedback and feeds it to the AI agent
- The agent can edit the val's own source code (e.g. add new data sources, change the script format)
- Then
generate-podcast.tsfetches live data and generates a TTS episode via ElevenLabs - The episode is stored as a blob and served via
feed.tsas an RSS feed
Subscribe in your podcast app. Leave feedback via the web form. The AI agent processes it before the next episode.
| File | Type | What it does |
|---|---|---|
generate-daily.ts | interval | Cron trigger β processes feedback, then generates today's episode |
generate-podcast.ts | script | Fetches data sources, builds script, calls ElevenLabs TTS |
feed.ts | http | RSS feed, episode audio serving, feedback form (/feedback) |
podcast-player.ts | http | Simple web audio player |
agent.ts | script | Self-improving AI agent β reads own source, calls Claude, applies code edits |
cover-art.ts | http | Podcast cover art |
changelog.md | file | Log of all agent-applied changes |
feature-ideas.md | file | Future ideas |
Out of the box, the podcast script includes:
- Weather β via Open-Meteo (free, no API key). Default: New York. Edit
WEATHER_LOCATIONSingenerate-podcast.tsto 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.
- Fork this val
- Add environment variables:
| Key | Description |
|---|---|
ELEVEN_LABS_API_KEY | ElevenLabs text-to-speech API key |
ANTHROPIC_API_KEY | Anthropic API key for Claude (used by agent) |
TOWNIE_TOKEN | Val Town API token with write access (used by agent to edit its own files) |
- Update
agent.tsβ changeVAL_UUIDto your forked val's UUID - Set the interval schedule on
generate-daily.ts(e.g. daily at 7am) - Subscribe to the RSS feed URL in your podcast app (see below)
Your feed URL is the endpoint for feed.ts β copy it from the Val Town dashboard.
- Open the Podcasts app
- Tap Library at the bottom
- Tap the β― (three dots) in the top-right
- Tap Follow a Show by URL
- Paste your feed URL β tap Follow
- Open Podcasts (or iTunes on older macOS)
- Click File β Add a Show by URLβ¦
- Paste your feed URL β click Follow
- Tap the magnifying glass icon
- Tap Add URL
- Paste your feed URL
- Go to the Discover tab
- Paste your feed URL into the search bar
- Tap Subscribe
- Tap + β RSS feed
- Paste your feed URL
β οΈ 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.
- Visit
/feedbackon the feed endpoint (linked in each episode description) - Submit text feedback β it's saved as a blob instantly
- Next time
generate-daily.tsruns, the agent reads all unprocessed feedback - The agent calls Claude with the full val source + your feedback
- Claude outputs edit blocks β agent applies them via the Val Town API
- Changes are logged in
changelog.md - The (potentially updated)
generate-podcast.tsruns to create that day's episode
Edit the constants at the top of each file:
generate-podcast.tsβWEATHER_LOCATIONS,POLYMARKET_EVENTS,ELEVENLABS_VOICE_IDfeed.tsβPODCAST_TITLE,PODCAST_DESCRIPTION,PODCAST_AUTHOR
Or just submit feedback and let the agent do it for you!
self-improving-podcast/
episodes/ β MP3 files (2026-03-25-1711234567890.mp3)
feedback/ β Feedback JSON blobs (timestamp.json)
agent-runs/ β Agent execution logs