A multi-agent philosophical debate platform powered by the GitHub Copilot SDK. Six AI agents embodying different philosophical traditions debate life's deepest questions, with a moderator synthesizing the final answer.
| Agent | Tradition | Core Focus |
|---|---|---|
| 🏛️ Marcus | Stoic | Virtue, self-mastery, accepting what we cannot control |
| 🎭 Jean-Paul | Existentialist | Freedom, authenticity, creating our own meaning |
| 🪷 Thich | Buddhist | Impermanence, non-attachment, compassion |
| 🔧 William | Pragmatist | Practical consequences, what works in reality |
| 🔬 René | Rationalist | Reason, logic, first principles |
| 🎪 Albert | Absurdist | Embracing life's absurdity with revolt and joy |
- Real-time debates: Watch philosophers respond and challenge each other via Server-Sent Events
- Moderator synthesis: A final synthesis highlighting agreements, tensions, and insights
- Persistence: Debates are saved to database (SQLite for dev, PostgreSQL for production)
- History: Browse and revisit past debates
- Backend: Python Flask
- AI Runtime: GitHub Copilot SDK
- Database: SQLAlchemy (SQLite / PostgreSQL)
- Frontend: Vanilla JS with SSE streaming
- Deployment: Azure Web App + Azure PostgreSQL
- GitHub Copilot CLI installed and authenticated
- Python 3.8+
# Clone the repository
git clone https://github.com/yourusername/debatechamber.git
cd debatechamber
# Create virtual environment
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate
# Install dependencies
pip install -r requirements.txt
# Copy environment file
cp .env.example .env
# Run the application
python app.pyVisit http://localhost:5000 to start debating!
# Create resource group
az group create --name debate-chamber-rg --location eastus
# Create PostgreSQL server
az postgres flexible-server create \
--resource-group debate-chamber-rg \
--name debate-chamber-db \
--admin-user adminuser \
--admin-password <your-password> \
--sku-name Standard_B1ms
# Create database
az postgres flexible-server db create \
--resource-group debate-chamber-rg \
--server-name debate-chamber-db \
--database-name debatechamber
# Create Web App
az webapp create \
--resource-group debate-chamber-rg \
--plan debate-chamber-plan \
--name debate-chamber-app \
--runtime "PYTHON:3.11"In Azure Portal, navigate to your Web App > Configuration > Application settings:
DATABASE_URL=postgresql://adminuser:<password>@debate-chamber-db.postgres.database.azure.com:5432/debatechamber?sslmode=require
FLASK_SECRET_KEY=<generate-a-secure-key>
FLASK_ENV=production
COPILOT_GITHUB_TOKEN=ghp_your_github_pat_with_copilot_access
Set the startup command to: startup.sh
# Deploy using Azure CLI
az webapp up --name debate-chamber-app --resource-group debate-chamber-rgThe Copilot SDK requires authentication to access AI models. There are three options:
Best for personal projects or demos where YOU pay for all usage.
- Create a GitHub Personal Access Token (PAT) with "Copilot Requests" scope
- Set
COPILOT_GITHUB_TOKENenvironment variable in Azure - All API calls are billed to your Copilot subscription
# In Azure App Settings
COPILOT_GITHUB_TOKEN=ghp_your_personal_access_tokenBest for organizations wanting to use their own LLM API keys.
- Go to GitHub Enterprise Settings → Copilot → Models → Custom Models
- Add API keys from: OpenAI, Anthropic, Azure OpenAI, AWS Bedrock, Google AI
- The SDK automatically uses your organization's configured keys
- Billing goes directly to your LLM provider
Supported providers:
- OpenAI
- Anthropic (Claude)
- Azure OpenAI
- AWS Bedrock
- Google AI Studio
- xAI (Grok)
Best for apps where each user has their own Copilot subscription.
- Implement GitHub OAuth login in your app
- Pass each user's token to the SDK
- Each user's API calls are billed to their own subscription
| Variable | Description | Default |
|---|---|---|
DATABASE_URL |
Database connection string | sqlite:///debates.db |
FLASK_SECRET_KEY |
Session encryption key | dev-secret-key-... |
FLASK_ENV |
Environment (development/production) |
development |
COPILOT_GITHUB_TOKEN |
GitHub PAT for Copilot access | (uses CLI auth) |
COPILOT_MODEL |
AI model to use | gpt-4.1 |
debatechamber/
├── app.py # Flask application & routes
├── config.py # Configuration management
├── models.py # SQLAlchemy database models
├── philosophers.py # Agent definitions & prompts
├── requirements.txt # Python dependencies
├── startup.sh # Azure startup script
├── .env.example # Environment template
├── static/
│ └── style.css # Styling
└── templates/
├── index.html # Main debate page
├── debates.html # Debate history list
└── debate_detail.html # Individual debate view
MIT Philosophical Debate Chamber