AI Research Library

Learning Dynamic and Trust-Aware Topology

Rajesh Ranjan Mahapatra

A multi-agent graph should change only when a replayable router can show that a task-specific evidence edge is worth more than its cost and correlated-error risk, while authority remains fixed.

© 2026 Rajesh Ranjan Mahapatra. 33 min read

Learning Dynamic and Trust-Aware Topology

A multi-agent graph should change only when a replayable router can show that a task-specific evidence edge is worth more than its cost and correlated-error risk, while authority remains fixed.

TLDR

  1. Static topology assumes the same agents should talk for every task and phase. That only holds when competence, dependencies and failure correlations stay stable.
  2. A useful router selects sparse message edges from task-conditioned reliability, uncertainty, complementarity and communication cost, then learns from attributable outcomes.
  3. Trust is a calibrated prediction about one agent on one task phase. It is not personality, self-confidence, popularity or a permanent global reputation.
  4. Dynamic routing breaks when outcomes are missing, identities drift silently, errors are strongly shared, or online exploration can cause irreversible harm.
  5. Keep authority fixed, route only evidence, record every candidate and score, and require equal-budget gains over single-agent and static baselines before release.

The case of the expert who should stop talking

A case-review system has five analytical agents. Atlas is excellent at extracting facts from messy documents. Numeral is the strongest calculator. Sceptic finds contradictions. Generalist is competent across all three jobs. Rhetor sounds decisive but has the weakest outcome record. None can execute an action. Their outputs go to a deterministic policy service and then, where required, a named human reviewer.

The obvious architecture is a stable supervisor with all five agents beneath it. Every case goes to every agent, every answer returns to the supervisor, and the supervisor decides which messages to pass into the next round. The diagram is easy to explain. It is also wrong in a particular way. During document extraction, Numeral adds little. During calculation, Atlas is mostly a spectator. During challenge, Rhetor's fluency can amplify the wrong answer. The system pays for all five voices and gives each voice an opportunity to influence the result, even when the current phase does not need it.

Now let the communication graph change. In extraction, Atlas proposes and Sceptic checks. In calculation, Numeral leads while Generalist and Sceptic inspect assumptions. In challenge, Sceptic receives the strongest independent alternatives. If Numeral's calculator tool changes and its accuracy falls, the route gradually shifts. The graph is no longer a picture of organisational roles. It is a sequence of decisions about whose information is useful now.

This sounds like an uncomplicated improvement until the system starts calling the routing score “trust”. A global score lets yesterday's success in extraction dominate tomorrow's calculation. Self-reported confidence rewards Rhetor. Early random wins create a monopoly. A learned router can become less inspectable than the fixed mesh it replaces.

The core answer is to learn a sparse collaboration graph as a contextual decision policy, while holding the authority graph constant. An edge is admitted because its expected information value, for this task and phase, exceeds its cost and shared-error risk. The decision is logged with enough state to replay it. No communication edge grants permission, no reputation survives an unversioned model change, and no claimed gain is accepted without an equal-budget baseline.

Part one

A topology is a policy, not a diagram

A communication topology is often drawn as if it were physical infrastructure: a star, chain, hierarchy, ring or mesh. That view is useful when the connections are genuinely fixed. It hides the more important fact that an edge is a decision. Agent j is allowed to send some message to agent i, at a particular point, because the designer expects that message to improve the receiving agent's next decision.

Classical multi-agent work made task allocation and selective communication explicit long before language models. The Contract Net Protocol treated assignment as a call, bid and award rather than permanent peer-to-peer access.[12] Learned communication research later asked when and with whom an agent should communicate. Modern language-agent systems inherit the same burden, but their messages are larger, their competence is harder to measure, and their verbal confidence can be mistaken for evidence.

Recent systems move beyond manually fixed graphs in several different ways. DyLAN selects teams and allows query-dependent collaboration. GPTSwarm represents agent operations and information flow as optimisable graphs. Sparse debate experiments show that all-to-all communication is not automatically best, while AgentPrune removes redundant edges from a spatial-temporal message graph. DynaSwarm chooses a graph for each input. DyTopo reconstructs a directed graph in each round by matching an agent's stated need to another's offer. DySCo combines reliability, divergence, relevance and cost under a sparse communication budget.[1][2][3][4][5][6][7]

These results establish an important possibility, not a universal prescription. Most evidence comes from bounded reasoning, coding or question-answering benchmarks. A graph selector can overfit its benchmark, reward extra computation, or exploit a routing proxy that disappears under distribution shift. The correct question is therefore not “are dynamic graphs better?” It is “what causal condition would make a changing graph better than a fixed one?”

Which graph is actually moving?

A compound agent system contains several graphs that are easy to collapse into one drawing. An assignment graph determines which agents are instantiated for a case. A communication graph determines which directed messages may be sent during a round. An aggregation graph determines which outputs can influence the synthesis. An authority graph determines who may invoke a tool or create an external effect. These graphs can share nodes while obeying different rules.

This article uses dynamic topology in a deliberately narrow sense: a router chooses directed, typed evidence edges among already registered analytical identities. The node catalogue, tool grants and approval rights remain outside the learning loop. The policy may choose Atlas to send extracted facts to Numeral, suppress Rhetor's redundant commentary, or add Sceptic as an independent check. It may not create a new identity, widen a data entitlement or turn a message recipient into an approver.

The distinction matters experimentally. A system that activates a better specialist has demonstrated task allocation. A system that gives one method five attempts and another three has demonstrated extra sampling. A system that changes the final voting rule has demonstrated aggregation. A topology result becomes interpretable only when the changing object is named and the other graphs are held constant.

Figure 1. Runtime topology is a closed-loop control policy

Fixed authority graph: identities, tool permissions, action caps and approval rights do not expand when the collaboration graph changes.
Practitioner synthesis. The upper loop is adaptive and probabilistic. The lower authority plane is deterministic and separately governed.

When movement earns its cost

Three conditions create a genuine opportunity for dynamic routing. First, agents must have heterogeneous competence. The best agent for one task or phase must not be the best for all of them. Second, the task must expose a changing dependency structure. Early work may need extraction, middle work calculation, and late work adversarial checking. Third, the system must receive enough outcome evidence to distinguish useful routing from persuasive routing.

If any condition is absent, a simpler baseline deserves priority. A single strong agent may be best when work is short and tightly coupled. A fixed panel may be best when the same specialists are always needed. A deterministic workflow may be best when the next step is already known. A full panel may be justified when the pool is small, failures are sufficiently independent, and missing one voice costs more than extra communication.

Published evidence: work on input-dependent influence describes multi-agent deliberation as a mixture of experts whose useful weighting varies by input.[8]

Decision boundary: that mechanism predicts a routing gain only when competence actually varies with the input. The homogeneous-agent experiment later in this article is the required negative control.

The counterfactual test for movement

Imagine replaying the same case twice. In the first world, a fixed equal-budget panel receives every phase. In the second, the router may change edges but uses the same agents, prompts, tools, aggregation rule and total calls. Dynamic topology has earned its name only when the second world selects a different information path because the task state changed, and that path improves a preregistered outcome.

The required signal is an interaction, not a high average score. Agent ranking must reverse across task families or phases, or the value of a sender must depend on what the receiver already knows. Without that interaction, a static specialist panel can capture the same competence more simply. Before training a router, estimate the task-by-agent and sender-by-receiver matrices. If their ordering is stable within uncertainty, stop and keep the graph fixed.

Figure 2. The signature figure: one case, three trust-aware graphs

Evolving trust graph Three panels show different directed communication edges among Atlas, Numeral, Sceptic, Generalist and Rhetor as the task moves from extraction to calculation to challenge. 1 · Extract facts 2 · Calculate 3 · Challenge Atlas Numeral Sceptic Generalist Rhetor Atlas Numeral Sceptic Generalist Rhetor Atlas Numeral Sceptic Generalist Rhetor Thick line: selected high-value edge · Dashed line: exploration or weak candidate Node border: current task-phase reliability, not permanent reputation
Illustrative topology. The graph changes because the task phase and expected value of information change. The figure does not claim measured performance for these named synthetic agents.
Part two
The argument in one passChart · flow
flowchart TD
  A["The case of the expert who<br/>should stop talking"] --> B["A topology is a policy, not a<br/>diagram"]
  B --> C["Trust belongs to a task, a<br/>phase and a version"]
  C --> D["A routing laboratory that is<br/>allowed to lose"]
  D -. "re-test" .-> A
  classDef first fill:#0a1424,stroke:#5B5CF6,stroke-width:2px,color:#e6f3ff
  classDef step fill:#0a1424,stroke:#3f7da0,stroke-width:1px,color:#e6f3ff
  class A first
  class B,C,D step
A structural route through Learning Dynamic and Trust-Aware Topology, from The case of the expert who should stop… to Let the graph move only when the…. Reading use: follow the relation, then test it against the surrounding evidence and limits.

Trust belongs to a task, a phase and a version

The word trust is dangerous because it compresses several different questions. Is the agent usually correct? Does it know when it is uncertain? Does it contribute a distinct error check? Does it preserve evidence? Is its current identity the same model, prompt, tool set and retrieval policy that earned the score? Can it be permitted to act? Only the first four belong in a collaboration router. The last is authority and must be decided elsewhere.

A useful trust estimate is a posterior prediction, not a character judgement. Write it as T(agent, task family, phase, version, horizon). Atlas may be highly reliable for extraction under prompt version 7, merely adequate for challenge, and unknown after its OCR tool changes. A single number erases exactly the structure the router needs.

A score must remember how it was earned

For a binary verified outcome, a simple starting point is a Beta posterior. Give each agent-phase-version cell prior counts α and β. A verified success adds to α; a verified failure adds to β; the posterior mean is α divided by α plus β. The two counts preserve sample size, so nine successes from ten trials remain more uncertain than nine hundred from one thousand. The laboratory uses this mechanism because its assumptions are visible, not because binary accuracy is sufficient for every application.

Real routes usually need a vector rather than one outcome. A sender may be factually correct yet omit provenance, breach a latency objective, duplicate another agent's evidence or trigger avoidable review. Keep those observations separate until the routing decision defines their trade-off. Collapsing them too early allows a cheap, fluent agent to compensate for a severe evidence defect with many minor successes.

Every observation also belongs to an identity version. Model weights, system prompt, retrieval policy, tool implementation, decoding policy and data entitlement can each change behaviour. A new version should begin with a bounded prior or a quarantined transfer from the predecessor, never inherit certainty by name alone. Sparse task cells may borrow strength from a broader task-family prior, but the fallback must be visible in the receipt. Trust without lineage is stale evidence wearing a familiar label.

Figure 3. A trust tensor exposes rank reversals that one score hides

Synthetic probabilities used by the executable laboratory. Colour is redundant with the printed values. These are environment parameters, not empirical estimates about named models.

Thought experiment one: the confident specialist

Hold every property constant except verbal confidence. Two agents have the same observed accuracy and the same error correlation. One says “0.95” on nearly every answer; the other says “0.65”. A router that calls the first agent more trustworthy will concentrate traffic without receiving additional evidence. Now change only their calibration: the first remains at 0.95 while its accuracy falls to 0.55 on hard tasks, and the second's confidence tracks its outcomes. The global confidence ranking becomes actively harmful.

This is not merely a philosophical concern. Runtime calibration research reports that raw verbalised confidence can mis-rank agents under difficult tasks and distribution shift, while online correction from observed outcomes can improve selection.[9] The broader lesson is modest: self-report can be one feature, but it should not overwrite outcome evidence, uncertainty or version boundaries.

The value of an edge

Agent reliability alone still does not tell us whether one agent should message another. A second highly accurate agent may repeat the same reasoning and add no information. A less accurate but differently trained verifier may be more valuable when its errors are independent. The router therefore scores a directed edge, not merely a node.

Sj→i,t = wrLj,k,φ + wnNj→i,t + wdDij,t − wcCj→i − wgΓij,t

L is a conservative reliability estimate for sender j on task family k and phase φ. N is need-offer match. D is useful diversity. C is token, latency and operational cost. Γ is estimated shared-error or contamination risk. The weights are local design parameters and must be validated rather than copied.

The word “conservative” matters. A posterior mean of 0.9 based on ten outcomes is not equivalent to 0.9 based on ten thousand. An upper-confidence term can deliberately explore uncertain candidates; a lower-confidence term can protect high-consequence routes. Which one is appropriate depends on the action boundary. The laboratory uses an exploration bonus for read-only analytical routing and a decayed Beta estimate for recent performance.

Worked example: from node rank to edge choice

Suppose the current calculation phase requires an independent check of both arithmetic and assumptions. Use illustrative weights of 0.35 for reliability, 0.25 for need match, 0.20 for diversity, and 0.10 each for cost and shared-error risk. With the component values in Figure 4, the Numeral-to-Sceptic edge scores 0.57. An alternative Generalist-to-Sceptic edge with values 0.78, 0.74, 0.15, 0.18 and 0.44 scores 0.43. At a preregistered admission threshold of 0.50, the first message is selected and the second is not.

Now vary only one causal feature. If Numeral and Sceptic start using the same retrieved calculation note, shared-error risk rises from 0.18 to 0.75; if the message also expands to include a long transcript, cost rises from 0.29 to 0.60. The edge falls to 0.48 and is rejected. Numeral's node-level reliability has not changed. What changed is the expected marginal value of sending this particular message to this particular receiver. The calculation is synthetic, but it exposes the decision that an opaque global trust rank would hide.

Figure 4. Edge admission is a balance of value and debt

Illustrative decomposition, not measured values. Exposing components makes the route contestable and prevents one opaque “trust” number from carrying the whole decision.

Thought experiment two: the council of clones

Create five agents from the same model, prompt, context and decoding seed. Give them different names but no independent evidence. The task phase changes, yet their competence and failure modes do not. A dynamic router can save cost by selecting fewer clones, but it cannot manufacture complementary knowledge. If an experiment reports an accuracy gain here, the likely cause is unequal compute, random sampling, or a biased evaluator rather than topology learning.

Diversity raises the value of exploration, while shared error lowers the value of communication. Recent work finds that current language agents may probe peers myopically and that structured exploration becomes more valuable as agent diversity increases.[10] Exploration must therefore be designed. Without it, an early winner receives more traffic, collects more labels, and appears ever more certain. A small canary rate, a minimum-connectivity rule or an uncertainty bonus prevents the graph from freezing around an accidental champion.

The router learns from censored evidence

A deployed router observes outcomes mainly for the agents it selected. Unselected agents produce no counterfactual answer, so their competence remains uncertain. This is a feedback trap: an early winner receives more traffic, earns narrower confidence intervals, and wins again partly because the system knows it better. The resulting monopoly can look like learned trust even when another agent would now perform better.

Three controls serve different purposes. A small canary slot samples an uncertain agent on reversible work. A shadow route asks an unselected agent to answer without influencing the live result, creating comparison labels at additional cost. A message ablation removes one selected edge from a controlled fraction of cases to estimate marginal contribution. Propensity logging records the probability of each route so offline estimates can correct, imperfectly, for unequal exposure.

Exploration must have a budget, an expiry and a safety class. It should stop when the posterior is sufficiently precise, resume after drift or version change, and never use a consequential action as the experiment. Where independent labels are rare, the honest output is an unresolved trust cell and a static fallback, not a score inferred from agreement alone.

Figure 5. Where dynamic routing should and should not help

Dynamic routing opportunity map A two-dimensional map with competence heterogeneity on the horizontal axis and observable outcome feedback on the vertical axis. Dynamic routing is useful in the upper-right, a fixed panel in the lower-right, and a single agent or simple static system on the left. High shared-error correlation cuts into the useful region. Competence heterogeneity across tasks and phases → Timely, attributable outcome feedback → Single agent or fixed workflow Fixed specialist panel Dynamic trust-aware routing Only after equal-budget lift Shared-error correlation shrinks the useful region
Illustrative decision surface. It expresses the causal hypothesis tested by the laboratory, not a fitted empirical boundary.
Part three

A routing laboratory that is allowed to lose

The executable artefact isolates one claim: phase-conditioned outcome learning should outperform a fixed equal-budget panel when agent competence genuinely changes by phase. It is a synthetic binary task, not a simulation of language. That simplicity is deliberate. Natural-language explanations would make it harder to tell whether routing, prompting, judging or extra tokens caused the result.

The five agents use the competence table in Figure 3. Two latent groups receive occasional shared shocks, which creates correlated errors. Rhetor is overconfident. Each task belongs to extraction, calculation or challenge. After a small public calibration set, the dynamic router selects three agents using a decayed Beta posterior, an uncertainty bonus and a small diversity term. Four per cent of tasks include a canary exploration slot. Outcomes are then revealed and update only the selected agents.

Five methods are compared over thirty seeds. The fixed panel and dynamic router each use three calls per task. The confidence router also uses three. The full panel uses five. The single generalist uses one. Every method sees the same sampled tasks within a run. The reported intervals are 95 per cent confidence intervals across seeds, not uncertainty about real deployments.

What a fair topology comparison holds constant

A routing experiment can produce an impressive number by changing several mechanisms at once. The cases, model versions, prompts, retrieval results, tools, message schemas, synthesis rule and verifier must be shared across compared methods. Call count alone is insufficient because one call can contain ten times the context of another. Report input and output tokens, wall-clock latency, tool invocations, retries and reviewer effort as separate denominators.

The baseline ladder should start below and above the proposed mechanism: a single strong agent, the best deterministic workflow, self-consistency at the same inference budget, a fixed specialist panel, a confidence-based router, a learned router and, where affordable, a full panel. The learned router must pay for its own scoring, state access and exploration. If a simpler baseline reaches the same lower confidence bound, the extra moving parts have not earned release.

Accuracy also misses the mechanism's own failure modes. Measure route entropy, specialist starvation, calibration error, residual error correlation, message duplication, privacy exposure, time to detect drift and time to recover. Slice every result by task family, phase, difficulty and version. A global average can conceal the exact rank reversals that justify the router, or conceal a protected subgroup on which exploration is consistently worse.

Figure 6. Synthetic positive case and negative control

Routing laboratory results Bars compare five routing methods. In the heterogeneous positive case, the dynamic router reaches 85.39 percent accuracy with three calls. In the homogeneous negative control, dynamic and fixed panels are nearly equal. 70% 75% 80% 85% 90% 74.4574.45 81.6783.41 82.9783.41 83.1088.35 85.3983.56 SingleFixed 3Confidence 3Full 5Dynamic 3 Phase-specific competence Homogeneous control
Synthetic measured output from the supplied Python artefact: thirty random seeds, 4,000 tasks per seed, eighty calibration observations per phase. Error bars are omitted from the drawing for legibility and reported in the table below.
MethodCallsPhase-specific caseHomogeneous controlInterpretation
Single generalist174.45% ± 0.22 pp74.45% ± 0.22 ppCheap, but cannot exploit specialisation.
Fixed panel381.67% ± 0.27 pp83.41% ± 0.23 ppStrong when the same members remain useful.
Confidence router382.97% ± 0.19 pp83.32% ± 0.20 ppHelped by specialisation, exposed to confidence bias.
Full panel583.10% ± 0.17 pp88.35% ± 0.20 ppMore votes help the homogeneous control, at higher cost.
Dynamic router385.39% ± 0.22 pp83.56% ± 0.22 ppWins only where task-conditioned competence exists.

In the positive case, the dynamic router improves on the fixed equal-call panel by 3.72 percentage points and on the five-call full panel by 2.29 points. That is the intended positive result. It does not establish that learned topology beats a larger language model, a better prompt, self-consistency, a tool call or a domain-specific deterministic method. Those are additional baselines for a real system.

Read the result as an interaction, not a leaderboard

The decisive observation is not that 85.39 is the largest number in one column. It is that the dynamic router's advantage appears when phase-specific competence exists and disappears when that structure is removed. The comparison asks whether topology responds to heterogeneity, not whether one synthetic method can be tuned to win every environment.

The full panel reinforces the point. It dominates the homogeneous control because five partly noisy votes beat three, yet it loses in the phase-specific case because weak or correlated voices can dilute specialists. Dynamic routing is useful here as a budgeted selector. It is not a general law that fewer agents are more accurate.

The serious negative control

Set every agent's true competence to 0.78 in every phase while preserving confidence bias and group shocks. The dynamic router reaches 83.56 per cent and the fixed panel 83.41 per cent. Their intervals overlap. The routing mechanism has no meaningful phase-specific advantage when the causal condition has been removed. The five-agent panel performs better because it buys two additional votes, not because its topology is smarter.

This control prevents a common mistake: comparing a dynamic system with more calls, more rounds or better-selected prompts against an underfunded fixed baseline. Any topology claim should report task success, calls, messages, tokens, latency, verifier cost and human review together. The graph is one term in a compute portfolio.

Worked example: competence drift

Halfway through a second synthetic run, Numeral's calculation competence falls from 0.92 to 0.57, while Atlas receives an improved calculator and rises from 0.63 to 0.86. The router discounts old observations by one per cent on each selected update. Across thirty seeds, Numeral appears on 100 per cent of calculation routes before the change and 25.2 per cent afterwards. Atlas moves from 5.7 to 75.4 per cent. Overall dynamic accuracy is 84.58 per cent, compared with 80.89 for the fixed panel.

The example exposes both the value and the danger of recency. A short memory adapts quickly but can chase noise. A long memory is stable but preserves obsolete competence. The retention factor is therefore a recovery objective, not a decorative hyperparameter. It should be chosen from the maximum acceptable time to detect a degraded agent.

Recovery is a release objective

Decay by itself does not guarantee recovery. Because the router samples the current winner more often, it can notice that winner's degradation quickly while learning slowly about a neglected replacement. A practical design combines recency weighting with shadow evidence, a minimum sample floor and an explicit change alarm. When the alarm fires, the system widens exploration or returns to a known fixed panel until new evidence is sufficient.

State the objective in operational terms: for example, detect a ten-point competence fall within a bounded number of labelled cases and restore the target outcome rate within another bound. Test false alarms as seriously as missed drift. Frequent unnecessary resets erase useful evidence and turn the router into expensive random selection.

Figure 7. The route changes after competence changes

Calculation route share before and after drift Before drift Numeral is selected for all calculation tasks and Atlas for 5.7 percent. After drift Numeral falls to 25.2 percent and Atlas rises to 75.4 percent. 0%25%50%75%100% 100.0%5.7%25.2%75.4%Before driftAfter drift NumeralAtlas
Synthetic measured selection frequency from the drift experiment. Selection shares can sum above 100 per cent because three agents are selected for each task.
Part four

A moving graph still needs a stable control plane

The research frontier often treats topology as an optimisation problem over accuracy and tokens. A consequential system needs a second question: what else changes when the graph changes? A message can carry untrusted instructions, private data, stale evidence or an implied request to act. If routing and authority share one graph, a learned edge can silently widen the system's reach.

Separate the collaboration graph from the authority graph. The collaboration graph controls evidence flow among analytical identities. It may change by task and round. The authority graph records which identity may call which tool, for what purpose, on which resources, under what cap and approval rule. It changes only through an explicit release process. This extends the distinction already developed in the adjacent article on computable blast radius, while narrowing the present paper to runtime evidence routing.

Figure 8. Two planes, one case

route_id: case-7 / round-2
phase: calculate
candidate_set: [Atlas, Numeral, Sceptic, Generalist, Rhetor]
selected: [Numeral, Sceptic, Generalist]
reason_codes: [phase_fit, independent_check, stable_generalist]
posterior_snapshot: model-v12 / prompt-p7 / tool-calc-v4
authority_delta: none
expires_after: round-2
Practitioner synthesis. The receipt is illustrative. A routing decision may change information flow, but its recorded authority delta must remain zero.

Worked production-shaped example

Consider a synthetic credit-review workflow. A document agent extracts covenant values. A calculation agent recomputes ratios. A policy agent retrieves the applicable rule version. A challenger searches for contradictory evidence. A drafting agent assembles a proposed memo. Each analytical output is read-only and cites its evidence. The final lending decision remains with an accountable human or separately authorised deterministic service.

The task graph changes by phase. Extraction routes document findings to the calculator and challenger. Calculation routes derived values to the policy agent. Draft review routes the proposed memo to the challenger, but does not reopen every raw document unless a contradiction demands it. The router may learn that one policy agent performs well on real-estate covenants and poorly on healthcare reimbursement cases. That evidence may change the collaboration edge. It cannot give the policy agent access to alter a limit, approve a facility or send a customer communication.

Every selected edge emits a routing receipt: task and phase; candidate set; score components; posterior version; exploration status; expected cost; privacy class; selected sender and receiver; message schema; expiry; and later outcome. The event stream must reconstruct the graph as it was, not as current scores would route the same case today. Otherwise the system cannot explain which information was available to which agent at the decision moment.

Inspectability is a runtime property

A diagram in a design document cannot explain a graph that changes per case. Inspectability comes from events. The router records the task features it was permitted to use, every eligible candidate, each score component, the selected edges, the policy and posterior versions, the message contract, the expiry condition and the later outcome. A reviewer should be able to reproduce the selection from that snapshot without consulting today's mutable state.

Replay does not require storing unrestricted prompts forever. Evidence identifiers, content hashes, typed fields, redacted excerpts and entitlement references can preserve the decision while reducing secondary leakage. The replay service must also be effect-free: it reconstructs the collaboration and its information state, but cannot resend a message, repeat a tool call or revive an expired permission. A replayable route is an evidential record, not a dormant command.

The four hard failure boundaries

First, absent outcomes. Open-ended research, creative work and long-horizon business cases may not produce timely ground truth. A router can then optimise judge preference, agreement or rhetorical style instead of correctness. External verification, delayed human labels or conservative static routing are safer than pretending consensus is an outcome.

Second, unidentifiable contribution. When agents revise after reading one another, final success does not reveal which edge caused it. Selected-only feedback also creates bandit bias. Counterfactual holdouts, message ablations, shadow routes and occasional independent attempts are needed to estimate contribution. The MAST failure taxonomy is a reminder that specification, inter-agent alignment, verification and termination all fail in different ways; one route score cannot absorb them.[11]

Third, correlated failure. Agents built from the same model, retrieval corpus or poisoned context may agree for the same wrong reason. Pairwise residual correlation and common-source provenance belong in the score. A minority agent with unique evidence may deserve a route even when its historical average is lower.

Fourth, unsafe exploration. A contextual bandit learns by trying uncertain options. That is acceptable for reversible, read-only analysis under bounded cost. It is unacceptable when the experiment itself can move money, deny service, change a customer record or disclose protected data. Explore communication in shadow mode; never explore authority.

Failure trigger: reset or quarantine trust statistics whenever the model, prompt, tool, retrieval policy, identity, data entitlement or outcome definition changes. A stable agent name is not a stable agent.

The release instrument

A dynamic topology should pass eight questions. The answer need not always be yes. A no-go can be the scientifically correct result.

Figure 9. Dynamic-topology release gate

1 · Rank reversal exists

Held-out data shows different agents lead on different task families or phases.

2 · Feedback is attributable

Outcomes arrive soon enough and can be tied to versioned agents and routes.

3 · Equal-budget lift is real

The lower confidence bound beats the best fixed baseline at matched calls and tokens.

4 · Exploration is safe

Canary routes are read-only, reversible, privacy-bounded and cost-capped.

5 · Error dependence is measured

Shared models, sources and prompts are represented rather than counted as independent votes.

6 · Drift has a recovery target

Decay, alarms and reset rules meet a stated maximum time to reroute degraded competence.

7 · Every route is replayable

Candidate scores, reason codes, versions, messages and outcomes produce a complete receipt.

8 · Authority cannot move

If a learned edge can widen permissions or bypass approval, release is blocked.

Decision instrument. Local teams should preregister thresholds for lift, cost, calibration, recovery and residual correlation before evaluating the router.
How the claim changes under pressureChart · state
stateDiagram-v2
  [*] --> Claim
  state "Which graph is actually moving?" as Claim
  state "Figure 1. Runtime topology is<br/>a closed-loop control policy" as Test
  state "When movement earns its cost" as Revision
  Claim --> Test: expose mechanism
  Test --> Decision: evidence survives
  Test --> Revision: rival survives
  Revision --> Claim: narrow or rebuild
  Decision --> [*]
The revision loop begins with Which graph is actually moving? and keeps counterexamples inside the reasoning path. Reading use: follow the relation, then test it against the surrounding evidence and limits.

Executable artefact: the dynamic-routing lab

The supplied Python file uses only the standard library. It contains the positive case, homogeneous negative control and competence-drift case. Run it with python dynamic_topology_lab.py. The expected output includes the results reported above. The assumptions are explicit: binary tasks, revealed outcomes, a five-agent registered pool, two shared-error groups, three calls for the learned router and no action authority.

The artefact is a mechanism test, not a benchmark claim. Replace its synthetic competence table with held-out, versioned outcome data before using the decision rule. Add a single stronger model, self-consistency, deterministic tools and a human-review baseline for any applied evaluation.

Open the complete runnable Python experiment
#!/usr/bin/env python3
"""Synthetic dynamic-routing lab for a trust-aware multi-agent topology.

The lab deliberately uses public, synthetic parameters. It compares:
  1. one generalist;
  2. a fixed three-agent panel;
  3. three agents chosen by self-reported confidence;
  4. all five agents;
  5. a phase-conditioned, trust-aware three-agent router.

Positive case: agents have different phase-specific competence.
Negative control: all agents have identical competence.
Drift case: the strongest calculator degrades while another agent improves.

No external packages are required.
"""

from __future__ import annotations

import math
import random
import statistics
from dataclasses import dataclass
from typing import Dict, Iterable, List, Mapping, MutableMapping, Sequence, Tuple

PHASES: Tuple[str, ...] = ("extract", "calculate", "challenge")
AGENTS: Tuple[str, ...] = ("Atlas", "Numeral", "Sceptic", "Generalist", "Rhetor")

BASE_SKILLS: Dict[str, Dict[str, float]] = {
    "Atlas": {"extract": 0.91, "calculate": 0.63, "challenge": 0.66},
    "Numeral": {"extract": 0.62, "calculate": 0.92, "challenge": 0.68},
    "Sceptic": {"extract": 0.68, "calculate": 0.72, "challenge": 0.89},
    "Generalist": {"extract": 0.78, "calculate": 0.78, "challenge": 0.78},
    "Rhetor": {"extract": 0.60, "calculate": 0.58, "challenge": 0.60},
}

GROUP = {
    "Atlas": "text",
    "Generalist": "text",
    "Rhetor": "text",
    "Numeral": "logic",
    "Sceptic": "logic",
}

# Rhetor sounds certain despite weak outcomes. Specialists are modest.
CONFIDENCE_BIAS = {
    "Atlas": -0.05,
    "Numeral": -0.03,
    "Sceptic": -0.06,
    "Generalist": 0.10,
    "Rhetor": 0.32,
}

METHODS: Tuple[str, ...] = (
    "single_generalist",
    "fixed_panel",
    "confidence_router",
    "full_panel",
    "dynamic_router",
)

CALLS_PER_TASK = {
    "single_generalist": 1,
    "fixed_panel": 3,
    "confidence_router": 3,
    "full_panel": 5,
    "dynamic_router": 3,
}


@dataclass(frozen=True)
class Task:
    phase: str
    truth: int
    predictions: Mapping[str, int]
    stated_confidence: Mapping[str, float]


@dataclass
class RunResult:
    accuracy: Dict[str, float]
    fixed_panel: Tuple[str, ...]
    selections: Dict[Tuple[str, str, str], int]
    phase_counts: Dict[Tuple[str, str], int]


def current_skills(
    step: int,
    *,
    homogeneous: bool,
    drift_at: int | None,
) -> Dict[str, Dict[str, float]]:
    if homogeneous:
        return {agent: {phase: 0.78 for phase in PHASES} for agent in AGENTS}

    skills = {agent: phase_map.copy() for agent, phase_map in BASE_SKILLS.items()}
    if drift_at is not None and step >= drift_at:
        skills["Numeral"]["calculate"] = 0.57
        skills["Atlas"]["calculate"] = 0.86
    return skills


def sample_task(
    rng: random.Random,
    step: int,
    *,
    homogeneous: bool,
    drift_at: int | None,
    forced_phase: str | None = None,
) -> Task:
    phase = forced_phase or rng.choice(PHASES)
    truth = rng.randint(0, 1)
    group_shock = {group: rng.random() < 0.18 for group in sorted(set(GROUP.values()))}
    skills = current_skills(step, homogeneous=homogeneous, drift_at=drift_at)

    predictions: Dict[str, int] = {}
    confidence: Dict[str, float] = {}
    for agent in AGENTS:
        base = skills[agent][phase]
        effective = max(0.50, base - (0.20 if group_shock[GROUP[agent]] else 0.0))
        predictions[agent] = truth if rng.random() < effective else 1 - truth

        # The agent does not observe the group shock. This makes verbal confidence
        # a biased signal rather than an oracle for current correctness.
        reported = base + CONFIDENCE_BIAS[agent] + rng.gauss(0.0, 0.06)
        confidence[agent] = min(0.99, max(0.01, reported))

    return Task(phase, truth, predictions, confidence)


def calibrate(
    rng: random.Random,
    *,
    homogeneous: bool,
    observations_per_phase: int,
) -> Tuple[MutableMapping[Tuple[str, str], float], MutableMapping[Tuple[str, str], float]]:
    alpha = {(agent, phase): 1.0 for agent in AGENTS for phase in PHASES}
    beta = {(agent, phase): 1.0 for agent in AGENTS for phase in PHASES}

    for phase in PHASES:
        for _ in range(observations_per_phase):
            task = sample_task(
                rng,
                -1,
                homogeneous=homogeneous,
                drift_at=None,
                forced_phase=phase,
            )
            for agent in AGENTS:
                correct = task.predictions[agent] == task.truth
                alpha[(agent, phase)] += int(correct)
                beta[(agent, phase)] += int(not correct)
    return alpha, beta


def weighted_vote(
    selected: Sequence[str],
    predictions: Mapping[str, int],
    weights: Mapping[str, float],
) -> int:
    weight_zero = sum(weights[agent] for agent in selected if predictions[agent] == 0)
    weight_one = sum(weights[agent] for agent in selected if predictions[agent] == 1)
    if weight_one > weight_zero:
        return 1
    if weight_zero > weight_one:
        return 0
    return predictions[selected[0]]


def run_once(
    seed: int,
    *,
    tasks: int,
    homogeneous: bool,
    drift_at: int | None = None,
    observations_per_phase: int = 80,
    decay: float = 0.99,
    exploration_rate: float = 0.04,
) -> RunResult:
    rng = random.Random(seed)
    alpha, beta = calibrate(
        rng,
        homogeneous=homogeneous,
        observations_per_phase=observations_per_phase,
    )

    global_mean = {
        agent: sum(alpha[(agent, phase)] for phase in PHASES)
        / sum(alpha[(agent, phase)] + beta[(agent, phase)] for phase in PHASES)
        for agent in AGENTS
    }
    fixed_panel = tuple(sorted(AGENTS, key=global_mean.get, reverse=True)[:3])

    correct = {method: 0 for method in METHODS}
    selections = {
        (phase, agent, period): 0
        for phase in PHASES
        for agent in AGENTS
        for period in ("pre", "post")
    }
    phase_counts = {
        (phase, period): 0 for phase in PHASES for period in ("pre", "post")
    }

    for step in range(tasks):
        task = sample_task(
            rng,
            step,
            homogeneous=homogeneous,
            drift_at=drift_at,
        )
        phase = task.phase

        def posterior_mean(agent: str) -> float:
            a = alpha[(agent, phase)]
            b = beta[(agent, phase)]
            return a / (a + b)

        def effective_count(agent: str) -> float:
            return max(1.0, alpha[(agent, phase)] + beta[(agent, phase)] - 2.0)

        def routing_score(agent: str, chosen: Sequence[str]) -> float:
            exploration = 0.12 * math.sqrt(
                math.log(observations_per_phase * len(PHASES) + step + 2)
                / effective_count(agent)
            )
            diversity = (
                0.03
                if chosen and GROUP[agent] not in {GROUP[name] for name in chosen}
                else 0.0
            )
            return posterior_mean(agent) + exploration + diversity

        dynamic_panel: List[str] = []
        while len(dynamic_panel) < 3:
            remaining = [agent for agent in AGENTS if agent not in dynamic_panel]
            dynamic_panel.append(
                max(remaining, key=lambda agent: routing_score(agent, dynamic_panel))
            )

        # Canary exploration prevents early winners from becoming permanent monopolies.
        if rng.random() < exploration_rate:
            candidates = [agent for agent in AGENTS if agent not in dynamic_panel]
            if candidates:
                probe = min(candidates, key=effective_count)
                dynamic_panel[-1] = probe

        panels: Dict[str, Sequence[str]] = {
            "single_generalist": ("Generalist",),
            "fixed_panel": fixed_panel,
            "confidence_router": tuple(
                sorted(AGENTS, key=task.stated_confidence.get, reverse=True)[:3]
            ),
            "full_panel": AGENTS,
            "dynamic_router": tuple(dynamic_panel),
        }

        for method, panel in panels.items():
            if method == "confidence_router":
                weights = task.stated_confidence
            elif method == "dynamic_router":
                weights = {agent: posterior_mean(agent) for agent in AGENTS}
            elif method in {"fixed_panel", "full_panel"}:
                weights = global_mean
            else:
                weights = {agent: 1.0 for agent in AGENTS}

            prediction = weighted_vote(panel, task.predictions, weights)
            correct[method] += int(prediction == task.truth)

        # The outcome is revealed after the decision. Discounting gives recent
        # evidence more weight, so the router can respond to competence drift.
        for agent in dynamic_panel:
            key = (agent, phase)
            is_correct = task.predictions[agent] == task.truth
            alpha[key] = 1.0 + decay * (alpha[key] - 1.0) + int(is_correct)
            beta[key] = 1.0 + decay * (beta[key] - 1.0) + int(not is_correct)

            period = "post" if drift_at is not None and step >= drift_at else "pre"
            selections[(phase, agent, period)] += 1

        period = "post" if drift_at is not None and step >= drift_at else "pre"
        phase_counts[(phase, period)] += 1

    return RunResult(
        accuracy={method: correct[method] / tasks for method in METHODS},
        fixed_panel=fixed_panel,
        selections=selections,
        phase_counts=phase_counts,
    )


def summarise(
    *,
    seeds: Iterable[int],
    tasks: int,
    homogeneous: bool,
    drift_at: int | None = None,
) -> Dict[str, Tuple[float, float]]:
    results = [
        run_once(
            seed,
            tasks=tasks,
            homogeneous=homogeneous,
            drift_at=drift_at,
        )
        for seed in seeds
    ]

    summary: Dict[str, Tuple[float, float]] = {}
    for method in METHODS:
        values = [result.accuracy[method] for result in results]
        mean = statistics.fmean(values)
        standard_error = statistics.stdev(values) / math.sqrt(len(values))
        summary[method] = (mean, 1.96 * standard_error)
    return summary


def mean_route_share(
    *,
    seeds: Iterable[int],
    tasks: int,
    drift_at: int,
    agent: str,
    period: str,
) -> float:
    shares: List[float] = []
    for seed in seeds:
        result = run_once(
            seed,
            tasks=tasks,
            homogeneous=False,
            drift_at=drift_at,
        )
        denominator = result.phase_counts[("calculate", period)]
        shares.append(result.selections[("calculate", agent, period)] / denominator)
    return statistics.fmean(shares)


def print_summary(title: str, summary: Mapping[str, Tuple[float, float]]) -> None:
    print(f"\n{title}")
    print("method                 calls    accuracy      95% CI")
    for method in METHODS:
        mean, half_width = summary[method]
        print(
            f"{method:22s} {CALLS_PER_TASK[method]:>5d}    "
            f"{100 * mean:6.2f}%    ± {100 * half_width:4.2f} pp"
        )


def main() -> None:
    seeds = range(30)
    print_summary(
        "Positive case: phase-specific competence",
        summarise(seeds=seeds, tasks=4000, homogeneous=False),
    )
    print_summary(
        "Negative control: homogeneous competence",
        summarise(seeds=seeds, tasks=4000, homogeneous=True),
    )
    print_summary(
        "Drift case: calculator competence changes halfway",
        summarise(seeds=seeds, tasks=5000, homogeneous=False, drift_at=2500),
    )

    print("\nMean route share on calculate tasks in the drift case")
    for agent in ("Numeral", "Atlas"):
        pre = mean_route_share(
            seeds=seeds,
            tasks=5000,
            drift_at=2500,
            agent=agent,
            period="pre",
        )
        post = mean_route_share(
            seeds=seeds,
            tasks=5000,
            drift_at=2500,
            agent=agent,
            period="post",
        )
        print(f"{agent:8s}: {100 * pre:5.1f}% before, {100 * post:5.1f}% after")


if __name__ == "__main__":
    main()
Expected console output
Positive case: phase-specific competence
single_generalist      1 call     74.45% ± 0.22 pp
fixed_panel            3 calls    81.67% ± 0.27 pp
confidence_router      3 calls    82.97% ± 0.19 pp
full_panel             5 calls    83.10% ± 0.17 pp
dynamic_router         3 calls    85.39% ± 0.22 pp

Negative control: homogeneous competence
fixed_panel            3 calls    83.41% ± 0.23 pp
dynamic_router         3 calls    83.56% ± 0.22 pp

Drift route share on calculation tasks
Numeral: 100.0% before, 25.2% after
Atlas:     5.7% before, 75.4% after

Source ledger

Primary research. The mechanism is grounded in work on dynamic teams, optimisable agent graphs, sparse communication, graph pruning, sample- and round-conditioned topology, input-dependent influence, exploration, runtime calibration and observed multi-agent failure modes.

  1. Liu et al., A Dynamic LLM-Powered Agent Network for Task-Oriented Agent Collaboration.
  2. Zhuge et al., Language Agents as Optimizable Graphs.
  3. Li et al., Improving Multi-Agent Debate with Sparse Communication Topology.
  4. Zhang et al., Cut the Crap: An Economical Communication Pipeline for LLM-Based Multi-Agent Systems.
  5. Leong and Wu, DynaSwarm: Dynamically Graph Structure Selection for LLM-Based Multi-Agent System.
  6. Lu et al., DyTopo: Dynamic Topology Routing for Multi-Agent Reasoning via Semantic Matching.
  7. Gou and Liu, Dynamic Trust-Aware Sparse Communication Topology for LLM-Based Multi-Agent Consensus.
  8. Bause et al., Multi-Agent Systems are Mixtures of Experts: Who Becomes an Influencer?
  9. Armstrong, MARGIN: Runtime Confidence Calibration for Multi-Agent Foundation Model Coordination.
  10. Choi et al., Multi-Agent LLMs Fail to Explore Each Other.
  11. Cemri et al., Why Do Multi-Agent LLM Systems Fail?
  12. Smith, The Contract Net Protocol: High-Level Communication and Control in a Distributed Problem Solver.

Practitioner synthesis. The two-plane separation, routing receipt, release gate and synthetic laboratory are original synthesis for this article. The authority boundary is adjacent to, but narrower than, Designing Multi-Agent Topologies with Computable Blast Radius.

Evidence boundary. Recent dynamic-topology results are promising but largely benchmark-bound. This article does not treat them as proof of production reliability, general factual correctness or permission to delegate consequential action.

The evidence conversationChart · sequence
sequenceDiagram
  participant Q as Question
  participant M as Mechanism
  participant E as Evidence
  participant D as Decision
  Q->>M: The case of the expert who should stop talking
  M->>E: Which graph is actually moving?
  E-->>M: compare rival explanations
  E->>D: Let the graph move only when the evidence can follow
  D-->>Q: revise scope or act
Question, mechanism, evidence and decision exchange the burdens developed in Learning Dynamic and Trust-Aware Topology. Reading use: follow the relation, then test it against the surrounding evidence and limits.

Let the graph move only when the evidence can follow

A fixed topology is an assumption that the same relationships remain useful. A dynamic topology replaces that assumption with a policy. The replacement earns its complexity only when competence varies, task phases alter who needs whom, feedback can update the estimate, and the resulting graph can be replayed.

The design decision is therefore precise. Learn sparse evidence routes, not ambient trust and not authority. Store reliability by task, phase and version. Price uncertainty, diversity, cost and shared failure separately. Preserve canary exploration without allowing early winners to monopolise the graph. Evaluate against the strongest equal-budget fixed and single-agent baselines, including the case where dynamic routing should not win.

In a governed system, the visible output is not merely an answer. It is the answer, the evolving collaboration graph that shaped it, the evidence carried across each selected edge, the outcome that updated the router, and a proof that no learned route changed who was allowed to act. That is the point at which a changing topology becomes inspectable engineering rather than a moving diagram.