> ## 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.

# Quickstart — Intake Agent

> Deploy the Intake Agent, the voice-first intake agent, in 15 minutes.

The Intake Agent is the Medera Patient Intake Agent — voice-first, adaptive, orchestrated via Medera Voice with Medera STT `nova-2-medical` transcription and an Medera voice. She follows a documented 7-state conversation state machine and registers 4 function calls.

## Conversation state machine

<Frame>
  <svg viewBox="0 0 720 380" xmlns="http://www.w3.org/2000/svg" role="img" aria-label="medera/intake-state.svg" style={{ width: '100%', height: 'auto', display: 'block', maxWidth: '780px', margin: '24px auto' }}><defs><pattern id="mdr-dots" x="0" y="0" width="10" height="10" patternUnits="userSpaceOnUse"><circle cx="1" cy="1" r="1" fill="rgba(0,0,0,0.08)" /></pattern></defs><rect x="0" y="0" width="720" height="380" fill="#ffffff" /><rect x="0" y="0" width="720" height="32" fill="#141413" /><circle cx="14" cy="16" r="3" fill="#ff5f57" /><circle cx="26" cy="16" r="3" fill="#febc2e" /><circle cx="38" cy="16" r="3" fill="#28c840" /><text x="54" y="20" fill="#9a9893" fontFamily="ui-monospace, SFMono-Regular, Menlo, monospace" fontSize="11" fontWeight="500">medera/intake-state.svg</text><text x="706" y="20" textAnchor="end" fill="#9a9893" fontFamily="ui-monospace, SFMono-Regular, Menlo, monospace" fontSize="10">7-state conversation</text><rect x="0" y="32" width="720" height="348" fill="#fafaf6" /><rect x="0" y="32" width="720" height="348" fill="url(#mdr-dots)" /><rect x="0.5" y="0.5" width="719" height="379" fill="none" stroke="#141413" strokeOpacity="0.18" /><text x="360.0" y="56" textAnchor="middle" fill="#141413" fontFamily="Inter, sans-serif" fontSize="15" fontWeight="600">Intake conversation state machine</text><rect x="104.0" y="92.0" width="80" height="36" fill="#ffffff" stroke="rgba(0,0,0,0.08)" strokeWidth="1" /><text x="144.0" y="114" textAnchor="middle" fill="#141413" fontFamily="ui-monospace, SFMono-Regular, Menlo, monospace" fontSize="9" fontWeight="600">GREETING</text><line x1="180.0" y1="110" x2="188.0" y2="110" stroke="rgba(20,20,19,0.40)" strokeWidth="1.5" /><polygon points="188.0,106 188.0,114 194.0,110" fill="rgba(20,20,19,0.25)" /><rect x="204.0" y="92.0" width="133" height="36" fill="#ffffff" stroke="rgba(0,0,0,0.08)" strokeWidth="1" /><text x="270.5" y="114" textAnchor="middle" fill="#141413" fontFamily="ui-monospace, SFMono-Regular, Menlo, monospace" fontSize="9" fontWeight="600">IDENTITY\_VERIFICATION</text><line x1="333.0" y1="110" x2="341.0" y2="110" stroke="rgba(20,20,19,0.40)" strokeWidth="1.5" /><polygon points="341.0,106 341.0,114 347.0,110" fill="rgba(20,20,19,0.25)" /><rect x="357.0" y="92.0" width="95" height="36" fill="#ffffff" stroke="rgba(0,0,0,0.08)" strokeWidth="1" /><text x="404.5" y="114" textAnchor="middle" fill="#141413" fontFamily="ui-monospace, SFMono-Regular, Menlo, monospace" fontSize="9" fontWeight="600">GATHERING\_INFO</text><line x1="448.0" y1="110" x2="456.0" y2="110" stroke="rgba(20,20,19,0.40)" strokeWidth="1.5" /><polygon points="456.0,106 456.0,114 462.0,110" fill="rgba(20,20,19,0.25)" /><rect x="472.0" y="92.0" width="144" height="36" fill="#ffffff" stroke="rgba(0,0,0,0.08)" strokeWidth="1" /><text x="544.0" y="114" textAnchor="middle" fill="#141413" fontFamily="ui-monospace, SFMono-Regular, Menlo, monospace" fontSize="9" fontWeight="600">MENTAL\_HEALTH\_SCREENING</text><rect x="117.0" y="192.0" width="138" height="36" fill="#ffffff" stroke="rgba(0,0,0,0.08)" strokeWidth="1" /><text x="186.0" y="214" textAnchor="middle" fill="#141413" fontFamily="ui-monospace, SFMono-Regular, Menlo, monospace" fontSize="9" fontWeight="600">APPOINTMENT\_SCHEDULING</text><line x1="251.0" y1="210" x2="259.0" y2="210" stroke="rgba(20,20,19,0.40)" strokeWidth="1.5" /><polygon points="259.0,206 259.0,214 265.0,210" fill="rgba(20,20,19,0.25)" /><rect x="275.0" y="192.0" width="128" height="36" fill="#ffffff" stroke="rgba(0,0,0,0.08)" strokeWidth="1" /><text x="339.0" y="214" textAnchor="middle" fill="#141413" fontFamily="ui-monospace, SFMono-Regular, Menlo, monospace" fontSize="9" fontWeight="600">SUMMARY\_CONFIRMATION</text><line x1="399.0" y1="210" x2="407.0" y2="210" stroke="rgba(20,20,19,0.40)" strokeWidth="1.5" /><polygon points="407.0,206 407.0,214 413.0,210" fill="rgba(20,20,19,0.25)" /><rect x="423.0" y="192.0" width="80" height="36" fill="#ffffff" stroke="rgba(0,0,0,0.08)" strokeWidth="1" /><text x="463.0" y="214" textAnchor="middle" fill="#141413" fontFamily="ui-monospace, SFMono-Regular, Menlo, monospace" fontSize="9" fontWeight="600">CLOSING</text><line x1="499.0" y1="210" x2="507.0" y2="210" stroke="rgba(20,20,19,0.40)" strokeWidth="1.5" /><polygon points="507.0,206 507.0,214 513.0,210" fill="rgba(20,20,19,0.25)" /><rect x="523.0" y="192.0" width="80" height="36" fill="#76a1fc" stroke="#4f7be0" strokeWidth="1" /><text x="563.0" y="214" textAnchor="middle" fill="#ffffff" fontFamily="ui-monospace, SFMono-Regular, Menlo, monospace" fontSize="9" fontWeight="700">COMPLETED</text><rect x="220.0" y="290" width="280" height="36" fill="#ffffff" stroke="#c44040" strokeWidth="1" /><text x="360.0" y="312" textAnchor="middle" fill="#c44040" fontFamily="ui-monospace, SFMono-Regular, Menlo, monospace" fontSize="10" fontWeight="600">ESCALATED (any state → terminal)</text></svg>
</Frame>

<Steps>
  <Step title="Configure the deployment">
    Use the [Agent Builder Canvas](/agentic/canvas/overview) to clone the **the Intake Agent — Patient Intake Agent** template. Configure:

    \| Field | Default | | :--- | :--- | | `intake_template_id` | Practice intake template | | `screeners` | `["phq-9", "gad-7", "audit-c", "c-ssrs"]` | | `routing_matrix` | Practice routing rules by acuity and payer | | `crisis_escalation_tree_id` | On-call escalation tree | | `workflow_modules` | `["general_intake"]` | | `language` | `en-US` | Publish the workflow — the canvas auto-deploys to sandbox at `https://sandbox.medera.info/{org}/intake-v{ver}`. |
  </Step>

  <Step title="Initialize the agent for the organization">
    <CodeGroup>
      ```text theme={"system"}
      bash cURL curl -X POST https://api.medera.info/api/onboarding/initialize-organization \ -H "X-API-Key: $MEDERA_API_KEY" \ -d '{ "org_name": "Acme Clinic", "org_type": "behavioral_health", "initial_agents": ["intake"], "voice_settings": { "language": "en-US", "tone": "warm" } }'
      ```

      ```text theme={"system"}
      typescript JavaScript await client.onboarding.initializeOrganization({ org_name: 'Acme Clinic', org_type: 'behavioral_health', initial_agents: ['intake'], voice_settings: { language: 'en-US', tone: 'warm' }, });
      ```

      ```text theme={"system"}
      python Python client.onboarding.initialize_organization(org_name="Acme Clinic", org_type="behavioral_health", initial_agents=["intake"], voice_settings={"language": "en-US", "tone": "warm"},)
      ```
    </CodeGroup>
  </Step>

  <Step title="Start an intake call">
    <CodeGroup>
      ```text theme={"system"}
      bash cURL curl -X POST https://api.medera.info/api/intake-calls \ -H "X-API-Key: $MEDERA_API_KEY" \ -d '{ "patient_id": "pat_abc", "phone_number": "+15555550100", "deployment_id": "dep_abc" }'
      ```

      ```text theme={"system"}
      typescript JavaScript const call = await client.intake.createCall({ patient_id: 'pat_abc', phone_number: '+15555550100', deployment_id: 'dep_abc', });
      ```

      ```text theme={"system"}
      python Python call = client.intake.create_call(patient_id="pat_abc", phone_number="+15555550100", deployment_id="dep_abc",)
      ```
    </CodeGroup>
  </Step>

  <Step title="Subscribe to real-time updates">
    ```typescript theme={"system"}
    const ws = new WebSocket(`wss://api.medera.info/ws/call/${call.id}?token=${apiKey}`);
    ws.addEventListener('message', (e) => {
      const event = JSON.parse(e.data);
      // event.type: 'call-started' | 'utterance-processed' | 'task-extracted' | 'transcript-update' | 'call-ended'
    });
    ```

    |
  </Step>

  <Step title="Receive outbound webhooks">
    If your tenant has a webhook URL configured, you'll receive signed events:

    ```text theme={"system"}
    http POST <your_webhook_url> Medera-Signature: sha256=<hmac> Medera-Event: intake.summary.ready Content-Type: application/json { "event": "intake.summary.ready", "call_id": "call_abc", "summary": { "screeners": { "phq-9": { "total": 14, "severity": "moderate" } }, "icd10_candidates": ["F32.1"] } }
    ```

    See [Medera Voice webhooks](/api-reference/intake/webhooks-voice).
  </Step>
</Steps>

## The Intake Agent's 4 function calls

| Function           | Parameters                                            | Purpose                                           |
| :----------------- | :---------------------------------------------------- | :------------------------------------------------ |
| `verify_identity`  | `patient_id`, `verification_data`                     | 2-of-3 ID confirmation (DOB, address, SSN last 4) |
| `document_symptom` | `symptom_description`, `severity_level`, `onset_date` | Capture chief complaint                           |
| `flag_for_review`  | `reason`, `urgency_level`                             | Flag for clinical review queue                    |
| `escalate_urgent`  | `escalation_reason`, `call_action`                    | Hard escalation for emergencies (no agent gating) |

## Compliance guarantees

<Warning>
  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` immediately.
</Warning>

***

## What's next

<CardGroup cols={2}>
  <Card title="Patient Intake Agent" icon="https://mintcdn.com/medera-357fd587/iC-6rAuwl-0aQSw_/icons/ui/phone.svg?fit=max&auto=format&n=iC-6rAuwl-0aQSw_&q=85&s=34f2e6801e9442b1759657e018e4882c" href="/agentic/agents/patient-intake" width="40" height="40" data-path="icons/ui/phone.svg">
    Agent-level documentation.
  </Card>

  <Card title="Medera Voice Webhooks" icon="https://mintcdn.com/medera-357fd587/n1mgcc3nR2sq_PoL/icons/ui/webhook.svg?fit=max&auto=format&n=n1mgcc3nR2sq_PoL&q=85&s=86e52a88445f2b721c6e83a7c59b2614" href="/api-reference/intake/webhooks-voice" width="40" height="40" data-path="icons/ui/webhook.svg">
    Webhook event schema.
  </Card>

  <Card title="Intake API" icon="https://mintcdn.com/medera-357fd587/n1mgcc3nR2sq_PoL/icons/ui/terminal.svg?fit=max&auto=format&n=n1mgcc3nR2sq_PoL&q=85&s=a54c23f663622840fa7b900ec04462a5" href="/api-reference/intake/create-call" width="40" height="40" data-path="icons/ui/terminal.svg">
    REST surface.
  </Card>

  <Card title="Crisis Response Agent" icon="https://mintcdn.com/medera-357fd587/iC-6rAuwl-0aQSw_/icons/ui/shield-alert.svg?fit=max&auto=format&n=iC-6rAuwl-0aQSw_&q=85&s=9a31ae547e9c652f00965438ad5f90e7" href="/agentic/agents/crisis-response" width="40" height="40" data-path="icons/ui/shield-alert.svg">
    Crisis-language detection.
  </Card>
</CardGroup>
