A multi-persona AI debugging consensus engine — Get 5 expert AI perspectives on your bugs, then watch them reach a consensus.
DebugMind automatically analyzes your code using 5 distinct AI developer personas in parallel. Each persona brings a unique perspective — from ruthless fixing to patient teaching to performance optimization. A consensus engine then synthesizes all insights into a definitive fix and explanation.
┌─────────────────────────────────────────────────────────────────┐
│ Frontend (React + Vite) │
│ http://localhost:5173 │
└───────────────────────────┬─────────────────────────────────────┘
│ POST /api/debug
▼
┌─────────────────────────────────────────────────────────────────┐
│ Python Backend (FastAPI) │
│ http://localhost:3001 │
├─────────────────────────────────────────────────────────────────┤
│ ┌─────────┐ ┌─────────┐ ┌─────────┐ ┌─────────┐ ┌────────┐ │
│ │ Fixer │ │ Teacher │ │Optimizer│ │ Tester │ │Visual. │ │
│ │ (Groq) │ │(Gemini) │ │(Gemini) │ │(OpenR.) │ │ (Groq) │ │
│ └────┬────┘ └────┬────┘ └────┬────┘ └────┬────┘ └────┬───┘ │
│ └────────────┴───────────┼───────────┴────────────┘ │
│ ▼ │
│ ┌─────────────────────┐ │
│ │ Consensus Engine │ │
│ │ (Gemini) │ │
│ └─────────────────────┘ │
├─────────────────────────────────────────────────────────────────┤
│ RAG: CVE Fetcher (NVD) + MDN Docs Fetcher │
└─────────────────────────────────────────────────────────────────┘
| Persona | Model | Provider | RAG Context | Role |
|---|---|---|---|---|
| 🔧 The Fixer | Llama 3.1 8B Instant | Groq | CVE Database | Ruthless, instant bug fixes |
| 👨🏫 The Teacher | Gemini 1.5 Flash 8B | None | Patient explanations with analogies | |
| ⚡ The Optimizer | Gemini 1.5 Flash | MDN Web Docs | Performance analysis & Big-O | |
| 🧪 The Tester | Mistral 7B Instruct | OpenRouter | None | Failing/passing test generation |
| 👁️ The Visualizer | Llama 3.1 8B Instant | Groq | None | Step-by-step execution tracing |
| 🎯 Consensus | Gemini 1.5 Flash | All Personas | Meta-analysis & final verdict |
- Llama 3.1 8B on Groq: Blazing fast inference (~100ms) for The Fixer and Visualizer where speed is critical
- Gemini 1.5 Flash: Excellent reasoning and huge context window for complex analysis and consensus building
- Mistral 7B Instruct: Precise instruction-following for structured test generation
The system uses Retrieval-Augmented Generation to enhance persona responses:
| RAG Source | Persona | Purpose |
|---|---|---|
| NVD CVE Database | The Fixer | Security vulnerability awareness |
| MDN Web Docs | The Optimizer | Latest JavaScript best practices |
Both sources have a 3-second timeout to prevent delays.
- Monaco Code Editor with syntax highlighting and line numbers
- 5 Toggleable AI Personas - enable/disable any persona
- Side-by-side Diff Viewer for comparing original vs fixed code
- ELI5 Mode - simplify any explanation for beginners
- Sample Bugs Library - 5 preloaded bugs to test
- Bug Pattern Tracker - tracks your debugging history
- Export Report - generate HTML reports
- Auto Language Detection - supports 14+ languages
| Provider | Link | Free Tier |
|---|---|---|
| Groq | console.groq.com | Yes |
| Google AI | aistudio.google.com | Yes |
| OpenRouter | openrouter.ai | Yes |
# Copy example env file
cd backend
cp .env.example .env
# Edit .env with your API keys
GROQ_API_KEY=your_groq_key_here
GEMINI_API_KEY=your_gemini_key_here
OPENROUTER_API_KEY=your_openrouter_key_here# Terminal 1: Python Backend
cd backend/python
pip install -r requirements.txt
python main.py
# Terminal 2: Frontend
cd frontend
npm install
npm run dev4. Open http://localhost:5173 🎉
debugmind/
├── frontend/
│ ├── src/
│ │ └── App.jsx # Main React component
│ ├── index.html
│ └── package.json
│
├── backend/
│ ├── .env # API keys (create from .env.example)
│ ├── .env.example
│ │
│ └── python/ # Python AI backend
│ ├── main.py # FastAPI server (port 3001)
│ ├── requirements.txt
│ ├── providers/
│ │ ├── groq.py
│ │ ├── gemini.py
│ │ └── openrouter.py
│ ├── personas/
│ │ ├── fixer.py
│ │ ├── teacher.py
│ │ ├── optimizer.py
│ │ ├── tester.py
│ │ ├── visualizer.py
│ │ └── consensus.py
│ ├── rag/
│ │ ├── cve_fetcher.py
│ │ └── mdn_fetcher.py
│ └── utils/
│ ├── language_detector.py
│ └── library_extractor.py
│
└── README.md
| Variable | Description | Required |
|---|---|---|
GROQ_API_KEY |
Groq API key for Llama models | Yes |
GEMINI_API_KEY |
Google AI API key for Gemini | Yes |
OPENROUTER_API_KEY |
OpenRouter API key for Mistral | Yes |
PORT |
Express server port (default: 3001) | No |
PYTHON_PORT |
Python server port (default: 3002) | No |
FRONTEND_URL |
Frontend URL for CORS (default: http://localhost:5173) | No |
Frontend: React, Vite, Monaco Editor, react-diff-viewer-continued
Backend: Express.js (Gateway), FastAPI (AI Processing)
AI Providers: Groq, Google Gemini, OpenRouter
RAG Sources: NVD CVE Database, MDN Web Docs
MIT
