council-debates
Run multiple independent LLM roles against the same prompt, optionally rank their responses, and generate a final answer through a chairman model.
council-debates is a small modular Python 3.11+ package for running debates between independent LLM roles through OpenAI-compatible APIs.
The pipeline is deliberately strict:
- Each role is called separately with only its own
system_promptand the original user prompt. - (Optional) A separate ranking LLM receives the original prompt plus all role responses.
- A final chairman LLM receives the original prompt, role responses, and the optional ranking result, then writes the final Markdown answer.
You can omit the ranking block entirely. In that case the chairman aggregates role responses without an external ranker, which prevents the ranker from biasing the chairman's decision.
The package supports OpenAI, OpenRouter, LM Studio, Ollama OpenAI-compatible endpoint, vLLM, LocalAI, and any /v1/chat/completions-compatible provider.
Pipeline
User Prompt
│
▼
┌───────────────┐
│ Role: Judge │
├───────────────┤
│ Role: Skeptic │
├───────────────┤
│ Role: Builder │
└───────────────┘
│
▼
┌────────────────────┐
│ Ranking (optional) │
└────────────────────┘
│
▼
┌────────────────────┐
│ Chairman │
└────────────────────┘
│
▼
Final Markdown Answer
Project layout
council_debates/
├── CHANGELOG.md
├── pyproject.toml
├── README.md
├── config.example.yaml
├── .env.example
├── requirements-dev.txt
├── tests/
└── src/
└── council_debates/
├── __init__.py
├── __main__.py
├── cli.py
├── core/
├── pipeline/
├── presentation/
├── providers/
└── templates.py
Install
Install the latest released version from PyPI:
pip install council-debates
Upgrade an existing installation:
pip install --upgrade council-debates
PyPI package:
Install the latest code directly from GitHub:
pip install "git+https://github.com/ssh-den/council-debates.git"
Install a specific branch, tag, or commit:
pip install "git+https://github.com/ssh-den/council-debates.git@main"
For local development and tests from the repository:
python -m venv .venv
. .venv/bin/activate
pip install -r requirements-dev.txt
Quality checks:
black --check .
ruff check .
mypy src tests
pylint src tests
pytest
Create a config
council-debates init-config
council-debates init-env
cp .env.example .env
Edit config.example.yaml or save it as config.yaml. Set the environment variables referenced by api_key_env.
Run
Prompt from the command line:
council-debates run "Suppose that a judge or magistrate..." --config config.yaml
Prompt from a file:
council-debates run --file prompt.txt --config config.yaml
Save Markdown output:
council-debates run "test prompt" --config config.yaml --output result.md
Show provider/model logging:
council-debates run "test prompt" --config config.yaml --verbose
Configuration
All behavior is configured in YAML:
providers: OpenAI-compatible base URLs and API keys orapi_key_envreferences.defaults: defaulttemperatureandmax_tokens.roles: independent debate roles; each role has its own provider, model, and system prompt.ranking: (optional) separate ranking model config. Omit it if you want the chairman to aggregate responses without external ranking.chairman: final aggregation model config.output: Markdown output options.
Example provider entries:
providers:
openai:
base_url: "https://api.openai.com/v1"
api_key_env: "OPENAI_API_KEY"
openrouter:
base_url: "https://openrouter.ai/api/v1"
api_key_env: "OPENROUTER_API_KEY"
local:
base_url: "http://localhost:11434/v1"
api_key: "ollama"
Local OpenAI-compatible servers usually accept any non-empty API key.
Design Principle
Roles never see each other's responses.
Each role receives only:
- its own system prompt
- the original user prompt
This prevents early consensus, role contamination, and chain-of-thought leakage between participants.
Contributions / Acknowledgments
The original idea of using multiple LLM roles in a council/debate setup comes from Andrej Karpathy's llm-council.
Metadata
Release files for council-debates 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| council_debates-0.1.0.tar.gz | 18.8 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| council_debates-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 37.0 kB
Release files / council_debates-0.1.0.tar.gz
| Download URL | council_debates-0.1.0.tar.gz |
|---|---|
| Size | 18.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
40fb897cc18b61f9721188383350c0f0cf237163d375cf280154ba69b764dded
|
|
BLAKE2b-256 checksum How to use checksums |
3c868cd34d2b0a1aa4fb802ba307d91f90d779479c1fa2d574a6456ee8906e5e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jun 14, 2026.
Transparency logRelease files / council_debates-0.1.0-py3-none-any.whl
| Download URL | council_debates-0.1.0-py3-none-any.whl |
|---|---|
| Size | 18.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
902e1ad5974bb29d7a1edabe6a39045e74ac2a72a655f558a366b649dadc6dd4
|
|
BLAKE2b-256 checksum How to use checksums |
421a8825df6578096126161eebba52fafd6d6101ed818cbd2442ea5288e2f9a5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jun 14, 2026.
Transparency log