Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

4 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ—£οΈ DebatingAgents v0.2.0

An Intelligent Multi-Model AI Debate Arena & Consensus Engine

Python 3.11+ OpenAI Google Gemini Anthropic Groq License: MIT


GitHub Repo LinkedIn Email


πŸ“– Overview

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.


🎯 Key Features

πŸ€– Multi-Model Arena

Debate across OpenAI, Google Gemini, Anthropic Claude, Groq / DeepSeek, and Ollama (Local) simultaneously.

βš”οΈ Adversarial Cross-Examination

Models are forced to audit peer reasoning line-by-line, pointing out logical fallacies and calculation errors in opposing arguments.

βš–οΈ AI Chief Justice Synthesis

An elected Moderator AI analyzes deadlocked debates, pinpoints flaws in losing logic, and delivers a definitive winning verdict.

⚑ Parallel Async Performance

Engineered with Python asyncio and httpx for concurrent, high-speed model responses and low latency.

🎨 Rich Visual Terminal UX

Color-coded model badges, real-time live execution panels, confidence meters (0-100%), and callout banners powered by rich.

πŸ“Š Transcripts & Telemetry

Automatically exports full debate logs as structured Markdown (.md) reports and raw JSON (.json) data into ./debates/.

πŸ› οΈ Supported AI Providers & Models

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

⚑ Quickstart

1. Clone the Repository

git clone https://github.com/smaranjitghose/DebatingAgents.git
cd DebatingAgents

2. Configure API Keys

Copy .env.example to .env and add your active API keys:

cp .env.example .env

Example .env configuration:

OPENAI_API_KEY=sk-proj-...
GEMINI_API_KEY=AIzaSy...
ANTHROPIC_API_KEY=sk-ant-...
GROQ_API_KEY=gsk_...

3. Install Dependencies & Launch

Using uv (recommended ultra-fast Python manager):

uv sync
uv run main.py

πŸ’» Usage & CLI Examples

πŸ”Ή Interactive Mode

Run without arguments to launch the interactive prompt:

uv run main.py

πŸ”Ή Command-Line Problem Input

uv run main.py "How many prime numbers are less than 100?"

πŸ”Ή Custom Model Lineup & Round Limits

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 3

πŸ”Ή High-Stakes Multi-Model Arena with AI Judge

Debate 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_debates

πŸ—οΈ Architecture & Project Structure

graph 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
Loading
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

🀝 Connect & Contribute

Contributions, issues, and feature requests are welcome! Feel free to check out the issues page.

GitHub LinkedIn Mail


πŸ“ License

This project is licensed under the MIT License - see the LICENSE file for details.

About

An intelligent multi-agent AI debate arena and consensus engine with adversarial cross-examination, AI judge synthesis, and rich visual telemetry.

Topics

Resources

Code of conduct

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages