Multi-Agent Swarm for Content Creation
Overview
Monolithic prompts struggle with long-form writing consistency. A single call that is asked to research, outline, draft, cite, and format will drop a constraint by page three: tone drifts, a code sample no longer matches the prose, a claim appears without a source. We engineered a specialized multi-agent pipeline where individual agents handle discrete phases of the editorial workflow, and a thin orchestrator decides when work is allowed to move forward.
This is an internal publishing system, not a public chatbot and not a named client product. The output is long-form technical writing — architecture notes, implementation guides, comparisons — that still needs a human editor before it ships. The swarm’s job is to make that editor’s first draft cheaper and more checkable, not to replace the byline.
Agent Roles
-
Researcher. Given a brief, it gathers primary sources: documentation, whitepapers, RFCs, and existing internal notes. Output is a dossier, not an essay: claims, quotes, URLs, and a confidence flag. It is not allowed to invent a source. If a URL cannot be retrieved, the item is marked unresolved.
-
Drafting. It receives the dossier and a style guide (heading grammar, how we treat code, what “we” means). It structures arguments section by section. It may not introduce facts that are not in the dossier. When it needs a number, it has to point at a dossier id.
-
Critic and fact-checker. A separate pass. It reads draft vs dossier, flags unsupported sentences, and runs code snippets in a sandbox where the language is executable. Failures come back as a list of patches, not a vibes paragraph. The drafter may be asked to rewrite a section; the critic does not rewrite the whole piece itself.
-
Formatter. Last. Markdown, tables, frontmatter, heading ids, and the mechanical consistency a human always forgets at 1 a.m. It does not add claims.
The orchestrator is boring on purpose: a state machine with retries, a token budget per role, and a hard stop if the critic still has blocking issues after a bounded number of loops. Shared memory is the dossier plus the current draft — not a chat dump that every agent reinterprets.
Why a swarm
A single model call optimizes for fluency. Fluency is the failure mode. Splitting roles makes the failure local: a bad research fetch does not silently become a confident paragraph. It also makes evaluation possible. We can score the researcher on source validity, the critic on precision/recall of flags, and the formatter on schema. We cannot score “write the article” except by reading it.
Cost is higher than one fat prompt. Latency is higher. The trade is that the human editor gets a draft with a paper trail instead of a wall of plausible text.
Outcome
The pipeline now produces first drafts that survive a technical edit without a full rewrite. The remaining work is judgment: what to cut, what to emphasize, whether the piece should exist. That is the part we did not try to automate. The swarm is a factory for checkable drafts, not an author.