How We Built a YouTube SEO Pipeline with AI Agents
A multi-agent system that automates video research, scripting, rendering, upload scheduling, and analytics — fully self-hosted. The Problem Running a YouTube channel is a full-time job. Research topics, write scripts, generate thumbnails, render videos, optimize SEO, upload on schedule, analyze performance — and repeat. For a solo developer team, this quickly becomes overwhelming. We built a…
Creating a successful YouTube channel demands a substantial time commitment. Researching topics, crafting scripts, designing thumbnails, rendering videos, optimizing SEO, scheduling uploads, and analyzing performance can become quite overwhelming for a small team. To tackle this challenge, we developed a multi-agent system that manages the entire pipeline independently.
Our system comprises three AI agents connected via a shared message bus. Node roles include an orchestrator that coordinates tasks, manages memory, maintains security audits, a content pipeline responsible for video rendering, upload scheduling, and API interactions, and a support agent focusing on SEO optimization, tool research, code fixes, and analytics.
Communication among nodes is facilitated through SQLite-backed inbox/outbox, with each node maintaining its task queue, heartbeat monitoring, and priority-based message delivery.
The pipeline process begins with topic research, where agents scan tech trends, community discussions, and competitor channels, fact-checking each topic and tagging it with relevant keywords. Next, AI-powered script generation follows a strict blueprint consisting of a hook (the YouTube title), content (250-300 words), an engagement section, an anti-call-to-action, a tactical debrief (three to four learning bullets), and an exploit timeline with chapter markers.
For video rendering, we utilize Piper TTS, an offline, free solution, coupled with FFmpeg to create voiceovers, FFmpeg handles rendering with PIL-piped terminal backgrounds, Karaoke ASS subtitles, and glitch overlays. All of this is achieved without relying on cloud APIs. SEO optimization involves generating blueprint-compliant descriptions, selecting 5 hashtags, including chapter timestamps, and implementing A/B testing.
To schedule uploads, our deploy script handles resumable YouTube API uploads, quota tracking (100 uploads/day and 10k units/day limit), scheduled publishing with publishAt timestamps, and pre-upload quality gates (metadata, description length, and blueprint compliance). Post-upload, we conduct a live metadata check.
Analytics are handled by bulk reporting API jobs, which collect daily data on watch time, impressions, click-through rate, traffic sources, and per-video performance. This information is then fed back into topic selection and title optimization. Our system has deployed over 250 videos across 7 waves, with zero cloud APIs used for TTS and rendering, ensuring 100% offline operation.
Automated quality gates catch 95% of metadata issues before upload, and we perform an analytics loop every 48 hours, using data to inform topic selection and title optimization.
Lessons learned include the importance of upload frequency, the benefits of rigid content structures, the advantages of offline rendering using Piper TTS and FFmpeg, and the value of cross-session memory to prevent repeated mistakes and preserve decisions across agent restarts. Our technology stack includes a custom Python swarm with SQLite message bus, offline TTS using Piper, video rendering with FFmpeg and Ken Burns effects, YouTube Data API v3 with quota tracking, analytics via YouTube Reporting API, and semantic search with MemPalace for memory management. Configurations are managed using OpenCode with MCP integrations.
Written by urgent.news from Dev.to's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.