AI-powered multi-agent system for bug triage, knowledge retrieval, code context linking, and fix recommendation.
Stack: Python + FastAPI · React + Vite + Tailwind · sentence-transformers + FAISS · Ollama (local LLM)
cd backend
python -m venv venv
source venv/bin/activate # Windows: venv\Scripts\activate
pip install -r requirements.txt
uvicorn main:app --reload --port 8000API live at http://localhost:8000 · Swagger docs at http://localhost:8000/docs
cd frontend
npm install
npm run devUI live at http://localhost:5173
ollama serve
ollama pull codellama # or: llama3, deepseek-coderBugBot works without Ollama using intelligent rule-based fallbacks.
bugbot/
├── backend/
│ ├── main.py # FastAPI app + all routes
│ ├── config.py # Environment config
│ ├── requirements.txt
│ ├── data/
│ │ ├── bugs.json # Bug DB (15 sample bugs)
│ │ ├── faiss_index.bin # Vector index (auto-generated)
│ │ └── sample_repo/ # Sample Java source files
│ ├── agents/
│ │ ├── triage_agent.py # Bug classification P0–P3
│ │ ├── knowledge_agent.py # FAISS similarity search
│ │ ├── context_agent.py # Code file & function linking
│ │ └── fix_agent.py # LLM fix + rule-based fallback
│ ├── models/schemas.py # Pydantic models
│ └── services/
│ ├── bug_store.py # JSON CRUD
│ ├── embedding_service.py # sentence-transformers + FAISS
│ └── ollama_service.py # Ollama REST client
└── frontend/
└── src/
├── App.jsx
├── components/
│ ├── Dashboard.jsx # Stats + recent bugs
│ ├── BugAnalyzer.jsx # Full 4-agent pipeline UI
│ ├── BugList.jsx # Registry with search/filter
│ └── Sidebar.jsx
├── hooks/useData.js
└── services/api.js
| Method | Endpoint | Description |
|---|---|---|
| POST | /api/bugs/analyze | Run full pipeline |
| GET | /api/bugs | List bugs (filter by status/priority) |
| PATCH | /api/bugs/{id} | Update bug status |
| GET | /api/bugs/stats | Aggregated stats |
| POST | /api/index/rebuild | Rebuild FAISS index |
| GET | /api/ollama/status | Check LLM availability |
# Drop source files into:
backend/data/sample_repo/
# Rebuild index:
curl -X POST http://localhost:8000/api/index/rebuildSupports: .java .py .js .ts .go .kt .cs .cpp
FAISS index empty → Click "Rebuild Index" on Dashboard or:
curl -X POST http://localhost:8000/api/index/rebuildOllama not connecting → Run ollama serve in a separate terminal.
Frontend can't reach API → Ensure backend is on port 8000.
- Real Jira webhook integration
- Git/Gerrit code repo integration
- Java AST Parser for line-level code analysis
- Auto-create draft pull request with fix
- Slack/Teams P0 notifications
- Fine-tuned triage model (replace keyword scoring)