q=qequals

Why multi-agent SEO pipelines break: three contracts stop the spiral

Multi-agent SEO pipelines break when handoffs assume state, order, and validation, and three boundary contracts plus a token-lean pass keep the next run from becoming a three-day repair.

Qqequals·Oct 17, 2026·8 min read

Multi-agent SEO pipelines break after the agents have already finished. The research agent returns a brief, the builder ships the site, and the content agent fills the template. Each action completes. The run still fails, because the handoff assumed state (what is true right now), ordering (what runs before what), and validation (what counts as correct).

That failure is hard to explain from inside any one agent. GitHub's engineering blog describes the shape: an agent closes an issue another agent just opened, or ships a change that fails a downstream check it did not know existed. The moment agents handle related tasks, triaging issues, proposing changes, running checks, and opening pull requests, the same post says they start making those implicit assumptions. Without explicit instructions, data formats, and interfaces, the same post warns, things will not go the way you planned, and these systems behave much less like chat interfaces and much more like distributed systems.

The SEO version of that failure shows up in a public account of a Hermes setup, the agent configuration someone was trying to run. One agent uses the DataForSEO API to build a semantic-authority map and a brief. A second agent creates the site from that brief. A third writes each site's content from a template. A fourth uses the Google Cloud API and Bing Webmaster Tools to do analytics and propose improvements. An orchestrator (the coordinator that orders which agent runs when) and a kanban board (a shared board for the workflow) run the whole thing. They report eating millions of tokens and spending three days fixing the Hermes setup instead of launching more web apps. It was not the first time they had broken that configuration. For now they are doing the work by hand so the projects already in queue can launch, and from what they had read on X this kind of setup is hard to keep from breaking. A reply describes something similar while configuring OpenSEO with DataForSEO on a virtual private server (a rented cloud machine), with OpenSEO deployed on Cloudflare.

Where an Orchestrator Loop Actually Breaks

The break shows up on the research-to-build handoff in the same way GitHub's engineering blog describes messy exchanges: workflows often fail early because agents exchange messy language or inconsistent JSON, field names change, data types do not match, formatting shifts, and nothing enforces consistency, so the next agent guesses what the payload means. The same post says most multi-agent workflow failures come down to missing structure.

Vague intent breaks the next handoff even when the fields are typed. Language models do not follow implied intent, GitHub's engineering blog says, only explicit instructions. The same post says "Analyze this issue and help the team take action" sounds clear, but different agents may close, assign, escalate, or do nothing. Each choice is reasonable, and none of them is automatable. On the SEO loop the same split appears when the instruction is to build the site and take the next step. The builder can ship markup the content agent cannot use. The content agent can publish pages that fail an analytics check it never received. No check rejects the bad handoff before it reaches production, so the repair happens days later by hand.

Contract 1: Typed Payloads That Fail Fast

A typed schema (a machine-checkable shape for the data an agent must return) is the first contract. GitHub's engineering blog calls typed schemas table stakes in multi-agent workflows: without them, nothing else works.

For the research-to-brief handoff, require a fixed shape: the target keyword, the entity list, the header outline, and the source URLs, each with a type the next agent can check. Fill the keyword and the source URLs from a live pull, in the same shape as the rest of the payload. qequals is an agent-first API for that pull: Google autocomplete strings for a seed query and live Google SERP results for the same query, with Search and Suggestions calls returning live data.

Establishing contracts early in development helps teams collaborate without stepping on each other, GitHub's engineering blog notes, and typed interfaces add that structure at every boundary: agents pass machine-checkable data, invalid messages fail fast, and downstream steps do not have to guess what a payload means. The same post says debugging moves from inspecting logs and guessing to naming the schema the payload violated, and schema violations should be treated like contract failures: retry, repair, or escalate before bad state propagates.

Contract 2: Actions That Resolve to a Small Allowed Set

Typed data still breaks when intent stays vague. The second contract pins what an agent may do.

An action schema (a fixed list of the only outcomes an agent may return, with the shape of each) defines that list. GitHub's engineering blog says the outcome must always resolve to one valid action from a small explicit set, even when earlier steps stay loose. The examples in the same post are a request for more information with the missing fields listed, an assignment to a named assignee, closing as a duplicate of a numbered issue, or no action, and anything else fails validation and is retried or escalated. Most agent failures are action failures, the same post says.

For the SEO loop, write that set at each handoff. The brief agent may return a complete brief, a request that names the missing competitor URLs, or a no-build flag with a reason. A half-finished brief comes back as that request, with the missing pieces named. The content agent may return finished markup, a request for a missing template block, or a flag for human review. The analytics agent may return a prioritized fix list, a monitoring note, or no action. Approving those fixes and shipping them still sits with a person.

Contract 3: Enforcement Before Execution

Contracts written down and never checked stay conventions. GitHub's engineering blog says enforcement is what turns them into guarantees. The same post prescribes the Model Context Protocol (MCP) as the enforcement layer that turns these patterns into contracts: an explicit input schema and an explicit output schema for every tool and resource, with the call validated before anything runs. The same post says agents cannot invent fields, omit required inputs, or drift across interfaces, because validation happens before execution and bad state stays out of production. Choosing an MCP server or a direct call for the data underneath is a different decision from whether the schema is checked first.

GitHub's engineering blog states the stack this way: schemas define structure, action schemas define intent, and MCP enforces both. The shift is to treat agents like code, not chat interfaces.

Fixing Beats Launching Compromised

Token pressure is what turns a contract violation into a launch decision. A multi-agent run costs three to ten times the tokens of one agent. Fixing the token architecture delays deployment by days or weeks while the code is refactored. Launching as-is gets the content out immediately and leaves truncated text, missing meta tags, broken code, and heavy manual post-processing. Context-window overflow (the point where the shared history grows past what the model can hold) shows up as hallucinated keywords, broken HTML and markdown, and corrupted metadata that destroy search rankings.

The handoff can be repaired without rewriting the whole framework:

  • Map-reduce clustering (splitting extraction from writing): do not force one writer agent to read 50 competitor URLs. Have a researcher extract only the core headers and semantic entities into a condensed blueprint, then pass that blueprint to the writer.
  • Strict JSON handshakes (machine-checkable handoffs with no conversational filler): wrap each handoff in structured output so tokens do not go to a lead-in before the data.
  • Stateful memory summarization (condensing history before the next step): when agents share a long history, run a summarizer that compresses prior steps into a tight bulleted list before the optimization agent reads it.

Adding new pages or longer target keywords on an as-is launch creates cascading API failures. A fixed layout keeps the handshakes between planning, writing, and optimization agents stable. The compute spent refining the agents and the memory layout is one-time. An as-is launch spends again on retries and on editing broken output by hand.

Make each handoff token-lean before the next run. The researcher passes entities. The writer receives a blueprint. The optimizer receives a summary. Check the shape, and on a violation retry, repair, or escalate before anyone launches the broken pages.