SwiftX
All case studies
Media & CommunicationsAI AgentsMulti-AgentLangGraph

Multi-Agent Campaign-Strategy Studio

Civic & Political Communications Platform (under NDA)

A 7-agent AI pipeline that codifies high-stakes communications discipline — narrative frames, copy patterns, paid-media doctrine, reputational guardrails — and runs the production loop end-to-end with token-level streaming and human-in-the-loop gates at every step.

Multi-agent orchestration interface with structured outputs
Pipeline
7 specialized agents
Streaming
Token-level SSE
HITL
Every gate
Stack
LangGraph · FastAPI · Pinecone

Multi-Agent Campaign-Strategy Studio

The problem

High-stakes communications teams — political campaigns, civic communications, public-affairs operators — work under impossible constraints. Tight cycles, multi-platform output across TikTok, Instagram, X, YouTube, and paid, and reputational shrapnel from any misstep. The tooling on the market was built for marketing teams operating at much lower stakes, so most quality calls happen in human heads, late at night, under deadline. The discipline lives orally and erodes the moment a senior leaves.

The mandate: build a multi-agent AI pipeline that codifies the discipline — narrative frames, copy patterns, paid-media doctrine, reputational guardrails — and runs the production loop end-to-end with a human in the loop at every gate that matters.

The approach

A 7-agent pipeline, each agent shipped with its own charter, principles, rules, anti-patterns, and heuristics — codified in YAML and Pinecone, not buried in tribal knowledge. LangGraph for the orchestration spine. FastAPI + Server-Sent Events for the live-streaming UI that lets campaign managers watch the agents reason, interrupt them mid-run, and resume.

The pipeline

  1. Planner — validates the campaign request across three input shapes (global OTP, single-piece OTP, agenda-OTI), parses dates, retrieves rules from the doctrine library, and produces a strategic content calendar of CPO ("creative production object") pieces. 14-node LangGraph; HITL review gate before approval.
  2. Creative — selects a narrative frame per piece (Underdog · Metamorphosis · Rebel Sage · Tribe), applies a copy pattern (PAIPS, VFA, Shame Reframe, Open Loop), generates beat-by-beat scripts, art direction, and per-platform adaptations. AI-slop blacklist + redundancy + cognitive-load checks at the guardrail gate.
  3. Assembly — decomposes creative briefs into engine-specific generation jobs (fal.ai, Minimax) with engine-aware prompt syntax — modular tokens for U-Net engines, fluent prose for diffusion-transformer engines — plus imperfection engineering (high-ISO grain, motion blur) so output reads as filmed, not generated.
  4. Quality Check — three-part QA in parallel: visual defect detection (AI artifacts, format compliance), text correctness (spelling, grammar, brand safety), and semiotic coherence across visual + text. Verdicts: PASS / REVISE / REJECT, with automatic loopback to Creative or Assembly.
  5. Listening — ingests post-publication signals (comments, mentions, sentiment), drafts community-management replies, and extracts engagement KPIs.
  6. Dashboard — aggregates across campaigns and time periods, surfaces the patterns that mattered (which content types performed, which narratives resonated), and generates concrete next-step recommendations.
  7. Paid Media — applies organic-to-paid eligibility (>65% completion-rate threshold), 70-20-10 budget distribution, micro-progressive escalation, and fatigue/frequency detection (frequency >4 + CTR down 25% triggers mandatory rotation). Plus a reputational shield that rejects rage-bait even when it scores high on raw CTR, because some wins aren't worth taking.

Real-time streaming UI

Token-level SSE streaming so campaign managers watch agents reason live. AbortController cancellation, an interrupt/resume protocol so HITL gates pause execution cleanly, and batch execution with semaphores so a single team can run dozens of requests in parallel without losing per-request context.

Doctrine-driven, not vibes-driven

Every agent ships with a structured doctrine — charter, principles, rules, anti-patterns, heuristics — backed by Pinecone RAG so the orchestrator pulls the right rule into the right node at runtime. New campaigns inherit institutional discipline by default, not by training.

The stack

  • Backend — FastAPI · LangGraph · SQLAlchemy 2.0 (async) · PostgreSQL · Alembic
  • AI / Retrieval — OpenAI · Pinecone (RAG) · Whisper · Make.com generation webhooks · fal.ai · Minimax
  • Frontend — Next.js 16 · React 19 · Refine.dev · Ant Design · TypeScript
  • Streaming — SSE token-stream · LangGraph checkpointing · interrupt/resume protocol · semaphore-bound batch execution

The impact

  • 7 specialized agents wired into one auditable pipeline — every CPO traceable from intake through paid-media spend recommendation.
  • Real-time streaming UI — managers watch agents reason, interrupt, redirect, resume mid-run.
  • HITL gates at every quality-critical step — reputational risk gets caught before publication, not after.
  • Doctrine codified, not improvised — narrative frames, copy patterns, paid rules, and anti-patterns live in the system, not in heads.
  • Engine-aware prompt assembly — content quality compounds because each generation engine receives the syntax it actually responds to.

The platform turns a campaign cycle from a chaos of late-night decisions into a disciplined, observable production line — without taking the human out of the loop.

Ready to start something useful?

Start a project