
Hey there, it’s Claudie! ✨
Starting today, we’re rolling out a 4-part series on how we built the Blog-Agent system — our AI multi-agent blog automation pipeline. Hand it a single Confluence doc, and it handles everything from SEO strategy to publishing in 3 languages (Korean, English, Japanese), fully automated.
Fun fact: this very post was written by Blog-Agent. Pretty meta, right? 😄
🎯 Why Did We Build This?
Our team writes a lot of technical docs on Confluence. But turning those into blog posts meant going through this tedious process every single time:
- Read the Confluence doc and rewrite it in blog format
- Do SEO keyword research and write metadata
- Generate a featured image
- Create diagrams and inline images
- Format everything in HTML
- Upload via the WordPress API
- Translate to English and Japanese, then publish each
- Link the languages together with Polylang
Publishing a single post in 3 languages took 3–4 hours. We thought, “What if we automated this?” — and that’s how the Blog-Agent project was born.
🏗️ Overall Architecture
The core idea behind Blog-Agent is simple: “Give each specialty its own AI expert, then orchestrate them like a conductor leading an orchestra.”

Instead of one massive prompt trying to do everything, 10 specialized agents each handle their own role:
| Agent | Role | Model |
|---|---|---|
| 🎯 SEO Strategist | Keyword analysis, title candidates, content angle | Sonnet |
| 🔍 Researcher | Source material collection, external data enrichment | Sonnet |
| 🎨 Art Director | Featured/closing image generation (AI images) | Sonnet |
| ✍️ Writer | Korean HTML draft creation | Opus |
| 📝 Editor | Proofreading, diagram insertion, emoji placement | Sonnet |
| 👀 Supervisor | QA review (SEO density, structure, tone check) | Sonnet |
| 🌐 Translator | EN/JA translation | Sonnet |
| 🚀 Publisher | Publish via WordPress API | Sonnet |
| 🔗 Polylang Ops | Multilingual linking (language assignment + translation links) | Sonnet |
Only the Writer uses the Opus model. Writing is the step where quality matters most. The rest of the agents do just fine with the cost-efficient Sonnet model.
🔄 The 13-Step Pipeline
From source input to final publication, there are 13 steps in total. Each step is handled by a specialized agent, and the output of each step feeds into the next.

Let’s walk through each step:
Phase 1: Planning (Steps 1–3)
Step 1 — SEO Strategy: Analyzes the source material to determine target keywords, title candidates, and content angle. The category (Dev Log, Tech, Daily, Economy) is decided here, and the corresponding category profile YAML is auto-loaded.
Step 2 — Research: Fetches the Confluence source and, if needed, gathers supplementary materials through web search or the RAG knowledge base. It automatically branches by source type — supporting Confluence pages, URLs, local files, PDFs, and even briefing JSONs.
Step 3 — Art Direction: Generates 2 AI images — a featured image (top) and a closing image (bottom). The key here is maintaining a consistent style based on character reference images.
Phase 2: Production (Steps 5–8)
Step 5 — Writing: The Opus model writes the Korean HTML draft. It weaves in SEO keywords naturally and maintains the blog voice (warm, conversational tone) consistently.
Step 6 — Editing: Handles sentence polishing, diagram generation and insertion, and character emoji placement. Diagrams follow a brand style (cream-to-sky-blue gradient, teal/coral boxes).
Step 7 — QA Review: The Supervisor automatically checks HTML structure, SEO keyword density, tone consistency, and image placement. It scores on a 100-point scale, and if there are issues, it sends revision requests back to the Writer or Editor.
Step 8 — Checkpoint: If the QA score is 80 or above, it’s auto-approved. Below that, it waits for manual review. This checkpoint acts as the quality gate.
Phase 3: Publishing (Steps 9–13)
Step 9 — Publish KO: Uploads images to WordPress, replaces local paths in the HTML with actual URLs, then publishes the Korean post.
Step 10 — Translate: Translates the Korean original into English and Japanese. This isn’t simple translation — SEO metadata and keywords are localized for each language too.
Step 11 — Publish EN/JA: Publishes the translated content. Since it reuses already-uploaded media, this step is fast.
Step 12 — Polylang Link: Uses the WordPress Polylang plugin to link the KO/EN/JA posts to each other. This is the trickiest part — we’ll cover it in detail in Part 4.
Step 13 — Label Source: Adds a blog-posted label to the original Confluence page to prevent duplicate publishing.
🔌 MCP Server Integration
One of Blog-Agent’s strengths is its integration with MCP (Model Context Protocol) servers. MCP is a standard protocol that lets Claude Code communicate directly with external services.

A total of 7 MCP servers are connected:
| MCP Server | Role | Pipeline Step |
|---|---|---|
| mcp-atlassian | Confluence page reading, Jira integration | Step 2 (Research), Step 13 (Label) |
| nanobanana | Gemini Flash/Pro image generation | Step 3 (Art), Step 6 (Diagrams) |
| terryxai | xAI Grok image generation | Step 3 (Featured Image) |
| knowledge-rag | Self-hosted RAG knowledge base search | Step 2 (Research supplement) |
| filesystem | NAS file read/write | All steps (HTML, image storage) |
| playwright | Browser automation (wp-admin) | Step 12 (Polylang setup) |
| wpcom-mcp | WordPress post CRUD | Step 9, 11 (Publishing) |
Notably, we use two different AI services for image generation depending on the purpose:
- Featured/closing images → xAI Grok (excels at animation/character styles)
- Diagrams/technical illustrations → Gemini Flash (great for clean, structured diagrams)
📦 State Management System
What happens if the 13-step pipeline fails midway? Running everything from scratch would waste time and money. That’s why we built a state management system.
# Initialize pipeline
python state_cli.py init \
--source confluence \
--refs 12345
# Record step start/completion
python state_cli.py start-step seo_strategy
python state_cli.py complete-step seo_strategy \
--output '{"keyword":"blog automation"}'
# Check current progress
python state_cli.py status
Each step’s state (pending → in_progress → completed/failed) and result data are saved as JSON files. Data sharing between agents is handled through set-shared / get-shared commands.
For real-time monitoring, there’s a Flask web dashboard (port 5055) where you can see pipeline progress, step details, image previews, and file maps at a glance.
📂 Multi-Format Source Support
We started with only Confluence pages as input, but gradually added support for various source formats:
| Source Type | Example | Processing |
|---|---|---|
| Confluence | --source confluence --refs 12345 | Fetch page via MCP |
| URL | --source url --refs "https://..." | Crawl via WebFetch |
| Local file | --source file --refs README.md | Direct read (multiple files OK) |
--source pdf --refs doc.pdf | Extract text via PDF parser | |
| Briefing JSON | --source briefing --refs brief.json | Use structured briefing directly |
⚙️ Category Profile System
Different blog categories need different tones, structures, and image styles. Instead of tweaking prompts every time, we created category profile YAMLs:
# profiles/dev_log.yaml
writer:
tone: "Dev log feel, sharing trial-and-error"
structure: "Background→Problem→Solution→Result"
editor:
diagram_style: "Code-centric, architecture diagrams"
translator:
tech_terms: "preserve original terms"
Once the category is decided in Step 1, the corresponding profile is auto-loaded and injected into every subsequent agent’s prompt. Want to add a new category? Just create 1 YAML file — all agents adapt automatically.
💰 Cost Optimization: Claude Code + Max Subscription
Initially, we used the Claude Agent SDK to call the API directly (blog-agent-api). But using the Opus model for the Writer meant significant token costs.
So we switched architectures:
# Before (direct API calls — token costs)
blog-agent-api → Claude API → per-token billing
# After (Claude Code CLI — included in Max)
OpenClaw → claude -p "write blog post" \
--permission-mode bypassPermissions
→ Claude Code (Max subscription, unlimited Opus)
With Claude Code Max subscription, even Opus is unlimited. By triggering the pipeline from an external agent (OpenClaw) using the claude -p command, we get the highest-quality model with zero API costs.
| Aspect | Direct API Calls | Claude Code CLI |
|---|---|---|
| Cost | Per-token pricing | Included in Max (no extra cost) |
| Model | Must consider cost (Haiku/Sonnet) | Opus unlimited |
| Tools | Connect via SDK | All built-in MCP tools available |
| Browser | Separate integration needed | Playwright MCP already connected |
🔐 Error Handling and Retries
Errors are inevitable in an automation pipeline. So we set up retry policies for each failure scenario:
| Error Scenario | Retries | Fallback |
|---|---|---|
| Confluence timeout | 3x | Use cache/previous result |
| Image generation failure | 3x (simplify prompt) | Placeholder image |
| WordPress 403 | 1x after token refresh | Save as local draft |
| Web search failure | 2x | Proceed without external data |
| Playwright failure | 3x | Manual Polylang instructions |
Image generation in particular can get caught by AI model safety filters, so on failure, the prompt is automatically simplified and retried.
📊 Version History: 10 Days of Evolution
Blog-Agent evolved rapidly from v0.1.0 to v0.8.5 in roughly 10 days:
| Version | Key Changes |
|---|---|
| v0.1.0 | Initial 13-step pipeline + 10 agents |
| v0.3.0 | Inline image upload pipeline |
| v0.4.0 | Category profile system (YAML) |
| v0.5.0 | WordPress native lightbox |
| v0.7.0 | Full auto-approve + NAS work directory |
| v0.8.0 | WordPress MCP integration (OAuth 2.1) |
| v0.8.5 | Polylang REST→post.php migration (final stabilization) |
We ran the pipeline in production every day and fixed issues as they came up. The v0.8.0–v0.8.5 period saw the biggest changes — we tried WordPress MCP integration, had to disable it due to bugs, and completely overhauled the Polylang approach. Lots of real-world experience baked in there.
📋 Series Overview
This series has 4 parts in total:
- Part 1 (this post): Why we built it, overall architecture, 13-step pipeline overview
- Part 2: Designing 10 AI agents — prompt engineering and role allocation
- Part 3: Claude Code CLI vs Agent SDK — comparing two implementations
- Part 4: WordPress + Polylang war stories — trilingual auto-publishing
In the next part, we’ll dive deep into how we designed each agent’s prompts and how data flows between agents!
Got questions or thoughts? Drop them in the comments! 💬
