AWS Builder Center
AIdeas: Sofia – Voice First AI Triage Assistant

AIdeas: Sofia – Voice First AI Triage Assistant

SOFIA is a voice-first medical triage assistant that collects patient identity and clinical information through natural conversation before they see a doctor.

Data Scientist | ML-AI Engineer
Demo:



App category: Commercial Solutions


Why Commercial Solutions? This fits the Commercial Solutions track because SOFIA is a practical productivity tool for healthcare institutions (clinics, hospitals) it boosts operational efficiency, reduces staff workload on routine tasks, and enables faster patient throughput in real business environments.


Description:
SOFIA is a practical productivity tool for healthcare institutions clinics, hospitals, and diagnostic centers. It boosts operational efficiency, reduces staff workload on routine intake tasks, and enables faster patient throughput in real, high-volume business environments.


My vision:
Triage is the first bottleneck in any clinic. Before a patient sees a doctor, someone has to ask them who they are, what's wrong, how long it's been going on, and how bad it is. In overloaded settings, that falls on one or two nurses managing dozens, sometimes hundreds of patients. It's repetitive, time-consuming, and leaves room for error.
My vision was simple: what if patients could go through that process themselves, naturally, before they ever reach a human staff member?
SOFIA (Smart Outpatient Fast Intake Assistant) is a voice-first triage assistant that runs on a phone, tablet, or waiting room kiosk. Patients speak naturally in any language and SOFIA guides them through a structured intake process:
  • Identity collection: name, ID number, date of birth, and sex. Patients can simply hold up their ID card and SOFIA reads it automatically using computer vision, skipping the verbal back-and-forth entirely.
  • Clinical intake: chief complaint, symptom location, duration, severity on a 1–10 scale, relevant medical history, and optional photos of visible conditions like rashes, wounds, or swelling.
  • Non-contact vitals: a 30-second camera scan estimates the patient's heart rate and respiratory rate using remote photoplethysmography (rPPG), no wearable required.
  • Structured report: a 2-page PDF is generated automatically and made available to the care team before the patient reaches the consultation room.
SOFIA is not a diagnostic tool. It does not suggest treatments or replace clinical judgment. It is a data collection and organization system one that transforms unstructured patient speech into professional clinical documentation, automatically, at scale.


Why this matters:
In Colombia and across much of Latin America, public clinics routinely run with a fraction of the staff needed for their patient volume. Emergency room waits of four to eight hours are common. A significant portion of that wait is not clinical, it is administrative. Patients sit idle while staff work through manual intake one person at a time.
SOFIA addresses this directly. A single device in a waiting room can run intake in parallel with everything else happening in the clinic. By the time a nurse or doctor is ready to see a patient, the chart is already built. No manual transcription. No repeated questioning. No lost information.
The impact compounds:
  • Speed: intake that previously took 10–15 minutes of staff time is handled autonomously, cutting average time-to-care.
  • Completeness: SOFIA always asks every required question and enforces clinical language standards. Data quality is consistent regardless of how busy the day is.
  • Staff relief: repetitive intake is a known contributor to healthcare worker burnout. Removing it from the nursing workload has real human value beyond throughput numbers.
  • Accessibility: voice-first interaction is particularly important for patients who are in pain, elderly, or have limited literacy. Speaking is lower friction than filling out a form.
The same value applies beyond Latin America to urgent care chains, community health centers, and any high-volume setting where intake efficiency directly affects patient outcomes.


How I built this:
SOFIA follows a serverless, event-driven architecture on AWS, kept within Free Tier where feasible.
  • Frontend: A static web app hosted on S3 (S3 Front), served via CloudFront CDN and routed through API Gateway. Accessible on any phone, tablet, or kiosk without an app install.
  • Connection (Lambda): Lambda has one job: when a patient session starts, it generates a WebSocket URL and auth token, returns them to the client, and steps out. All real-time processing happens downstream in AgentCore.
  • Agent runtime (AgentCore): AgentCore is the managed AWS service that hosts the full agent runtime. It owns the persistent WebSocket connection with the client, streams audio bidirectionally through Nova Sonic 2, and orchestrates all calls to Bedrock. This is where the intelligence lives; Nova Sonic 2 handles speech recognition, natural language understanding, voice response generation, and automatic language detection, all in a single low-latency loop.
  • Model calls (Bedrock): AgentCore calls two models via Bedrock:
  • Nova Sonic 2: the real-time speech and conversation model, also acting as conversation orchestrator. It decides when to invoke the Triage Tool, when to wait, and when to close the session.
  • Nova 2 Lite: powers the Triage Tool internally for structured data extraction, validation, state management, and the doctor advisory generation.
  • Triage Tool: The Triage Tool is built on the Strands Agent framework and runs a stateful three-stage pipeline, with Pydantic structured output models enforcing data consistency at every step:
  • Stage 1 (Identity Collection): Collects name, ID number, date of birth, and sex. Preferred path is ID photo upload analyzed via Bedrock Vision. Verbal collection is the fallback. All four fields must be confirmed before advancing.
  • Stage 2 (Clinical Collection): Gathers chief complaint, symptom location, duration, severity (1–10), medical history, and conditionally a photo of visible symptoms. SOFIA only requests a photo when the complaint is visible (rash, wound, swelling). All patient speech is rephrased into professional third-person clinical language before storing. Priority level (P1 Emergency / P2 Urgent / P3 Routine) is assigned based on all collected data.
  • Stage 3 (Vitals Scan): Once all clinical information is collected, SOFIA transitions to a 30-second non contact vitals scan using  VitalLens . The patient is asked to look at the camera and stay still. Heart rate and respiratory rate are estimated via remote photoplethysmography (rPPG) from the camera feed, with no wearable or physical contact required.
  • Stage 4 (Report Generation): A dedicated Nova 2 Lite call generates a 7-section clinical advisory tailored to this specific patient's presentation. ReportLab then assembles the final 2-page PDF: demographics, clinical summary, vitals, priority level, and the full advisory which is uploaded to S3 Media and shared to the doctor.
  • Cost optimization (prompt caching): By enabling prompt caching, calls that share the same prompt prefix skip reprocessing and are billed at the cached token rate approximately 70% savings on input token costs for those prompts. I used it for the Clinical Collection agent.
  • Storage (S3 Media): AgentCore writes uploaded photos, video snippets, and final PDF reports directly to S3 Media.


Agent Pipeline:



Architecture:



PDF:





What I learned:
Exploring AWS repositories, documentation, samples (Nova 2 Sonic, Strands), and tools was essential building on proven patterns accelerated development.
Focus on real world problems (triage bottlenecks) over fancy features proved key: selecting practical services (voice-first for accessibility, staged agents for reliability) delivers more value than using everything available. Always learning new services, but prioritizing user focused solutions makes the biggest impact.


Code:
The code can be found in the following repository:  SOFIA 
Any opinions in this article are those of the individual author and may not reflect the opinions of AWS.
Enjoyed reading this content? Let the author know!

Your likes, comments, shares, and saves help creators reach more builders.

Loading recommendations

Loading article