This project demonstrates a sophisticated multi-agent AI system designed to refine product requirements through specialized agent interactions, aggregate feedback, and generate comprehensive visualizations of changes. The system includes advanced debate handling capabilities that resolve conflicts in under 2 minutes for maximum efficiency.
- 🤖 Multi-Agent Architecture: Specialized agents for Domain Expert, UX/UI Specialist, Technical Architect, and Moderator/Aggregator
- ⚡ Efficient Debate Resolution: Automated debate analysis and routing to appropriate specialists (under 2 minutes)
- 🔄 Parallel Processing: Multiple specialist agents work simultaneously for faster results
- 📊 Comprehensive Analysis: Business logic, user experience, technical architecture, and conflict resolution
- 🎯 Smart Query Classification: Automatic routing to the most appropriate specialist based on query content
- 💬 Real-time Feedback: Live activity timeline showing agent progress and interactions
- 🌐 Fullstack Application: React frontend with LangGraph-powered backend
- 🚀 Optimized Performance: Uses Google Gemini 2.0 Flash model for all agent interactions
The system implements a sophisticated multi-agent workflow as shown in the flow diagram:
- Domain Expert: Analyzes business logic, industry standards, compliance requirements, and domain-specific knowledge
- UX/UI Specialist: Handles user experience requirements, interface design, accessibility, and usability patterns
- Technical Architect: Manages system architecture, technology stack, scalability, and implementation requirements
- Moderator/Aggregator: Consolidates feedback from all specialists and resolves conflicts
- Debate Handler: Analyzes and routes debates to appropriate specialists for efficient resolution
The project is divided into two main directories:
frontend/: Contains the React application built with Vite and TypeScriptbackend/: Contains the LangGraph/FastAPI application with the multi-agent system
Follow these steps to get the application running locally for development and testing.
1. Prerequisites:
- Node.js and npm (or yarn/pnpm)
- Python 3.11+
GEMINI_API_KEY: The backend requires a Google Gemini API key.- Navigate to the
backend/directory. - Create a file named
.envby copying thebackend/.env.examplefile. - Open the
.envfile and add your Gemini API key:GEMINI_API_KEY="YOUR_ACTUAL_API_KEY"
- Navigate to the
2. Install Dependencies:
Backend:
cd backend
pip install -r requirements.txt
Frontend:
cd frontend
npm install3. Run Development Servers:
Backend
langgraph dev --allow-blockingfrontend
npm run devThis will run the backend and frontend development servers. Open your browser and navigate to the frontend development server URL (e.g., http://localhost:5173/app).
Alternatively, you can run the backend and frontend development servers separately. For the backend, open a terminal in the backend/ directory and run langgraph dev. The backend API will be available at http://127.0.0.1:2024. For the frontend, open a terminal in the frontend/ directory and run npm run dev. The frontend will be available at http://localhost:5173.
The core of the backend is a LangGraph-based multi-agent system defined in backend/src/agent/graph.py. It follows these steps:
- Query Classification: Analyzes user input to determine the most appropriate specialist agent(s) to handle the request
- Parallel Specialist Analysis: Routes queries to Domain Expert, UX/UI Specialist, and/or Technical Architect based on classification
- Debate Detection & Routing: Automatically detects debates and routes them to appropriate specialists for resolution
- Moderator Aggregation: Consolidates feedback from all specialists and resolves any conflicts
- Final Answer Generation: Creates a comprehensive, well-structured final answer based on all specialist analyses
The system includes sophisticated debate handling capabilities:
- Automatic Detection: Identifies debate content through keyword analysis
- Smart Routing: Routes debates to the most appropriate specialist based on content analysis
- Efficiency Focus: Targets resolution in under 2 minutes for optimal productivity
- Conflict Resolution: Moderator agent resolves conflicts between specialist perspectives
The system uses Google Gemini 2.0 Flash for all agent interactions, ensuring:
- Consistent Performance: Same model across all specialist agents
- Optimized Speed: Fast response times for real-time interactions
- Cost Efficiency: Single model reduces API costs
- Reliable Results: Consistent quality across all analyses
The system provides several REST API endpoints:
POST /api/refine-requirements: Main endpoint for product requirements refinementGET /api/health: Health check endpointGET /api/agents: Information about available specialist agents
For quick testing, you can use the CLI example:
cd backend
python examples/cli_research.py "What are the requirements for a mobile banking app?"In production, the backend server serves the optimized static frontend build. LangGraph requires a Redis instance and a Postgres database for state management and real-time streaming.
1. Build the Docker Image:
docker build -t multi-agent-requirements -f Dockerfile .2. Run the Production Server:
GEMINI_API_KEY=<your_gemini_api_key> LANGSMITH_API_KEY=<your_langsmith_api_key> docker-compose upOpen your browser and navigate to http://localhost:8123/app/ to see the application.
- React (with Vite) - For the frontend user interface
- TypeScript - For type-safe development
- Tailwind CSS - For styling
- Shadcn UI - For components
- LangGraph - For building the multi-agent system
- Google Gemini 2.0 Flash - LLM for all agent interactions
- FastAPI - For the backend API
This project is licensed under the Apache License 2.0. See the LICENSE file for details.

