Gloria turns a patient’s voice, answers and documents into a source-linked clinical intake that a qualified reviewer can verify.
Inspiration
Gloria is designed for health systems where the demand for patient assessment is growing faster than the skilled clinical capacity available to meet it. The WHO projects a shortage of **11 million}} health workers by 2030, with the greatest gaps in low- and lower-middle-income countries.
The shortage is felt before the consultation begins. A patient arrives with a spoken story, referral sheet or lab result. Someone still has to reconstruct what happened, ask what is missing, notice contradictions and preserve possible red flags; often while the queue keeps growing. We asked: what if that work could move ahead without hiding the evidence from the clinician?
What it does
Gloria leads a patient through clinical intake, one focused step at a time.
- The patient tells the story once by typing, recorded voice or live transcription.
- Gloria preserves the original account, reconstructs a timeline and extracts atomic clinical facts linked to their exact source.
- It asks one short follow-up question at a time, skipping questions already answered and closing branches that no longer apply.
- If the patient mentions a referral note, prescription or result, Gloria can request it at that moment. Separate document-reading and document-verification agents decide which lines are clear enough to become evidence.
- Contradictions, unresolved uncertainty and possible red flags remain visible.
- A qualified clinical reviewer receives the completed packet, original transcript, attachments and evidence behind every material claim. They can add a private note, mark it reviewed or request more information; Gloria then reopens the intake and rebuilds the packet.
How we built it
Gloria separates model intelligence from clinical state control.
Specialised roles run through the Google GenAI SDK: Gemini 3.7 Flash extracts facts, reconstructs history, plans follow-ups, localises questions and reads documents; Gemini 3.5 Transcribe and the Live API preserve speech; Gemini 3.5 Flash-Lite verifies candidate facts against cited spans; Gemini 3.1 Flash TTS provides spoken guidance.
A model-independent TypeScript engine owns immutable evidence spans, atomic facts, contradiction detection, red-flag rules, the question safety gate, provenance and final packet assembly. Zod schemas, bounded retries, and explicit failure states prevent malformed model output from silently entering the case.
The patient and clinician interfaces share a Fastify API deployed as one CPU-only Cloud Run container. Firestore stores episode state, Cloud Storage stores evidence media, Secret Manager holds credentials and Cloud Logging records redacted agent metadata. Gemini requests use store: false.
For our Nigerian primary-care case study, Gloria retrieves reviewer-facing citations from a structured index derived from the publicly available National Standing Orders for Community Health Extension Workers. It is not used to automate diagnosis or treatment.
Challenges we ran into
The hardest problem was deciding what the system was allowed to believe. Patient stories contain corrections, caregiver statements and conflicts with documents. “Smart” transcription could make speech cleaner while deleting evidence; document summarisation could turn an uncertain line into a confident claim; a planner could repeat an answered question.
We kept verbatim evidence canonical, split document reading from validation, verified facts independently and placed deterministic gates around state changes. Gloria prepares the case; a qualified human reviews it.
Accomplishments that we're proud of
- A complete typed, voice, live-transcribed and document-assisted intake runs on Google Cloud today.
- Every reviewer-facing claim opens back to the words or document line that supports it.
- On the same 25 synthetic cases.
- The public repository includes reproducible setup, architecture diagrams, complete evaluation artefacts, and representative agent traces and an honest challenging case.
What we learned
In clinical intake, provenance is a product feature: a shorter summary is not automatically better, and an uncertain source should remain uncertain. Useful agent autonomy came from controlled state transitions, not chat personality. Specialised Gemini roles became more dependable when each had a narrow contract and deterministic code retained authority over evidence, branching and handoff.
Failure data also improved the product: a Hausa localisation preflight that changed clinical meaning stayed failed, so the locale stayed off the ready list.
What's next for Gloria
Next we will add production identity and institutional workspaces, automated retention deletion, more preflighted languages and voice guides, and API integrations for clinics and telemedicine providers. The larger milestone is a prospectively designed, blinded evaluation with clinicians before any real-world clinical use.
Our aim is simple: move intake forward so scarce clinical minutes can be spent on decisions and care.
Built With
- cloud-run
- cloud-storage
- firestore
- gemini
- typescript
Log in or sign up for Devpost to join the conversation.