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.
- Research Specialist Agent: Web research and fact-finding capabilities
- Creative Writer Agent: Blog post creation with engaging content
- Email Agent: Email optimization and professional communication enhancement
- Blog Creation: Automated research and writing of 250-word blog posts
- Fact Research: Web-based research using SerperDev and website search tools
- Structured Content: Hook, introduction, body, conclusion, and call-to-action format
- Professional Tone: Converts casual emails to professional communication
- Jargon Expansion: Automatically expands abbreviations (AI, ML, NLP, etc.)
- Gen-Z Term Expansion: Modernizes informal language for professional contexts
- YAML-Based Configuration: Declarative agent and task definitions
- Modular Design: Easy to modify agents and tasks without code changes
- Environment Separation: Clean separation of configuration and implementation
- Python 3.12+: Modern Python with advanced features
- CrewAI: Multi-agent orchestration framework with YAML configuration support
- Gemini 2.0 Flash: Google's latest AI model for natural language processing
- SerperDev: Web search and research capabilities
- Website Search Tool: RAG-enabled web content analysis
- ChromaDB: Vector database for RAG functionality
- Gradio: Web application framework for user interaction
- Python 3.12 or higher
- Access to Google Gemini API
- SerperDev API key for web search functionality
- Internet connection for web research capabilities
-
Clone the repository
git clone <your-repo-url> cd crew_agents
-
Install dependencies using uv (recommended)
uv sync
Alternative: Using pip
pip install -r requirements.txt
-
Set up environment variables Create a
.envfile in the root directory:GOOGLE_API_KEY=your_gemini_api_key_here SERPER_API_KEY=your_serperdev_api_key_here
The project also uses a declarative YAML configuration system that separates agent and task definitions from the implementation code.
research_agent:
llm: gemini/gemini-2.0-flash
role: >
A Senior research specialist.
goal: >
Research interesting 4-5 facts about the topic: {topic}
backstory: >
You are a highly skilled research assistant that can research the web and provide the factual data
writer_agent:
llm: gemini/gemini-2.0-flash
role: >
A creative writer.
goal: >
Write a 250 words blog using the research on {topic} and must be a casual tone
backstory: >
You are a highly skilled writer assistant that can write a blog post about the topicresearch_task:
description: >
Research interesting 4-5 facts about the topic: {topic}
expected_output: >
A bullet point list of 4-5 facts about the topic
writer_task:
description: >
Write a 250 words blog using the research on {topic} and must be a casual tone
expected_output: >
Blog post- Google Gemini: Get your API key from Google AI Studio
- SerperDev: Sign up at SerperDev for web search capabilities
The system uses Gemini 2.0 Flash with the following settings:
- Temperature: 0.7 (balanced creativity and consistency)
- Streaming: Enabled for real-time output
- Context-aware processing
Use the new declarative configuration system:
python agent_yaml.pyFeatures:
- Clean separation of concerns
- Easy to modify agents and tasks
- No code changes needed for configuration updates
- Uses
@CrewBase,@agent,@task, and@crewdecorators
Custom Topic: Modify the topic in the main section:
response = crew.blog_crew().kickoff(inputs={"topic": "Your custom topic here"})Run the original blog generation system:
python BlogsAgent/blogs_agent.pyDefault Topic: "How Agriculture can be changed by AGI"
Custom Topic: Modify line 64 in blogs_agent.py:
response = crew.kickoff(inputs={"topic": "Your custom topic here"})Launch the beautiful web interface:
python gradio_app/app.pyFeatures:
- User-friendly web interface
- Real-time progress tracking
- Beautiful markdown output
- Example topics for inspiration
- Responsive design
Access: Open your browser and go to http://localhost:7860
Output: A well-researched, 250-word blog post with:
- Engaging hook
- Introduction paragraph
- Body content with researched facts
- Conclusion
- Call-to-action
Run the email optimization system:
python emailAgent/email_agent.pyFeatures:
- Professional tone conversion
- Jargon expansion (AI β Artificial Intelligence)
- Gen-Z term modernization
- Enhanced persuasiveness
For enhanced email processing with custom tools:
python emailAgent/agent_tool.pyCustom Tools:
- Jargon replacement tool
- Professional language enhancement
- Context-aware improvements
crew_agents/
βββ agent_yaml.py # Main YAML-based configuration system (NEW)
βββ main.py # Entry point (placeholder)
βββ pyproject.toml # Project configuration and dependencies
βββ requirements.txt # Python dependencies
βββ uv.lock # UV dependency lock file
βββ config/ # Configuration directory (NEW)
β βββ agents.yaml # Agent definitions in YAML format
β βββ tasks.yaml # Task definitions in YAML format
βββ BlogsAgent/ # Blog-related components
β βββ blogs_agent.py # Legacy blog generation system
βββ gradio_app/ # Web interface module
β βββ app.py # Gradio web application
βββ emailAgent/ # Email enhancement module
β βββ email_agent.py # Basic email optimization
β βββ agent_tool.py # Advanced email tools
βββ db/ # Database storage (Chroma vector DB)
β βββ chroma.sqlite3 # Vector database file
βββ README.md # This file
- Configuration Loading: CrewAI automatically loads agent and task configurations from YAML files
- Decorator Pattern: Uses
@CrewBase,@agent,@task, and@crewdecorators for clean code organization - Dynamic Agent Creation: Agents are created based on YAML configurations at runtime
- Separation of Concerns: Configuration changes don't require code modifications
- Research Phase: Research Specialist Agent searches the web for relevant facts
- Content Creation: Creative Writer Agent crafts engaging blog content
- Quality Assurance: Structured format with hook, body, and conclusion
- Output: Professional blog post ready for publication
- Input Analysis: Raw email content analysis
- Language Processing: Jargon expansion and tone adjustment
- Professional Refinement: Enhanced communication style
- Output: Polished, professional email
- Content Marketing: Automated blog creation for websites
- Research Papers: Fact-finding and content generation
- Professional Communication: Email optimization for business
- Educational Content: Research-based learning materials
- SEO Content: Web-optimized articles with current information
- RAG Applications: Vector database storage for web content retrieval
- YAML-based configuration system β
- Gradio web interface for user interaction β
- ChromaDB integration for RAG functionality β
- Additional agent types (Editor, SEO Specialist, etc.)
- Content scheduling and publishing automation
- Multi-language support
- Advanced content analytics
- Integration with CMS platforms
- Email agent web interface
- Content export options (PDF, Word, etc.)
- Configuration validation and error handling
- Multiple configuration profiles (dev, staging, prod)
- Update
config/agents.yamlwith new agent definition - Add agent method in your crew class with
@agentdecorator - No code changes needed for configuration updates
- Update
config/tasks.yamlwith new task definition - Add task method in your crew class with
@taskdecorator - Link tasks in the
@crewmethod
- Use descriptive names for agents and tasks
- Keep configurations focused and single-purpose
- Use YAML multi-line syntax (
>) for long text - Reference variables using
{variable_name}syntax
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
- CrewAI for the multi-agent framework
- Google Gemini for advanced language models
- SerperDev for web search capabilities
- ChromaDB for vector database functionality
For questions, issues, or contributions:
- Open an issue on Gitlab
- Check the CrewAI documentation
- Review the project structure and examples
Built with β€οΈ using CrewAI and modern AI technologies