Building AI agents, atomically
YouTube Summarizer
This directory contains the YouTube Summarizer example for the Atomic Agents project. This example demonstrates how to extract and summarize knowledge from YouTube videos using the Atomic Agents framework.
Getting Started
To get started with the YouTube Summarizer:
Clone the main Atomic Agents repository:
git clone https://github.com/eigenwise/atomic-agentsNavigate to the YouTube Summarizer directory:
cd atomic-agents/atomic-examples/youtube-summarizerInstall the dependencies using uv:
uv syncSet up environment variables:
Create a
.envfile in theyoutube-summarizerdirectory with the following content:OPENAI_API_KEY=your_openai_api_key YOUTUBE_API_KEY=your_youtube_api_keyTo get your YouTube API key, follow the instructions in the YouTube Scraper README.
Replace
your_openai_api_keyandyour_youtube_api_keywith your actual API keys.Run the YouTube Summarizer:
uv run python youtube_summarizer/main.pyor
uv run python -m youtube_summarizer.main
File Explanation
1. Agent (agent.py)
This module defines the YouTubeKnowledgeExtractionAgent, responsible for extracting summaries, insights, quotes, and more from YouTube video transcripts.
2. YouTube Transcript Scraper (tools/youtube_transcript_scraper.py)
This tool comes from the Atomic Forge and handles fetching transcripts and metadata from YouTube videos.
3. Main (main.py)
The entry point for the YouTube Summarizer application. It orchestrates fetching transcripts, processing them through the agent, and displaying the results.
Customization
You can modify the video_url variable in main.py to analyze different YouTube videos. Additionally, you can adjust the agent's configuration in agent.py to tailor the summaries and insights according to your requirements.
Contributing
Contributions are welcome! Please fork the repository and submit a pull request with your enhancements or bug fixes.
License
This project is licensed under the MIT License. See the LICENSE file for details.