Skip to content
Agentic AIAutonomous content engine

AI Content Pipeline

/Case Study

An end-to-end autonomous content engine that discovers trending topics via live web search, researches competitor gaps, drafts SEO-optimized posts with GPT-4o, and publishes to Ghost CMS — orchestrated on a recurring n8n schedule with zero manual intervention.

Category
Agentic AI
Type
Autonomous content engine
Core stack
LangChain · GPT-4o · FastAPI
Status
Live at thesupercreator.ghost.io
/02 · Agentic AIthesupercreator.ghost.io

Draft-first publishing. Four independently deployable FastAPI services.

/Architecture

Discovery
LangChain agent with Tavily real-time web search finds high-value blog topics for a given niche.
Research
second LangChain agent analyzes competitor gaps, keywords, and content outline for the top topic.
Drafting
LCEL chain with GPT-4o generates a full SEO-optimized blog post from the research brief.
SEO scoring
deterministic Python scoring for character counts and keyword density — no LLM arithmetic.
Publishing
Ghost CMS Admin API with JWT auth; posts publish as drafts by default for human review.
Orchestration
n8n scheduler triggers the full pipeline on a recurring cadence and sends email notifications.

/Stack

Backend
Python · FastAPI · Pydantic · Railway
Agents
LangChain · Tavily · GPT-4o
Orchestration
n8n · Gmail notifications
CMS
Ghost Admin API · JWT (PyJWT)
Repo
LucasLisboaDev/ai-content-pipeline

/Key engineering decisions

05 points
  1. Agents vs. chains

    Discovery and research use autonomous LangChain agents for tool use over live search; drafting uses LCEL chains when all context is already available.

  2. Temperature tuning

    Research and metadata at 0.1–0.2 for accuracy; drafting at 0.7 for natural prose.

  3. Deterministic SEO scoring

    Pure Python over LLM — faster, cheaper, and more reliable for measurable metrics.

  4. Draft-first publishing

    Posts never go live automatically — human review before publication.

  5. Separation of concerns

    Each pipeline phase is its own router, agent module, and Pydantic models — independently testable and replaceable.