The open-source AI agent that runs a YouTube channel end to end, with you approving every video before it goes out.
It researches topics, writes scripts, generates narration and visuals, assembles real MP4s, writes titles, descriptions and tags, schedules approved videos, and learns from analytics and from what your audience says. It runs on your own machine with your own API keys.

![]() |
![]() |
|---|---|
| Content review: quality checks and approval for one video | Autonomous operator: your mandate and the agent's plan |
Screenshots use sample data so every panel is populated. Regenerate them with npm run docs:screenshots.
You need:
git clone https://github.com/darkzOGx/youtube-automation-agent.git
cd youtube-automation-agent
npm install
npx playwright install chromium # renders slideshow videos; on Linux add --with-deps
npm run walkthrough
npm start
Then open http://localhost:3456.
npm run walkthrough explains each provider choice, tests your keys, and connects your YouTube channel. For a shorter flow, use npm run setup. Every setting is documented in .env.example.FFmpeg is installed with npm install through ffmpeg-static.
config/credentials.json.Error 403: access_denied. While the app is in Testing mode, Google expires the sign-in after 7 days.| Stage | What the agent does | What you control |
|---|---|---|
| Research | Finds topics and builds a content strategy | Niche, audience, blocked topics |
| Script | Writes the hook, narrative, CTA, and metadata | Voice, format, length, brand direction |
| Production | Generates narration and visuals, then assembles a real MP4 | Provider choice and media fallbacks |
| Review | Runs quality checks and opens the video for review | Facts, media rights, edits, approval |
| Publish | Schedules and uploads approved content | Privacy, timing, final decision |
| Learn | Captures 24-hour and 7-day evidence, measures your chosen outcome, then proposes the next move | Choose the KPI and approve or reject each lesson |
Each item links to its walkthrough in the feature guide.
Plan - Autonomous Channel Operator: give it an objective, audience, content pillars, cadence, and limits. It researches trends and competitors, builds an evidence-labeled plan, and sends each video through production. - Outcome & ROI Studio: set a target (views, watch hours, net subscribers, engagement, or revenue) and a budget, and track progress. Missing data shows as unavailable, never as zero.
Produce - Production readiness: a verified check of every provider, your channel, and video assembly before anything runs on its own. Paid image and video probes are separate opt-ins. - Resumable generation: every stage is checkpointed, so a crash or timeout resumes where it stopped instead of starting over. - AI video generation: local slideshow by default; Seedance, MiniMax H3, Gemini Omni, Kling, or Wan for real clips, with a cap on paid seconds. - Shorts Repurposing Studio: turn an approved video into three 9:16 Short drafts with burned-in captions, reusing existing media so no new generation credits are spent.
Review - Content review: quality checks, metadata editing, approval, and scheduling for each video. - Scene Repair Studio: edit, reorder, lock, replace, or regenerate a single scene, then rebuild the video. - Evidence desk: link each factual claim in the script to a verified source before approval. - Discoverability preflight: advisory search and AI-answer checks from a bundled DarkzSEO audit.
Learn - Learning loop: compares each video's 24-hour and 7-day results with your channel's own history and proposes changes for you to approve. - Controlled growth experiments: test approved title and thumbnail variants on a live video. A winner needs a 95% evidence threshold, and the original is restored before you decide. - Scene-aware retention: see which scene lost viewers.
Engage - Audience Engagement Studio: comment sync, themes and questions, spam quarantine, reply drafts that post only after you approve them, and video ideas mined from repeated requests.
One key gets you started. Pick a text provider in the walkthrough: Gemini, OpenAI, OpenRouter (400+ models, including Claude), Kimi, MiMo, GLM, DeepSeek, or MiniMax. Gemini has free tiers for text and narration.
Models, keys, env vars, clip limits, and the .env essentials are in the providers guide.
The scheduler starts with npm start and uses the server's local time.
| When | What runs |
|---|---|
| Daily at 06:00 | Content generation, following the active channel strategy's cadence |
| Every 15 minutes | Publishing queue |
| Daily at 09:00 | Analytics collection |
| Daily at 22:00 | Optimization |
| Every 4 hours | Comment sync and growth-experiment refresh |
| Sundays at 08:00 | Weekly strategy review |
Details are in the feature guide.
POST /generate with x-api-key.The three problems people hit most:
| Problem | Fix |
|---|---|
Missing credentials for: an AI provider |
Configure any one text provider with npm run walkthrough. OpenAI isn't required. |
Google sign-in shows Error 403: access_denied |
Add your Google account as a test user under Google Auth Platform → Audience. |
| No video is produced, or it's marked simulated | Read the ✗ lines in the startup capability check, and make sure you ran npx playwright install chromium. |
Questions and setup help go in Discussions.
See CONTRIBUTING.md for ground rules, project structure, and how to add a provider. Short version: one focused concern per PR, no lockfile churn, lint and tests must pass. Issues are for bugs.
git clone <your-fork>
cd youtube-automation-agent
npm install
npm run lint # CI runs this on every PR
npm test
Made something real with it? Share verified output in examples.
@darkzOGx, a solo builder shipping AI automation and developer tools. Find me on X and laderalabs.io. If YouTube Automation Agent saves you time, a star helps it reach more developers.
MIT. See LICENSE. Model and API acknowledgments are in the providers guide.
This tool is for legitimate content creation. Comply with YouTube's Terms of Service and Community Guidelines.
More from darkzOGx:
| 日期 | 榜单 | 排名 | 周期新增 | 总 STAR |
|---|