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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Crew Agents - AI-Powered Multi-Agent System
|
| 2 |
+
|
| 3 |
+
A sophisticated multi-agent system built with CrewAI that demonstrates the power of collaborative AI agents for content creation and email optimization. This project showcases how multiple specialized AI agents can work together to accomplish complex tasks through research, writing, and communication enhancement.
|
| 4 |
+
|
| 5 |
+
## π Features
|
| 6 |
+
|
| 7 |
+
### π€ Multi-Agent Architecture
|
| 8 |
+
- **Research Specialist Agent**: Web research and fact-finding capabilities
|
| 9 |
+
- **Creative Writer Agent**: Blog post creation with engaging content
|
| 10 |
+
- **Email Agent**: Email optimization and professional communication enhancement
|
| 11 |
+
|
| 12 |
+
### π Content Generation
|
| 13 |
+
- **Blog Creation**: Automated research and writing of 250-word blog posts
|
| 14 |
+
- **Fact Research**: Web-based research using SerperDev and website search tools
|
| 15 |
+
- **Structured Content**: Hook, introduction, body, conclusion, and call-to-action format
|
| 16 |
+
|
| 17 |
+
### π§ Email Enhancement
|
| 18 |
+
- **Professional Tone**: Converts casual emails to professional communication
|
| 19 |
+
- **Jargon Expansion**: Automatically expands abbreviations (AI, ML, NLP, etc.)
|
| 20 |
+
- **Gen-Z Term Expansion**: Modernizes informal language for professional contexts
|
| 21 |
+
|
| 22 |
+
## π οΈ Technology Stack
|
| 23 |
+
|
| 24 |
+
- **Python 3.12+**: Modern Python with advanced features
|
| 25 |
+
- **CrewAI**: Multi-agent orchestration framework
|
| 26 |
+
- **Gemini 2.0 Flash**: Google's latest AI model for natural language processing
|
| 27 |
+
- **SerperDev**: Web search and research capabilities
|
| 28 |
+
- **Website Search Tool**: RAG-enabled web content analysis
|
| 29 |
+
- **Streamlit**: Web application framework (planned integration)
|
| 30 |
+
|
| 31 |
+
## π Prerequisites
|
| 32 |
+
|
| 33 |
+
- Python 3.12 or higher
|
| 34 |
+
- Access to Google Gemini API
|
| 35 |
+
- SerperDev API key for web search functionality
|
| 36 |
+
- Internet connection for web research capabilities
|
| 37 |
+
|
| 38 |
+
## π Installation
|
| 39 |
+
|
| 40 |
+
1. **Clone the repository**
|
| 41 |
+
```bash
|
| 42 |
+
git clone <your-repo-url>
|
| 43 |
+
cd crew_agents
|
| 44 |
+
```
|
| 45 |
+
|
| 46 |
+
2. **Install dependencies using uv (recommended)**
|
| 47 |
+
```bash
|
| 48 |
+
uv sync
|
| 49 |
+
```
|
| 50 |
+
|
| 51 |
+
**Alternative: Using pip**
|
| 52 |
+
```bash
|
| 53 |
+
pip install -r requirements.txt
|
| 54 |
+
```
|
| 55 |
+
|
| 56 |
+
3. **Set up environment variables**
|
| 57 |
+
Create a `.env` file in the root directory:
|
| 58 |
+
```env
|
| 59 |
+
GOOGLE_API_KEY=your_gemini_api_key_here
|
| 60 |
+
SERPER_API_KEY=your_serperdev_api_key_here
|
| 61 |
+
```
|
| 62 |
+
|
| 63 |
+
## π§ Configuration
|
| 64 |
+
|
| 65 |
+
### API Keys Setup
|
| 66 |
+
- **Google Gemini**: Get your API key from [Google AI Studio](https://makersuite.google.com/app/apikey)
|
| 67 |
+
- **SerperDev**: Sign up at [SerperDev](https://serper.dev/) for web search capabilities
|
| 68 |
+
|
| 69 |
+
### Model Configuration
|
| 70 |
+
The system uses Gemini 2.0 Flash with the following settings:
|
| 71 |
+
- Temperature: 0.7 (balanced creativity and consistency)
|
| 72 |
+
- Streaming: Enabled for real-time output
|
| 73 |
+
- Context-aware processing
|
| 74 |
+
|
| 75 |
+
## π Usage Examples
|
| 76 |
+
|
| 77 |
+
### 1. Blog Generation
|
| 78 |
+
|
| 79 |
+
#### **Command Line Interface**
|
| 80 |
+
Run the blog generation system:
|
| 81 |
+
|
| 82 |
+
```bash
|
| 83 |
+
python blogs_agent.py
|
| 84 |
+
```
|
| 85 |
+
|
| 86 |
+
**Default Topic**: "How Agriculture can be changed by AGI"
|
| 87 |
+
|
| 88 |
+
**Custom Topic**: Modify line 64 in `blogs_agent.py`:
|
| 89 |
+
```python
|
| 90 |
+
response = crew.kickoff(inputs={"topic": "Your custom topic here"})
|
| 91 |
+
```
|
| 92 |
+
|
| 93 |
+
#### **Web Interface (Gradio App)**
|
| 94 |
+
Launch the beautiful web interface:
|
| 95 |
+
|
| 96 |
+
```bash
|
| 97 |
+
python gradio_app.py
|
| 98 |
+
```
|
| 99 |
+
|
| 100 |
+
**Features**:
|
| 101 |
+
- User-friendly web interface
|
| 102 |
+
- Real-time progress tracking
|
| 103 |
+
- Beautiful markdown output
|
| 104 |
+
- Example topics for inspiration
|
| 105 |
+
- Responsive design
|
| 106 |
+
|
| 107 |
+
**Access**: Open your browser and go to `http://localhost:7860`
|
| 108 |
+
|
| 109 |
+
**Output**: A well-researched, 250-word blog post with:
|
| 110 |
+
- Engaging hook
|
| 111 |
+
- Introduction paragraph
|
| 112 |
+
- Body content with researched facts
|
| 113 |
+
- Conclusion
|
| 114 |
+
- Call-to-action
|
| 115 |
+
|
| 116 |
+
### 2. Email Enhancement
|
| 117 |
+
|
| 118 |
+
Run the email optimization system:
|
| 119 |
+
|
| 120 |
+
```bash
|
| 121 |
+
python emailAgent/email_agent.py
|
| 122 |
+
```
|
| 123 |
+
|
| 124 |
+
**Features**:
|
| 125 |
+
- Professional tone conversion
|
| 126 |
+
- Jargon expansion (AI β Artificial Intelligence)
|
| 127 |
+
- Gen-Z term modernization
|
| 128 |
+
- Enhanced persuasiveness
|
| 129 |
+
|
| 130 |
+
### 3. Advanced Email Tools
|
| 131 |
+
|
| 132 |
+
For enhanced email processing with custom tools:
|
| 133 |
+
|
| 134 |
+
```bash
|
| 135 |
+
python emailAgent/agent_tool.py
|
| 136 |
+
```
|
| 137 |
+
|
| 138 |
+
**Custom Tools**:
|
| 139 |
+
- Jargon replacement tool
|
| 140 |
+
- Professional language enhancement
|
| 141 |
+
- Context-aware improvements
|
| 142 |
+
|
| 143 |
+
## ποΈ Project Structure
|
| 144 |
+
|
| 145 |
+
```
|
| 146 |
+
crew_agents/
|
| 147 |
+
βββ blogs_agent.py # Main blog generation system (CLI)
|
| 148 |
+
βββ gradio_app.py # Web interface for blog generation
|
| 149 |
+
βββ main.py # Entry point (placeholder)
|
| 150 |
+
βββ pyproject.toml # Project configuration and dependencies
|
| 151 |
+
βββ requirements.txt # Python dependencies
|
| 152 |
+
βββ emailAgent/ # Email enhancement module
|
| 153 |
+
β βββ email_agent.py # Basic email optimization
|
| 154 |
+
β βββ agent_tool.py # Advanced email tools
|
| 155 |
+
βββ BlogsAgent/ # Blog-related components (planned)
|
| 156 |
+
βββ db/ # Database storage (Chroma vector DB)
|
| 157 |
+
β βββ chroma.sqlite3 # Vector database file
|
| 158 |
+
βββ README.md # This file
|
| 159 |
+
```
|
| 160 |
+
|
| 161 |
+
## π How It Works
|
| 162 |
+
|
| 163 |
+
### Blog Generation Process
|
| 164 |
+
1. **Research Phase**: Research Specialist Agent searches the web for relevant facts
|
| 165 |
+
2. **Content Creation**: Creative Writer Agent crafts engaging blog content
|
| 166 |
+
3. **Quality Assurance**: Structured format with hook, body, and conclusion
|
| 167 |
+
4. **Output**: Professional blog post ready for publication
|
| 168 |
+
|
| 169 |
+
### Email Enhancement Process
|
| 170 |
+
1. **Input Analysis**: Raw email content analysis
|
| 171 |
+
2. **Language Processing**: Jargon expansion and tone adjustment
|
| 172 |
+
3. **Professional Refinement**: Enhanced communication style
|
| 173 |
+
4. **Output**: Polished, professional email
|
| 174 |
+
|
| 175 |
+
## π― Use Cases
|
| 176 |
+
|
| 177 |
+
- **Content Marketing**: Automated blog creation for websites
|
| 178 |
+
- **Research Papers**: Fact-finding and content generation
|
| 179 |
+
- **Professional Communication**: Email optimization for business
|
| 180 |
+
- **Educational Content**: Research-based learning materials
|
| 181 |
+
- **SEO Content**: Web-optimized articles with current information
|
| 182 |
+
|
| 183 |
+
## π§ Future Enhancements
|
| 184 |
+
|
| 185 |
+
- [x] Gradio web interface for user interaction β
|
| 186 |
+
- [ ] Additional agent types (Editor, SEO Specialist, etc.)
|
| 187 |
+
- [ ] Content scheduling and publishing automation
|
| 188 |
+
- [ ] Multi-language support
|
| 189 |
+
- [ ] Advanced content analytics
|
| 190 |
+
- [ ] Integration with CMS platforms
|
| 191 |
+
- [ ] Email agent web interface
|
| 192 |
+
- [ ] Content export options (PDF, Word, etc.)
|
| 193 |
+
|
| 194 |
+
## π€ Contributing
|
| 195 |
+
|
| 196 |
+
1. Fork the repository
|
| 197 |
+
2. Create a feature branch (`git checkout -b feature/amazing-feature`)
|
| 198 |
+
3. Commit your changes (`git commit -m 'Add amazing feature'`)
|
| 199 |
+
4. Push to the branch (`git push origin feature/amazing-feature`)
|
| 200 |
+
5. Open a Pull Request
|
| 201 |
+
|
| 202 |
+
## π License
|
| 203 |
+
|
| 204 |
+
This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.
|
| 205 |
+
|
| 206 |
+
## π Acknowledgments
|
| 207 |
+
|
| 208 |
+
- [CrewAI](https://github.com/joaomdmoura/crewAI) for the multi-agent framework
|
| 209 |
+
- [Google Gemini](https://ai.google.dev/) for advanced language models
|
| 210 |
+
- [SerperDev](https://serper.dev/) for web search capabilities
|
| 211 |
+
|
| 212 |
+
## π Support
|
| 213 |
+
|
| 214 |
+
For questions, issues, or contributions:
|
| 215 |
+
- Open an issue on Gitlab
|
| 216 |
+
- Check the CrewAI documentation
|
| 217 |
+
- Review the project structure and examples
|
| 218 |
+
|
| 219 |
+
---
|
| 220 |
+
|
| 221 |
+
**Built with β€οΈ using CrewAI and modern AI technologies**
|
requirements.txt
ADDED
|
@@ -0,0 +1,4 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
crewai[tools]>=0.159.0
|
| 2 |
+
streamlit>=1.48.1
|
| 3 |
+
gradio>=4.0.0
|
| 4 |
+
python-dotenv>=1.0.0
|