Result Aggregation and Consensus Mechanisms
Why aggregation is the hardest part of swarm systems
Here's the thing, spawning ten agents in parallel is easy. Getting ten useful answers back and turning them into one coherent decision is where most swarm systems fall apart. From what I've seen, teams focus on orchestration and lifecycle management, then bolt on a quick "just pick the first response" aggregation strategy that throws away 90% of the value.
Result aggregation is how you combine outputs from multiple worker agents into a single actionable result. The simplest pattern is "wait for all, then decide," but the decision logic, majority vote, weighted confidence, full consensus, critique-and-revise, defines whether your swarm produces insight or noise. In production DevOps incident response swarms, multi-agent orchestration with proper aggregation achieves 100% actionable recommendation rates versus 1.7% for single-agent approaches (Codebridge, 2026).
The trade-off is coordination cost. Every aggregation strategy introduces latency, complexity, and potential for deadlock. The trick is matching the mechanism to the task: embarrassingly parallel tasks (50 files, 50 workers, merge findings) need simple deduplication. Judgment-heavy decisions (root cause analysis, code review) need consensus or critique loops. Get it wrong and you've just built an expensive random number generator.
Check your understanding
Your swarm spawns three agents to diagnose a production outage. One says 'database timeout,' one says 'network partition,' and one says 'rate limit exceeded.' Which aggregation approach is most appropriate for this scenario?
Consensus-based aggregation: voting and confidence weighting
The simplest consensus mechanism is majority voting, spawn N workers, count responses, pick the winner. This works when tasks have discrete answers and workers are roughly equal in capability. Security scans across 50 files? Majority vote on vulnerability severity. Classification tasks with clear categories? Count the votes.
But here's where it gets interesting: not all agents should vote equally. Weighted confidence aggregation lets each worker return a score alongside its answer, "I'm 0.9 confident this is a SQL injection, 0.3 confident it's XSS." The controller sums weighted votes and picks the highest aggregate confidence. Anthropic's Claude Opus 4.6 Agent Teams (February 2026) use approvePlan consensus where teammates must agree before deployment, gating execution until collective approval is reached.
The failure mode? Fake confidence. LLMs are notoriously overconfident, so raw probability scores often mislead. I've seen swarms where three agents all return 0.95 confidence on conflicting answers. The fix is calibration, tune thresholds on validation sets, or use a meta-agent to adjust weights based on worker track records. (Moonshot AI's Kimi K2.5 research showed that training agents to handle non-stationary feedback improved tool-use accuracy by +20.1% over GPT-5.2's +11.0%, precisely because it accounts for delayed and uncertain worker signals.)
More agents ≠ better consensus
Spawning ten agents instead of three doesn't automatically improve accuracy, it increases coordination cost quadratically and risks chatter loops where agents argue in circles. Optimal swarm size depends on task parallelizability and aggregation complexity. Start with three workers, measure disagreement rates, and scale only if variance is high and the task truly benefits from more perspectives.Check your understanding
Deliberative critique and feedback loops
Voting assumes independence, each agent votes once, done. But what if you let agents see and critique each other's reasoning before finalizing? That's deliberative aggregation, and it's where swarm systems start to feel genuinely intelligent.
The pattern: workers produce initial outputs, then a reviewer agent evaluates all results for quality, completeness, and internal consistency. If outputs fail thresholds, the controller re-spawns workers with critique feedback for iterative refinement. The content pipeline example from the research bundle demonstrates this: three specialist workers research topics in parallel, a reviewer checks for gaps, and any that fail get routed back with specific critique until validation passes.
From what I've observed, this moves swarms from "poll the crowd" to "structured deliberation." Multi-file software engineering using the CAID pattern (arXiv 2603.21489) showed 26.7% accuracy improvement on paper reproduction tasks by having a manager construct dependency-aware plans, spawn isolated workers in separate git worktrees, then merge results via test-based verification. The key is structured feedback, not just "try again," but "your code missed the edge case on line 47, here's the failing test."
The trade-off is latency and cost. Each critique round adds another LLM call and blocks progress. For high-stakes decisions (code review, financial analysis, medical triage), it's worth it. For low-stakes tasks (summarize tweets, extract keywords), skip the loop and just vote.
Check your understanding
You're building a code analysis swarm where 10 workers scan files in parallel and a reviewer validates findings. A worker flags a "potential SQL injection" but the reviewer's critique says "false positive, the variable is already sanitized upstream." Design the feedback loop: what information should the controller pass back to the worker if you re-spawn it, and when should the loop terminate?
Production patterns: validation agents and bounded aggregation
In production swarm systems, you rarely aggregate raw worker outputs directly. Instead, you insert a validation agent as a filter layer before propagation. This agent checks for hallucinations, schema compliance, and business rule violations, think of it as a type checker for LLM outputs.
Nikola Balic's Sub-Agent Spawning pattern documentation emphasizes that spawned agents have isolated contexts with no conversation history. The parent must explicitly pass all necessary context in the delegation call, and workers return only summarized results to prevent context pollution. This means your aggregation logic can't assume workers "know" about each other, you need explicit result structures (JSON schemas, typed outputs) that the controller can merge deterministically.
AG2 Beta (March 2026) introduced async-first event-driven architecture for swarm patterns, with frameworks converging on MCP for tool interoperability and explicit recursion depth limits (max_spawn_depth) to prevent unbounded spawning. Most production systems default to max_iterations around 50 (Hermes framework) and workers cancel if the parent turn is interrupted, your aggregation strategy must handle partial results gracefully.
The pattern I use most: bounded fan-out with validation gate. Spawn N workers with a timeout, collect results as they arrive, pass the batch to a validator, and only propagate outputs that pass quality thresholds. Any that fail trigger a single retry with critique (not an infinite loop), then escalate to human review if still failing. This balances thoroughness with cost and latency.
Aggregation is where swarm value compounds
Single-agent systems give you one perspective. Parallel workers without aggregation give you ten unfiltered perspectives. But a swarm with consensus voting, critique loops, and validation gates gives you a meta-judgment that's often more reliable than any individual agent, and measurably better than humans on structured tasks. The 100% actionable rate in incident response swarms comes from the aggregation layer, not from any single agent being smarter.Key takeaways
- Result aggregation turns multiple agent outputs into a single coherent decision, it's where swarm systems succeed or fail.
- Majority voting works for discrete answers with equal agents; weighted confidence helps when agents have different expertise, but raw LLM probabilities need calibration.
- Deliberative critique loops let agents evaluate each other's reasoning and iteratively refine outputs, improving accuracy 20–27% on complex tasks at the cost of latency.
- Production swarms use validation agents as filters before propagation, bounded iteration limits to prevent runaway costs, and explicit result schemas since workers have isolated contexts.
- Optimal swarm size depends on task parallelizability, coordination complexity grows quadratically, so start small and scale only when variance is high.
Your product check-in
Apply “Result Aggregation and Consensus Mechanisms” to a product or workflow you know. What would you try, what could go wrong, and what evidence would help you decide?