An autonomous, end-to-end multi-agent AI system designed to convert raw, unstructured bug reports, stack traces, and GitHub issues into structured technical entities, ranked root-cause hypotheses, step-by-step reproduction flows, ready-to-run Jest/RTL unit tests, and interactive Mermaid.js architecture flowcharts.
- Overview & Vision
- Multi-Agent Pipeline Architecture
- Key Features & Application Pages
- Technology Stack
- Prerequisites
- Step-by-Step Installation & Setup
- Environment Configuration
- Running the Application
- Database & Data Management
- REST API Reference
- Verification & Diagnostic Commands
- Troubleshooting & FAQ
- License
Software debugging is often slowed down by vague user reports, missing environment context, unverified stack traces, and the time required to write deterministic reproduction tests.
The AI-Powered Bug Reproduction Engine solves this by employing a multi-agent orchestration pipeline. Each agent is specialized for a distinct phase of the debugging lifecycle β from entity parsing to deterministic confidence scoring, root-cause hypothesis ranking, automated test code generation, and fix recommendations.
flowchart TD
RawInput[Raw Bug Report / Stack Trace / GitHub Issue] --> Agent1[Agent 1: Entity Extractor]
Agent1 --> Agent2[Agent 2: Deterministic Confidence Scorer]
Agent2 --> Agent3[Agent 3: Root-Cause Hypothesis Generator]
Agent3 --> Agent4[Agent 4: Step Validator & Prerequisite Engine]
Agent4 --> Agent5[Agent 5: Executable Test Writer]
Agent5 --> Agent6[Agent 6: Fix Suggester & Flow Diagrammer]
Agent6 --> DB[(PGlite Embedded Postgres)]
Agent6 --> UI[Frontend Web Dashboard & SSE Stream]
- Agent 1 β Entity Extraction Agent: Parses raw text into structured JSON schemas (affected components, triggering actions, expected vs actual behavior, error codes, and environment details).
- Agent 2 β Confidence Scorer: Calculates an objective 0β100 confidence score based on verifiable input signals (stack trace presence, environment info, reproduction step clarity).
- Agent 3 β Hypothesis Generator: Formulates, ranks, and retains/eliminates root-cause hypotheses based on evidence mechanics.
- Agent 4 β Step Validator: Generates step-by-step reproduction instructions with prerequisite checks.
- Agent 5 β Executable Test Writer: Synthesizes ready-to-execute Jest, React Testing Library, or Vitest TypeScript unit & integration test files.
- Agent 6 β Fix Suggester & Diagrammer: Renders interactive Mermaid.js failure diagrams and recommends actionable code-level fixes with confidence rankings.
-
π Home Page (
/): Submit raw text bug reports or GitHub issue URLs. Features live Server-Sent Events (SSE) streaming as each AI agent executes in real time. -
π Analyses History (
/history): Interactive, filterable table displaying all past bug analyses with confidence badges, input types, dates, and severity tags. -
π Analytics Dashboard (
/dashboard): Visual charts, severity distribution metrics, confidence score trends, and system throughput summary. -
π¬ Analysis Detail Deep-Dive (
/detail/:id): Multi-tab interface providing deep technical breakdown:- Entities: Extracted component metadata and environment specs.
- Hypotheses: Ranked root-cause theories with mechanisms.
- Reproduction Steps: Step-by-step instructions and prerequisites.
- Test Code: Syntax-highlighted Jest/RTL unit tests with one-click copy.
- Flow Chart: Interactive Mermaid.js visualization of the bug execution path.
- Fix Suggestions: Prioritized code fixes with target file locations.
-
π§ͺ NL-to-Test Generator (
/nl2test): Converts plain English bug descriptions directly into structured assertions. -
β‘ Flaky Test Detector (
/flaky-detector): Analyzes intermittent test behavior and computes flakiness probability scores. -
π Environment Matrix Diff (
/env-diff): Compares OS, browser, and runtime matrix mismatches between working and failing setups. -
π Project Registry (
/projects): Organize bug reports by software project or repository. -
π Export Suite (
/export): Export diagnostic reports to Markdown or PDF formats.
| Layer | Technologies Used |
|---|---|
| Frontend UI | React 18, Vite, Tailwind CSS, Lucide Icons, Shadcn UI, Recharts, Mermaid.js |
| Backend API | Node.js, Express, Fastify, Zod Schema Validation, SSE Streaming |
| Database | @electric-sql/pglite (WASM Embedded PostgreSQL), Drizzle ORM |
| AI Infrastructure | Groq AI (llama-3.3-70b-versatile), OpenAI SDK, OpenRouter API |
| Package Manager | PNPM Workspace |
Before setting up the project, ensure you have the following installed on your machine:
- Node.js: Version
v20.0.0or higher (Download from nodejs.org) - PNPM Package Manager: Version
v9.0.0or higher:npm install -g pnpm
- Git: Version
2.xor higher
git clone https://github.com/your-username/AI-BugReproducer.git
cd AI-BugReproducerInstall all workspace dependencies using PNPM:
pnpm installCreate a .env file in the root directory by copying the .env.example template:
On Linux/macOS:
cp .env.example .envOn Windows (PowerShell):
Copy-Item .env.example .envOpen .env in your code editor and configure your Groq API Key:
# Server Port Configuration
PORT=8080
FRONTEND_PORT=5000
# LLM Provider Configuration
LLM_PROVIDER=groq
GROQ_API_KEY=your_groq_api_key_here
GROQ_MODEL=llama-3.3-70b-versatile
# Database Path (Default embedded PGlite location)
DATABASE_URL=file:.data/pgdataNote: Get your free Groq API key from console.groq.com.
To run the full application locally, you will start the Backend API Server and the Frontend Web Client.
pnpm --filter @workspace/api-server run build$env:PORT="8080"; node ./artifacts/api-server/dist/index.mjsOpen a second terminal window and run:
$env:PORT="5000"; $env:BASE_PATH="/"; $env:API_PROXY_TARGET="http://127.0.0.1:8080"; pnpm --filter @workspace/bug-engine run devOpen your web browser and navigate to:
π http://localhost:5000 (Main UI)
π http://localhost:5000/history (Bug Analyses History)
This project uses PGlite (@electric-sql/pglite), an embedded WASM PostgreSQL database that stores data locally in .data/pgdata. No external PostgreSQL server installation is required!
To load all 55 benchmark bug analysis records into your local database:
pnpm --filter @workspace/scripts exec tsx ./src/import-csv-data.tspnpm --filter @workspace/scripts exec tsx ./src/seed-analyses.ts| Method | Endpoint | Description |
|---|---|---|
GET |
/api/healthz |
System health check |
GET |
/api/analyses |
List all bug analyses |
GET |
/api/analyses/:id |
Fetch specific bug analysis by ID |
POST |
/api/analyses |
Submit new bug report for AI analysis |
POST |
/api/analyses/:id/run |
Trigger real-time SSE AI agent analysis stream |
DELETE |
/api/analyses/:id |
Delete an analysis record |
GET |
/api/analyses/stats/summary |
Get aggregated system metrics |
GET |
/api/analyses/trends |
Fetch 30-day analysis trend points |
GET |
/api/settings/llm |
Read LLM provider configuration |
POST |
/api/settings/llm/test |
Test live Groq AI API key connection |
GET |
/api/projects |
List all registered projects |
Run the automated point-to-point verification suite to validate all API endpoints, database persistence, LLM connectivity, and frontend proxies:
pnpm --filter @workspace/scripts exec tsx ./src/verify-deployment.tsExpected Verification Output:
=== VERIFICATION SUMMARY RESULTS ===
β
ALL 11 POINT-TO-POINT VERIFICATION CHECKS PASSED PERFECTLY!
- Solution: Use the correct health check endpoint:
GET /api/healthz.
- Solution: The app uses
formatDateSafehelper to prevent date formatting crashes on missing ISO timestamps.
- Solution: Verify
GROQ_API_KEYin.envand test connection viaPOST /api/settings/llm/testor the Settings page UI.
- Solution: Stop any process occupying the port or change
PORTin.env.
Distributed under the MIT License. See LICENSE for more details.