A demo-ready React SPA showcasing three AI decision-making frameworks:
- LLM Council - Multiple AI models deliberate and a chairman synthesizes
- DxO Decision Orchestrator - Role-based sequential decision-making
- Adversarial Debate - Advocate-Challenger-Arbiter pattern for refined reasoning
- Multiple AI council members provide independent answers
- Each member shows confidence scores and detailed reasoning
- Chairman agent synthesizes all inputs into final recommendation
- Visual indicators for consensus and disagreements
- Role-based sequential analysis (Lead Researcher → Critic → Expert → Analyst)
- Each role builds upon previous roles' outputs
- Final decision shows revisions and how feedback was incorporated
- Inspired by Microsoft's MAI-DxO research
- Three-role pattern: Advocate → Challenger → Arbiter
- Multi-turn debate cycles with iterative refinement
- Smart convergence detection or configurable turn limits
- Adversarial critique strengthens final reasoning
- Frontend: React 18 + Vite + Tailwind CSS
- Backend: Node.js + Express
- LLM Integration: Multi-provider support (OpenAI, Anthropic, Google Gemini, OpenRouter) with mock mode for demos
- Node.js 18+
- npm or yarn
# Clone the repository
git clone <repo-url>
cd DeepR
# Install dependencies
npm run install:all- Copy the environment example file:
cp backend/.env.example backend/.env- Configure your settings in
backend/.env:
# Use mock data (no API key needed)
USE_MOCK=true
# Or use real AI APIs
USE_MOCK=false
# OpenAI API Configuration
AI_INTEGRATIONS_OPENAI_API_KEY=your-openai-api-key-here
AI_INTEGRATIONS_OPENAI_BASE_URL=https://api.openai.com/v1
# Anthropic API Configuration (optional)
AI_INTEGRATIONS_ANTHROPIC_API_KEY=your-anthropic-api-key-here
AI_INTEGRATIONS_ANTHROPIC_BASE_URL=https://api.anthropic.com
# Google Gemini API Configuration (optional)
AI_INTEGRATIONS_GEMINI_API_KEY=your-gemini-api-key-here
AI_INTEGRATIONS_GEMINI_BASE_URL=https://generativelanguage.googleapis.com
# OpenRouter API Configuration (optional, for open-source models)
AI_INTEGRATIONS_OPENROUTER_API_KEY=your-openrouter-api-key-here
AI_INTEGRATIONS_OPENROUTER_BASE_URL=https://openrouter.ai/api/v1# Start both frontend and backend
npm run devThis starts:
- Frontend: http://localhost:5173
- Backend: http://localhost:3001
# Frontend only
npm run dev:frontend
# Backend only
npm run dev:backendDeepR/
├── frontend/ # React frontend
│ ├── src/
│ │ ├── components/ # UI components
│ │ │ ├── CouncilView.jsx
│ │ │ ├── DxOView.jsx
│ │ │ ├── AdversarialView.jsx
│ │ │ ├── CouncilMemberCard.jsx
│ │ │ ├── ChairmanCard.jsx
│ │ │ ├── RoleCard.jsx
│ │ │ ├── FinalDecisionCard.jsx
│ │ │ └── ...
│ │ ├── App.jsx
│ │ └── main.jsx
│ └── tailwind.config.js
│
├── backend/ # Node.js backend
│ └── src/
│ ├── index.js # Express server
│ ├── config.js # Configuration
│ ├── llmService.js # LLM API integration
│ └── mockData.js # Mock responses
│
└── package.json # Root package.json
GET /api/health
POST /api/council
Body: { "question": "Your research question" }
POST /api/council/stream # Streaming responses
Body: { "question": "Your research question" }
POST /api/dxo
Body: { "question": "Your decision problem" }
POST /api/dxo/stream # Streaming responses
Body: { "question": "Your decision problem" }
POST /api/adversarial/stream # Streaming responses
Body: {
"question": "Your research question",
"roles": [
{ "id": "advocate", "model": "gpt-5.3", ... },
{ "id": "challenger", "model": "gpt-5.3", ... },
{ "id": "arbiter", "model": "gpt-5.3", ... }
],
"turnLimit": "smart" // or "1", "2", "3"
}
| Variable | Description | Default |
|---|---|---|
PORT |
Server port | 3001 |
USE_MOCK |
Use mock data instead of real API | true |
AI_INTEGRATIONS_OPENAI_API_KEY |
OpenAI API key | - |
AI_INTEGRATIONS_OPENAI_BASE_URL |
OpenAI API base URL | - |
AI_INTEGRATIONS_ANTHROPIC_API_KEY |
Anthropic API key | - |
AI_INTEGRATIONS_ANTHROPIC_BASE_URL |
Anthropic API base URL | - |
AI_INTEGRATIONS_GEMINI_API_KEY |
Google Gemini API key | - |
AI_INTEGRATIONS_GEMINI_BASE_URL |
Gemini API base URL | - |
AI_INTEGRATIONS_OPENROUTER_API_KEY |
OpenRouter API key (for open-source models) | - |
AI_INTEGRATIONS_OPENROUTER_BASE_URL |
OpenRouter API base URL | - |
In backend/.env:
# For demos without API costs
USE_MOCK=true
# For real LLM responses (requires API keys)
USE_MOCK=false
AI_INTEGRATIONS_OPENAI_API_KEY=sk-...
AI_INTEGRATIONS_ANTHROPIC_API_KEY=sk-ant-...
AI_INTEGRATIONS_GEMINI_API_KEY=...
AI_INTEGRATIONS_OPENROUTER_API_KEY=sk-or-...Edit backend/src/config.js:
councilMembers: [
{ id: 'new-model', name: 'New Model', model: 'gpt-5.3', provider: 'Provider Name', color: '#hex' },
// ...
]Note: The application supports multiple AI providers including OpenAI, Anthropic, Google Gemini, and OpenRouter (for open-source models like Llama, DeepSeek, etc.).
Edit the role configuration in backend/src/config.js or modify prompts in backend/src/llmService.js.
- Start with Mock Mode - Ensures reliable demo without API failures
- Use Quick Prompts - Pre-configured questions for best results
- Expand Reasoning - Click to show detailed AI reasoning
- Compare Modes - Switch between Council, DxO, and Adversarial to show different approaches
- Select Models - Choose from multiple AI providers (OpenAI, Anthropic, Google, OpenRouter)
- Adversarial Turns - Configure debate cycles for deeper analysis
MIT