Skip to content

Coordinator Interaction — Steer Document

Date: 2026-04-10 (Session 35) Status: Spec only — Phase 1 (streaming) enabled, Phase 2 deferred ADR: ../../adr/ADR-0015-coordinator-interaction-model.md


Problem

Curaway's conversational UI only supports AI ↔ patient interaction. Real-world medical travel coordination requires human coordinators for visa logistics, hospital scheduling, payment processing, and clinical clarifications the AI shouldn't handle.

Phases

Phase 1: AI streaming (NOW — enabled)

  • SSE token streaming via enable_response_streaming flag
  • sender_type column on Message model (ai | patient | coordinator)
  • Zero coordinator features — just future-proofing the data model

Phase 2: Coordinator chat (POST-SEED)

  • WebSocket upgrade for bidirectional real-time messaging
  • Coordinator dashboard (admin.curaway.ai or /admin route)
  • Escalation flow: AI detects → emits event → coordinator accepts
  • AI pauses during coordinator takeover, resumes on release
  • Internal notes (coordinator-only, patient doesn't see)

Phase 3: Multi-channel (POST-SERIES A)

  • Phone (Twilio) → call summary logged to case timeline
  • WhatsApp (Twilio) → webhook → message in conversation
  • Email forwarding → attachment triggers OCR pipeline
  • All channels unified in case timeline with message.source field

Design Decisions

Why SSE now, WebSocket later

AI chat is request-response. Patient types, AI responds. No simultaneous typing. SSE handles this perfectly with less complexity. WebSocket becomes necessary when two humans need real-time messaging in the same conversation.

Why sender_type now

Adding a column with server_default is free — no migration on existing data, no code changes needed. Waiting until Phase 2 means a schema migration under production traffic.

Why not Intercom/Zendesk

Clinical context (EHR, match results, documents, consent forms) must render inline in the conversation as rich cards. Third-party chat SDKs don't support custom clinical UI components.

Capacity Planning

Tier Cost/mo Concurrent users
Current (free tiers) $20 ~7 (Upstash Redis limit)
MVP launch (Redis Pro) $30 ~500-1000
Growth ($100/mo) $100 ~2000-5000
Scale (multi-instance) $300+ ~10,000+

Upstash Redis free tier (10K commands/day) is the immediate bottleneck for streaming. Pro tier ($10/mo) removes this constraint.

References

  • ADR-0015: Coordinator Interaction Model
  • Session 31: Streaming implementation
  • Session 35: Architecture assessment + flag enablement