https://youtube-growth-engine.onrender.com

Composio - Youtube analytics Render - Postgres, MCP server, Frontend , Backend

The Problem Every YouTuber faces the same question: "What should my next video be?" The usual answer is hours of manually browsing competitor channels, eyeballing what's trending, and guessing what might work. There's no feedback loop — you never know if your instincts were right until after you've already invested days into a video.

The Insight What if an AI agent could do that research for you — not just once, but continuously, learning from its own track record? Instead of a one-shot recommendation engine, build a system that watches, suggests, measures, and adapts.

What I Built YouTube Strategy Lab takes up to 10 channel URLs, unleashes a Gemini-powered AI agent equipped with 7 YouTube API tools (via Composio), and produces a cross-channel content strategy — trending topics, content gaps, and specific next-video suggestions with AI-generated thumbnails.

The twist is the feedback loop: every suggestion gets saved. On the next run, the system checks if any tracked channel actually published a similar topic, scores its real-world performance against the channel's baseline, and distills patterns into learned rules. Those rules get injected back into the agent's prompt, so suggestions genuinely improve over time.

Technical Highlights Agentic architecture — Multi-turn Gemini chat with autonomous tool calling (channel lookup → video listing → stats → captions), not a simple prompt-in/answer-out pipeline. Composio integration — YouTube OAuth handled externally; the agent gets clean tool abstractions without managing API keys or pagination. Self-improving loop — Jaccard similarity + substring matching to detect when a suggestion was "published," then a view-ratio × engagement-multiplier scoring formula to judge quality. Full observability — Every tool call, argument, response, and reasoning step is traced in the UI and logged to agent_debug.log. Stack React + Vite frontend, FastAPI + Python backend, Google Gemini for LLM + image generation, Composio for YouTube API tools, SQLite for persistence, flat-file memory across sessions.

What I Learned Building an agent that uses tools autonomously is fundamentally different from prompt engineering. The hard parts were handling tool-call chains gracefully, recovering from API failures mid-conversation, and designing a scoring system that's meaningful with sparse data. The learning loop was the most satisfying piece — watching the system's suggestions measurably improve after a few cycles.

Built With

Share this project:

Updates