Jeevan Setu is a sophisticated multi-agent AI system built on the crewAI framework, designed to predict patient surges and optimize hospital preparedness. This intelligent system analyzes various data sources including cultural events, environmental factors, epidemic trends, and hospital operations to provide comprehensive forecasts and actionable recommendations for hospital administrators.
The system consists of 7 specialized AI agents that work in sequence to analyze, predict, and recommend strategies for hospital surge management:
Role: Predicts patient surges linked to cultural events and festivals Functionality:
- Analyzes Indian cultural calendars and public holidays
- Processes historical hospital admission patterns from
festival_admissions.csv - Predicts surges during major festivals (Diwali, Holi, Ganesh Chaturthi, Eid, etc.)
- Outputs forecast reports with dates, duration, intensity levels, and affected medical categories
Role: Monitors environmental data to predict health risks Functionality:
- Analyzes AQI levels, seasonal pollution patterns, and weather data
- Processes
pollution_health_data.csvfor historical trends - Predicts respiratory, cardiac, and related health complications
- Provides region-specific health risk assessments and department impact forecasts
Role: Tracks infectious disease trends in the region Functionality:
- Monitors current health bulletins and news reports
- Analyzes
epidemic_data.csvfor disease patterns - Focuses on COVID-19, influenza, and common infectious diseases
- Provides risk level assessments and hospital resource impact predictions
Role: Recommends optimal staffing schedules Functionality:
- Analyzes surge forecasts from all prediction agents
- Processes
staffing_data.csvfor current staffing levels - Recommends staffing levels for doctors, nurses, and technicians
- Develops emergency backup plans and shift reallocation strategies
Role: Manages hospital inventory needs Functionality:
- Calculates demand for critical supplies based on surge predictions
- Analyzes
inventory_data.csvfor current stock levels - Manages medicines, oxygen, PPE, ICU beds, and ventilators
- Provides procurement strategies and shortage mitigation plans
Role: Generates patient communication materials Functionality:
- Creates advisories in multiple languages (English, Hindi, regional languages)
- Provides preventive health measures and emergency protocols
- Generates materials for SMS, WhatsApp, and hospital notice boards
- Guides patients on when to visit hospitals vs. use telemedicine
Role: Integrates all predictions into unified reports Functionality:
- Synthesizes outputs from all forecasting agents
- Generates comprehensive hospital preparedness reports
- Provides confidence scores and executive summaries
- Creates actionable recommendations for administrators
The system processes multiple CSV data files:
festival_admissions.csv- Historical patient admissions during festivalspollution_health_data.csv- Environmental and health correlation dataepidemic_data.csv- Disease outbreak and case datastaffing_data.csv- Current hospital staffing informationinventory_data.csv- Medical supply inventory levels
- Python >=3.10 <3.14
- UV package manager
- Install UV:
pip install uv- Install Dependencies:
cd hospital
crewai install- Environment Configuration:
Create a
.envfile with required variables:
# Required Variables
HOSPITAL_NAME="Your Hospital Name"
REGION="Your Region"
CURRENT_STAFFING="Current staffing details"
ADMINISTRATOR_NAME="Hospital Administrator Name"
# Optional Variables
HISTORICAL_DATA_PERIOD="2020-2024"
CURRENT_SEASON="Current season"
SURVEILLANCE_DATA="Government health bulletins and hospital records"
BUDGET_CONSTRAINTS="Budget constraints details"
CURRENT_INVENTORY="Standard hospital inventory levels"
VENDOR_DETAILS="Approved medical suppliers"
REGIONAL_LANGUAGES="Hindi,English"
EMERGENCY_CONTACTS="Emergency contact details"cd hospital
crewai runThe system generates comprehensive reports in the following structure:
resources/
├── forecasts/
│ ├── festival_surge_forecast.md
│ ├── pollution_health_risk.md
│ └── epidemic_surveillance.md
├── plans/
│ ├── staffing_optimization.md
│ └── supply_chain_inventory.md
├── communications/
│ └── patient_advisories/
│ ├── english_advisories.md
│ ├── hindi_advisories.md
│ └── regional_advisories.md
└── reports/
└── hospital_preparedness_report.md
Modify src/hospital/config/agents.yaml to customize agent roles, goals, and backstories.
Update src/hospital/config/tasks.yaml to modify task descriptions and expected outputs.
Replace CSV files in resources/data/ with your hospital's actual data for accurate predictions.
- API Key Rotation: Automatic rotation between multiple Gemini API keys for reliability
- Model Pooling: Random model selection from configured pool for diversity
- Error Handling: Comprehensive error handling with retry mechanisms
- Data Validation: Input validation and missing field detection
- Structured Output: Machine-readable reports for integration with other systems
- Festival Preparedness: Predict patient surges during cultural events
- Environmental Health: Monitor pollution-related health risks
- Epidemic Response: Track and respond to disease outbreaks
- Staff Optimization: Ensure adequate staffing during surge periods
- Supply Chain Management: Maintain optimal inventory levels
- Patient Communication: Provide timely health advisories
For support and questions:
This project is built on the crewAI framework and follows its licensing terms.
Built with ❤️ using crewAI - The Framework for Multi-Agent AI Systems