DebatingAgents is a state-of-the-art multi-agent AI debate platform designed to tackle complex math proofs, logic puzzles, coding challenges, and open-ended analytical queries. By orchestrating parallel adversarial debates between competing top-tier AI models (OpenAI, Gemini, Anthropic Claude, Groq/DeepSeek, and local Ollama models), agents engage in line-by-line cross-examination to expose calculation mistakes, logical fallacies, and unstated assumptions.
When deadlocked without consensus, an elected AI Chief Justice / Moderator reviews the full transcript, evaluates argument strengths, and issues a final reasoned ruling.
| Debate across OpenAI, Google Gemini, Anthropic Claude, Groq / DeepSeek, and Ollama (Local) simultaneously. | Models are forced to audit peer reasoning line-by-line, pointing out logical fallacies and calculation errors in opposing arguments. |
| An elected Moderator AI analyzes deadlocked debates, pinpoints flaws in losing logic, and delivers a definitive winning verdict. |
Engineered with Python asyncio and httpx for concurrent, high-speed model responses and low latency.
|
Color-coded model badges, real-time live execution panels, confidence meters (0-100%), and callout banners powered by rich.
|
Automatically exports full debate logs as structured Markdown (.md) reports and raw JSON (.json) data into ./debates/.
|
| Provider | Supported Models | Required Environment Key |
|---|---|---|
| OpenAI | gpt-4o, gpt-4o-mini, o3-mini |
OPENAI_API_KEY |
| Google Gemini | gemini-2.5-flash, gemini-2.5-pro, gemini-1.5-flash |
GEMINI_API_KEY |
| Anthropic Claude | claude-3-5-sonnet, claude-3-5-haiku |
ANTHROPIC_API_KEY |
| Groq | llama-3.3-70b, deepseek-r1-groq |
GROQ_API_KEY |
| Ollama (Local) | ollama-llama3, ollama-deepseek |
OLLAMA_BASE_URL |
git clone https://github.com/smaranjitghose/DebatingAgents.git
cd DebatingAgentsCopy .env.example to .env and add your active API keys:
cp .env.example .envExample .env configuration:
OPENAI_API_KEY=sk-proj-...
GEMINI_API_KEY=AIzaSy...
ANTHROPIC_API_KEY=sk-ant-...
GROQ_API_KEY=gsk_...Using uv (recommended ultra-fast Python manager):
uv sync
uv run main.pyRun without arguments to launch the interactive prompt:
uv run main.pyuv run main.py "How many prime numbers are less than 100?"Specify exact debate participants and round caps:
uv run main.py "What is the sum of angles in an 8-sided regular polygon?" \
--models gpt-4o-mini,gemini-1.5-flash \
--rounds 3Debate across OpenAI, Gemini, and Groq/DeepSeek with an explicit Judge model:
uv run main.py "In a room of 23 people, what is the exact probability that at least two share a birthday?" \
--models gpt-4o-mini,gemini-1.5-flash,llama-3.3-70b \
--judge gpt-4o-mini \
--rounds 5 \
--export-dir ./my_debatesgraph TD
A[User Question] --> B[DebateEngine Core]
B -->|Async Parallel Query| C1[OpenAI Provider]
B -->|Async Parallel Query| C2[Gemini Provider]
B -->|Async Parallel Query| C3[Claude / Groq / Ollama]
C1 --> D{Consensus Check}
C2 --> D
C3 --> D
D -->|Agreed| E[Consensus Answer Output]
D -->|Disagreed| F[Adversarial Cross-Examination Round]
F -->|Deadlock after Max Rounds| G[AI Chief Justice Verdict]
E --> H[Rich Terminal UI & Report Exporter]
G --> H
DebatingAgents/
βββ debating_agents/
β βββ __init__.py # Package version & metadata
β βββ config.py # Model registry & auto-key detection
β βββ models.py # Pydantic schemas (AgentResponse, JudgeVerdict, DebateTranscript)
β βββ debate_engine.py # Async multi-round debate runner & AI Judge synthesizer
β βββ ui.py # Rich terminal panels, tables, and color badges
β βββ cli.py # Command-line interface & argument parser
β βββ providers/ # Async model adapters
β βββ base.py # Provider interface & JSON payload extraction
β βββ openai_provider.py
β βββ gemini_provider.py
β βββ anthropic_provider.py
β βββ groq_provider.py
β βββ ollama_provider.py
βββ debates/ # Exported Markdown & JSON report directory
βββ main.py # Main CLI entrypoint
βββ pyproject.toml # Dependencies & Hatchling build target
βββ .env.example # API Key configuration template
βββ README.md # Documentation
Contributions, issues, and feature requests are welcome! Feel free to check out the issues page.
This project is licensed under the MIT License - see the LICENSE file for details.