Fully autonomous AI agent that runs your YouTube channel 24/7 — script, voice, editing, thumbnail, upload. Zero human input.
▶ Watch the full demo with sound
TubeAssistant is an open-source AI agent that automates your entire YouTube workflow. It generates scripts with an LLM, synthesizes narration, downloads stock footage, edits the video, creates an AI thumbnail, and uploads to YouTube — every day, automatically, at the time you choose.
No editing software. No recording. No scheduling. The agent runs 24/7 and you control it via Telegram.
Growing a YouTube channel is a second job. Every single day you need to:
- Research what topics are working
- Write a full script
- Record or synthesize a voice-over
- Find and edit video footage
- Design a thumbnail
- Write SEO-optimized titles, descriptions, and tags
- Upload and schedule at the right time
- Analyze performance and adapt
Most creators quit within 3 months — not because they lack ideas, but because the process is relentless and eats hours every day.
TubeAssistant eliminates every step. It runs 24/7, reads your channel analytics, generates content, and publishes — completely autonomously.
- Full pipeline automation — from topic idea to published video, zero human input
- AI script generation — LLM writes the script based on your niche and what's performing
- Natural voice narration — Edge TTS, no API cost, no robotic voice
- Stock footage — auto-downloads relevant clips from Pexels (free, millions of clips)
- Smart video editing — FFmpeg montage with synced audio and background music
- AI thumbnail — generated by Pollinations.ai or HuggingFace FLUX with automatic text overlay
- Analytics-driven — reads your channel data, adapts topic and tone accordingly
- Telegram control — send a message, the agent obeys. Stop, force, queue topics, check stats
- Crash recovery — pipeline checkpoints resume from the last completed step
- 100% free tier — OpenRouter, Pexels, Edge TTS, Pollinations.ai — all free
pip install uv # fast installer (one-time)
uv tool install git+https://github.com/metiu1/tube-assistant.git
tube-assistant # interactive menu — pick Setup wizard firstThat's it. The wizard handles API keys, Google OAuth, Telegram bot, and channel preferences.
Analytics → Strategy → AI Script → TTS Voice → Stock Clips → Montage → AI Thumbnail → Upload
Every day, at the time you choose, TubeAssistant:
- Reads your channel analytics to understand what's performing
- Picks a topic aligned with your niche and goals
- Writes a full script using an LLM (OpenRouter, Ollama Cloud, or local)
- Synthesizes narration with Edge TTS — natural voice, zero cost
- Downloads stock footage from Pexels — free library, millions of clips
- Edits the video with FFmpeg — synced audio, background music
- Generates a thumbnail with AI (Pollinations.ai or HuggingFace FLUX) + automatic text overlay
- Uploads to YouTube and schedules at the optimal time
Everything controllable in real time via Telegram — just message your bot.
- Python 3.11+
- FFmpeg in PATH (download)
- Google account with YouTube Data API enabled
- Telegram bot (free, 2 min via @BotFather)
- OpenRouter API key (free tier works)
- Pexels API key (free)
# Clone
git clone https://github.com/metiu1/tube-assistant.git
cd tube-assistant
# Install
pip install uv # one-time
uv tool install -e . # or: installa.bat on Windows
# Setup (one-time wizard)
tube-assistant onboard
# Run
tube-assistant startThe onboard wizard walks through every step:
Step 1 — Agent language Any language your Telegram assistant will speak
Step 2 — AI Service OpenRouter / Ollama Cloud / local Ollama / 12 more
Step 3 — Image provider Pollinations (free) or HuggingFace FLUX
Step 4 — Pexels API Free key for stock footage
Step 5 — Telegram Bot Token from @BotFather
Step 6 — Channel setup Name, niche, goals, style, language
→ Send your Google credentials.json
| Command | Action |
|---|---|
/status |
Current agent state |
/forza |
Trigger pipeline immediately |
/forzaora <topic> |
Publish now with a specific topic |
/topic <text> |
Add topic to queue |
/coda |
View topic queue |
/skip |
Skip today's video |
/setpubblica <hour> |
Change publish time (UTC) |
/setvideogiorno <n> |
Videos per day (1–5) |
/recap |
Analytics on recent videos |
/memoria |
What the agent remembers |
Natural language works too:
"Next video about the future of remote work" "Avoid mentioning crypto" "Make the pacing faster"
15 providers supported. Set AI_SERVICE in .env to switch at any time.
OpenRouter and Ollama (the wizard defaults) need no extra packages. Providers with their own SDK are optional extras - install only what you use:
pip install "tube-assistant[openai]" # also deepseek/xai/together/perplexity/fireworks/azure
pip install "tube-assistant[anthropic]" # or: gemini, mistral, groq, cohere, huggingface, all| Provider | Cost | AI_SERVICE value |
Key |
|---|---|---|---|
| OpenRouter | Free tier | openrouter |
OPENROUTER_API_KEY |
| OpenAI | Paid | openai |
OPENAI_API_KEY |
| Anthropic | Paid | anthropic |
ANTHROPIC_API_KEY |
| Gemini | Free tier | gemini |
GEMINI_API_KEY |
| Mistral | Paid | mistral |
MISTRAL_API_KEY |
| Groq | Free tier | groq |
GROQ_API_KEY |
| DeepSeek | Very cheap | deepseek |
DEEPSEEK_API_KEY |
| xAI (Grok) | Paid | xai |
XAI_API_KEY |
| Cohere | Paid | cohere |
COHERE_API_KEY |
| Together AI | Paid | together |
TOGETHER_API_KEY |
| Perplexity | Paid | perplexity |
PERPLEXITY_API_KEY |
| Fireworks AI | Paid | fireworks |
FIREWORKS_API_KEY |
| Azure OpenAI | Paid | azure_openai |
AZURE_OPENAI_API_KEY |
| Ollama Cloud | Paid | ollama_cloud |
OLLAMA_API_KEY |
| Local Ollama | Free | ollama_local |
— |
Every model is overridable via env (e.g. OPENAI_MODEL=gpt-4o, GROQ_MODEL=mixtral-8x7b-32768).
See .env.example for the full list of variables.
tube-assistant # interactive TUI menu (recommended)
tube-assistant onboard # first-time setup wizard
tube-assistant start # start the 24/7 daemon
tube-assistant run # one-shot pipeline (one video now)
tube-assistant update # update to latest version
tube-assistant status # show workspace and config
tube-assistant workspace # print workspace path| Service | Cost |
|---|---|
| OpenRouter free tier | $0 |
| Pexels API | $0 |
| Telegram bot | $0 |
| Pollinations.ai (thumbnails) | $0 |
| Edge TTS (voice) | $0 |
| YouTube Data API | $0 (standard quota) |
Total: $0/month on free tiers.
youtube_ai_agent/ CLI and launcher (pip entry point)
moduli/
cervello.py Topic and script generation (LLM)
audio.py Voice synthesis (Edge TTS)
asset.py Pexels clip download
montaggio.py Video editing (FFmpeg / MoviePy)
thumbnail.py AI thumbnail (Pollinations.ai / HuggingFace + Pillow)
pubblica.py YouTube Data API v3 upload
analytics.py Channel performance reading
strategia.py Strategy adaptation from analytics
telegram_handler.py Telegram bot (live control)
ai_client.py Multi-provider AI client
agent.py Main daemon (24/7 scheduler)
wizard.py Configuration wizard
MIT — use, modify, and distribute freely.

