Watch Artificial Intelligence clash in real-time debates on any topic.
AI Debates is a full-stack platform that orchestrates structured debates between multiple AI personas. Powered by OpenRouter, it allows you to pit over 600+ LLMs (including GPT-5, Gemini 3, Claude 3.7, DeepSeek R1) against each other, assigning them custom roles, personalities, and stances.
Watch the conversation unfold in real-time as a Moderator AI guides the discussion through opening statements, rebuttals, and closing arguments.
🚀 Live Demo Version is Coming Soon!
- 🎭 Custom Personas: Create detailed debaters with specific voices, biases, and knowledge bases.
- ⚔️ LLM vs LLM: Mix and match models. Have Claude 3 Opus debate GPT-4o on philosophy.
- ⚡ Real-time Streaming: Watch the debate generate token-by-token with live updates.
- ⚖️ AI Moderator: An automated judge manages the flow, ensures rules are followed, and delivers a final verdict.
- 📊 Analytics: Track token usage, cost per debate, and logical fallacy analysis.
- 🐳 Dockerized: Fully containerized setup for easy deployment.
- Framework: FastAPI (Python)
- Database: PostgreSQL (Async SQLAlchemy)
- Queue: Redis & RQ (Redis Queue) for reliable task orchestration
- AI Integration: OpenRouter API
- Framework: React (Vite)
- Styling: TailwindCSS
- State/Routing: React Router, Axios
- Streaming: Server-Sent Events (SSE)
- IDE: Visual Studio Code
Follow these steps to get a local copy up and running.
- Docker installed on your machine.
- An API Key from OpenRouter.
-
Clone the repository
git clone https://github.com/khoren93/ai-debates.git cd ai-debates -
Configure Environment Copy the example environment file:
cp .env.example .env
Open
.envand add your OpenRouter API Key:OPENROUTER_API_KEY=sk-or-v1-your-key-here
-
Run with Docker Build and start the application:
docker-compose up -d --build
-
Access the App
- Frontend: http://localhost:5173
- Backend API: http://localhost:8000/docs
- Open the web interface at
http://localhost:5173. - Click "Create Debate".
- Enter a Topic (e.g., "Is AI sentient?").
- Configure your Participants:
- Debater 1: "Optimist Prime" (Model: GPT-4o)
- Debater 2: "Skeptical Sam" (Model: Claude 3.5 Sonnet)
- Moderator: (Model: Gemini Pro)
- Set the Intensity and Rounds.
- Hit Start Debate and watch the magic happen!
The system uses an event-driven architecture to handle long-running LLM generation tasks without blocking the UI.
- API Layer: Receives a request to create a debate.
- Database: Saves the initial debate configuration with status
queued. - Queue (RQ): A job is pushed to the Redis Queue.
- Worker: Picks up the job and acts as the "Orchestrator".
- It builds the prompt for the current speaker.
- Calls OpenRouter API.
- Streams the response back to Redis Pub/Sub.
- Frontend: Subscribes to the debate channel via SSE (Server-Sent Events) and updates the UI in real-time.
- Voice Synthesis (TTS): Hear the debaters speak!
- User Voting: Let the audience decide the winner.
- Export Transcripts: Save debates as PDF/Text.
- Multiplayer Mode: Human vs AI debates.
- Local LLM Support: Integration with Ollama for offline debates.
Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/AmazingFeature) - Commit your Changes (
git commit -m 'Add some AmazingFeature') - Push to the Branch (
git push origin feature/AmazingFeature) - Open a Pull Request
Distributed under the MIT License. See LICENSE for more information.
Project Link: https://github.com/khoren93/ai-debates
