An interactive platform that enables AI agents from different domains to engage in structured debates on various topics.
The AI Debate Simulator is a Flask-based web application that facilitates debates between AI agents specialized in different domains. Each agent utilizes domain-specific knowledge bases and Large Language Models (LLMs) to generate informed responses and engage in meaningful discussions.
-
Web Application (
app.py)- Flask server handling HTTP requests
- Manages debate creation and status
- Provides API endpoints for debate interaction
-
Agent System (
agents/)agent.py: Defines the base Agent class for debate participantsorchestrator.py: Manages debate flow and agent interactionsspecializations.py: Creates domain-specific agents
-
Knowledge Base (
knowledge_base/)- Domain-specific knowledge storage
- RAG (Retrieval-Augmented Generation) implementation
- Organized by domains (AI, Data Science, ML, etc.)
-
Frontend (
static/,templates/)- Web interface for debate interaction
- Real-time debate status updates
- Debate visualization and logging
- Clone the repository
- Set up a Python virtual environment:
python -m venv .venv source .venv/bin/activate # On Windows: .venv\Scripts\activate
- Install dependencies:
pip install -r requirements.txt
- Ensure Ollama is installed and running for LLM support
- Start the application:
python app.py
- Navigate to
http://localhost:5000in your browser - Create a new debate by:
- Selecting a topic
- Choosing participating domains (minimum 2)
- Setting the number of rounds
- Selecting LLM type and model
GET /: Home page with debate creation formGET /debates: List of all active debatesPOST /start_debate: Initialize a new debateGET /debate/<debate_id>: View specific debate
GET /api/debate/<debate_id>/status: Get debate status{ "status": "in_progress", "current_round": 2, "total_rounds": 3, "agents": ["AI Expert", "Data Scientist"], "log_length": 4, "has_summary": false }GET /api/debate/<debate_id>/log: Get debate log and summary{ "status": "completed", "log": [...], "summary": "Debate summary text" }
- Asynchronous debate progression
- Domain-specific knowledge integration
- Real-time status updates
- Automated debate summarization
- Multi-round structured discussions
- Support for various LLM backends
The agent system consists of specialized AI agents that:
- Access domain-specific knowledge bases
- Generate contextual responses
- Maintain conversation history
- Support multiple LLM backends
The DebateOrchestrator manages:
- Round progression
- Agent turn management
- Context maintenance
- Summary generation
- Status tracking
Current knowledge domains include:
- Artificial Intelligence
- Data Analytics
- Data Science
- Machine Learning
- Programming
- UI/UX Design
Each domain has its own knowledge base stored in knowledge_base/domains/.