YT AI Agent is a background YouTube automation system for AI/productivity channels. It analyzes trend signals, reads channel analytics, plans upload timing, generates narrated Shorts/videos, writes metadata, and uploads through the official YouTube APIs.
- Trend scanner for configured niches and seed keywords.
- YouTube Analytics reader for recent channel performance.
- Upload-hour scoring using recent video performance.
- Automatic Shorts and long-form video generation with scripts, narration, rendered slides, metadata, and queues.
- Official YouTube Data API upload pipeline.
- Windows startup-task scripts for unattended background operation.
- Status reporting through
data/status.jsonand channel reports.
The latest local verification reported:
Activity: Sleeping
Next cycle: 900 seconds
Ready Shorts: 5 locally queued, 3 reported in latest agent status
Ready Videos: 1
Next upload: 2026-06-04 07:00:00
Best upload hours: 18, 7, 17, 19
28-day views: 238
28-day watch time: 12 minutes
Recent uploads analyzed: 35
Underperforming uploads flagged for metadata rescue: 10
Verified generated Short: 1080x1920 H.264/AAC, 32 seconds
Creative providers: Gemini configured but quota-limited, Hugging Face authenticated, Ollama fallback workingRuntime databases, OAuth tokens, logs, and generated video queues are intentionally excluded from GitHub.
- Python
- YouTube Data API v3
- YouTube Analytics API
- SQLite
- Windows SAPI text-to-speech
- Movie/rendering utilities
- Optional LLM providers: Ollama, Gemini, OpenRouter, OpenAI-compatible endpoints, Pollinations
- Create a Google Cloud project.
- Enable YouTube Data API v3 and YouTube Analytics API.
- Create OAuth Desktop credentials and place them in
secrets/client_secret.jsonlocally. - Copy
.env.exampleto.envand fill local keys. - Install dependencies:
python -m venv .venv
.\.venv\Scripts\Activate.ps1
pip install -r requirements.txt- Authenticate and run:
python -m yt_ai_agent auth
python -m yt_ai_agent runyt_ai_agent/ Core agent modules
scripts/ Startup install/uninstall scripts
brand/ Public channel branding assets
reports/ Local analytics/trend reports, ignored by default
content/ Local video queues, ignored by default
data/ Local state/status, ignored by default
secrets/ OAuth credentials, ignoredThe project uses official APIs and keeps secrets out of source control. You are responsible for YouTube policy compliance and rights to uploaded content.
