AI Content Pipeline
/Case StudyAn 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
Draft-first publishing. Four independently deployable FastAPI services.
/Architecture
- LangChain agent with Tavily real-time web search finds high-value blog topics for a given niche.
- second LangChain agent analyzes competitor gaps, keywords, and content outline for the top topic.
- LCEL chain with GPT-4o generates a full SEO-optimized blog post from the research brief.
- deterministic Python scoring for character counts and keyword density — no LLM arithmetic.
- Ghost CMS Admin API with JWT auth; posts publish as drafts by default for human review.
- n8n scheduler triggers the full pipeline on a recurring cadence and sends email notifications.
/Stack
- Python · FastAPI · Pydantic · Railway
- LangChain · Tavily · GPT-4o
- n8n · Gmail notifications
- Ghost Admin API · JWT (PyJWT)
- LucasLisboaDev/ai-content-pipeline
/Key engineering decisions
05 pointsAgents 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.
Temperature tuning
Research and metadata at 0.1–0.2 for accuracy; drafting at 0.7 for natural prose.
Deterministic SEO scoring
Pure Python over LLM — faster, cheaper, and more reliable for measurable metrics.
Draft-first publishing
Posts never go live automatically — human review before publication.
Separation of concerns
Each pipeline phase is its own router, agent module, and Pydantic models — independently testable and replaceable.