Skip to content

Research note

Agent swarms on a knowledge graph

When many cheap agents beat one careful one.

Research note · Agents → Ongoing

Some questions are one lookup away. “What was the cycle time on purchase orders last month?” maps to a KPI, the KPI maps to a view, and the view maps to two tables. A single agent with a good catalogue gets there in a few steps. Other questions are not like that. “Why did the accrual variance jump in the third week?” can run through a vendor, a contract amendment, a late goods receipt and a change in a posting rule, each joined to the next by a weak, easily missed link.

This note is about the second kind. We have been testing whether many cheap agents walking a knowledge graph at once, leaving traces for each other, find better evidence paths than one careful agent walking alone. The short answer is: sometimes, and we can say fairly precisely when.

The mechanism, borrowed from ants

Ant colony optimisation is an old idea. Each ant builds a path step by step, choosing the next edge with a probability that mixes two things: how promising the edge looks on its own (the heuristic) and how much pheromone earlier ants have left on it. Good paths get reinforced, and pheromone evaporates so that early mistakes fade.1Dorigo, Maniezzo and Colorni, 1996. The selection rule weights pheromone by an exponent alpha and the heuristic by beta.

On a knowledge graph the translation is direct. Nodes are entities the platform already knows about: tables, KPIs, documents, vendors, procedures. Edges are typed relations such as computed-from, billed-by or references. The heuristic for an edge is how relevant its far end looks to the question, scored from names, descriptions and a small embedding comparison. Pheromone is the part that matters: it is deposited only when an agent reaches a node that actually contains evidence, checked by running the query or reading the passage, and the amount depends on how strong that evidence was.

Fig. 1Agents walk a catalogue graph toward a KPI question. Pheromone builds on edges that led to checked evidence and converges on one answer path (violet). Press a KPI to change the question. Illustrative data.

So pheromone is not popularity. It is evidence weight, and it carries a pointer back to the evidence that earned it. When the swarm converges, the winning path is a chain of edges, each of which some agent walked and each of which ended at a fact that was verified. That chain becomes the answer’s source list.

Against a single agent

The baseline is the agent we already run: plan, retrieve, read, decide what to look at next. It is good at questions where the right next step is obvious from the current one. Its weakness is commitment. Once it has chosen a branch, the cost of backing out is a full re-plan, so it tends to explain the anomaly with the first plausible cause it finds.

The swarm spends its budget differently. Instead of one deep walk it runs many short ones in parallel, with a small step limit each. No single walker is clever. The cleverness is in the shared trace: a walker that reaches a dead end leaves nothing, a walker that reaches real evidence leaves a mark that the next walkers can follow and extend.

On questions where the cause was one or two hops from the starting entity, the single agent was as accurate and cheaper, because the swarm wasted walkers on branches the agent would never have opened. On questions where the cause was four or more weakly typed hops away, the swarm found it more often, and its paths carried more independent sources. Those are the questions reviewers care about most, because they are the ones that take a person most of a day.2Internal evaluation set of reviewed investigations, small enough that every case has been read. Treat the direction as the finding, not the magnitude.

Convergence is a signal, and so is its absence

One side effect turned out to be more useful than the accuracy gain. When pheromone concentrates on one path quickly, the evidence is usually unambiguous. When it splits between two paths and stays split, there are two competing explanations with comparable support. A single agent hides that: it returns its first explanation with the same confidence either way.

Gossip spreading on a 30-node network: each round every node calls one random neighbour (push-pull). 30 of 30 nodes agree with the origin after 12 rounds.PUSH-PULL GOSSIP · INFORMED 30/30 · AGREEMENT
Fig. 2Gossip until agreement. A swarm that does not converge is telling you the evidence is split. Illustrative data.

We now surface that split directly. If the two strongest paths end at different root causes and neither dominates after the walk budget is spent, the run reports both, with their sources, and asks the owner to decide. That is a better outcome than a confident wrong answer, and it is cheap to detect: it is a ratio of pheromone on two edge sets.

Where it does not help

We want to be plain about the limits, because swarm methods are easy to oversell.

  • Sparse or wrong graphs. If the relation that connects cause to effect is missing from the graph, no number of walkers will cross it. The swarm can only find paths that exist. Improving the catalogue does more than tuning alpha and beta.
  • Short questions. For lookups and one-hop joins the overhead is pure cost. We route those to the single agent and only start a swarm when the planner estimates a long, uncertain path.
  • Expensive evidence checks. Pheromone is only honest if deposits are checked. When checking a node means a heavy query, the budget runs out before convergence. Caching query results per run helps; so does lowering the walker count.
  • Evaporation tuning. Too little evaporation and the first lucky walker decides the answer. Too much and nothing converges. We fix it per graph size rather than per question, which is crude but stable.

Pheromone is evidence weight, not popularity. Every reinforced edge points back to a fact someone can check.

What we are doing next

Two threads. First, typed heuristics: some relation types are far more likely to carry causal weight than others (computed-from versus mentioned-in), and reviewers’ corrections tell us which. Learning a per-type prior from those corrections should cut wasted walks. Second, handing the converged path to the single agent as a starting plan. The swarm is good at finding the route; the agent is good at writing the explanation and asking for approval. Used together they play to both strengths.

Whichever way it goes, the rule stays the same as everywhere else in the platform: the answer comes with its path, and every step on that path keeps its source.

Read the evidence yourself. Every run keeps its sources.