feat(agents): add council command for multi-model deliberation#149
Open
basnijholt wants to merge 6 commits intomainfrom
Open
feat(agents): add council command for multi-model deliberation#149basnijholt wants to merge 6 commits intomainfrom
basnijholt wants to merge 6 commits intomainfrom
Conversation
Inspired by Karpathy's llm-council project, this adds a new `council` subcommand that enables collaborative AI deliberation: - Stage 1: Query multiple models in parallel - Stage 2: Models peer-review anonymized responses with structured output - Stage 3: Chairman model synthesizes final answer Features: - Works with any OpenAI-compatible API (OpenRouter, Ollama, etc.) - Structured output (JSON mode) for reliable ranking extraction - Rich console output showing full deliberation process - --no-ranking flag to skip peer review for faster results - --final-only flag to show only the synthesis - Auto-copy final answer to clipboard
- Renamed run_council -> _run_council - Renamed render_council_result -> _render_council_result - Added comprehensive test suite with 18 tests covering: - Data model creation - Ranking aggregation logic - Formatting functions - CLI command invocation - Integration tests with mocked API
Use NO_COLOR and TERM=dumb env vars in CliRunner to prevent Rich console from emitting ANSI escape codes in test output.
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.
Summary
councilsubcommand inspired by Karpathy's llm-councilFeatures
--no-rankingflag to skip peer review for faster results--final-onlyflag to show only the synthesisUsage
Test plan
--no-rankingflag skips stage 2--final-onlyshows only synthesis--jsonoutput format