Project ID: T3:315-Citizen Voice AI MultiAgent Government Accountability System-vinay-vinayb1021
Complete AI-Powered Government Complaint Processing System with Dual Deployment Modes
A comprehensive AI system that automates government complaint processing from citizen submission to resolution tracking. Features 6 intelligent agents working together to ensure transparency, accountability, and efficient resolution of citizen grievances.
Citizen Complaint → Chat Agent → Router Agent → Tracker Agent
├→ Follow Agent
├→ Analytics Agent
└→ Escalate Agent
- 🔴 RED: New complaint received
- 🟠 ORANGE: Routed to department with deadline
- 🔵 BLUE: Acknowledged by department
- 🟢 GREEN: Under resolution/progress
- ⚫ BLACK: Resolved and closed
Perfect for: Development, demos, local testing
Features: Instant setup, no API keys needed, full web interface
Deployment: Single command - python main.py
Perfect for: Government deployment, enterprise scale
Features: Professional AI orchestration, cloud scalability
Deployment: Import ready-made agents, flows, and tools
- Python 3.9+
- Git (for cloning repository)
- Web Browser (Chrome/Firefox recommended)
- IBM Watsonx Account (for Mode 2 only)
git clone https://github.com/vinay1359/citizen-voice-ai.git
cd citizen-voice-ai# Windows
python -m venv venv
venv\Scripts\activate
# Mac/Linux
python3 -m venv venv
source venv/bin/activatepip install -r requirements.txt# Copy environment template
copy ".env sample" .env
# Edit .env file with your credentials (only needed for Mode 2)Quick Start (30 seconds):
python main.pyAccess Points:
- Citizen Interface: http://localhost:8000
- Government Dashboard: http://localhost:8000/dashboard.html
- API Documentation: http://localhost:8000/docs
Features Available:
- Real-time complaint submission
- 6-agent processing simulation
- WebSocket live updates
- Department routing and tracking
- Status progression visualization
- Government dashboard for officials
Prerequisites:
- IBM Watsonx Orchestrate account
- CLI tool installed:
npm install -g @ibm/watsonx-orchestrate-cli
Deployment Steps:
- Import Tools:
orchestrate tools import -k python -f "tools/language_detector.py"
orchestrate tools import -k python -f "tools/text_classifier.py"
orchestrate tools import -k python -f "tools/urgency_analyzer.py"
orchestrate tools import -k python -f "tools/department_mapper.py"
orchestrate tools import -k python -f "tools/deadline_calculator.py"
orchestrate tools import -k python -f "tools/status_monitor.py"
orchestrate tools import -k python -f "tools/reminder_scheduler.py"
orchestrate tools import -k python -f "tools/data_analyzer.py"
orchestrate tools import -k python -f "tools/deadline_tracker.py"- Import Knowledge Base:
orchestrate knowledge import -f "knowledge/knowledge_base_config.yaml"- Import Agents:
orchestrate agents import -f "agents/chat-agent.yaml"
orchestrate agents import -f "agents/router-agent.yaml"
orchestrate agents import -f "agents/tracker-agent.yaml"
orchestrate agents import -f "agents/follow-agent.yaml"
orchestrate agents import -f "agents/analytics-agent.yaml"
orchestrate agents import -f "agents/escalate-agent.yaml"- Deploy Agents:
orchestrate agents deploy --name "Chat_Agent"
orchestrate agents deploy --name "Router_Agent"
orchestrate agents deploy --name "Tracker_Agent"
orchestrate agents deploy --name "Follow_Agent"
orchestrate agents deploy --name "Analytics_Agent"
orchestrate agents deploy --name "Escalate_Agent"- Import Workflow:
orchestrate flows import -f "flows/complaint-processing-flow.py"-
Start the Application:
python main.py
Wait for:
Server started on http://localhost:8000 -
Citizen Interface Demo:
- Open: http://localhost:8000
- Submit a complaint: "There has been no electricity in my area for 2 days"
- Expected Output:
- Complaint ID generated (e.g.,
abc123def) - Status changes: RED → ORANGE
- Agent activities displayed in real-time
- Department assignment shown
- Complaint ID generated (e.g.,
-
Government Dashboard Demo:
- Open: http://localhost:8000/dashboard.html
- View complaint in department queue
- Change status from ORANGE → BLUE → GREEN → BLACK
- Expected Output:
- Real-time status updates
- Deadline tracking
- Department workload display
-
Agent Workflow Observation:
- Chat Agent: Processes complaint → categorizes as "electricity"
- Router Agent: Routes to "Delhi Electricity Board" → sets 48hr deadline
- Tracker Agent: Monitors status → sets up tracking
- Follow Agent: Schedules reminders
- Analytics Agent: Generates insights
- Escalate Agent: Monitors for delays
- Access IBM Watsonx Orchestrate Interface
- Start Chat with Chat_Agent:
{ "complaint_text": "Water pressure is very low in our building", "citizen_name": "John Doe", "phone": "+91-9876543210", "location": "Mumbai, Maharashtra" } - Expected Agent Flow:
- Chat_Agent → processes and returns complaint_id
- Router_Agent → routes to Mumbai Water Board
- Tracker_Agent → sets up monitoring
- Follow/Analytics/Escalate Agents → work in background
citizen-voice-ai/
├── 📄 main.py # FastAPI application (Mode 1)
├── 🌐 index.html # Citizen interface
├── 🏛️ dashboard.html # Government dashboard
├── 📋 requirements.txt # Python dependencies
├── ⚙️ .env # Configuration file
├── 🤖 agents/ # IBM Watsonx agent configs (Mode 2)
│ ├── chat-agent.yaml
│ ├── router-agent.yaml
│ ├── tracker-agent.yaml
│ ├── follow-agent.yaml
│ ├── analytics-agent.yaml
│ └── escalate-agent.yaml
├── 🔄 flows/ # Workflow definitions (Mode 2)
│ ├── complaint-processing-flow.py
│ └── complaint-processing-flow.yaml
├── 🛠️ tools/ # Processing tools (Mode 2)
│ ├── language_detector.py
│ ├── text_classifier.py
│ ├── urgency_analyzer.py
│ └── [6 more tools]
└── 📚 knowledge/ # Knowledge base (Mode 2)
├── complaint-categories.json
├── department-contacts.json
└── [configuration files]
# IBM Watsonx Configuration (Mode 2 only)
WATSON_JWT_TOKEN=your_jwt_token_here
WATSON_INSTANCE_ID=your_instance_id
WATSON_REGION_CODE=us-south
WATSON_MODE=auto- Multilingual complaint submission (English, Hindi, regional languages)
- Real-time status tracking with visual indicators
- SMS/Email notifications for updates
- Community visibility for public complaints
- Upvoting system for community issues
- Centralized complaint dashboard
- Department-wise workload distribution
- Automated deadline management
- Escalation alerts and workflows
- Performance analytics and insights
- Automatic complaint categorization
- Department routing based on complaint type
- Urgency assessment and prioritization
- Deadline calculation with government SLAs
- Pattern recognition for systemic issues
- Automated escalation for delays
✅ Complaint ID: GVT2024001
✅ Category: Electricity
✅ Urgency: HIGH
✅ Department: Delhi Electricity Regulatory Commission
✅ Acknowledgment Deadline: 24 hours
✅ Resolution Deadline: 5 days
✅ Status: ORANGE → Routed to Department
✅ Tracking: ACTIVE
✅ Reminders: SCHEDULED
- Agent status indicators in UI
- WebSocket notifications
- Status progression visualization
- Department workload updates
- Escalation alerts when needed
python main.py # Runs on localhost:8000"Module not found" error:
pip install -r requirements.txtPort 8000 in use:
# Change port in main.py or kill existing process
netstat -ano | findstr :8000WebSocket connection failed:
- Refresh browser
- Check firewall settings
- Ensure main.py is running
MIT License - Open for educational and government use