Retention Loop
Retention Loop is an AI Director for YouTube creators.
Core trick
Joins retention curves with frame-level content analysis, then a render-watch-fix loop re-cuts footage with FFmpeg for up to three critique rounds.
Description
Retention Loop is an AI Director for YouTube creators. YouTube Studio shows where viewers leave a video but never why. Retention Loop works that out. It syncs your uploads and their retention curves from YouTube Analytics with read-only access. Gemini 4 Argon watches every video and notes what was on screen at each drop or hold. It then reads your whole back catalog in one long-context call and turns it into channel lessons, each with evidence, counterexamples and real frames.
A panel of four Managed Agents on Argon reviews your published videos and new scripts in parallel: Maya is a first-time viewer, Dev is a retention editor, Priya is a skeptic who checks claims with Google Search, and Sam is a longtime subscriber. Argon merges their notes into a ranked list of fixes.
For new videos, it scouts trending topics and drafts a script that leads with the payoff and cites the lessons it applied. It also gives recording tips before you film. For rough cuts, Argon proposes typed edits and FFmpeg renders them. Argon then watches the render next to the original, checks for clipped words, a late payoff and jarring jumps, and fixes the cut over up to three rounds. The creator stays in control. Nothing is uploaded to YouTube, every edit can be toggled off and source files are never modified. Every video teaches the next.
README excerpt
# Retention Loop An AI Director for YouTube creators, powered by **Gemini 4 Argon**. It watches your published videos next to their real audience-retention curves, learns what your viewers respond to, and turns that into concrete changes: a better angle, a payoff-first script, and a playable recut of your own footage that it checks by watching it. Built for the Gemini 4 Argon SF Hackathon (Cerebral Valley × Google DeepMind), **Problem Statement Two: More Dimensions**. Retention Loop renders the cut it proposed, watches the result, critiques it against the goal, and fixes it in a loop. ## Built during the hackathon (October 25, 2026) All code in this repository was written during the event: the app, the Gemini 4 Argon director, the render → watch → fix loop, channel memory, and the YouTube Analytics sync. Things that existed before and are only used: - The product spec in [docs/spec.md](docs/spec.md), written before the event. - A local read-only YouTube Analytics OAuth token for the @techfren channel (`yt-analytics.readonly`), which the app reads from `~/.config/youtube-analytics-readonly`. - Open-source tools: FFmpeg, yt-dlp, OpenAI Whisper, Next.js, PGlite, Drizzle. - The demo footage is the creator's own published video. ## What Gemini 4 Argon does here | Job | Model | How | |---|---|---| | Learn the channel | `gemini-4-argon` | Syncs recent uploads and retention from YouTube Analytics (read-only). Argon watches each video in parallel and annotates its hook, beats,