Skip to content

✨ A smart AI agent that generates full-length blog posts and social media captions from any topic using GPT-4o and LangChain.

License

Notifications You must be signed in to change notification settings

kaveeshagim/ai-content-creator-agent

Repository files navigation

🧠 AI Content Creator Agent

Python LangChain OpenAI GPT-4o GitHub Pages RSS Feed Medium Last Updated License

An intelligent, agent-powered blog generator built with Python, LangChain, and OpenAI GPT-4o. Fully automated — from idea to published blog with zero manual effort.


✨ Key Features

  • 🔍 Input any blog topic
  • 🧠 Outliner Agent to structure posts before writing
  • ✍️ Writer Agent + Proofreader Agent for high-quality content
  • 📣 Auto-generated captions for Twitter, LinkedIn, Instagram
  • 🔗 Citation Inserter Agent for credibility and references
  • 🎯 SEO Agent for tags, meta descriptions, and summaries
  • 🖼️ Share Banner Generator for social media branding
  • 💾 Saves content as .md, .txt, .json, and .html
  • 📤 Auto-push to GitHub Pages for hosting + RSS feed
  • 📰 Auto-publish to Dev.to via RSS
  • 🎛️ Streamlit UI with queue system, trending topics, outline editing
  • ⏰ Optional Google Calendar sync for scheduled posts
  • 📊 Built-in Analytics Dashboard (reading time, tags, calendar heatmap)

🧩 Modular Agent Architecture

Agent Role
Outliner Agent Creates blog structure before writing
Writer Agent Generates content based on topic, tone, audience, outline
Proofreader Agent Cleans and refines blog content
Citation Agent Inserts credible references and links
SEO Agent Suggests meta description and SEO tags
Social Agent Generates captions and post templates for each platform
Editor Agent Summarizes content in bullet points

🖥️ Streamlit UI Features

  • ✅ Topic input, tone & audience selector
  • 📋 Optional outline preview and editing
  • ➕ Queue multiple topics for batch processing
  • 🚀 One-click generation with live feedback
  • 📦 Downloadable files and preview windows
  • 📆 Analytics Dashboard with:
    • Calendar heatmap
    • Weekly/monthly trends
    • Top tags
    • Filterable blog archive
    • CSV export

📂 Project Structure

  • 📁 blogs/ → Markdown blog posts
  • 📁 captions/ → Captions for each blog
  • 📁 metadata/ → Blog metadata (JSON: SEO, summary, links, etc.)
  • 📁 docs/ → GitHub Pages folder (.html files + rss.xml)
  • 📁 banners/ → Social share images
  • 📄 rss.xml → Auto-updated RSS feed for Dev.to and Medium

🔮 Possible Enhancements

  • 🧵 Thread Composer Agent (Twitter carousel style)
  • 📱 Mobile version using Streamlit Cloud / Flutter
  • 🧠 Personalization agent for tone & voice calibration
  • 🤖 Slack + Zapier integration for daily blog triggers
  • 📨 Newsletter bot for Substack / Revue

📡 Live Demo


🛠️ Tech Stack

  • Python 3.11
  • LangChain
  • OpenAI GPT-4o
  • Streamlit
  • Matplotlib + Calplot
  • GitHub Pages + RSS

⚙️ Setup

  1. Copy .env.example to .env and fill in your API keys.
  2. Install the dependencies with pip install -r requirements.txt.
  3. To sync blog posts with Google Calendar, set ENABLE_GOOGLE_CALENDAR=true in .env and provide your Google credentials (credentials.json).

🚀 Run the Components

  • CLI: python main.py
  • Streamlit UI: streamlit run app.py
  • FastAPI API: uvicorn api:app --reload
  • React UI:
    cd ai-content-creator-ui
    npm install
    npm run dev

📚 API Endpoints

Method Endpoint Description
POST /generate Generate blog content from a topic
GET /suggest-topics?category=tech Get trending topic ideas
GET /check-topic Check if a blog slug exists and get a rewrite
POST /save Save blog, captions, and citations
GET /calendar Return calendar data of published blogs
GET /analytics Aggregate metadata for dashboard

Want to build your own AI-powered publishing assistant? Fork this repo and start generating!


About

✨ A smart AI agent that generates full-length blog posts and social media captions from any topic using GPT-4o and LangChain.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published