A comprehensive multi-agent AI system built for connecting citizens with frontline workers and healthcare services. This prototype demonstrates intelligent triage, service guidance, hospital capacity management, booking, and follow-up communications.
This system provides:
- Citizen Portal: Easy-to-use interface for submitting requests
- AI-Powered Triage: Intelligent classification of urgency and service needs
- Service Guidance: Recommendations based on location and requirements
- Hospital Capacity: Real-time availability checking
- Automated Booking: Appointment scheduling with confirmations
- Follow-up Communications: SMS/email notifications
- Admin Dashboard: Real-time analytics and case management
- FastAPI: REST API with async support
- Firestore: NoSQL database for cases, hospitals, bookings
- Vertex AI: LLM integration for intelligent agents
- Google Cloud Services: Translation, Speech, Text-to-Speech
- Twilio: SMS notifications
- Next.js 14: Modern React framework with App Router
- TypeScript: Type-safe development
- Tailwind CSS: Utility-first styling
- Recharts: Data visualization
- Lucide Icons: Beautiful icons
- Triage Agent: Classifies urgency and service type
- Guidance Agent: Provides service recommendations
- Hospital Capacity Agent: Checks availability
- Booking Agent: Creates appointments
- Follow-up Agent: Sends confirmations
- Equity Oversight Agent: Monitors for bias
- Analytics Agent: Generates insights
- Python 3.9+
- Node.js 18+
- Google Cloud Project (optional for local development)
# Navigate to project root
cd /home/sameer/hackathon/inovista-hackathon
# Install Python dependencies
pip install -r requirements.txt
# Copy environment template
cp env.example .env
# Edit .env with your configuration (optional for demo)
# nano .env
# Start the backend server
python -m uvicorn backend.main:app --reload --host 0.0.0.0 --port 8000# Navigate to frontend directory
cd frontend
# Install dependencies
npm install
# Start the development server
npm run dev- Citizen Portal: http://localhost:3000
- Admin Dashboard: http://localhost:3000/admin
- API Documentation: http://localhost:8000/docs
- API Health Check: http://localhost:8000/health
- Submit Request: Citizen describes their situation
- AI Triage: System classifies urgency (Emergency/Urgent/Routine)
- Service Guidance: Recommends appropriate services/hospitals
- Capacity Check: Finds available hospitals with capacity
- Booking: Creates appointment with confirmation
- Follow-up: Sends SMS/email with details
- Dashboard Update: Admin sees real-time analytics
Input: "I have severe chest pain and shortness of breath"
β Triage: EMERGENCY (95% confidence)
β Guidance: Emergency Medical Services
β Capacity: Hospital A has 15 beds available
β Booking: Emergency Dept, immediate appointment
β Follow-up: SMS sent with confirmation code
β Dashboard: Case marked as completed
The system includes sample data from Pakistan:
- 220 Frontline Worker Cases: Various emergency and service requests
- 3000+ Hospitals: Real hospital data with locations and specialties
Load sample data via:
- Admin Dashboard β "Load Sample Data" button
- API endpoint:
POST /admin/ingest-sample-data
# Google Cloud (optional for demo)
GOOGLE_CLOUD_PROJECT=your-project-id
GOOGLE_APPLICATION_CREDENTIALS=path/to/service-account.json
VERTEX_AI_LOCATION=us-central1
# Twilio (optional)
TWILIO_ACCOUNT_SID=your-twilio-account-sid
TWILIO_AUTH_TOKEN=your-twilio-auth-token
TWILIO_PHONE_NUMBER=your-twilio-phone-number
# API Configuration
API_HOST=0.0.0.0
API_PORT=8000
API_DEBUG=true
# Frontend
NEXT_PUBLIC_API_URL=http://localhost:8000POST /intake- Submit citizen requestPOST /triage/{case_id}- Classify casePOST /guidance/{case_id}- Get service recommendationsPOST /capacity/{case_id}- Check hospital availabilityPOST /booking/{case_id}- Create appointmentPOST /followup/{case_id}- Send notificationsPOST /process-complete/{case_id}- Run complete flow
GET /dashboard- Dashboard analyticsGET /cases- List cases with filtersGET /cases/{case_id}- Get case detailsGET /health- System health check
POST /admin/ingest-sample-data- Load sample data
- β Multi-step request form
- β Real-time processing status
- β Urgency level selection
- β Contact information capture
- β Emergency warnings
- β Responsive design
- β Real-time case statistics
- β Hospital capacity monitoring
- β Interactive charts and graphs
- β Recent cases table
- β System health indicators
- β Alert notifications
- β Data ingestion controls
- β Rule-based triage with confidence scoring
- β Location-aware service recommendations
- β Dynamic hospital capacity simulation
- β Automated booking with confirmations
- β Multi-channel follow-up (SMS/email mock)
- β Equity oversight logging
- β Real-time analytics generation
- Start both backend and frontend
- Visit citizen portal at http://localhost:3000
- Submit a test request (e.g., "I have chest pain")
- Watch the processing flow in real-time
- Check admin dashboard for updates
# Health check
curl http://localhost:8000/health
# Submit request
curl -X POST http://localhost:8000/intake \
-H "Content-Type: application/json" \
-d '{"request_text": "I need medical help", "urgency": "urgent"}'
# Check dashboard
curl http://localhost:8000/dashboard- Backend: Deploy to Cloud Run
- Frontend: Deploy to Firebase Hosting or Vercel
- Database: Use Firestore in production mode
- AI: Enable Vertex AI APIs
- Monitoring: Set up Cloud Monitoring
# Backend Dockerfile (create if needed)
FROM python:3.9
WORKDIR /app
COPY requirements.txt .
RUN pip install -r requirements.txt
COPY backend/ .
CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "8000"]
# Frontend Dockerfile (create if needed)
FROM node:18-alpine
WORKDIR /app
COPY frontend/package*.json ./
RUN npm install
COPY frontend/ .
RUN npm run build
CMD ["npm", "start"]- Input validation and sanitization
- Rate limiting on API endpoints
- Authentication for admin dashboard (not implemented in demo)
- HTTPS in production
- Environment variable security
- Database access controls
- Fork the repository
- Create a feature branch
- Make your changes
- Add tests if applicable
- Submit a pull request
This project is created for the Inovista Hackathon. See individual component licenses for details.
For issues and questions:
- Check the API documentation at
/docs - Review the console logs for errors
- Ensure all services are running
- Verify environment configuration
- Real Vertex AI integration
- Voice interface with Dialogflow CX
- Real-time hospital capacity feeds
- Advanced analytics with BigQuery
- Mobile app development
- Multi-language support
- Geographic information system (GIS) integration
- Real Twilio SMS integration
- Authentication and user management
- Advanced AI models for better triage