AI SystemsHackathon Prototype (Proof of Concept)

Klinik — AI Patient Intake Voice Assistant Prototype

Voice-driven patient intake & triage agent prototype built for medical hackathons

Note: Klinik is an experimental hackathon prototype and proof-of-concept demonstration, not a licensed medical device. Latency metrics represent simulated test conditions.
Stack:FastAPILangGraphPythonSpeech-to-Text APIsWebSocketsPydantic
View Source on GitHub
1. THE BUSINESS PROBLEM

Emergency room and clinic admissions face bottlenecks during initial intake because intake staff must manually transcribe spoken descriptions into rigid electronic forms while managing patient distress.

2. WHAT CHANGED

Developed a hackathon proof-of-concept voice assistant that captures spoken symptom descriptions in real time, parses observations into structured Pydantic schemas, and routes dialogue through a stateful LangGraph machine.

3. THE OUTCOME / RESULT

Demonstrated functional real-time speech capture and structured intake summaries during live hackathon judging, with deterministic safety guardrails preventing any medical diagnosis.

Key Architecture Components

  • 1
    FastAPI WebSockets layer handling real-time audio streaming from the client
  • 2
    LangGraph state machine coordinating intent classification, triage inquiry branching, and fallback safety guards
  • 3
    Strict Pydantic response modeling ensuring output conforms to medical intake record formatting
  • 4
    Safety guardrail node rejecting medical diagnoses and enforcing immediate referral to licensed professionals

Engineering Decisions & Business Rationale

LangGraph over linear prompt chains

Intake conversations are non-linear; patients re-clarify symptoms or backtrack. Graph-based state transitions allowed conditional routing without brittle prompt chains.

FastAPI with async WebSockets

Minimizing audio latency is paramount for conversational voice. Async event-driven handling delivered smooth turn-taking in live demonstration testing.

Challenges & Trade-offs

  • •Prioritized transcription fidelity and low latency over running edge models locally, using hosted speech-to-text APIs with strict data sanitization filters.
  • •Framed explicitly as an administrative intake assistant prototype rather than a diagnostic tool to avoid clinical liability and hallucination risks.

What I Learned

  • ✓Stateful agent loops need deterministic interrupt handlers when users correct previously stated information.
  • ✓Latency budgets must be budgeted strictly across speech-to-text, LLM inference, and text-to-speech synthesis.

Interested in a similar build for your operations?

Book a free workflow review or message Charles directly on WhatsApp.