Why I Automated My Entire Content Pipeline with AI (and What I Would Do Differently)
I run multiple brands. Each one needs blog posts, social content, SEO optimization, and consistent publishing. Doing all of that manually was eating 15-20 hours a week. So I did what any engineer would do: I built a system.
The system is called travel-micros-fleet. It is a multi-agent AI platform with 11 specialized agents, over 60 tools, and 15 automated workflows. Here is the real story of how it works.
The Problem: Content at Scale as a Solo Operator
When you are running multiple brands by yourself, content is the thing that always slips. You know you should be publishing. You know SEO takes months to compound. But there is always something more urgent.
I was publishing maybe one blog post a month across all my brands. That is not enough to build organic traffic. I needed a system that could handle the boring parts so I could focus on the interesting ones.
The Framework: Mastra
The whole system is built on Mastra, an open-source TypeScript framework for building AI agents and workflows. Mastra gave me structured workflows with typed inputs and outputs, tool integration, agent orchestration, and memory. It let me build something that feels like a real engineering system, not a pile of prompt scripts.
Each workflow is a pipeline of typed steps. Each agent has specific tools it can use. Everything is composable and testable. If a step fails, I know exactly where and why.
The 11 Agents
Instead of one giant AI that does everything poorly, I built specialized agents:
- Research Agent — Scans Reddit, YouTube comments, and communities for real questions people are asking
- Ideation Agent — Turns raw community signals into content briefs with ICP framing
- Content Planner Agent — Prioritizes ideas by brand goals, funnel stage, and keyword opportunity
- SEO Writer Agent — Generates full articles using brand voice, Youtility principles, and Google Search grounding through Gemini 2.5 Pro for factual accuracy
- Editor Agent — Scores articles on humanness, readability, and brand voice. Returns APPROVE, REVISE, or HUMAN_REVIEW verdicts
- Publisher Agent — Handles Ghost CMS publishing with feature images, tags, and SEO metadata
- Social Media Agent — Generates platform-specific social posts and schedules them via Late API
- Video Analyst Agent — Downloads TikTok/Instagram videos, extracts frames and transcripts, and produces content breakdowns
- Brand Onboarding Agent — Sets up new brands in Firestore with ICP profiles, content pillars, and voice guidelines
- Fleet Commander Agent — Orchestrates multi-agent workflows and handles escalation
- Analyst Agent — Generates analytics reports and performance tracking
The Content Kitchen: The Core Pipeline
The main workflow is called the Content Kitchen. It is the pipeline that takes a topic brief and produces a published article. Here is how it works step by step:
- Duplicate Check — Derives a candidate slug and checks Ghost CMS to make sure we have not already published this topic. Prevents wasted work.
- ICP Framing — Maps the topic to our Ideal Customer Profile. It figures out the funnel stage (suspect, prospect, lead), why the reader cares, and the Youtility angle. This is the difference between writing content for us and writing content that actually helps someone.
- Article Generation — The SEO Writer agent produces the article using Gemini 2.5 Pro with Google Search grounding. This means the AI backs up claims with real search results instead of hallucinating data. It retries up to 2 times if the JSON output is malformed.
- Affiliate Link Injection — Contextually inserts relevant affiliate links into the article body. Maximum 3 per article, inline placement with dedup guards.
- Editorial Review — The Editor agent runs three automated checks: humanness scoring (catches AI-isms like "In today's fast-paced world"), readability analysis, and brand voice matching. It scores the article 1-10 and renders a verdict.
- Revision Loop — If the editor says REVISE, the SEO Writer agent gets the specific issues and rewrites only the flagged sections. This loops until approved or capped.
- Feature Image Generation — Generates a branded feature image using Gemini, saves it locally, and uploads it to Ghost.
- Ghost Publishing — Publishes to Ghost CMS with proper title, meta description, slug, tags, and the feature image. Can be set to draft, publish, or scheduled mode.
Beyond Articles: The Full Tool Belt
The 60+ tools cover way more than blog posts:
- Blog-to-Slides — Takes a published Ghost article and turns it into a TikTok/Instagram carousel with generated images and text overlays
- Community Scanner — Monitors Reddit and Facebook groups for content opportunities
- Ghost Admin Tools — JWT auth, image upload, post CRUD, duplication checks
- Content Calendar — Manages scheduling across platforms via Firestore
- Sintra Prompt Generator — Creates social media prompts optimized for the Sintra scheduling tool
- Video Downloader + Analyzer — Downloads TikTok videos via yt-dlp, extracts frames, and produces hook analysis
What Actually Works Well
Idea mining is the biggest win. Finding content ideas used to take hours of forum scrolling. The community scanner surfaces 10-15 ideas per run with actual questions attached. I review and approve the good ones.
The editorial loop catches real problems. AI-generated content has tells. The editor agent flags generic transitions, empty authority claims, and that weird formal-but-hollow tone. It forces concrete rewrites.
Google Search grounding is a game-changer. Using Gemini with grounding means articles include real, current data instead of confident-sounding fiction. The grounding metadata includes source URLs and confidence scores.
What Broke (Repeatedly)
The 40-hour automation trap. I spent far more time building this system than any reasonable cost-benefit analysis would justify. But I am an engineer, and the system is for multiple brands over multiple years. The ROI is real, just slow.
JSON parsing from LLMs is fragile. Gemini sometimes returns prose instead of JSON, or wraps JSON in markdown code fences. I had to add retry logic, fence stripping, and regex extraction. The Content Kitchen retries up to 2 times on parse failures.
Ghost API quirks. JWT tokens expire, large payloads timeout, and the admin API has undocumented behaviors. I built a full JWT helper, image upload pipeline, and slug deduplication system just to publish reliably.
The editorial loop sometimes spirals. The editor and writer agents occasionally disagree and bounce articles back and forth. I added a hard cap and a HUMAN_REVIEW escape hatch.
What I Would Do Differently
- Start with the Content Kitchen only. I built too many tools and agents before validating the core pipeline. Get topic-to-published-article working first. Everything else is optimization.
- Invest in voice training early. Write 5 articles manually and use them as style examples before touching automation. The brand voice checker is only as good as the examples it has.
- Measure from day one. I did not track which automated articles performed well for the first two months. Now I have analytics tools, but that early data is gone.
- Use structured outputs from the start. I switched to Zod schemas and typed workflow steps after too many unstructured prompt failures. Should have started there.
The Numbers
Before automation: 1-2 articles per month, 6-8 hours each.
After automation: 8-12 articles per month across brands, 30-45 minutes each (review + approve + minor edits).
Build time for the system: 80+ hours and counting.
Was it worth it? For someone running multiple brands long-term, absolutely. For a single blog? Probably not. Start with templates and a good writing process first.
Curious about building AI agent systems? I consult on AI-powered workflows for founders and businesses. Let us talk.