Repository navigation
feat: add multi-agent debate orchestrator for consensus-based reasoning - #1072
Merged
AmitoVrito merged 2 commits intoOct 13, 2026
Merged
Conversation
DebateOrchestrator runs a proposer and opponent through N rounds of rebuttal/defense, then has a judge synthesize a final decision from the transcript. At merge, fixed a context-amnesia bug before it shipped: each executor's ReActAgent clears its own scratchpad on every run() call, so passing only the single latest message into each round's prompt meant every participant forgot its own and the other side's earlier arguments after round 1. Each prompt now re-injects the full transcript so far. Added a regression test that fails on the old code and passes on the fix. Co-authored-by: Ashish Maurya <[email protected]>
AmitoVrito
force-pushed
the
feat/multi-agent-debate
branch
from
October 13, 2026 17:19
61d7b78 to
66550d2
Compare
AmitoVrito
approved these changes
Oct 13, 2026
AmitoVrito
left a comment
Collaborator
There was a problem hiding this comment.
Reviewed and hardened before merge: stripped the leftover debug artifacts this PR was stacked with (fake_audit.jsonl, pr_body.md, scratch.py, scratch3.py) by rebasing just the debate-orchestrator commit onto main, and fixed a context-amnesia bug — each executor's ReActAgent clears its own scratchpad every run(), so only passing the single latest message into each round's prompt meant every participant forgot its own and the other side's earlier arguments after round 1. Each prompt now re-injects the full transcript, with a regression test confirmed to fail on the old code.
4 of 11 tasks
ramashishmaurya
added a commit
to ramashishmaurya/SynapseKit
that referenced
this pull request
Nov 7, 2026
Each opening/rebuttal/defense/judge prompt is now prefixed with
"You are {name}, acting as: {role}.", so a debater's persona reaches the model
on every turn (the executors' ReActAgent wipes its scratchpad between turns).
Complements the transcript re-injection already in SynapseKit#1072.
Co-authored-by: Ashish Maurya <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This PR introduces the
DebateOrchestratortosynapsekit.agents.multi, adding a powerful new multi-agent pattern to the framework.While existing orchestrators (
crew.py,supervisor.py) are excellent for sequential delegation, they lack a native mechanism to resolve disagreements or prevent hallucinations through consensus. TheDebateOrchestratorsolves this by forcing two agents (aProposerand anOpponent) to argue a topic over multiple rounds, while aJudgesynthesizes the transcript to produce a final, highly accurate decision.Changes Included
src/synapsekit/agents/multi/debate.pycontainingDebater,Judge, andDebateOrchestrator.src/synapsekit/agents/multi/__init__.py.tests/agents/test_multi_debate.pysimulating a full 2-round debate with a mocked LLM.Testing
pytest tests/agents/test_multi_debate.py(passes 100%).pre-commit(ruff, trailing whitespaces, etc. are clean).