A sophisticated system that uses multiple AI agents to research, create, and polish video scripts for social media platforms. The system employs specialized agents for research, script writing, polishing, and evaluation to ensure high-quality, engaging content.
-
Multi-Agent Architecture
- ResearchAgent: Plans and conducts topic research
- ScriptWriterAgent: Creates initial video scripts
- PolishingAgent: Enhances scripts for engagement
- EvaluatorAgent: Assesses quality and provides feedback
-
Advanced Content Research
- Dynamic search query generation
- Web content extraction and processing
- ChromaDB-based vector storage for semantic search
- URL deduplication and content filtering
-
Intelligent Script Generation
- Platform-specific formatting (TikTok, YouTube Shorts, Instagram Reels)
- Automatic timestamp generation
- Engaging transitions and hooks
- Visual suggestions and hashtag generation
-
Quality Assurance
- Automated evaluation of research quality
- Script engagement scoring
- Improvement suggestions
- Multiple retry attempts for low-scoring outputs
- Python 3.8+
- DeepSeek API key
- SerpAPI key
- Required Python packages (see requirements.txt)
- Clone the repository:
git clone https://github.com/kr3t3n/smolagents-video-script-generator.git
cd smolagents-video-script-generator
- Create and activate a virtual environment:
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate
- Install dependencies:
pip install -r requirements.txt
- Create a .env file with your API keys:
DEEPSEEK_API_KEY=your_deepseek_api_key
SERPAPI_KEY=your_serpapi_key
- Run the script:
python deepseek_agent.py
-
Follow the interactive prompts to specify:
- Video format (TikTok, YouTube Short, Instagram Reel)
- Video length
- Number of questions/items
- Topic
- Number of URLs per search query
- Number of search terms
-
The system will generate:
- Research data
- Initial script
- Polished script
- Evaluation reports
- Human-readable output
output/
├── [Topic]_[Timestamp]/
│ ├── debug/
│ │ └── (Debug logs and raw API responses)
│ ├── research/
│ │ └── (Research data and evaluations)
│ ├── script/
│ │ └── (Initial and polished scripts)
│ ├── evaluation/
│ │ └── (Evaluation reports)
│ ├── final_script.json
│ └── final_script.txt
- Adjust scoring thresholds in main()
- Modify agent prompts in respective agent classes
- Configure retry attempts and delays in ContentRetrieverTool
- Comprehensive error handling for API calls
- Automatic retries for failed searches
- Fallback mechanisms for incomplete responses
- Detailed error logging
- Fork the repository
- Create a feature branch
- Commit your changes
- Push to the branch
- Create a Pull Request
Free to use and open to everyone.
Created by Georgi from Mangia Studios Limited.
If you find this project useful, consider buying me a coffee ☕
- DeepSeek API for language model capabilities
- SerpAPI for web search functionality
- ChromaDB for vector storage
- All other open-source libraries used in this project