§ 04 · The pattern
What a coordinator actually does.
A coordinator is not a dispatcher. Its job is not to pass a topic along and collect the
results. Its job is to make the decomposition decision — to convert an
ambiguous user intent into a partitioned research space before any subagent runs. The code is
modest. The decisions are the work.
# Coordinator — partitions BEFORE delegating
topic = "AI impact on creative industries"
# 1. Decompose the topic into disjoint research spaces
partitions = [
{ "scope": "visual", "sources": ["arxiv", "artforum"] },
{ "scope": "music", "sources": ["jstor", "billboard"] },
{ "scope": "literature", "sources": ["jstor", "publisher"] },
]
# 2. Delegate in parallel — each subagent gets scoped work
results = await asyncio.gather(*[
research_agent.run(
scope = p["scope"],
allowed_sources = p["sources"],
return_envelope = FindingsEnvelope,
)
for p in partitions
])
# 3. Synthesis receives the union — nothing to dedup
return synthesis_agent.merge(
results,
coverage = { "excluded": ["film"] }, # explicit, not implicit
)
Three things to notice. First, the partitions are disjoint by construction — no subagent
can collide with another because their scope strings do not overlap. Second, each
subagent gets an allowed_sources allow‑list; this is least‑privilege,
and it is also a context‑budget control, because a source a subagent cannot query is a
source it cannot spend tokens on. Third, the excluded sector — film — is
named in the coverage annotation that flows forward. Synthesis sees an explicit gap, not an
inferred one.
Identify the ambiguity in the user’s intent. Convert it into disjoint subtasks the
coordinator is prepared to name. Delegate each subtask with scoped sources and a known return
envelope. Record what was deliberately excluded. The coordinator’s job is done
before any subagent returns.