Hayat (Arabic for "Life") is an offline-first AI medical assistant designed for crisis zones, remote areas, and situations where internet connectivity and hospitals are unavailable. Built with privacy and accessibility in mind.
Provide life-saving medical guidance in emergency situations when:
- Internet connectivity is unavailable or unreliable
- Hospitals/clinics are inaccessible (conflict zones, natural disasters)
- Professional medical help is not immediately available
- Language barriers exist (supports English & Arabic)
- Offline LLM Inference: Runs locally on device using GGUF quantized models
- RAG-Powered Responses: Retrieval-Augmented Generation prevents hallucinations by grounding answers in verified medical protocols
- Vector Search: Semantic search through ICRC/WHO emergency guidelines
- Bilingual Support: Full English and Arabic interface with RTL layout support
- Privacy-First: No data leaves your device, no tracking, no analytics
- P2P Sharing: Share app and medical assets via Bluetooth/WiFi Direct
- Printable Cheat Sheets: Generate 1-page PDF emergency protocol summaries
- APK Export: Bundle app with models for offline distribution
- Low-End Device Support: Optimized for devices with limited RAM/storage
- Triple-Check Validation: All responses validated against medical database
- Clear Disclaimers: Every response includes a medical disclaimer
- Source Attribution: Shows which protocol each answer comes from
- Refusal Messages: Gracefully declines queries outside medical scope
- Android 8.0 (API 26) or higher
- 2GB RAM (3GB+ recommended)
- 1.5GB free storage space
- ARM64-v8a processor (ARMv7 supported with reduced performance)
Place these files in /sdcard/Hayat/:
| File | Size | Description | Download Source |
|---|---|---|---|
model.gguf |
~600MB-1.1GB | Quantized medical LLM | HuggingFace |
e5-small.onnx |
~67MB | Embedding model | HuggingFace |
medical.db |
~44KB | Emergency protocols DB | Bundled with app |
Recommended Models:
- LLM:
Medical-Llama-3-8B-GGUF(Q4_K_M quantization) orTinyLlama-1.1B-Chat-v1.0-GGUFfor low-end devices - Embeddings:
multilingual-e5-small(ONNX format) for English/Arabic support
-
Clone the Repository
git clone https://github.com/your-org/hayat-ai.git cd hayat-ai -
Download Model Files
# Create Hayat directory mkdir -p /sdcard/Hayat # Download medical LLM (choose one based on device specs) # For powerful devices (>4GB RAM): wget https://huggingface.co/TheBloke/Medical-Llama-3-8B-GGUF/resolve/main/medical-llama-3-8b.Q4_K_M.gguf -O /sdcard/Hayat/model.gguf # For low-end devices (<3GB RAM): wget https://huggingface.co/TheBloke/TinyLlama-1.1B-Chat-v1.0-GGUF/resolve/main/tinyllama-1.1b-chat-v1.0.Q4_K_M.gguf -O /sdcard/Hayat/model.gguf # Download embedding model wget https://huggingface.co/intfloat/multilingual-e5-small/resolve/main/onnx/model.onnx -O /sdcard/Hayat/e5-small.onnx
-
Build and Install
./gradlew assembleDebug adb install app/build/outputs/apk/debug/app-debug.apk
-
Copy Bundled Assets (if needed) The app will prompt you to copy medical databases from bundled assets on first launch.
- Open project in Android Studio
- Sync Gradle files
- Connect Android device or start emulator (min 2GB RAM)
- Run
appconfiguration
Download pre-built APK with models included (coming soon):
- Full version (~1.2GB): Includes high-quality medical LLM
- Lite version (~700MB): Uses TinyLlama for low-end devices
The app includes emergency protocols from:
- Bleeding Control (Direct Pressure, Tourniquets, Wound Packing)
- Burn Treatment (Thermal, Chemical, Electrical)
- Fracture Stabilization (Splinting, Immobilization)
- CPR & Basic Life Support
- Dehydration Management (ORS Preparation)
- Wound Care & Infection Prevention
- Emergency Triage (START Protocol)
- Shock Management
- Ψ§ΩΨͺΨΩΩ ΩΩ Ψ§ΩΩΨ²ΩΩ
- ΨΉΩΨ§Ψ¬ Ψ§ΩΨΨ±ΩΩ
- Ψ§ΩΨΉΩΨ§ΩΨ© Ψ¨Ψ§ΩΩΨ³ΩΨ±
- Ψ§ΩΨ₯ΩΨΉΨ§Ψ΄ Ψ§ΩΩΩΨ¨Ω Ψ§ΩΨ±Ψ¦ΩΩ
- Ψ₯Ψ―Ψ§Ψ±Ψ© Ψ§ΩΨ¬ΩΨ§Ω
- Ψ§ΩΨΉΩΨ§ΩΨ© Ψ¨Ψ§ΩΨ¬Ψ±ΩΨ
- Ψ§ΩΩΨ±Ψ² Ψ§ΩΨ·Ψ¨Ω ΩΩ ΨΨ§ΩΨ§Ψͺ Ψ§ΩΨ·ΩΨ§Ψ±Ψ¦
- Ψ₯Ψ―Ψ§Ψ±Ψ© Ψ§ΩΨ΅Ψ―Ω Ψ©
All protocols sourced from:
- International Committee of the Red Cross (ICRC)
- World Health Organization (WHO) Emergency Guidelines
- Médecins Sans Frontières (MSF) Field Manuals
app/
βββ src/main/java/com/hayat/
β βββ MainActivity.kt # Main entry point
β βββ assets/
β β βββ AssetManager.kt # Asset copying/validation
β βββ data/
β β βββ AppDatabase.kt # Room database setup
β β βββ MedicalChunk.kt # Database entities
β β βββ VectorSearchEngine.kt # Semantic search
β β βββ ChatModels.kt # Chat data classes
β βββ services/
β β βββ ModelInferenceService.kt # Llama.cpp integration
β β βββ EmbeddingService.kt # ONNX runtime
β β βββ PeerSharingService.kt # Bluetooth/WiFi Direct
β β βββ WordPieceTokenizer.kt # Text tokenization
β βββ ui/
β β βββ screens/
β β β βββ ChatScreen.kt # Main chat interface
β β β βββ SettingsScreen.kt # Configuration
β β β βββ SharingScreen.kt # P2P sharing UI
β β β βββ CheatSheetScreen.kt # PDF generation
β β β βββ SetupScreen.kt # First-run setup
β β βββ theme/
β β β βββ Theme.kt # Material 3 theme
β β β βββ Color.kt # Color palette
β β β βββ Type.kt # Typography
β β βββ viewmodel/
β β βββ ChatViewModel.kt # RAG pipeline logic
β βββ utils/
β βββ CheatSheetGenerator.kt # PDF generation
βββ src/main/assets/
β βββ medical.db # English protocols
β βββ medical_arabic.db # Arabic protocols
β βββ vocab.json # Tokenizer vocabulary
βββ build.gradle.kts # App-level build config
# Clone repository
git clone https://github.com/your-org/hayat-ai.git
cd hayat-ai
# Build debug APK
./gradlew assembleDebug
# Build release APK (requires signing key)
./gradlew assembleRelease# Unit tests
./gradlew test
# Instrumentation tests
./gradlew connectedAndroidTest
# Code coverage
./gradlew jacocoTestReport- Add protocol text to
app/src/main/assets/protocols_en.txtorprotocols_ar.txt - Run embedding generation script:
python scripts/generate_embeddings.py --language en
- Rebuild app to include updated database
We welcome contributions! Please see CONTRIBUTING.md for guidelines.
Priority Areas:
- Additional language translations
- More medical protocols (pediatric, obstetric, mental health)
- Performance optimizations for low-end devices
- Accessibility improvements
- NGO partnership integrations
IMPORTANT: This application is for educational and informational purposes only. It does NOT:
- Replace professional medical advice, diagnosis, or treatment
- Provide guarantees of accuracy or completeness
- Establish a doctor-patient relationship
- Handle all possible medical scenarios
Always seek professional medical help when available. In emergencies, contact local emergency services immediately.
The developers and contributors are not liable for any adverse outcomes resulting from use of this application.
This project is licensed under the MIT License - see the LICENSE file for details.
Important: Medical protocol content may have separate licensing restrictions. Always verify usage rights for ICRC/WHO/MSF content before redistribution.
We're actively seeking partnerships with:
- Humanitarian organizations (ICRC, MSF, WHO)
- Refugee camp administrators
- Disaster response teams
- Medical NGOs working in conflict zones
Contact: team@hayat-ai.org (placeholder)
- Llama.cpp team for efficient GGUF inference
- Hugging Face for open-source medical models
- ICRC/WHO/MSF for open-access medical guidelines
- Android Jetpack Compose team for modern UI toolkit
- All contributors and supporters of this humanitarian project
- β Core RAG chat functionality
- β English/Arabic bilingual support
- β Medical protocol database
- β P2P sharing infrastructure
- β Printable cheat sheets
- French language support
- Pediatric-specific protocols
- Obstetric emergency guidelines
- Mental health first aid
- Voice input/output for hands-free use
- Offline map integration for nearest clinics
- Symptom checker with decision trees
- Medication dosage calculator
- Multi-patient triage management
- SMS-based query fallback
- iOS version
- Wear OS support for smartwatches
- Integration with portable diagnostic devices
- Mesh networking for group deployments
Built with β€οΈ for humanity
Hayat AI - Saving lives through technology