A system that uses multiple AI agents (Planner, Writer, and Editor) to collaboratively research and write articles on any given topic.
- Multi-agent collaboration for content creation
- Interactive topic input through command line
- Environment-based configuration for API keys
- Comprehensive content planning, writing, and editing workflow
- Python 3.8 or higher
- Mistral AI API key
- Clone the repository:
git clone <https://github.com/Pranavharshans/CrewAI-MultiAgent.git>
cd CrewAI-MultiAgent- Create and activate a virtual environment:
python -m venv venv
source venv/bin/activate - Install the required packages:
pip install -r requirements.txt- Create a
.envfile in the project root and add your Mistral AI API credentials:
OPENAI_API_KEY=your-mistral-api-key
OPENAI_API_BASE=https://api.mistral.ai/v1
OPENAI_MODEL_NAME=mistral-small
Run the article generation script:
multi-agents.pyWhen prompted, enter the topic you want to write about. The system will:
- Plan the article structure and research approach
- Write the initial content
- Edit and refine the final article
The final article will be displayed in markdown format.
-
Content Planner
- Plans article structure
- Identifies target audience
- Determines key points and SEO keywords
-
Content Writer
- Crafts the initial article
- Follows planner's outline
- Incorporates SEO keywords
- Maintains engaging structure
-
Editor
- Reviews and refines content
- Ensures journalistic best practices
- Maintains balanced viewpoints
- Polishes final output
## Configuration
The system uses environment variables for configuration. Required variables:
- `OPENAI_API_KEY`: Your Mistral AI API key
- `OPENAI_API_BASE`: Mistral AI API endpoint
- `OPENAI_MODEL_NAME`: Model to use (default: mistral-small)