RavenCare is a production-ready, AI-powered medical triage system that revolutionizes patient assessment through hybrid AI consensus methodology, intelligent doctor matching, and seamless healthcare workflow automation. Powered by Composio for enterprise-grade Google Workspace integrations.
- Ensemble Intelligence Architecture: Three AI models (Gemini, Grok, OpenAI) collaborate through consensus-based decision making for enhanced diagnostic accuracy
- Intelligent Matching Algorithm: 8-factor scoring system with 200+ medical keywords for precise doctor-patient alignment
- Complete Automation: End-to-end workflow automation from triage to appointment scheduling via Composio
- Production-Grade: Finetune two 7b LLMs such as Mistral or Gemma and deepseek's reasoning Model! this will keep the data secure
Read : information.md to see how it works.
- Gemini 2.5 Pro: Comprehensive symptom analysis and medical specialty mapping
- Grok 4 Fast Reasoning: Urgency scoring (0-100) and risk assessment with red flags
- OpenAI O4-Mini: Final clinical evaluation and cross-validation
- Sub-Specialization Matching: 200+ keyword database for precise expertise alignment
- Urgency-Based Prioritization: Critical cases mapped to most experienced doctors
- Age-Appropriate Care: Pediatric and geriatric specialization awareness
- Smart Availability: Slot matching with urgency multipliers
- Language Preferences: Multi-language support
- Quality Ratings: Doctor ratings and awards consideration
- Match Transparency: Full scoring breakdown and explanations
Cardiology • Gastroenterology • Hepatology • Neurology • Orthopedics • Pediatrics • Dermatology • Ophthalmology • ENT • Psychiatry • Pulmonology
Each specialty includes sub-specialization detection for precise matching.
- Python 3.8+
- Internet connection (for AI APIs)
- Google account (for Composio integrations)
- Composio account (free tier available)
- Git (for cloning repository)
1. Clone the Repository
# Clone from GitHub
git clone https://github.com/SamirXR/RavenCare.git
# Navigate to project directory
cd RavenCare2. Install Dependencies
pip install -r requirements.txt3. Configure Environment Variables
# Copy template
copy .env.example .env
# Edit with your API keys
notepad .env4. Verify Configuration
python -c "from src.config import config; config.print_config_status()"Web Dashboard (Recommended)
python app.pyOpen http://localhost:5000 in your browser
Command Line
python -m src.triage_orchestratorRavenCare requires several API keys for full functionality. Below is a detailed guide on obtaining each key:
GEMINI_API_KEY=your_gemini_keyHow to obtain:
- Visit Google AI Studio
- Sign in with your Google account
- Click "Get API Key" or "Create API Key"
- Copy the generated key and paste it in your
.envfile
Free Tier: Available with generous quota for testing
GROK_API_KEY=your_grok_key
GROK_ENDPOINT=https://your-endpoint.services.ai.azure.com/openai/v1/How to obtain:
- Create an account at Azure Portal
- Navigate to Azure AI Services or Azure OpenAI
- Click "Create" to set up a new resource
- Once created, go to "Keys and Endpoint" in the left sidebar
- Copy KEY 1 or KEY 2 → Use as
GROK_API_KEY - Copy the Endpoint URL → Use as
GROK_ENDPOINT - Go to "Model deployments" and deploy the Grok model
- Note the deployment name for
GROK_MODEL_NAME
Note: Requires Azure subscription (free trial available)
OPENAI_API_KEY=your_openai_key
OPENAI_ENDPOINT=https://your-endpoint.cognitiveservices.azure.com/How to obtain:
- Go to Azure Portal
- Search for "Azure OpenAI" service
- Create a new Azure OpenAI resource (may require access approval)
- Once approved and created, navigate to "Keys and Endpoint"
- Copy KEY 1 or KEY 2 → Use as
OPENAI_API_KEY - Copy the Endpoint URL → Use as
OPENAI_ENDPOINT - Deploy the o4-mini model in "Model deployments"
Important: Azure OpenAI access may require application approval. Apply at Azure OpenAI Access Form
COMPOSIO_API_KEY=your_composio_key
COMPOSIO_USER_ID=your_user_idHow to obtain:
- Sign up at Composio Dashboard
- Navigate to Settings → API Keys
- Copy your API Key → Use as
COMPOSIO_API_KEY - Find your User ID in the dashboard or profile → Use as
COMPOSIO_USER_ID
Free Tier: Available with sufficient quota for development
COMPOSIO_SHEETS_ACCOUNT_ID=your_sheets_account
COMPOSIO_CALENDAR_ACCOUNT_ID=your_calendar_account
COMPOSIO_GMAIL_ACCOUNT_ID=your_gmail_account
COMPOSIO_DRIVE_ACCOUNT_ID=your_drive_accountHow to obtain:
- Go to Composio Apps
- Connect each Google Workspace app:
- Google Sheets (for data dashboards)
- Google Calendar (for appointment scheduling)
- Gmail (for email notifications)
- Google Drive (for PDF report storage)
- Authorize each app with your Google account
- After connection, go to "Connected Accounts"
- Copy each Account ID and add to
.env
Note: These are optional but highly recommended for full automation features
ADMIN_EMAIL=admin@your-domain.com
FLASK_SECRET_KEY=random_secret_key- ADMIN_EMAIL: Your email to receive system notifications
- FLASK_SECRET_KEY: Generate securely with:
python -c "import secrets; print(secrets.token_hex(32))"
- Create
.envfile from.env.example - Add Gemini API key (Google AI Studio)
- Add Azure Grok credentials (Key + Endpoint)
- Add Azure OpenAI credentials (Key + Endpoint)
- Add Composio API key and User ID
- (Optional) Connect Google Workspace apps in Composio
- Set admin email
- Generate Flask secret key
- Test configuration:
python -c "from src.config import config; config.print_config_status()"
Composio powers all Google Workspace integrations for seamless automation.
File: src/services/email_service.py
Features:
- HTML-formatted professional emails
- Multi-recipient support (admin, patients, doctors)
- Embedded calendar links
- Delivery tracking
Composio Actions Used:
GMAIL_SEND_EMAIL: Send notifications
File: src/services/sheets_service.py
Features:
- Real-time online dashboards
- Formatted triage data tables
- Auto-generated reports
- Shareable links
Composio Actions Used:
GOOGLESHEETS_SHEET_FROM_JSON: Create sheets from data
File: src/services/calendar_service.py
Features:
- Automatic appointment scheduling
- Meeting link generation
- Multi-participant events
- Timezone handling
Composio Actions Used:
GOOGLECALENDAR_CREATE_EVENT: Schedule appointments
File: src/services/email_service.py
Features:
- PDF report storage
- Shareable link generation
- Public access permissions
- Organized folder structure
Composio Actions Used:
GOOGLEDRIVE_UPLOAD_FILE: Upload PDFsGOOGLEDRIVE_ADD_FILE_SHARING_PREFERENCE: Make files shareable
Real-time Streaming Interface
Features:
- Live progress updates via Server-Sent Events (SSE)
- Visual progress bars
Access: Run python app.py then navigate to http://localhost:5000
- Hospital Emergency Departments: Rapid patient prioritization
- Telemedicine Platforms: Remote triage and consultation
- Healthcare Chatbots: Automated initial assessment
- Medical Hotlines: Operator decision support
- Walk-in Clinics: Efficient patient routing
- Healthcare Education: Teaching triage principles
This system is designed for educational and demonstration purposes. It should not replace professional medical judgment. Always consult qualified healthcare professionals for medical advice.
- Custom Finetuned Model learning for outcome prediction
- Multi-language patient support
- EHR system integration
- Mobile application
- Advanced analytics dashboard
- Prescription management