Agents, world models and multi-agent systems
Choosing agent topology from task structure
An agent topology should be compiled from the task’s dependency graph and authority graph, because communication helps only when it manages a real dependency without weakening control.
TLDR
- Begin with work units, dependencies and commit rights, not with agent personas.
- Pipeline, hierarchy, market, debate and swarm solve different coordination problems.
- Extra communication can amplify cost, shared error and fault propagation rather than intelligence.
- Communication edges must never silently become authority to create irreversible effects.
- Compile the smallest fitting topology, then challenge it with faults, resets and matched alternatives.
Opening case: five analysts and one payment button
A supplier submits an invoice for £84,000. Five software agents can read the contract, inspect delivery records, calculate tax, check fraud indicators and prepare a payment request. They use the same model family, the same tools and the same case file. Only their pattern of interaction changes.
In the first design, every agent can message every other agent. The contract reader misreads an amendment, sends a confident summary, and the error circulates before the others inspect the original clause. Within two rounds, five voices agree. The agreement looks like corroboration, but it is one error copied through a dense network.
In the second design, the agents form a pipeline. Evidence extraction feeds contract interpretation, which feeds calculation, which feeds fraud review. The hand-offs are orderly and cheap. Yet an omitted delivery record becomes a settled input for every downstream stage. The pipeline has made provenance legible, but it has also made upstream defects highly consequential.
In the third design, a coordinator decomposes the case and receives typed results from four specialists. It can reject incomplete outputs and ask for rework. The hierarchy contains some faults, but now the coordinator is a bottleneck and a powerful source of common-mode error.
In the fourth design, two interpreters argue opposing readings before a separate judge. This helps only if their evidence or reasoning paths are meaningfully independent. If both begin from the same poisoned summary, debate turns correlation into theatre.
In the fifth design, agents bid for subtasks. The best contract specialist wins the interpretation work, while a faster calculator wins the arithmetic. The market allocates effort well when capabilities and costs differ. It does not answer who may authorise the payment.
The common intuition is that these are merely orchestration styles. Pick the one that looks clean, resembles a human team, or is easiest in the framework. That intuition hides a decisive assumption: that the communication pattern is neutral plumbing. It is not. Topology changes which errors spread, which facts arrive in time, who can block whom, how work is recovered and where authority accumulates.
The design problem is therefore not “Which multi-agent pattern is best?” It is “What dependencies must be managed, and where must authority remain?” Once those two structures are explicit, topology stops being a mascot and becomes a constrained engineering choice.
The hidden shape of the job
Imagine three people moving a piano upstairs. One person cannot simply “do the left side” and another “do the right side” independently. Their actions are coupled by weight, timing, geometry and a shared object. Now imagine three people translating three unrelated pages. The work can be separated almost completely. A third task asks three scientists to decide which of two explanations fits a result. Their dependency is neither physical nor sequential. It is epistemic: the value comes from preserving rival hypotheses long enough to test them.
Calling all three situations “collaboration” discards the variable that matters. Coordination theory offers a better starting point: coordination is the management of dependencies among activities.1 Classic multi-agent work reached a similar conclusion from computation. Decker and Lesser argued that there is no single best coordination mechanism for every environment; mechanisms should respond to features of the task environment.2 The task contains a shape before any agent is assigned to it.
Draw the task graph before the chat graph
Represent each unit of work as a node. Draw an edge only when one unit changes what another unit can validly do. The edge must say why. A predecessor edge means one result is required before another begins. A producer-consumer edge means an output becomes another task’s input. A shared-resource edge means two activities compete for the same tool, budget or record. A mutual-constraint edge means the activities must be reconciled together. An epistemic edge means two claims must remain in tension until evidence discriminates between them.
This is the task dependency graph, written here as GD. It is not a list of roles. “Researcher”, “critic” and “manager” describe labels attached to actors. “Claim B cannot be assessed until evidence A arrives” describes a causal dependency. The latter can tell us what communication or sequencing is required.
A second graph is equally important. Its nodes are decision roles, services or people. Its edges express rights such as propose, inspect, approve, execute, verify and compensate. This is the authority graph, GA. The authority graph answers questions that the task graph cannot: Who may release a payment? Who may merely recommend it? Who can revoke a capability? Who verifies that the effect occurred?
Only after both graphs exist should we draw the communication graph, GC. Its message edges should be justified by a dependency in GD or an obligation in GA. A framework may make full-mesh conversation easy, but ease is not a causal reason for every node to hear every message.
Decision takeaway: do not select one topology for the whole system when different stages manage different dependencies.
Decision takeaway: compare topologies with agents and budgets held constant before attributing improvement to “collaboration”.
Twelve independent invoice packets require extraction, validation and exception routing. The extraction for packet 7 does not depend on packet 3. A single vendor master is shared, and only exception cases need interpretation.
A twelve-stage pipeline would invent dependencies that do not exist. A full mesh would let irrelevant packet details contaminate other contexts. The fitting design is parallel workers with read-only access to the vendor master, followed by a small hierarchy for exception routing. A pipeline appears only inside each packet: extract, validate, then route. The topology follows the graph at two grains rather than forcing the whole job into one pattern.
flowchart TD A["Opening case, five analysts<br/>and one payment button"] --> B["The hidden shape of the job"] B --> C["What each topology is actually for"] C --> D["Compile from two graphs"] D -. "re-test" .-> A classDef first fill:#0a1424,stroke:#D95545,stroke-width:2px,color:#e6f3ff classDef step fill:#0a1424,stroke:#3f7da0,stroke-width:1px,color:#e6f3ff class A first class B,C,D step
What each topology is actually for
Topology names are useful only when they denote a coordination contract. A contract states what dependency the pattern manages, what information it assumes, what authority it grants and what causes it to fail. Without those clauses, “hierarchy”, “swarm” and “debate” become decorative language.
Pipeline: preserve precedence and typed hand-offs
A pipeline fits when the work has a stable partial order. One stage transforms an artefact and hands a typed result to the next. It is strongest when intermediate outputs can be validated locally, replayed safely and versioned. The critical property is not that agents speak one after another. It is that downstream work is invalid until a named upstream condition holds.
The break condition is frequent backflow or hidden shared state. If stage four regularly discovers that stage one must reinterpret the original evidence, the supposed line is actually a loop. If several stages mutate the same operational record, a message chain does not provide transaction semantics. Pipelines also concentrate error in early stages, so each hand-off needs provenance and acceptance criteria.
Hierarchy: decompose work while retaining accountable control
A hierarchy fits a decomposable goal with nested scope. A parent assigns bounded tasks, integrates results and holds responsibility for unresolved conflicts. This reduces the number of relationships each worker must track. Horling and Lesser’s survey describes hierarchies among several organisational paradigms and notes that organisational design can materially affect system performance.4
The break condition is a manager whose context, judgement or throughput becomes the system’s limiting resource. A hierarchy can also erase local information when every observation is compressed upward. The coordinator must receive decision-sufficient evidence, not every token, and its authority must be narrower than its conversational visibility.
Market: allocate substitutable work under private differences
A market fits when several agents could perform a task, their capabilities or costs differ, assignments can change, and delivered work is verifiable. Smith’s Contract Net Protocol was an early high-level protocol for distributing problem-solving tasks through announcements, bids and awards.3 The mechanism is useful because bids can reveal local information that a central scheduler does not possess.
The break condition is an outcome that cannot be verified, or an assignment with large externalities on other tasks. If every bidder has the same model, tool access and cost, bidding may reveal only sampling noise. Markets allocate; they do not automatically create truth, shared intent or legitimate authority.
Debate: preserve contest until an adjudicator can discriminate
Debate fits a decision with rival explanations, evidence that can be partitioned or independently inspected, and an adjudication rule that can recognise a better argument. Multi-agent debate has improved reasoning and factuality on some evaluated tasks.9 That evidence supports debate as a conditional mechanism, not a universal upgrade.
The break condition is correlated evidence, persuasive conformity or an evaluator weaker than the dispute. A later study of five popular multi-agent frameworks across more than 150 tasks identified failures in system design, inter-agent alignment, verification and termination, with gains often limited relative to simpler baselines.10 A debate protocol must protect independence before communication, reveal sources and allow “no decision” when the judge cannot discriminate.
Swarm: aggregate local rules without global deliberation
A swarm fits many similar units acting from local observations under a simple aggregate objective. Reynolds showed how local behavioural rules could generate flock-like global motion, while later control work analysed conditions under which nearest-neighbour interactions converge.67 The engineering lesson is narrow: global coordination can emerge without a central planner when the local rule and connectivity assumptions are right.
The break condition is a need for globally consistent mutable state, semantic adjudication or irreversible local actions. A swarm of language agents sharing free-form messages is not automatically analogous to a flock. The agents are richer, the messages can carry adversarial instructions, and the global objective may be underspecified.
| Topology | Dependency it manages | Information assumption | Authority pattern | Break condition |
|---|---|---|---|---|
| Pipeline | Stable precedence and producer-consumer hand-offs | Stages can validate typed inputs | Usually concentrated at final commit | Frequent backflow, hidden shared state or non-idempotent replay |
| Hierarchy | Nested decomposition and conflict integration | Parents receive sufficient summaries and exceptions | Scoped delegation with accountable escalation | Manager bottleneck, context compression or unchecked central error |
| Market | Dynamic task allocation among substitutable providers | Bids reveal capability, cost or availability | Award grants bounded task capability, not general power | Unverifiable output, common externalities or meaningless bids |
| Debate | Epistemic conflict among rival claims | Some evidence or reasoning remains independent | Debaters propose; a separate rule or judge decides | Shared error, conformity, persuasion bias or weak adjudication |
| Swarm | Local coordination toward a simple aggregate objective | Local signals are sufficient and connectivity persists | Distributed, narrow and usually reversible | Global semantic state, irreversible acts or adversarial message spread |
Decision takeaway: “more connected” is a cost and fault-spread claim before it is an intelligence claim.
Decision takeaway: do not infer execution rights from conversational centrality or expertise.
Compile from two graphs
A useful compiler does not pretend to discover a mathematically optimal organisation from a few sliders. Its job is narrower. It converts explicit task and authority assumptions into a ranked design, exposes contradictions and generates tests. The output is a hypothesis for a configured system, not a verdict.
Step 1: type the dependencies
For each edge in GD, record its kind, strength and timing. A hard predecessor blocks execution. A soft predecessor improves quality but can be skipped under a deadline. A shared resource needs arbitration. A mutual constraint needs iterative reconciliation. An epistemic conflict needs protected independence followed by adjudication.
This is where many agent designs fail. They decompose a goal into nouns such as “planner”, “researcher” and “reviewer”, then connect the nouns conversationally. The compiler instead asks what makes one work unit valid or invalid. Roles are assigned after dependencies, because roles do not create the dependency they are meant to manage.
Step 2: type authority separately
For each role or service in GA, record the subject, purpose, resource, action type, limits, expiry and revocation path. Distinguish proposal from permission. Distinguish a decision receipt from an effect receipt. Distinguish an agent’s belief that an action succeeded from a readback by an authoritative system.
Irreversibility changes the design. A research summary can be regenerated. A public filing, payment or access revocation may not be cheaply reversed. As irreversibility rises, execution should pass through fewer, more deterministic authority edges, with idempotency, explicit confirmation and independent outcome verification.
Step 3: score candidate contracts by mismatch
Let a candidate topology be T. The compiler estimates five losses. Ddep is dependency distortion: required dependencies that the topology omits or artificial dependencies it invents. Dauth is authority leakage: rights available outside the declared authority graph. Cmsg is communication cost. Rcorr is correlated-failure exposure. Rrec is recovery difficulty after interruption.
Lower is better. The weights make authority leakage more expensive than message cost. That is a policy choice, not a universal constant. The equation is valid only when assessors use a common ordinal scale and agree on the relative weights. Remove that assumption and the arithmetic should be treated as a discussion aid, not a ranking.
Consider a synthetic reimbursement case with parallel evidence collection, one contested rule interpretation, a typed calculation and an irreversible payment. Assess each loss from 0, no material mismatch, to 4, severe mismatch. The table uses the formula above.
| Candidate | Ddep | Dauth | Cmsg | Rcorr | Rrec | J(T) |
|---|---|---|---|---|---|---|
| Pipeline only | 1 | 1 | 1 | 2 | 1 | 14 |
| Hierarchy only | 1 | 1 | 2 | 2 | 1 | 15 |
| Market only | 3 | 3 | 2 | 1 | 3 | 31 |
| Debate only | 2 | 2 | 3 | 1 | 2 | 23 |
| Swarm only | 4 | 4 | 4 | 3 | 4 | 46 |
| Compiled hybrid | 0 | 0 | 2 | 1 | 1 | 6 |
The hybrid uses parallel evidence workers, a short pipeline for typed transformations, a bounded debate at the rule conflict, and a separate authority gate for payment. Its score is not evidence that it will outperform every implementation. It reveals why no single topology manages all the dependencies without distortion.
Step 4: compile overlays rather than a single label
A practical compiler emits layers. The work layer may be a pipeline or hierarchy. The allocation layer may be a market. The epistemic layer may invoke debate only for a contested node. The execution layer may be a deterministic authority kernel. The recovery layer specifies checkpoints, receipts and compensation.
This decomposition prevents a common category error. A market can select a specialist without granting the specialist payment authority. A debate can challenge an interpretation without becoming the execution path. A hierarchy can own escalation without seeing unrestricted customer data. A hybrid is disciplined when each overlay manages a named dependency; it is not a licence to combine every pattern.
Decision takeaway: label edge types, rather than only task order, or the topology compiler has nothing causal to preserve.
Three evidence workers read separate authoritative sources: the submitted claim, the policy version valid at the event time and account history. Their outputs are typed facts with provenance. An eligibility analyst and an amount calculator consume only the fields they need. A risk screen operates independently.
If the eligibility analyst flags a contested clause, the coordinator spawns two interpretation paths with source separation. An adjudicator receives claims, cited clauses and explicit assumptions, not a merged conversation transcript. The winning interpretation and amount become a proposal. A policy service checks identity, purpose, amount limit, approval and freshness before issuing an idempotent payment request. A separate readback verifies the ledger state.
The design is a hierarchy for decomposition, parallel fan-out for evidence, a short pipeline for transformations, conditional debate for a dispute and a deterministic gate for authority. No swarm or market is justified in this case. That absence is part of the design.
Decision takeaway: a good hybrid is sparse in purpose, rather than only complicated in appearance.
Executable lab: task-to-topology compiler
Move the task properties. The browser ranks five topology contracts and emits an authority warning. The scores are design heuristics, not empirical performance estimates.
Ranked fit
Decision takeaway: a positive result permits a bounded pilot and comparison test, not a production claim.
Run the extended compiler as code
The Python version below uses only the standard library. It adds shared-state coupling and output verifiability to the browser instrument, so its scores are deliberately more discriminating. Save it as topology_compiler.py and run python topology_compiler.py. Edit the sample profile or import compile_topology into a design notebook.
from __future__ import annotations
from dataclasses import dataclass
from enum import Enum
from typing import Dict, List, Tuple
class Topology(str, Enum):
PIPELINE = "pipeline"
HIERARCHY = "hierarchy"
MARKET = "market"
DEBATE = "debate"
SWARM = "swarm"
@dataclass(frozen=True)
class TaskProfile:
"""All fields use an ordinal 0..4 scale."""
serial_dependency: int
decomposability: int
allocation_uncertainty: int
contestability: int
locality_and_scale: int
capability_heterogeneity: int
independent_evidence: int
irreversibility: int
shared_state_coupling: int
output_verifiability: int
def validate(self) -> None:
for name, value in self.__dict__.items():
if not 0 <= value <= 4:
raise ValueError(f"{name} must be between 0 and 4")
def clamp(value: float) -> float:
return max(0.0, min(100.0, value))
def compile_topology(profile: TaskProfile) -> Tuple[List[Tuple[Topology, float]], List[str]]:
"""Rank topology fit and emit invariant or break-condition warnings.
The score is a design prior. It is not a forecast of task accuracy.
"""
profile.validate()
p = profile
scores: Dict[Topology, float] = {
Topology.PIPELINE: clamp(
18 * p.serial_dependency
+ 6 * p.output_verifiability
- 9 * p.contestability
- 8 * p.shared_state_coupling
),
Topology.HIERARCHY: clamp(
15 * p.decomposability
+ 7 * p.irreversibility
+ 5 * p.shared_state_coupling
- 4 * p.locality_and_scale
),
Topology.MARKET: clamp(
14 * p.allocation_uncertainty
+ 11 * p.capability_heterogeneity
+ 8 * p.output_verifiability
- 9 * p.shared_state_coupling
- 6 * p.irreversibility
),
Topology.DEBATE: clamp(
17 * p.contestability
+ 13 * p.independent_evidence
+ 4 * p.output_verifiability
- 8 * p.serial_dependency
),
Topology.SWARM: clamp(
17 * p.locality_and_scale
+ 6 * (4 - p.shared_state_coupling)
- 12 * p.irreversibility
- 5 * p.serial_dependency
),
}
warnings: List[str] = []
if p.irreversibility >= 3:
warnings.append(
"Invariant: keep irreversible execution behind one typed authority gate "
"with idempotency and independent readback."
)
if p.contestability >= 3 and p.independent_evidence < 2:
warnings.append(
"Debate break condition: agents lack sufficiently independent evidence."
)
if p.allocation_uncertainty >= 3 and (
p.capability_heterogeneity < 2 or p.output_verifiability < 2
):
warnings.append(
"Market break condition: bids are not informative or deliverables are hard to verify."
)
if p.locality_and_scale >= 3 and (
p.irreversibility >= 2 or p.shared_state_coupling >= 2
):
warnings.append(
"Swarm break condition: local action is too irreversible or globally coupled."
)
if p.serial_dependency >= 3 and p.contestability >= 3:
warnings.append(
"Hybrid indicated: use a pipeline for evidence flow and debate only at contested nodes."
)
ranked = sorted(scores.items(), key=lambda item: item[1], reverse=True)
return ranked, warnings
if __name__ == "__main__":
reimbursement = TaskProfile(
serial_dependency=2,
decomposability=3,
allocation_uncertainty=1,
contestability=3,
locality_and_scale=1,
capability_heterogeneity=2,
independent_evidence=3,
irreversibility=4,
shared_state_coupling=3,
output_verifiability=4,
)
ranking, warnings = compile_topology(reimbursement)
print("Ranked coordination layers:")
for topology, score in ranking:
print(f" {topology.value:10s} {score:5.1f}")
print("\nDesign warnings:")
for warning in warnings:
print(f" - {warning}")
A positive result means the stated task properties make a topology plausible enough to prototype and compare. A negative result means the topology lacks an enabling condition or violates an invariant. It does not mean multi-agent work is impossible; it may mean the task should remain with one agent and tools, be decomposed differently, or use a hybrid.
The compiler cannot establish model competence, empirical superiority, regulatory compliance or safe operation. It also cannot infer the true task graph from a vague prompt. Its value is to make the designer state assumptions that a benchmark can later challenge.
How to obtain the graphs before compiling
Begin with a single completed case, not a list of imagined agent roles. Record each input, transformation, decision, external effect and verification. Draw an edge only when changing the upstream item could change what the downstream step should do. Then classify the edge: hard predecessor, shared state, resource contention, epistemic conflict, allocation signal or effect authority. This prevents conversational habit from masquerading as task structure.
Next, run two counterfactuals. Remove the edge and ask whether correctness, timeliness or recoverability changes. Reverse the edge and ask whether the apparent dependency was merely an implementation choice. Edges that survive both questions belong in the task model. Finally, identify every operation that creates an irreversible or regulated effect. Those operations enter the authority graph even when no model participates. The compiler should optimise communication only after the non-negotiable authority boundary is fixed.
Optional depth: a minimal typed input schema
{
"task_id": "reimbursement_assessment",
"dependency_edges": [
{"from": "policy_fact", "to": "eligibility", "kind": "hard_predecessor"},
{"from": "claim_fact", "to": "amount", "kind": "producer_consumer"},
{"from": "interpretation_a", "to": "adjudication", "kind": "epistemic_conflict"}
],
"authority_edges": [
{"subject": "case_coordinator", "action": "propose_payment", "limit": 100000},
{"subject": "policy_kernel", "action": "execute_payment", "requires": ["approval", "freshness", "idempotency_key"]}
],
"task_profile": {
"serial_dependency": 2,
"decomposability": 3,
"contestability": 3,
"independent_evidence": 3,
"irreversibility": 4
}
}
stateDiagram-v2 [*] --> Claim state "Draw the task graph before the<br/>chat graph" as Claim state "Pipeline: preserve precedence<br/>and typed hand-offs" as Test state "Hierarchy: decompose work<br/>while retaining accountable<br/>control" as Revision Claim --> Test: expose mechanism Test --> Decision: evidence survives Test --> Revision: rival survives Revision --> Claim: narrow or rebuild Decision --> [*]
Test the seams under pressure
A topology is not validated because the happy path completes. The revealing tests change the property that justified the topology. Remove independent evidence from debate. Equalise bidder capabilities in a market. Increase the number of peers in a mesh. Interrupt a pipeline after an external effect but before its receipt. Compromise the most central node in a hierarchy.
Failure is transmitted along edges
Recent work on multi-agent systems has made the cost of unnecessary edges visible. AgentPrune reported large reductions in token use while retaining comparable performance in its evaluated benchmarks by pruning redundant communication.11 G-Designer found that different tasks benefited from different communication graphs and that simple tasks could use much smaller structures.12 These results are benchmark-specific, but they support a general design caution: a communication edge should earn its place.
Edges also carry attacks and social influence. Research on the security of interacting agents identifies risks such as collusion, privacy propagation and coordinated attacks across networks.14 A compromised agent in a mesh can expose every peer. A compromised leaf behind typed interfaces may expose one bounded task. The security difference is structural.
Three agents assess whether a policy clause applies. They are prompted as an advocate, a sceptic and a judge. All three retrieve the same machine-generated summary, which omits an exception. They disagree about phrasing but share the missing fact. After two rounds, the judge reports “high confidence because all perspectives converged”.
The failure is not lack of debate turns. It is lack of evidence independence and source readback. Add a fourth agent with the same summary and confidence may rise further. The repair is to separate retrieval paths, require clause-level citations, hide initial answers until commitments are recorded and give the judge authority to abstain. More voices are not the mechanism.
Decision takeaway: evaluate blast radius per edge, not only normal-path collaboration quality.
Interrupt the system where certainty is weakest
Suppose the authority gate submits a payment request. The external system commits it, but the network times out before the effect receipt returns. The agent sees an unknown outcome. A naive pipeline retries and pays twice. A chat transcript saying “I think the tool failed” is not world state.
The recovery topology needs an idempotency key, a durable intent record, a decision receipt, an effect receipt and an independent readback. On timeout, the system enters an unknown-outcome state and queries the authoritative ledger before retrying. This pattern belongs to topology because it determines how control and evidence reconnect after interruption.
Decision takeaway: topology selection is incomplete until interruption and resumption paths are designed.
The topology congruence experiment
Under matched models, tools, agent count and inference budget, a topology that matches the task and authority graphs will outperform a denser but incongruent topology on the joint frontier of task success, invalid actions, fault spread, cost and recovery time.
Test five synthetic task families. Use a serial transformation, a divisible allocation problem, a contested evidence judgement, a local search problem and a decomposable hierarchical plan. For every task instance, randomise pipeline, hierarchy, market, debate, swarm and a compiler-produced hybrid. Keep base prompts, models, tools and total token budget fixed. Separate initial private work from communication so independence can be measured.
Inject one fault per run: stale evidence, a compromised message, a missing predecessor result, an agent timeout or a revoked capability. Measure correct completion, calibrated abstention, token and tool cost, invalid effect attempts, time to recovery, fault reach and the fraction of initially distinct hypotheses that survive until adjudication.
The hypothesis strengthens if congruent topologies produce a better Pareto frontier and if specific mismatches predict specific failures. It weakens if one simple topology dominates after budget control, or if task features do not predict outcomes. A rival explanation is prompt or role quality rather than topology. Control it with identical role-neutral workers, typed interfaces and topology-only rewiring. Another rival is that learned graph search discovers latent task features better than the hand-coded compiler.
| Observation | Supports | Also explained by | Decision consequence |
|---|---|---|---|
| Pipeline wins on serial transformation with low rework | Dependency congruence | Better prompt order or lower context noise | Retain pipeline; test predecessor fault handling |
| Debate wins only with source-separated evidence | Independence is causal | Extra test-time compute | Budget-match and preserve private commitments |
| Market gain vanishes when bidders are identical | Private capability signal matters | Random assignment variance | Remove auction when bids carry no information |
| Dense mesh raises consensus but not accuracy | Correlation and convergence pressure | Weak evaluator or excessive context | Prune edges; compare independent aggregation |
| Compiler hybrid loses to one fixed topology everywhere | Weakens the proposed framework | Bad weights or mislabelled task graphs | Revise or retire the compiler rather than defend it |
The strongest alternative: learn the graph
Hand-designed rules may miss subtle interactions. AutoGen makes conversation patterns programmable,8 while more recent systems explicitly search or learn prompts and topologies. MASS jointly optimises prompts and workflow structure, and G-Designer generates task-adaptive communication graphs.1312 It is plausible that empirical search will beat a simple compiler on a stable benchmark.
That is not a reason to abandon causal structure. It changes the compiler’s role. Use the task graph as a prior, the authority graph as a hard constraint and learned search inside the remaining safe design space. The optimiser may add or remove communication edges. It may not grant a new subject the right to execute a payment because validation accuracy rose on a benchmark.
Dynamic tasks create another boundary. The dependency graph may change as evidence arrives. A topology can recompile its work and communication layers, but authority changes require a fresh policy decision. An agent that discovers a new subtask does not thereby acquire a new capability.
The compiler should not be applied when the task cannot yet be decomposed, success cannot be observed, or authority cannot be specified. In those cases, the honest output is an exploratory single agent with tools, a human-led investigation, or a research sandbox with no consequential effects.
sequenceDiagram participant Q as Question participant M as Mechanism participant E as Evidence participant D as Decision Q->>M: Opening case: five analysts and one payment button M->>E: Draw the task graph before the chat graph E-->>M: compare rival explanations E->>D: Compile topology from dependency and authority D-->>Q: revise scope or act
Compile topology from dependency and authority
Do not begin an agent design review by asking whether the team should use a supervisor, a swarm or a debate. Begin with two drawings. The first shows work units and typed dependencies. The second shows proposal, approval, execution, verification and recovery rights.
Then choose the smallest communication topology that preserves the required dependencies. Use a pipeline for stable precedence, a hierarchy for nested decomposition, a market for informative allocation, a debate for protected epistemic conflict and a swarm for local reversible coordination. Combine them only at boundaries where the causal demand changes.
Keep effect authority outside the conversational topology. An agent’s position in the communication graph should not determine what it may do. Irreversible actions require explicit capability, policy freshness, idempotency, receipts and readback.
Finally, test the design by removing the property that justified it. If debate survives without independent evidence, the test is weak. If a market still appears valuable when bids contain no private information, the score is measuring ceremony. If a fifty-agent mesh cannot outperform independent sampling under a matched budget, prune it.
The practical decision is simple: compile topology from dependency and authority, not from enthusiasm for agents. When neither graph requires multiple autonomous parties, use one agent with tools.
Glossary
- Authority graph
- A typed representation of who may propose, approve, execute, verify, revoke or compensate an action.
- Communication graph
- The directed message paths through which agents exchange information during a run.
- Dependency distortion
- The loss created when a topology omits a real dependency or invents a dependency the task does not contain.
- Epistemic conflict
- A dependency in which rival claims must remain distinguishable until evidence or adjudication can discriminate.
- Effect receipt
- Authoritative evidence that an external action occurred, distinct from the decision to attempt it.
- Task dependency graph
- A graph of work units connected by typed causal relationships such as precedence, shared resources or mutual constraints.
- Topology congruence
- The proposed degree to which a coordination pattern matches the task dependencies and authority boundaries it must manage.
References
- Malone, T. W. and Crowston, K. (1994). The interdisciplinary study of coordination. ACM Computing Surveys, 26(1), 87-119.
- Decker, K. S. and Lesser, V. R. (1995). Designing a family of coordination algorithms. Proceedings of the First International Conference on Multiagent Systems.
- Smith, R. G. (1980). The Contract Net Protocol: high-level communication and control in a distributed problem solver. IEEE Transactions on Computers, C-29(12), 1104-1113.
- Horling, B. and Lesser, V. (2004). A survey of multi-agent organizational paradigms. The Knowledge Engineering Review, 19(4), 281-316.
- Bernstein, D. S., Givan, R., Immerman, N. and Zilberstein, S. (2002). The complexity of decentralized control of Markov decision processes. Mathematics of Operations Research, 27(4), 819-840.
- Reynolds, C. W. (1987). Flocks, herds and schools: a distributed behavioral model. Computer Graphics, 21(4), 25-34.
- Jadbabaie, A., Lin, J. and Morse, A. S. (2003). Coordination of groups of mobile autonomous agents using nearest neighbor rules. IEEE Transactions on Automatic Control, 48(6), 988-1001.
- Wu, Q. et al. (2024). AutoGen: enabling next-generation LLM applications via multi-agent conversation. Conference on Language Modeling.
- Du, Y., Li, S., Torralba, A., Tenenbaum, J. B. and Mordatch, I. (2024). Improving factuality and reasoning in language models through multiagent debate. International Conference on Machine Learning.
- Cemri, M. et al. (2025). Why do multi-agent LLM systems fail? arXiv:2503.13657.
- Zhang, G. et al. (2025). Cut the Crap: an economical communication pipeline for LLM-based multi-agent systems. International Conference on Learning Representations.
- Zhang, Y. et al. (2025). G-Designer: architecting multi-agent communication topologies via graph neural networks. arXiv:2410.11782.
- Zhou, H. et al. (2026). Multi-Agent Design: optimizing agents with better prompts and topologies. International Conference on Learning Representations.
- Schroeder de Witt, C. et al. (2026). Open challenges in multi-agent security: towards secure systems of interacting AI agents. arXiv:2505.02077.