Last updated: March 2026 Β· Source: agent-meeting
Multi-Agent Consensus Protocol
Coordinates multiple OpenClaw agents through structured turn-based discussions using the Mediator Pattern. Each agent reasons independently, embeds a stance marker in its response, and the coordinator automatically detects consensus and writes meeting minutes.
What
agent-meeting is a multi-agent meeting system. A coordinator sends each agent the current rolling summary and a question; agents reply with their reasoning and a structured stance marker. After each round the coordinator extracts stances, checks for consensus, compresses the conversation history, and either advances to the next round or writes a final Markdown minutes file.
Why
Multi-agent collaboration without structure has two failure modes: token explosion and ambiguous outcomes. Without a coordinator, agents send messages to each other in NΓN patterns β every agent talks to every other agent, and the conversation history grows quadratically. Without a formal consensus mechanism, there is no reliable way to know when the group has actually agreed on something.
Prompt-based multi-agent frameworks typically ask agents to "discuss" a topic and then summarize the conversation. This works for simple cases but breaks down when rounds are long, agents disagree, or you need a verifiable audit trail. This module formalizes the process: a fixed protocol, deterministic consensus detection, and a structured minutes file that records exactly what was said and decided.
Architecture
| Component | Responsibility |
|---|---|
| Coordinator | Meeting orchestration loop β drives rounds, manages state, routes all messages |
| Session Manager | Spawns and sends messages to OpenClaw agent sessions |
| Summarizer | Compresses round history to ~500 tokens after each round |
| Consensus Detector | Stance extraction via regex; FULL / MAJORITY / NO consensus logic |
| Minutes Writer | Generates final Markdown minutes with full transcript |
| Timeout Handler | Per-agent 60s timeout; overall meeting 10-minute limit |
The round lifecycle:
Coordinator β send each agent: rolling summary + question β collect responses with [STANCE: AGREE/DISAGREE/NEUTRAL] β extract stances (regex, deterministic) β check consensus β if consensus reached or max rounds β write minutes β else β compress history to ~500 tokens β next round
Consensus rules:
| Result | Condition |
|---|---|
| FULL_CONSENSUS | All agents AGREE |
| MAJORITY_CONSENSUS | ≥ 2/3 of agents AGREE, zero DISAGREE |
| NO_CONSENSUS | Neither condition met β continue to next round |
Key Design Decisions
Mediator Pattern β no NΓN chatter
All messages route through the coordinator. Agents never communicate directly. This keeps the message graph linear (N messages per round, not NΓN) and gives the coordinator full control over the conversation state.
Rolling summaries β O(1) tokens per round
After each round, the full transcript is compressed to ~500 tokens. Each subsequent round only sees the rolling summary plus the new round's responses β not the entire history. Token usage stays roughly constant regardless of round count, making long meetings tractable.
Stance markers β deterministic, no extra LLM call
Agents embed [STANCE: AGREE | DISAGREE | NEUTRAL] in their responses. Regex parsing extracts the stance without an additional LLM call for interpretation. An unknown or missing stance is treated as NEUTRAL β it won't block a majority consensus.
Early exit on consensus
The meeting ends as soon as full or majority consensus is reached, even before max rounds. This avoids pointless additional rounds when agents have already agreed.
How to Build Your Own
1. Inject stance instructions into agent system prompts
Every participating agent needs a system prompt that instructs it to include a stance marker. The format must be consistent and parseable by your consensus detector. Use a fixed format like [STANCE: AGREE/DISAGREE/NEUTRAL] β don't let agents choose their own format.
2. Use regex for stance extraction, not LLM parsing
Calling an LLM to interpret whether an agent agreed adds cost and latency, and creates a failure mode where the parser LLM misreads the original. A simple regex like /\[STANCE:\s*(AGREE|DISAGREE|NEUTRAL)\]/i is deterministic and fast.
3. Compress after every round, not at the end
Rolling compression must happen incrementally. Compressing only at the end defeats the purpose β the context window is already exhausted. Use your LLM to summarize the current round's responses plus the previous rolling summary into a new ~500-token summary.
4. Set both per-agent and overall timeouts
A single slow or stuck agent should not block the entire meeting indefinitely. Per-agent timeouts (e.g. 60s) trigger a NEUTRAL stance for that agent; an overall meeting limit (e.g. 10 minutes) ensures the coordinator eventually terminates regardless.
5. Write minutes to disk, not just to memory
The output of a multi-agent meeting is only as useful as its record. Write a structured Markdown file with: topic, participants, timestamps, per-round transcripts with parsed stances, rolling summaries, and the final consensus result. This becomes the audit trail for the decision.
Frequently Asked Questions
Does this work with any OpenClaw agents I already have configured?
Yes. You pass the agent IDs that exist in your OpenClaw workspace. The session manager spawns them through the OpenClaw gateway rather than creating new agent configs.
What happens if an agent doesn't include a stance marker?
The stance is recorded as UNKNOWN. The coordinator treats UNKNOWN the same as NEUTRAL for consensus calculation β it won't block a majority consensus if all other agents agree.
How does rolling summary compression work?
After each round, the summarizer sends the full transcript to an LLM and requests a compressed summary of approximately 500 tokens. This summary becomes the context for the next round, keeping token usage roughly constant regardless of round count.
Can I use this without OpenClaw?
Not directly β the session manager spawns agents via the OpenClaw gateway. However, the core protocol (stance markers, rolling compression, consensus detection) is framework-agnostic and can be reimplemented against any agent runtime.
Authors: Qiushi Wu & Orange π