Inspiration

We realized that most AI health assistants give generic advice because they use broad, one size fits all prompts. A pregnant woman and a diabetic patient with the same symptom (headache) need completely different medical guidance, but generic use of LLM's treat them the same. In Nigeria, this problem is amplified most health tools ignore our languages and cultural context. We built Wellah to be the AI health companion that truly knows you, your medical history, your language, and your specific condition, delivering specialized care powered by clinical guidelines instead of generic responses.

What it does

Wellah is a multi-agent AI health assistant that routes your health concerns to 6 specialized medical advisors (Pregnancy, Diabetes, Pediatrics, Mental Health, Emergency Triage, and Preventive Health). It has been design with ease, such that all you need is a system prompt to add new a specialized medical advisors. It maintains a 3-layer memory system (your profile, conversation history, and daily health tracking) to provide truly personalized guidance.

Key features include Smart specialist routing - Analyzes context and directs you to the right medical expert Risk assessment - Every response includes risk level (low/medium/high/critical) and urgency Nigerian language support - Voice input/output in Hausa, Igbo, Yoruba and English Emergency protection - Automatically alerts your doctor and emergency contacts for critical situations Preventive intelligence - Detects health patterns 2-3 weeks early (rising blood sugar, symptom trends) Document analysis - Extracts medical facts from lab reports and prescriptions Daily tracking - Logs symptoms, mood, medications for pattern detection

How we built it

Backend:

  • Flask + Python with Google Gemini for AI reasoning
  • LangChain for multi-agent orchestration: Each specialist tool (tools/) has domain-specific prompts based on clinical guidelines (ACOG for pregnancy, ADA for diabetes, DSM-5 for mental health, etc.).

We built a 3-layer context system in main.py that aggregates user profile, memory, and tracking data before every specialist consultation.

Frontend: Next.js with React 19 and Tailwind CSS, featuring real-time chat, voice controls, document upload, and risk monitoring dashboards.

Localization: Integrated Spitch API for Nigerian language speech-to-text/text-to-speech with a translation pipeline (local language → English → specialist → local language).

Key technical innovations: Cached specialist LLM instances for performance SMTP-based emergency alert system File-based persistence for rapid prototyping Risk scoring algorithm that saved assessments to track trends

Challenges we ran into

Context overload: Aggregating profile + memory + tracking + conversation history often exceeded LLM token limits. We solved this by truncating the far previous tools.

Routing ambiguity: Early versions struggled with vague queries like "I feel tired." We built a two-step orchestrator that asks clarifying questions before routing to specialists.

Emergency alert reliability: Ensuring critical conditions trigger alerts 100% of the time required extensive testing and threshold tuning in emergency_alerts.py.

Language translation accuracy: Medical terminology often lost precision in translation. We added validation checks and terminology glossaries for each Nigerian language.

Risk scoring calibration: Balancing between false positives (scaring users) and false negatives (missing dangers) required iterating on the risk assessment logic across all specialists.

Accomplishments that we're proud of

Created 6 specialized medical advisors with evidence-based clinical guidelines not generic AI responses Achieved true personalization with a 3-layer memory system that remembers your entire health journey Implemented preventive intelligence that detects patterns 2-3 weeks before conditions worsen Built emergency protection that could literally save lives by alerting doctors automatically Made healthcare accessible to 130M+ Nigerians in their mother tongue with voice support Designed a complete full-stack application from authentication to AI orchestration to emergency alerting

What we learned

Multi-agent AI architecture requires careful prompt engineering and routing logic each specialist needs domain-specific context, not just generic instructions Context is king in healthcare AI the same symptom means different things for different patients, so personalization through memory is critical Risk assessment is delicate medical AI must balance being helpful without causing unnecessary panic or missing real dangers Cultural localization goes beyond translation voice interfaces and language support dramatically change accessibility Preventive care needs data over time pattern detection across days/weeks is where AI adds the most value beyond traditional consultations Emergency systems need redundancy we learned to log every alert, handle email failures gracefully, and provide user confirmation Production readiness matters authentication, error handling, and data persistence separate demos from deployable systems

What's next for Wellah

Immediate roadmap:

Video consultations with real doctors Database migration from JSON to PostgreSQL for scalability Medication reminders with push notifications Integration with wearables (glucose monitors, fitness trackers)

Long-term vision:

Doctor dashboard for monitoring their patients AI interactions and risk alerts Hospital partnerships to integrate with EMR systems Community features for support groups (diabetes management, pregnancy journeys) Predictive health scoring using historical data and genetic factors Expand to other African countries with additional language support FDA/regulatory compliance for clinical decision support classification We envision Wellah becoming the trusted AI health companion for every Nigerian, bridging the gap between limited healthcare access and world-class preventive medicine.

Built With

  • css4
  • flask
  • google-gemini-api
  • langchain/langgraph
  • next.js-16
  • pypdf
  • python-3.12
  • python-docx
  • react-19
  • smtp
  • spitch-api
  • tailwind
Share this project:

Updates