Content-studio — governed content conveyor

A governed content-production engine on LangGraph with three surfaces: a web cabinet, an MCP server and a WordPress plugin. Verifier loops, fail-closed human gates, RAG grounding.

Role
Creator & sole engineer
Stack
PythonLangGraphClaudePostgreSQLFastAPIMCPWordPress
A LangGraph content conveyor: intake → research (with a verify loop) → plan → human approval → section writing → review (with a revise loop) → final approval → publish, driven by a cabinet, an MCP server and a WordPress plugin.

A personal project: a content-production system built so AI can produce long-form content at scale without lying and without shipping un-reviewed. One governed engine, three ways to drive it — a web cabinet, an MCP server and a WordPress plugin.

The engine

The engine is a LangGraph StateGraph. Agents are real Claude calls; the control flow is code. A run moves through intake → harvest → brief → domain_brief → research → plan → section writing → assemble → review → package → publish, and the interesting parts are the controls between those stages.

Two independent verifier loops. research ⇄ research_check and review ⇄ revise are producer → verifier → regenerate loops: a separate check finds what’s still open and sends the agent back, bounded by a budget. What stays open when the budget is spent is surfaced to the human rather than hidden.

Two human gates that fail closed. approve_plan and approve_final pause the graph on a LangGraph interrupt(). Approve to continue; decline with edits and the run loops back (to plan or revise) and applies them; decline with nothing and the run escalates rather than guessing. Nothing irreversible happens on the un-approved branch, so there’s nothing to roll back.

Fan-out and a batch lane. Once a plan is approved, sections are written in parallel (Send per section). A batch lane routes section writing and review through the Anthropic Message Batches API at roughly half price for bulk runs that don’t need a human waiting. Every node has a retry policy and a typed error path that escalates instead of failing silently.

Grounding

Research is grounded, not free-associated. The engine has its own retrieval layer — a knowledge base with chunking, embeddings, reranking and a text-embeddings service — plus live web research (SERP and Perplexity). Claims trace back to sources, and quality tiers set the bar: the stricter tier demands verified primary sources and per-claim grounding.

Why it’s trustworthy

Agents reach a model only through a single mediated seam that also books cost against a per-run budget and ceiling. Human pauses are durable: with a Postgres checkpointer a paused run survives restarts and works across replicas (it falls back to in-memory for local dev). The service is multi-tenant — accounts, sites and usage metering — so it runs for more than one client.

Three surfaces

  • Web cabinet — a FastAPI service: paste a brief or upload a .docx/.md/.txt, pick tier and locale, start a run and watch live per-stage status, then download the article (Markdown/HTML) and JSON. Bulk plans run many articles without a human waiting; token-locked endpoints and a per-run cost ceiling keep spend bounded.
  • MCP server — exposes the same durable pipeline as MCP tools, so Claude Desktop or Claude Code drive it (with the cost ceiling and auth intact) without the UI. It takes a topic, a free-text description, an adopted brief, or a spec followed verbatim.
  • WordPress plugin — a thin PHP 8.2+ client that runs no model itself: from wp-admin it starts a run, shows live progress and assembles the result into a native post — Markdown to Gutenberg blocks, cover and per-section images, JSON-LD and SEO meta routed to Rank Math or Yoast. Posts default to draft. Its logic lives in WP-free, unit-tested classes.