A Python application that orchestrates debates between multiple LLMs, each embodying a different philosopher's personality.
- 2-5 Philosophers debate any given issue
- 20 Famous Philosophers to choose from (Socrates, Plato, Aristotle, Kant, Nietzsche, etc.)
- LLM Integration with Ollama or compatible APIs
- Automatic Model Discovery from
/api/tags, plus a Custom option for any name - Streaming Output — responses appear as they are generated, with a working Stop button
- Consensus Detection by an independent judge, checked every 2 turns and always on the final turn
- Independent Judge Model for consensus checks and summaries, run at temperature 0 so the same debate gets the same verdict
- Time & Turn Limits — the debate stops at the configured duration or after 20 turns
- Clear Failure Reporting — an unreachable backend or a missing model is shown, not swallowed
- Crash-Safe Storage — settings and saved debates are written atomically, so a reader never sees a half-written file
- Streamlit Web UI for easy interaction
pip install -r requirements.txtEnsure you have an LLM API server running. Options:
# Install Ollama from https://ollama.com
ollama pull llama3
ollama pull phi4The app expects endpoints at /api/generate and /api/chat (Ollama-compatible format).
streamlit run app.py- Select Philosophers: Choose 2-5 philosophers from the dropdown
- Enter Issue: Type the philosophical issue to debate
- Set Time Limit: Configure how long the debate may run (default 30 minutes)
- Choose Models: Pick from the models discovered on your server, or type a custom name
- Choose a Judge: Optionally pick a separate model for the consensus/summary calls
- Start Debate: Watch the arguments stream in turn by turn; press Stop to end early
- Consensus Check: Every 2 turns — and always on the final turn — the judge model evaluates whether consensus was reached
- Review Results: See the outcome, statistics, summary and full history
Each philosopher has a unique personality defined by their core philosophical principles:
- Socrates: Dialectical questioning, "knowing that I know nothing"
- Plato: Theory of Forms, analogies and allegories
- Aristotle: Empirical observation, logical causality
- Descartes: Radical doubt, "I think therefore I am"
- Nietzsche: Will to Power, critique of morality
- Rawls: Veil of ignorance, fairness as justice
- And 10+ more!
- LLM API URL: Default
http://localhost:11434 - Model Names: Discovered from the provider's
/api/tags; if the server is unreachable the built-in list is used, and Custom… accepts any name - Judge Model: Model used for the consensus and summary calls (defaults to the selected LLM model)
- Judge Temperature: 0.0 — the judge only classifies and summarises, so it runs greedily
- Per-philosopher overrides: Off by default; enables a provider/model per philosopher
- Time Limit: The debate stops once this duration elapses (default 30 minutes)
- Max Turns: 20 turns maximum per debate
- Consensus Check Interval: Every 2 turns, plus the final turn (judging is a full extra model call)
- Temperature: 0.7 (balanced creativity/rationality) for the debating philosophers
- Response Length: 512 tokens per turn
- Request Timeouts: 5 seconds to connect, 10 minutes to read a response
- Python: 3.11 or newer
debate_settings.jsonholds the saved configuration anddebates_data/holds finished debates. Both paths can be redirected with theMASTER_DEBATE_SETTINGS_FILEandMASTER_DEBATE_DEBATES_DIRenvironment variables.- Writes go to a temporary file and are moved into place with
os.replace, and settings access is serialised by a lock. Every Streamlit session in a process shares these files, so a file is never left half-written, but the last session to change a setting still wins.
- Model Quality: Better philosophical reasoning with larger models (Llama3 70B, Phi-4, etc.)
- Consensus: Tough philosophical issues rarely reach consensus - that's the point!
- Debate Quality: Try contrasting philosophies (e.g., Rawls vs. Nozick on justice)
pip install -r requirements-dev.txt
pytest
ruff check .The suite covers the debate engine, the streaming client, the background debate
runner, the philosopher roster, and the Streamlit app (via
streamlit.testing.v1.AppTest), so it runs without a network connection or an
LLM backend.
MIT License — see LICENSE for details. Feel free to modify and extend!