AGENTS / GITHUB / blog-writer-multi-agents
githubinferredactive

blog-writer-multi-agents

provenance:github:gourav-1711/blog-writer-multi-agents
WHAT THIS AGENT DOES

Here's a plain English summary of the blog-writer-multi-agents AI agent: This agent automatically creates professional-quality blog posts for you. It handles everything from researching the topic and creating a logical outline, to writing the content and formatting it nicely. It solves the problem of time-consuming blog writing, freeing up your time to focus on other things. Business owners, marketers, and anyone who needs to regularly publish blog content would find this incredibly useful.

View Source ↗First seen 22d agoNot yet hireable
README
# Multi-AI Agent Blog Writer

A sophisticated multi-agent system that automatically researches, outlines, writes, and formats professional blog posts using AI agents.

## Overview

This project demonstrates the power of collaborative AI agents working together to create high-quality blog content. The system uses four specialized agents coordinated by a manager agent:

- **Researcher**: Gathers facts and data about topics using web search
- **Outliner**: Creates logical blog structure and outlines
- **Writer**: Generates the actual blog prose
- **Formatter**: Adds final styling and saves the output

## Features

- 🤖 **Multi-Agent Architecture**: Specialized agents for different tasks
- 🔍 **Web Research**: Automatic fact-finding using web search
- 📝 **Structured Writing**: Professional blog generation with proper formatting
- 💾 **File Output**: Automatic saving to markdown files
- 🔧 **Flexible Models**: Support for multiple AI providers (Gemini, Hugging Face, Local)

## Installation

1. Clone the repository:

```bash
git clone <repository-url>
cd multi_ai_agent
```

1. Create a virtual environment:

```bash
python -m venv .venv
source .venv/bin/activate  # On Windows: .venv\Scripts\activate
```

1. Install dependencies:

```bash
pip install -r requirements.txt
# or with uv
uv sync
```

## Configuration

Create a `.env` file in the project root:

```env
# For Gemini API (recommended)
GEMINI_API_KEY=your_gemini_api_key_here

# For Hugging Face API
ACCESS_TOKEN=your_huggingface_token_here
```

## Usage

### Basic Usage

```bash
python main.py "Your Blog Topic" [output_file.md]
```

Examples:

```bash
# Write about AI with default output file (blog.md)
python main.py "The Future of Artificial Intelligence"

# Specify custom output file
python main.py "Climate Change Solutions" "climate_blog.md"
```

### Direct Agent Usage

```bash
python agent.py "Your Blog Topic" [output_file.md]
```

## Architecture

### Agent Roles

1. **Researcher Agent**
   - Uses web search to gather relevant facts
   - Limited to 5 steps for efficiency
   - Returns research summaries

2. **Outliner Agent**
   - Creates logical blog structure
   - Generates markdown outlines
   - Ensures content flow

3. **Writer Agent**
   - Writes the actual blog content
   - Follows the provided outline
   - Creates engaging prose

4. **Formatter Agent**
   - Adds final styling and formatting
   - Saves content to specified file
   - Handles file operations

5. **Blog Manager Agent**
   - Coordinates all other agents
   - Manages the complete workflow
   - Ensures quality and consistency

### Supported AI Models

The system supports multiple AI providers:

- **Gemini AI** (default): `gemini/gemini-2.5-flash`
- **Hugging Face**: Various models available
- **Local AI**: Custom OpenAI-compatible servers

## Dependencies

- `smolagents`: Multi-agent framework
- `litellm`: AI model integration
- `python-dotenv`: Environment variable management
- `ddgs`: Web search capabilities

## Example Output

The system generates well-structured blog posts with:

- Clear introduction and conclusion
- Logical section organization
- Research-backed content
- Professional formatting

## Development

### Project Structure

```text
multi_ai_agent/
├── agent.py          # Main agent system
├── main.py           # CLI interface
├── tools/
│   └── file_write.py # File writing tool
├── pyproject.toml    # Project configuration
└── README.md         # This file
```

### Customization

You can modify the agents in `agent.py` to:

- Change model providers
- Adjust agent behavior
- Add new tools
- Modify prompts and workflows

## Contributing

1. Fork the repository
2. Create a feature branch
3. Make your changes
4. Test thoroughly
5. Submit a pull request

## License

This project is open source. Please check the license file for details.

## Troubleshooting

### Common Issues

1. **API Key Errors**: Ensure your `.env` file contains valid API keys
2. **Web Search Failures**: Check internet connectivity
3. **File Permission Errors**: Ensure write permissions in output directory

### Debug Mode

For debugging, you can modify the `max_steps` parameter in agent definitions or add logging statements to trace execution flow.

## Future Enhancements

- [ ] Support for additional AI providers
- [ ] Custom blog templates
- [ ] Image generation integration
- [ ] Multi-language support
- [ ] SEO optimization features

PUBLIC HISTORY

First discoveredApr 1, 2026

IDENTITY

inferred

Identity inferred from code signals. No PROVENANCE.yml found.

Is this yours? Claim it →

METADATA

platformgithub
first seenMar 26, 2026
last updatedMar 31, 2026
last crawled1 day ago
version

README BADGE

Add to your README:

![Provenance](https://getprovenance.dev/api/badge?id=provenance:github:gourav-1711/blog-writer-multi-agents)