Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.medera.info/llms.txt

Use this file to discover all available pages before exploring further.

Category: Clinical Operations  ·  Voice agent: Grace (AgentType.INTAKE)  ·  Voice ID: ElevenLabs 21m00Tcm4TlvDq8ikWAM (Rachel)
The Patient Intake Agent runs the first contact a patient has with the practice. It is voice-first, runs through Vapi orchestration with Deepgram nova-2-medical transcription, and follows a documented 7-state conversation state machine with 10 task types.

Conversation state machine

GREETING → IDENTITY_VERIFICATION → GATHERING_INFO →
MENTAL_HEALTH_SCREENING → APPOINTMENT_SCHEDULING →
SUMMARY_CONFIRMATION → CLOSING → COMPLETED
Alternative terminal state: ESCALATED (reachable from any state).

Task types (TaskType enum)

IDENTITY_VERIFICATION, INSURANCE_VERIFICATION, APPOINTMENT_SCHEDULING, REFERRAL_PROCESSING, PRE_AUTHORIZATION, PRESCRIPTION_REFILL, BILLING_CALCULATION, SYMPTOM_DOCUMENTATION, CHIEF_COMPLAINT, URGENT_CARE_TRIAGE.

Function calls

Grace’s prompt registers 4 function calls that the LLM can invoke during the call:
FunctionSignature
verify_identity(patient_id, verification_data) — 2-of-3 required (DOB, address, SSN last 4)
document_symptom(symptom_description, severity_level, onset_date)
flag_for_review(reason, urgency_level)
escalate_urgent(escalation_reason, call_action)

Workflow modules

The intake conversation runs one of three reusable workflow modules:
ModulePurpose
general_intakeBaseline demographics + insurance + chief complaint
prescription_refillMedication history + formulary checks
lab_flaggedLab requisition + specimen handling

System prompt structure

GRACE_SYSTEM_PROMPT_TEMPLATE is composed of 13 sections, including:
  1. PATIENT CONTEXT (name, DOB, provider, conditions, meds, allergies)
  2. CALL SCENARIO (type + scenario_details)
  3. CONVERSATION GUIDELINES (tone, opening, AI / recording disclosure — mandatory, identity verification, info gathering, sensitive topics, urgent situations, closing)

Configuration

FieldDescription
intake_template_idPractice intake template (fields, screeners, scripts)
screenersDefault ["phq-9", "gad-7", "audit-c", "c-ssrs"]
routing_matrixPractice routing rules by acuity and payer
languagePreferred language for the call
crisis_escalation_tree_idPractice escalation policy + handoff destinations
workflow_modules["general_intake"] by default

Composable experts

ExpertRole
Vocal Prosody ExpertF0, jitter, shimmer for affect and acuity inference
Linguistic Content ExpertTopic, valence, certainty, pronoun shift markers
Validated Screener ExpertPHQ-9, GAD-7, AUDIT-C, C-SSRS administration and scoring
C-SSRS Risk ExpertSuicide-risk classification with documented rationale

Compliance guarantees

  • Verbal recording + AI disclosure is mandatory before any clinical questions
  • Identity verification requires 2-of-3 confirmation
  • Crisis-language detection bypasses agent gating and triggers escalate_urgent
  • Every claim in the summary is anchored to a quoted span in the transcript

Quickstart

Deploy Grace in 15 minutes.

Vapi Webhooks

Webhook event schema.

Intake API

Backend REST surface.

Care Orchestrator

Multi-agent runtime.