Agent Swarm Orchestration Built in Kansas City: Meet Quorum

Quorum lets plain, auditable machine learning decide how a swarm of AI agents is organized, with humans setting the goals and the limits. On a simulated grid emergency, learned routing lifted survival from 83.5% to 98.5% and cut compute by 56%. The open core is free on GitHub.

Agent swarm orchestration results: dot plot of grid survival after a simulated line outage, 83.5% with fixed wiring and 98.5% once Quorum's learned routing is added, with compute per episode falling from 5.28 to 2.31

Why agent swarm orchestration needs a different control plane

On February 15, 2021, the Southwest Power Pool called a regional system emergency and asked its member utilities, Evergy among them, to call for conservation and then to carry out controlled, temporary outages. SPP coordinates the transmission grid and wholesale power markets for the central United States, Kansas and Missouri included. When a grid is under that kind of stress, operators work through a short list of moves under a hard clock, and every move needs a person to own it.

That is also a fair description of agent swarm orchestration, the problem of getting many AI agents to work one problem together. Most frameworks solve it in one of two ways. A developer wires the agents together by hand, or a large language model sits in the middle and decides who talks to whom. Hand wiring is predictable but cannot adapt. An LLM in charge can adapt, but its choices are hard to audit and expensive to repeat thousands of times.

Quorum is a third way, and I built it here in Kansas City. LLM agents do the work. Plain machine learning that you can inspect decides how the swarm is organized. Humans set the goals and the hard limits, and a gate decides when a person actually needs to be asked. The open core is on GitHub under Apache 2.0 at Bodhi8/quorum-swarm, and the live Quorum demo replays a 30-episode run on a simulated power grid, tick by tick.

This article covers the design, the math behind each piece, an ablation that shows which piece earns the gain, the code to run it yourself, and where it breaks.

Agent Swarm Orchestration on a Power Grid: Quorum in 70 Seconds · 1 min 10 s
Video transcript

A line trips. The swarm has ten minutes. Doing nothing ends in a cascade blackout within two five-minute steps. With fixed wiring the grid survived a line outage in 83.5% of runs; with learned routing it held in 98.5%.

Three loops at three speeds. The fast loop works one problem in ticks: scouts, analysts and skeptics. The slow loop runs between problems: a bandit learns which scouts earn their cost. The human loop runs on every plan: hard rules, then a gate decides who approves. LLM agents do the work, plain machine learning you can audit organizes them, and people set the goals and the limits.

Coordination through traces. Agents never message each other. They leave signals on the grid that spread, drift toward stress and fade. After five ticks, scouts send 75% of their attention to substation 5, 8.6% to substation 10 and 4.8% to substation 12. A stability check shrinks the time step to 0.2621 so the field cannot oscillate.

Pay for the expensive scout only when it earns it. Fixed wiring sends 100% of scout calls to the LLM scout; Quorum sent 21%. Each scout's reward is quality minus 0.5 times its cost, and Thompson sampling, first described in 1933, picks each scout. Compute per episode fell from 5.28 to 2.31, 56% less.

Routing does almost all of the work. Over 10 seeds of 40 episodes, grid survival was 83.5% with fixed wiring, 98.5% with learned routing in the open core, and 98.2% with the self-tuning field from Quorum Pro, which showed no measurable effect on this 14-substation grid. Larger grids are next.

Ask less, without letting bad plans through. On the same 158 plans, always-ask interrupted the operator 158 times, the learned gate 59 times and a risk threshold 36 times. The learned gate let 1 bad plan through and the threshold 5. It still asks more often than a tuned threshold.

ML steers the swarm; people steer the ML. Replay every tick of a 30-episode run at vector1.ai/demos/quorum. The open core is on GitHub at Bodhi8/quorum-swarm. Designed and built in Kansas City.

Three loops at three speeds

Quorum runs three loops at once, each at its own clock.

The fast loop runs in ticks inside one problem. Scouts propose candidate fixes, analysts score them in simulation, skeptics stress-test the leaders, and everyone writes what they learned back onto a shared field.

The slow loop runs between problems. A bandit learns which scout strategies are worth what they cost. Every few episodes a field policy proposes new settings for how the field behaves, and a shadow twin has to approve the change before it goes live.

The human loop runs whenever a plan is ready. Hard rules block forbidden plans outright. A gate then applies the plan, blocks it, or interrupts a person to decide.

Keeping these loops apart is the point. The learning happens in the slow loop, where it can be checked. The safety rules sit outside every loop, where nothing can learn its way around them.

Coordination through traces: the semantic field

Agents in Quorum never message each other. They coordinate the way termites build a mound. The French biologist Pierre-Paul Grassé named this stigmergy in 1959: each worker responds to the traces earlier work left behind, not to instructions from other workers. Quorum's traces live on a graph of the problem. In the grid demo the graph is the grid itself: 14 substations as nodes and 20 transmission lines as edges.

Each node carries a few signals. Promise marks where good fixes were found, dead end marks where they were not, and stress marks where the problem is. Promise evolves as an advection-diffusion-reaction system on the graph:

dp / dt = − D L p + v A(s) p − k p + r p (1 − p) + u

Here p is the vector of promise on every node, L is the graph Laplacian (each node's degree on the diagonal, minus one for every edge), D is the diffusion rate, A(s) moves promise from low-stress nodes toward high-stress neighbors at drift rate v, k is the decay rate, r is a recruitment rate whose logistic term reinforces what works without letting it grow forever, and u is what agents deposit this tick. Diffusion spreads good news to neighboring parts of the problem. Advection carries attention toward where the problem is. Decay forgets stale signals.

Scouts then pick where to look in proportion to a softmax over each node's attractiveness, promise minus dead end plus stress minus a crowding term, so they spread out instead of piling onto one spot.

A stability bound the field enforces itself

An explicit update like this one can oscillate or blow up if the step is too large. Quorum checks a bound before it runs:

Δ t (D λ_max(L) + k + r + v d_max) < 1

where λ_max(L) is the largest eigenvalue of the Laplacian and d_max is the largest node degree. On the 14-substation grid, λ_max = 6.48 and d_max = 5. With the default knobs (D = 0.2, k = 0.15, r = 0.3, v = 0.3) the bracket comes to 3.25, so a time step of 1.0 would violate the bound by a wide margin. The field shrinks the step until the margin is safely positive: Δt = 0.2621, with a stability margin of 0.149. No policy can push the field into a regime that oscillates, because the field refuses the step.

The same six knobs (drift, diffusion, decay, recruitment, temperature and crowding) are everything the slow loop is allowed to tune. A change to the swarm's behavior is a change to six numbers with physical meanings.

import networkx as nx
from quorum.field import FieldKnobs, SemanticField

# The IEEE 14-bus test grid: substations as nodes, transmission lines as edges
lines = [(0, 1), (0, 4), (1, 2), (1, 3), (1, 4), (2, 3), (3, 4), (5, 10), (5, 11), (5, 12),
         (8, 9), (8, 13), (9, 10), (11, 12), (12, 13), (3, 6), (3, 8), (4, 5), (6, 7), (8, 6)]
field = SemanticField(nx.Graph(lines), FieldKnobs())   # default knobs, dt = 1.0

print(f"largest Laplacian eigenvalue: {field.lambda_max:.2f}")
print(f"time step after the stability check: {field.knobs.dt:.4f}")
print(f"stability margin: {field.stability_margin():.3f}")

# A scout reports a promising fix at substation 5; stress sits on the overloaded lines
field.set_channel("stress", {5: 1.0, 10: 0.6, 12: 0.4})
field.deposit(5, "promise", 1.0)
for _ in range(5):
    field.step()
p = field.distribution()
top = sorted(range(field.n), key=lambda i: -p[i])[:3]
print("where scouts look next:", [(field.nodes[i], round(float(p[i]), 3)) for i in top])

It prints a largest eigenvalue of 6.48, a time step of 0.2621 and a margin of 0.149, and after five ticks the scouts send 75% of their attention to substation 5, 8.6% to substation 10 and 4.8% to substation 12.

Routing scouts by what they earn

Each scout can use one of several strategies. In the grid demo there are four: a random scout that samples substations at random, a field scout that follows the field, a local scout that goes to the ends of the most overloaded line, and an LLM scout that reads a plain-language summary of the outage and names the substations to reconfigure. They differ in cost. The LLM scout costs 1.0 unit per call, the local and field scouts 0.1, the random scout 0.05.

Quorum chooses among them with Thompson sampling, a bandit method William R. Thompson described in Biometrika in 1933. Each strategy keeps a Beta posterior over how often it pays off. Before each call, Quorum draws one sample from every posterior and uses the strategy with the highest draw. After the call it updates that posterior with the strategy's reward:

r = q − λ c, α leftarrow α + r, β leftarrow β + (1 − r)

where q is the share of the problem the scout's best candidate fixed (from 0 to 1), c is its cost and λ = 0.5 is the price of compute. A worked example: a local scout and an LLM scout each find a fix worth q = 0.8. The local scout's reward is 0.8 − 0.5 × 0.1 = 0.75, and its posterior moves from Beta(1, 1) to Beta(1.75, 1.25), a mean of 0.583. The LLM scout's reward is 0.8 − 0.5 × 1.0 = 0.3, and its posterior moves to Beta(1.3, 1.7), a mean of 0.433. Equal quality, unequal cost, so the cheap scout earns more of the next calls. The expensive scout still gets called when cheap scouts start coming back empty. A small discount on old evidence lets the bandit follow a problem that changes.

In the 30-episode demo run, the bandit sent 21% of scout calls to the LLM scout. Fixed wiring sends all of them there.

Every change goes through a shadow twin

The slow loop proposes changes to the field's six knobs. Quorum never applies one directly. A shadow twin replays the same scenarios twice in simulation, once with the current knobs and once with the proposed ones, using the same random seeds for both so the comparison measures the knobs and not luck. The change goes live only if it wins by a set margin. Shadow runs write nothing to the live record and update no learner, so a rejected change leaves no trace except the decision itself, which is logged.

In the demo run the twin tested ten proposed changes and accepted three.

Humans set goals and limits, and a gate decides when to ask

The human layer does not write prompts for agents. It states goals as weighted objectives and limits as hard rules. Quorum compiles the goals into a reward the learning loops optimize, and keeps the rules outside every loop: a plan that breaks a rule is blocked before anyone sees it, and no amount of reward can buy an exception.

Then a gate takes the best plan. The open core ships three gates. Full autonomy never asks. Always-ask sends every plan to a person, the usual enterprise setting. A risk threshold asks only when a plan's risk score crosses a line. Quorum Pro adds a learned gate that learns from the operator's own decisions which plans need them. Gate-aware plan choice, in the core, prefers the near-best plan the gate expects a person to approve.

The test: a line trips on a stressed grid

The grid simulation uses Grid2Op, the open-source power grid environment from RTE, France's transmission system operator, built for its Learning to Run a Power Network competitions. It solves AC power flow, enforces thermal line limits and disconnects lines that stay overloaded. The test grid is the standard IEEE 14-bus system: 14 substations, 20 lines and 6 generators (nuclear, thermal, two solar, wind and hydro).

Each episode is a scenario drawn from 349 that I screened: a moment from one of the grid's bundled load and generation scenarios, then a line outage that leaves other lines overloaded but has not yet collapsed the grid. Left alone, protection trips the overloaded lines and the grid falls into a cascade blackout within two five-minute steps. The swarm searches 178 substation reconfigurations plus generator redispatch moves, and its best plan goes to the gate. A simulated control-room operator then approves or rejects it. Its hidden rules: do not reconfigure the nuclear plant's substation without a call, the plan must keep every line under 105% of its limit when the skeptics add 4% load growth and forecast error, and redispatch stays at 15 MW or less. The episode scores whether the grid survives the next 30 minutes.

What each part earns: the ablation

The ablation adds one component at a time, each row on top of the one above it, on identical scenario sequences. Each row is 10 seeds of 40 episodes, and ± is the 95% interval across seeds. Compute is in abstract units, where one LLM call costs 1.0.

ConfigurationGrid survivedCompute per episodeHuman interrupts per episodeBad plans auto-applied per episode
Fixed wiring (baseline)83.5% ± 3.15.280.0450.013
+ learned routing (open core)98.5% ± 0.82.310.1220.003
+ self-tuning field (Quorum Pro)98.2% ± 1.32.330.1250.003
+ learned gate (Quorum Pro)98.2% ± 1.32.330.2000
+ gate-aware plan choice (open core)97.7% ± 1.42.330.1850

Learned routing does almost all of the work. It lifts survival from 83.5% to 98.5% and cuts compute by 56%. Fixed wiring always sends the strongest scout to the ends of the most overloaded line. That is a good guess most of the time, but when the fix sits elsewhere on the grid, the swarm never looks there. The bandit mixes broad, cheap scouts with focused ones, and the field steers the broad ones toward the stress.

The self-tuning field made no measurable difference at this scale. Its row matches routing alone within the intervals. On a 14-substation grid the default physics are already good enough, and whether tuning pays off on larger grids is the next test.

The learned gate trades interruptions for safety. It brought plans wrongly auto-applied to zero, from about one in 300 episodes, but it asked the operator more often than the hand-tuned risk threshold: 0.200 times per episode against 0.125, counting its warm-up. In a separate gate study, where the same 158 plans went through each gate, always-ask interrupted the operator 158 times, the risk threshold 36 times with 5 bad plans let through, full autonomy let 41 bad plans through, and the learned gate interrupted 59 times with 1 bad plan let through. That is 63% fewer interruptions than always-ask.

Run it yourself

The open core needs only NumPy and NetworkX, runs on a laptop CPU and needs no API keys. The toy domain, a fault hunt on a 30-node network, runs the same comparison:

from quorum.build import build_swarm

for mode in ("static", "quorum"):
    swarm = build_swarm("toy", mode=mode, seed=0, llm="mock")
    history = swarm.run(40)
    n = len(history)
    survived = sum(h.metrics["survived"] for h in history) / n
    compute = sum(h.metrics["compute_cost"] for h in history) / n
    print(f"{mode:>6}: survived {survived:.1%}, compute {compute:.2f} per episode")

On seed 0 it prints 100.0% survival for both, with compute of 3.13 per episode for fixed wiring and 0.96 for Quorum. From the command line, quorum ablate --domain toy runs the full ablation, quorum run --domain toy --interactive makes you the operator who approves escalated plans, and quorum run --domain toy --llm anthropic swaps the offline mock for a real Claude scout and records real calls, tokens and dollars per episode.

Quorum also routes combinatorial subproblems through one QUBO interface, so the same problem can go to an exact solver, simulated annealing, D-Wave or QAOA. On a unit commitment problem with 18 binary variables, simulated annealing with 32 restarts matched the exact optimum. With 8 restarts it settled on a schedule that cost 7% more, a reminder that any quantum comparison has to be made against a well-tuned classical solver.

Where it breaks

The LLM scout in these results is an offline mock that reads the prompt the way a model would, so compute is in abstract units, not dollars. The real-model script exists, and those runs are the next test.

The operator is simulated with three hand-written rules. A real control room has more rules, some unwritten, and the learned gate's value depends on learning those.

The grid is small: 14 substations, one remedial action per episode and a 30-minute horizon. Grid2Op ships 36- and 118-substation grids, and the field's self-tuning has to prove itself there or come out of the claims.

The learned gate asks more often than a well-tuned threshold on this grid. Its case rests on never letting a bad plan through without a hand-tuned rule, and on learning an operator's preferences that nobody wrote down. Calibrating it to ask less is open work.

Open core and Quorum Pro

The open core is everything above except three pieces: the learned gate, the self-tuning field and the grid domain. Those are Quorum Pro, which is not open source. The demo's grid results come from it, and the page code and event log are public. Utility and grid teams curious to see it on their own scenarios can contact Brian.

Built in Kansas City

Quorum was designed and built in Kansas City, and its first domain comes from home. Kansas City's grid runs inside the Southwest Power Pool footprint, and the February 2021 emergency showed how fast a regional grid moves from normal operation to controlled outages. KC AI Lab, which began in 2016 as the Kansas City Machine Learning Group, grew past 1,500 members. The code is meant for that community first: read it, run it, break it and send what you find.

The path forward

Five questions are worth asking of any agent swarm in production this quarter. Which share of your agent calls go to your most expensive model, and what would a cheaper first pass catch? Could you replay last week's decisions with a different routing policy and compare the two on the same inputs? Which of your rules could an optimizer trade away for a better score, and which sit outside its reach? How often does your system ask a person, and how often does the person change the answer? And when a plan goes wrong, can you trace which agent proposed it, which agent tested it and who approved it?

The Quorum demo replays every tick of a 30-episode grid run, including the two episodes where the grid went down. The open core is at github.com/Bodhi8/quorum-swarm.

Sources

Related research