A production-ready Agency Swarm implementation for YouTube content strategy, featuring AI-powered news analysis, trend detection, competitor analysis, and content ideation.
- 📰 Discover Trending Topics: Analyzes news from multiple sources (Readwise Reader + X/Twitter)
- 🔍 Analyze Competitors: Tracks competitor videos and identifies successful strategies
- 💡 Generate Video Ideas: Creates data-driven content ideas based on trends and gaps
- ✨ Optimize Titles: Generates high-performing video titles using proven frameworks
- 📊 Track Performance: Analyzes channel metrics, comments, and transcripts
- ⏱️ Create Timestamps: Automatically generates engaging video timestamps
- Fork this repository to your own GitHub account
- Sign up at agencii.ai
- Connect your repository and click deploy
- Add API keys when prompted during deployment
That's it! Your agency will be deployed and ready to use.
YouTubeContentStrategyAgent (Entry Point)
├── NewsletterAgent (Readwise Reader articles)
├── GrokNewsAgent (X/Twitter trends)
├── TitleGenerationAgent (Title optimization)
│ └── BuilderTomAgent (ICP feedback)
└── BuilderTomAgent (ICP feedback)
Agents:
- YouTube Content Strategy Agent: Main orchestrator for content strategy and analysis
- Newsletter Agent: Fetches and analyzes news from Readwise Reader
- Grok News Agent: Discovers viral AI content from X/Twitter
- Title Generation Agent: Generates optimized titles using Notion frameworks (optional)
- Builder Tom Agent: ICP persona providing audience feedback on titles and content ideas
Copy and paste these prompts to try the agency:
Generate video ideas based on the latest AI news
Analyze competitor performance this week
What should I make a video about next?
Generate titles for a video about [topic]
Analyze the performance of my latest video
Generate timestamps for video [URL or ID]
File: channel_description.md
Edit this file to customize for your channel:
- Channel details (name, description, subscriber count)
- Content focus and topics
- Target audience demographics
- Mission, values, and goals
File: yt_content_strategy_agent/instructions.md
Find the "Primary Competitors" section and update with your competitors:
#### Primary Competitors
1. Competitor Name: `UCxxxxxxxxxxxxxxxxxx`
2. Another Channel: `UCxxxxxxxxxxxxxxxxxx`The agent will automatically track these channels.
Readwise Reader:
- Save AI-related articles, blogs, and documentation
- Tag articles with relevant topics (e.g., "AI", "agents", "tools")
- The agent will analyze articles from your reading list
X/Twitter via Grok:
- Automatically monitors viral AI content
- No manual setup needed
File: title_generation_agent/tools/NotionTitleFrameworksTool.py
If using Notion for title frameworks:
- Create a Notion database with your title templates
- Add your Notion database ID to the tool
- Set
NOTION_API_KEYin your.envfile
Note: The Notion API key is optional. You can skip title generation if you don't need it.
youtube-content-agency/
├── agency.py # Main agency entry point
├── requirements.txt # Python dependencies
├── Dockerfile # Container configuration
├── .env # Environment variables (create this)
├── channel_description.md # Your channel configuration
│
├── yt_content_strategy_agent/ # Main orchestrator
├── newsletter_agent/ # Readwise Reader integration
├── grok_news_agent/ # X/Twitter trends
├── title_generation_agent/ # Title optimization
├── builder_tom_agent/ # ICP feedback persona
│
├── py-mcp-youtube-toolbox/ # YouTube MCP server
└── readwise-reader-mcp/ # Readwise MCP server
git clone https://github.com/your-username/youtube-content-agency.git
cd youtube-content-agencypip install -r requirements.txtCreate a .env file in the root directory:
# Required
OPENAI_API_KEY=your_openai_api_key_here
# News Sources
READWISE_TOKEN=your_readwise_token_here
XAI_API_KEY=your_xai_api_key_here
# YouTube Integration
YOUTUBE_API_KEY=your_youtube_api_key_here
# Optional - for title generation
NOTION_API_KEY=your_notion_api_key_hereGet your Readwise token: https://readwise.io/access_token
Sign up for Readwise Reader: https://readwise.io/read (I use this to check newsletters)
python agency.pyIf you encounter any issues, please open an issue on GitHub.
Built with ❤️ using Agency Swarm