Skip to content

realrubberduckdev/blog-gen

Repository files navigation

🤖 AI Blog Generator

Multi-agent AI system that creates high-quality blog posts using Microsoft Agent Framework

✨ Features

🔍 Research Agent - Creates topic outlines & gathers information
✍️ Content Writer - Writes engaging blog content
📝 Editor Agent - Reviews & polishes for quality
🔧 Markdown Linter - Ensures proper formatting
🚀 SEO Agent - Optimizes content & generates metadata

🛠️ Tech Stack

  • .NET 9.0 with Microsoft Agent Framework
  • Microsoft.Extensions.AI for AI integration
  • Google Gemini / Azure OpenAI / OpenAI / Local Model support
  • Agent-based architecture with dependency injection

🚀 Quick Start

# Clone & setup
git clone <repo-url>
cd blog-gen

# Configure API key (choose one)
# Google Gemini (recommended)
dotnet user-secrets set "GoogleAI:ApiKey" "your-gemini-key"

# Azure OpenAI
dotnet user-secrets set "AzureOpenAI:ApiKey" "your-azure-key"

# Run with JSON file (recommended)
dotnet run sample-request.json

# Or run interactively
dotnet run

📝 Usage Options

1. JSON File Input (Recommended)

Create a JSON request file for complex blog posts:

{
  "Topic": "Avoid Storing Secrets in PowerShell's Command History",
  "Description": "When using PowerShell scripts to manage secrets like API tokens, passwords, or other sensitive data...",
  "TargetAudience": "Software Engineers and DevOps Professionals",
  "WordCount": 1200,
  "Tone": "Professional and Technical"
}
# Use specific JSON file
dotnet run my-blog-request.json

# Auto-discovery (searches for blog-request.json, request.json, sample-request.json)
dotnet run

2. Command Line Arguments

For simple requests:

dotnet run --topic "API Security Best Practices" --description "Comprehensive guide to securing APIs" --audience "Developers" --wordcount 1500 --tone "Technical"

3. Configuration File

Add defaults to appsettings.json:

{
  "BlogPostDefaults": {
    "TargetAudience": "Software Engineers",
    "WordCount": 1000,
    "Tone": "Professional"
  }
}

4. Interactive Mode

Run without arguments to enter interactive mode.

⚙️ AI Provider Configuration

The application supports multiple AI providers with Microsoft Agent Framework:

🚀 Google Gemini (Recommended)

dotnet user-secrets set "GoogleGemini:ApiKey" "your-google-ai-api-key"

Configuration in appsettings.json:

{
  "GoogleGemini": {
    "ModelId": "gemini-2.5-flash",
    "ApiKey": ""
  }
}

See GEMINI_SETUP.md for detailed setup instructions.

☁️ Azure OpenAI

{
  "AzureOpenAI": {
    "Endpoint": "https://your-endpoint.openai.azure.com/",
    "DeploymentName": "gpt-4o-mini"
  }
}

🏠 Local Model Configuration (Docker)

{
  "LocalModel": {
    "Endpoint": "http://localhost:11434",
    "ModelName": "ai/gemma3",
    "ApiKey": "",
    "UseLocal": true
  }
}

🔄 Provider Priority

The application checks providers in this order:

  1. Google Gemini (if ApiKey configured)
  2. Azure OpenAI (if Endpoint configured)
  3. OpenAI (if ApiKey configured)

📊 Pipeline

TopicResearchWriteEditLintSEO📝 Blog Post


Built with 💙 using Microsoft Agent Framework and Microsoft.Extensions.AI

About

Multi-agent AI blog generator using Microsoft Agent Framework

Topics

Resources

Stars

Watchers

Forks

Languages