Skip to content

MikSanty/AI-Content-Studio

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

16 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

AI-Content-Studio

An Intelligent Multi-Agent AI Workflow for Professional Content Creation

Transform a content brief into publication-ready articles through an advanced 3-agent pipeline powered by AI, featuring intelligent quality scoring, adaptive learning, and parallel processing.


🎯 What is AI-Content-Studio?

A sophisticated content creation system that uses three specialized AI agents working in sequence:

  1. WRITER - Generates structured outlines and initial drafts
  2. LLMON - Creates 3 distinct stylistic variations (in parallel)
  3. EDITOR - Applies multi-pass professional polish

✨ What Makes It Special?

  • 🧠 Learns from your feedback - Memory system adapts to your preferences
  • πŸ“Š Objective quality metrics - Multi-dimensional scoring (readability, SEO, engagement)
  • ⚑ 3x faster - Parallel variation generation
  • 🎯 Intelligent validation - Ensures variations are truly different and citations are properly linked
  • πŸ”„ Iterative refinement - Approve, revise, or reject at each stage
  • 🎨 Flexible providers - OpenAI (GPT-4o/GPT-4.1) or Google Gemini
  • πŸ“ Dual content modes - General articles OR specialized tool reviews
  • πŸ”— Citation validation - Automatic detection of missing hyperlinks and URL verification

πŸš€ Quick Start (5 Minutes)

1. Install Dependencies

# Clone or download this repository
cd ai-content-studio

# Install Python packages
pip install -r requirements.txt

2. Set Up API Access

Option A: OpenAI (Recommended)

# Run interactive setup
python setup_env.py

# Or manually create .env file:
AI_PROVIDER=openai
OPENAI_API_KEY=sk-proj-your-key-here
OPENAI_WRITER_MODEL=gpt-5-nano
OPENAI_LLMON_MODEL=gpt-4o-mini
OPENAI_EDITOR_MODEL=gpt-4.1-mini

Option B: Google Gemini (Free Tier)

AI_PROVIDER=gemini
GEMINI_API_KEY=your-gemini-key-here

Get API Keys:

3. Create Your Content Brief

Edit templates/manual.md:

# Article Topic
How AI is transforming content creation in 2025

# Target Audience
Marketing professionals and content creators

# Key Points
- AI-powered workflows save 10+ hours per week
- Multi-agent systems produce higher quality
- [Add your key points...]

4. Run the Workflow

python main.py

That's it! The system will guide you through each stage with interactive prompts.


🌟 Key Features

🎯 Six Intelligence Enhancements (v1.0+)

1. Outline Generation Phase - Plan before writing
  • Generate and approve article structure before full draft
  • Iterate on outlines faster than full revisions
  • Better validation of approach early in process

Example:

β†’ OUTLINE GENERATION PHASE
β†’ Generating article outline...

ARTICLE OUTLINE
# Introduction
- Hook: Latest AI statistics
- Thesis: Multi-agent workflows transform content

## Section 1: Current Challenges
- Time constraints in content creation
- Maintaining quality at scale

[Approve/Revise/Reject]
2. Parallel Variation Generation - 3x faster processing
  • All 3 LLMON variations generate simultaneously
  • 90-180 seconds β†’ 30-60 seconds
  • No quality compromise
3. Quality Scoring System - Objective metrics for every output

Five-dimensional analysis:

  • πŸ“– Readability (82/100) - Flesch-Kincaid, grade level, complexity
  • πŸ” SEO (78/100) - Word count, headings, keyword density
  • πŸ’‘ Engagement (88/100) - Questions, examples, action verbs
  • πŸ“‹ Structure (90/100) - Template matching, completeness
  • βœ“ Factual (85/100) - Citation tracking, reference alignment

Overall Score: 85/100

4. Workflow Memory - System learns your preferences
  • Tracks all feedback across sessions
  • Extracts patterns from approvals/rejections
  • Provides historical context to agents
  • Reduces iterations over time
5. Variation Validation - Ensures true diversity
  • Automatic differentiation checking (TF-IDF cosine similarity)
  • Enforces 30% minimum difference threshold
  • Auto-regeneration if variations too similar
  • Up to 2 retry attempts

Example Report:

VARIATION DIFFERENTIATION REPORT
Minimum Difference: 45.2%
Average Difference: 52.8%
βœ“ All variations are sufficiently different!
6. Multi-Pass Editing - Professional polish

Four focused editing passes:

  1. Grammar & Mechanics - Technical correctness (temp: 0.4)
  2. Style & Voice - Tone consistency (temp: 0.5)
  3. Flow & Transitions - Readability (temp: 0.5)
  4. Final Consistency - Validation (temp: 0.4)

Higher quality than single-pass editing.

πŸ”§ Multi-Provider Support (v2.0+)

  • OpenAI GPT-4o - Premium quality (~$0.43/article)
  • OpenAI GPT-4.1 - Next-generation models
  • Google Gemini - Free tier option
  • Per-agent model configuration - Mix and match models for cost optimization

🎨 Additional Features

  • βœ… Interactive approval gates at each stage
  • βœ… Dynamic rule editing for LLMON variations
  • βœ… Session management - All drafts saved with timestamps
  • βœ… Comprehensive test suite (23 tests, 100% passing)
  • βœ… Rich documentation with guides and examples

πŸ“ Project Structure

AI-Content-Studio/
β”œβ”€β”€ πŸš€ ENTRY POINTS
β”‚   β”œβ”€β”€ main.py                      # Main application
β”‚   β”œβ”€β”€ run.bat / run.sh             # Quick launch scripts
β”‚   └── setup_env.py                 # Interactive API setup
β”‚
β”œβ”€β”€ βš™οΈ CORE SYSTEM
β”‚   β”œβ”€β”€ workflow.py                  # Orchestrator (3-agent pipeline)
β”‚   β”œβ”€β”€ config.py                    # Configuration & feature flags
β”‚   β”œβ”€β”€ api_client.py                # Multi-provider API client
β”‚   └── utils.py                     # Helper functions
β”‚
β”œβ”€β”€ πŸ€– AI AGENTS
β”‚   └── agents/
β”‚       β”œβ”€β”€ writer_agent.py          # Stage 1: Draft + Outline
β”‚       β”œβ”€β”€ llmon_agent.py           # Stage 2: Parallel variations
β”‚       └── editor_agent.py          # Stage 3: Multi-pass polish
β”‚
β”œβ”€β”€ 🧠 INTELLIGENCE MODULES
β”‚   β”œβ”€β”€ quality_analyzer.py          # Multi-dimensional scoring
β”‚   β”œβ”€β”€ workflow_memory.py           # Cross-stage learning
β”‚   β”œβ”€β”€ variation_differentiator.py  # Variation validation
β”‚   └── citation_validator.py        # Citation & hyperlink validation
β”‚
β”œβ”€β”€ πŸ“ USER INPUTS (YOU EDIT THESE)
β”‚   β”œβ”€β”€ templates/
β”‚   β”‚   β”œβ”€β”€ manual.md                # ⚠️ Your content brief (REQUIRED)
β”‚   β”‚   β”œβ”€β”€ template.md              # Article structure
β”‚   β”‚   β”œβ”€β”€ references.md            # Research & data
β”‚   β”‚   β”œβ”€β”€ writer_prompt.md         # Writing instructions
β”‚   β”‚   β”œβ”€β”€ tool_review_brief.md     # Tool review input template
β”‚   β”‚   β”œβ”€β”€ tool_review_structure.md # Review section structure
β”‚   β”‚   └── tool_review_writer_prompt.md # Review writer instructions
β”‚   └── rules/
β”‚       β”œβ”€β”€ llmon_rules.md           # Variation styles (general)
β”‚       β”œβ”€β”€ editor_rules.md          # Polish guidelines (general)
β”‚       β”œβ”€β”€ llmon_tool_review_rules.md    # Tool review variations
β”‚       └── editor_tool_review_rules.md   # Tool review polish
β”‚
β”œβ”€β”€ πŸ“š DOCUMENTATION
β”‚   └── docs/
β”‚       β”œβ”€β”€ INDEX.md                 # Complete file navigation
β”‚       β”œβ”€β”€ guides/
β”‚       β”‚   β”œβ”€β”€ QUICK_START.md       # 5-minute setup guide
β”‚       β”‚   β”œβ”€β”€ WORKFLOW_DIAGRAM.md  # Visual workflow
β”‚       β”‚   β”œβ”€β”€ ENHANCEMENTS_GUIDE.md # Feature deep-dive
β”‚       β”‚   └── TOOL_REVIEW_MODE.md  # Tool review mode guide
β”‚       β”œβ”€β”€ setup/
β”‚       β”‚   β”œβ”€β”€ SETUP.md             # Detailed instructions
β”‚       β”‚   └── OPENAI_SETUP_INSTRUCTIONS.md
β”‚       └── project/
β”‚           β”œβ”€β”€ PROJECT_SUMMARY.md   # System overview
β”‚           β”œβ”€β”€ CHANGELOG.md         # Version history
β”‚           └── AGENT_ANALYSIS.md    # Technical analysis
β”‚
β”œβ”€β”€ πŸ’‘ EXAMPLES
β”‚   └── examples/
β”‚       β”œβ”€β”€ example_manual.md        # Sample content brief
β”‚       β”œβ”€β”€ example_references.md    # Sample references
β”‚       β”œβ”€β”€ example_tool_review_brief.md   # Sample tool review
β”‚       β”œβ”€β”€ example_tool_review_output.md  # Sample review output
β”‚       β”œβ”€β”€ template_manual.md       # Template for general articles
β”‚       β”œβ”€β”€ template_references.md   # Template for references
β”‚       └── template_tool_review_brief.md  # Template for reviews
β”‚
β”œβ”€β”€ πŸ“Š OUTPUTS (AUTO-GENERATED)
β”‚   └── outputs/
β”‚       └── [timestamp]/
β”‚           β”œβ”€β”€ 01_writer_outline.md
β”‚           β”œβ”€β”€ 01_writer_draft.md
β”‚           β”œβ”€β”€ 02_llmon_variation1.md (+ quality scores)
β”‚           β”œβ”€β”€ 02_llmon_variation2.md
β”‚           β”œβ”€β”€ 02_llmon_variation3.md
β”‚           β”œβ”€β”€ 03_editor_polished.md
β”‚           └── FINAL_ARTICLE.md     # ✨ Final output
β”‚
β”œβ”€β”€ πŸ§ͺ TESTING
β”‚   β”œβ”€β”€ test_setup.py                # Setup verification
β”‚   β”œβ”€β”€ test_enhancements.py         # Feature tests (23 tests)
β”‚   └── test_citation_validator.py   # Citation validation tests
β”‚
β”œβ”€β”€ πŸ’Ύ MEMORY (AUTO-CREATED)
β”‚   └── memory/                      # Persistent learning data
β”‚
└── πŸ“‹ CONFIG
    β”œβ”€β”€ .env                         # API keys (YOU CREATE THIS)
    β”œβ”€β”€ requirements.txt             # Dependencies
    └── README.md                    # This file

πŸ”„ The 3-Agent Workflow

Stage 1: WRITER Agent

What Happens:

  1. Outline Phase - Creates structured outline from your brief
  2. Review - You approve, revise, or reject the outline
  3. Full Draft - Generates complete article from approved outline
  4. Quality Score - Provides multi-dimensional quality metrics

Your Inputs:

  • templates/manual.md - Content brief (required)
  • templates/template.md - Article structure
  • templates/references.md - Research materials
  • templates/writer_prompt.md - Writing instructions

Approval Options:

  • βœ“ Approve β†’ Continue to LLMON
  • ✎ Revise with feedback β†’ Regenerate with your input
  • βœ— Reject β†’ Stop workflow

Stage 2: LLMON Agent

What Happens:

  1. Parallel Generation - Creates 3 distinct variations simultaneously
  2. Differentiation Check - Validates variations are >30% different
  3. Quality Scoring - Analyzes each variation
  4. Comparison - Presents all 3 with differentiation report

Your Inputs:

  • rules/llmon_rules.md - Stylistic transformation rules
  • Previous stage approved article

Approval Options:

  • Select Variation 1/2/3 β†’ Continue to EDITOR
  • ↻ Iterate with edited rules β†’ Modify rules, regenerate
  • βœ— Reject all β†’ Stop workflow

Stage 3: EDITOR Agent

What Happens:

  1. Pass 1: Grammar - Technical correctness
  2. Pass 2: Style - Tone and voice consistency
  3. Pass 3: Flow - Readability and transitions
  4. Pass 4: Consistency - Final validation
  5. Quality Score - Final quality assessment

Your Inputs:

  • rules/editor_rules.md - Polish guidelines
  • Selected variation from Stage 2

Approval Options:

  • βœ“ Approve as final β†’ Complete! Save to FINAL_ARTICLE.md
  • ✎ Request revisions β†’ Provide specific feedback
  • βœ— Reject β†’ Stop workflow

πŸ“Š Quality Scoring Explained

Every output receives a comprehensive quality analysis:

QUALITY ANALYSIS REPORT
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

Overall Score: 85/100

πŸ“– Readability: 82/100
   β€’ Grade Level: 10 (General Adult)
   β€’ Reading Ease: 65.2 (Standard)
   β€’ Avg Sentence Length: 18.3 words
   β€’ Complex Word %: 12.4%

πŸ” SEO: 78/100
   β€’ Word Count: 1,847 βœ“
   β€’ Headings: 8 βœ“
   β€’ Keyword Density: 2.1% βœ“
   β€’ URL-friendly: Yes

πŸ’‘ Engagement: 88/100
   β€’ Questions: 5
   β€’ Examples: 7
   β€’ Action Verbs: High
   β€’ Emotional Words: Moderate

πŸ“‹ Structure: 90/100
   β€’ Template Match: 95%
   β€’ Section Completeness: 100%
   β€’ Logical Flow: Excellent

βœ“ Factual Consistency: 85/100
   β€’ Reference Alignment: High
   β€’ Citation Count: 6
   β€’ Keyword Overlap: 78%

βš™οΈ Configuration Guide

Feature Toggles (config.py)

All enhancements enabled by default:

# Enhancement Feature Flags
ENABLE_OUTLINE_PHASE = True           # Outline generation
ENABLE_PARALLEL_VARIATIONS = True     # 3x speed boost
ENABLE_QUALITY_SCORING = True         # Objective metrics
ENABLE_WORKFLOW_MEMORY = True         # Learning system
ENABLE_VARIATION_VALIDATION = True    # Differentiation check
ENABLE_MULTIPASS_EDITING = True       # 4-pass polish

AI Provider Configuration

OpenAI (Per-Agent Models):

AI_PROVIDER=openai
OPENAI_API_KEY=sk-proj-...

# Different models for different agents
OPENAI_WRITER_MODEL=gpt-5-nano        # Fast drafting
OPENAI_LLMON_MODEL=gpt-4o-mini        # Creative variations
OPENAI_EDITOR_MODEL=gpt-4.1-mini      # Premium polish

Google Gemini (Simple):

AI_PROVIDER=gemini
GEMINI_API_KEY=your-key-here

Agent Temperature Settings

WRITER_TEMPERATURE = 0.7   # Balanced creativity
LLMON_TEMPERATURE = 0.8    # Higher for variation diversity
EDITOR_TEMPERATURE = 0.5   # Lower for consistency

πŸ’‘ Usage Tips & Best Practices

βœ… For Best Results

  1. Write Detailed Briefs - More detail in manual.md = better output
  2. Use References Liberally - Add data, examples, research to references.md
  3. Customize Templates - Adjust template.md for your specific format
  4. Leverage Memory - System improves over multiple sessions
  5. Monitor Quality Scores - Use metrics to identify weak areas
  6. Iterate Strategically - Use outline revisions for structure, feedback for content

πŸ“ Example Use Cases

  • Blog Posts - Optimized for engagement and SEO
  • Technical Articles - Structured with clarity and accuracy
  • Marketing Content - Persuasive with strong calls-to-action
  • Educational Guides - Clear explanations with examples
  • Product Descriptions - Benefit-focused with features
  • Industry Analyses - Data-driven with insights

⚑ Performance Tips

  • Parallel processing saves ~90 seconds per LLMON iteration
  • Outline approval reduces wasted time on wrong structure
  • Quality scores help identify issues before final polish
  • Memory system reduces iterations after 2-3 sessions

πŸ”§ Tool Review Mode

NEW: Generate professional, story-driven software/tool reviews optimized for both humans and LLMs.

What's Different?

Tool Review Mode creates personable, evidence-backed reviews with a specialized workflow:

Feature General Article Tool Review
Voice Professional, flexible First-person, story-driven
Evidence Optional citations Required 6-10 user quotes
Structure Flexible template Fixed review sections
Format Standard Strict (no em dashes, clean headers)
Pricing Not required Detailed breakdown required

Quick Start

1. Set Mode:

CONTENT_MODE=tool_review

2. Fill Out Brief: Use templates/tool_review_brief.md:

  • Answer 4 pre-writing questions (title, audience, motivation, benefit)
  • Collect 6-10 quotes from G2, Capterra, Reddit, etc.
  • Document pricing, migration paths, implementation steps
  • Gather review hub ratings (G2, Capterra)

3. Run Workflow:

python main.py

Output Includes

βœ… Story-driven narrative with first-person voice
βœ… 6-10 integrated user quotes (from G2, Reddit, Capterra, etc.)
βœ… Conditional framing: "If you're X... if you're Y..."
βœ… Detailed pricing breakdown with scaling info
βœ… Honest pros, cons, and fit analysis
βœ… Migration paths (switching to/from tool)
βœ… Implementation steps (realistic setup)
βœ… Sources appendix with all quote URLs

Example

See examples/example_tool_review_output.md for a complete Surfer SEO review demonstrating all required elements.

Learn More

πŸ“š Complete Tool Review Mode Guide - Detailed walkthrough, best practices, troubleshooting


πŸ”§ Advanced Customization

Modify Agent Behavior

LLMON Variations: Edit rules/llmon_rules.md:

# Variation 1: Professional
- Formal tone, executive audience
- Data-driven, authoritative

# Variation 2: Conversational
- Casual, friendly, relatable
- Story-driven, examples

# Variation 3: Technical
- Detailed, precise, expert-level
- Code examples, specifications

Editor Standards: Edit rules/editor_rules.md to adjust polish criteria.

Change Article Structure

Edit templates/template.md:

# [Your Custom Structure]

## Introduction (100-150 words)
- Hook
- Context
- Thesis

## Main Sections (3-5 sections, 300-500 words each)
[Your requirements...]

## Conclusion (100-150 words)
- Summary
- Call-to-action

Adjust Quality Thresholds

# In quality_analyzer.py
MIN_VARIATION_DIFFERENCE = 0.3  # 30% minimum (0-1 scale)

πŸ’° Cost Analysis

OpenAI GPT-4o (Typical Usage)

Metric Estimate
Input tokens per article ~50,000
Output tokens per article ~30,000
Input cost $0.125 ($2.50/1M)
Output cost $0.300 ($10.00/1M)
Total per article ~$0.43
Articles from $10 ~23 articles

Google Gemini (Free Tier)

  • Cost: $0.00
  • Limit: 15 requests/minute
  • Best for: Testing, low-volume use

πŸ’‘ Tip: Use cheaper models (gpt-5-nano) for Writer/LLMON, premium (gpt-4.1) for Editor only!


πŸ“š Full Documentation

This README provides a comprehensive overview. For deeper details:


βœ… Testing & Verification

Run Setup Verification

python test_setup.py

Checks:

  • βœ… Python version (3.8+)
  • βœ… All dependencies installed
  • βœ… API keys configured
  • βœ… Template files exist
  • βœ… Directory structure

Run Enhancement Tests

python test_enhancements.py

Results:

  • βœ… 23 tests total
  • βœ… 23 passing
  • βœ… 0 failing
  • πŸ• Execution: ~1 second

❓ Troubleshooting

Common Issues

"API key not found"

Solution:

  1. Check .env file exists in root directory
  2. Verify variable name: OPENAI_API_KEY or GEMINI_API_KEY
  3. No quotes needed around key value
  4. Run python setup_env.py for interactive setup
"Missing model configuration"

Solution (OpenAI):

OPENAI_WRITER_MODEL=gpt-5-nano
OPENAI_LLMON_MODEL=gpt-4o-mini
OPENAI_EDITOR_MODEL=gpt-4.1-mini

All three required for OpenAI provider.

"File not found" errors

Solution:

  1. Check templates/manual.md exists and has content
  2. Verify working directory: cd ai-content-studio
  3. Copy from examples: cp examples/example_manual.md templates/manual.md
Poor output quality

Solutions:

  • βœ… Add more detail to templates/manual.md
  • βœ… Include data in templates/references.md
  • βœ… Check quality scores for weak areas
  • βœ… Provide specific feedback in revision loops
  • βœ… Customize template.md for your needs
API rate limits

Solutions:


πŸ—ΊοΈ Roadmap & Future Enhancements

Potential Future Features

  • Token usage tracking - Real-time cost monitoring
  • Draft comparison tool - Side-by-side version comparison
  • Template validation - Automatic structure checking
  • AI-powered rule suggestions - Smart rule generation
  • Batch processing mode - Multiple articles in sequence
  • A/B testing support - Variation performance tracking
  • SEO optimization agent - Dedicated 4th agent
  • Export formats - PDF, DOCX, HTML output
  • Web UI - Browser-based interface
  • Claude/Anthropic support - Additional AI provider

πŸ“„ License & Credits

License: MIT - Free to use and modify for your content creation needs.

Credits:

  • Built with Python, OpenAI GPT-4o/4.1, Google Gemini
  • Quality analysis: TextStat, scikit-learn
  • CLI: Colorama

πŸ†˜ Support & Resources

Getting Help

  1. Read the docs: Start with docs/INDEX.md
  2. Check examples: See examples/ directory
  3. Run tests: python test_setup.py to verify setup
  4. Review changelog: docs/project/CHANGELOG.md

External Resources


πŸŽ‰ Get Started Now!

# 1. Install dependencies
pip install -r requirements.txt

# 2. Set up API access
python setup_env.py

# 3. Edit your content brief
# Open templates/manual.md and add your topic

# 4. Run the workflow
python main.py

# πŸš€ Watch the magic happen!

Built with ❀️ for efficient, intelligent, scalable content creation

AI-Content-Studio v3.0 - October 2025

About

A 3-agent AI workflow for scalable content creation using WRITER, LLMON, and EDITOR agents with intelligent revision loops and user control gates

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages