> ## Documentation Index
> Fetch the complete documentation index at: https://docs.arlohealth.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Quickstart

> Integrate Arlo Health into your AI agent

## Integration Options

Arlo Health provides three integration methods:

<CardGroup cols={3}>
  <Card title="MCP (Recommended)" icon="plug" href="/mcp-tools/overview">
    Model Context Protocol for native AI agent integration. Tools are discovered automatically.
  </Card>

  <Card title="Claude & ChatGPT" icon="message-bot" href="/tutorials/claude-web">
    Add Arlo as a connector — no code required. Guides for [Claude](/tutorials/claude-web) and [ChatGPT](/tutorials/chatgpt-web).
  </Card>

  <Card title="REST API" icon="code" href="/api-reference/introduction">
    Traditional REST endpoints for direct HTTP integration (also wrapped by the [OpenClaw plugin](/openclaw)).
  </Card>
</CardGroup>

## Core Workflow

Arlo's core primitive is the **conversation** — a continuous health thread that never closes. Every provider visit flows through it:

<Steps>
  <Step title="Gather Context">
    Have a natural conversation with the user to understand their health concern
  </Step>

  <Step title="Start a Conversation">
    Call `start_conversation` with a first-person narrative and the patient's current region
  </Step>

  <Step title="AI Triage">
    Await replies with `wait_for_reply`; answer follow-up questions with `send_message`
  </Step>

  <Step title="Payment Gate">
    Present the consultation summary; the patient explicitly confirms via `confirm_provider_connection`
  </Step>

  <Step title="Provider Match">
    User is matched with a licensed clinician (`MATCHING` → `WITH_PROVIDER`)
  </Step>

  <Step title="Provider Visit">
    User exchanges messages with the provider asynchronously
  </Step>

  <Step title="Back to IDLE">
    The visit wraps up with clinical notes (`get_visit_notes`) and any prescriptions; the conversation stays open for follow-up
  </Step>
</Steps>

### Step 1: Gather Context

Before starting a conversation, talk with the user to understand their health concern:

* What's the main symptom?
* How long has it been going on?
* Any associated symptoms?
* Has this happened before?

Also confirm **where the patient is right now** — care is licensed by current physical location, not home address.

### Step 2: Start the Conversation

Call `start_conversation` with a **first-person narrative** and the region:

<CodeGroup>
  ```json Good Example theme={null}
  {
    "contextMessage": "I've had a sore throat for 3 days. It started with a scratchy feeling and now it hurts to swallow. I don't have a fever but I've been feeling tired. I had strep throat last year with similar symptoms.",
    "region": "US-CA"
  }
  ```

  ```json Bad Example theme={null}
  {
    "contextMessage": "sore throat, 3 days, no fever",
    "region": "US-CA"
  }
  ```
</CodeGroup>

<Tip>
  Rich, narrative context helps the AI triage system gather information faster, reducing the number of follow-up questions.
</Tip>

<Note>
  Before starting a new conversation, call `list_conversations` — if a relevant conversation already exists, continue it with `send_message` instead. Messaging an idle conversation re-runs triage on the same thread, preserving continuity of care.
</Note>

### Step 3: Respond to AI Triage

`start_conversation` returns immediately (fast-ack). Call `wait_for_reply` to await the AI's response — it's resumable, so re-call it if it returns `stillWaiting`.

Answer follow-up questions with `send_message`, which by default sends **and** waits for the next reply in one call:

```json theme={null}
{
  "conversationId": "conv_abc123",
  "messages": ["No fever, but I've been feeling really tired and run down the past few days."],
  "lastSeenMessageId": "msg_042"
}
```

<Note>
  `send_message` enforces a **read-first gate**: pass `lastSeenMessageId` from your last `get_conversation`/`wait_for_reply` result, or call `get_conversation` first. If triage returned an `informationNeed` checklist, batch all the answers into one `send_message` call.
</Note>

### Step 4: Handle the Payment Gate

After triage completes, the conversation enters `PAYMENT_REQUIRED`. Arlo is **pay-per-use and never auto-charges** — the patient must explicitly confirm:

1. Present the `paymentGate.consultationSummary` to the user
2. If a card is on file: on the user's confirmation, call `confirm_provider_connection` to place the per-visit hold
3. If not: call `create_payment_setup`, direct the user to the Stripe card-setup URL, poll `get_payment_status` until `ACTIVE`, then confirm
4. If the user declines: `cancel_request` dismisses the gate and the conversation returns to AI-only chat

### Step 5: Provider Visit

Once a provider is matched, the conversation becomes `WITH_PROVIDER`. Messaging is asynchronous — use `wait_for_reply` to await provider messages and relay them. Providers can:

* Ask additional questions
* Provide diagnosis and treatment recommendations
* Write prescriptions and order labs

When the provider wraps up, the conversation returns to `IDLE` — fetch the clinical note with `get_visit_notes`, and check `get_prescriptions` for any prescriptions.

## Authentication

**On connector hosts (Claude.ai, ChatGPT)**: the platform's connector UI handles OAuth — nothing to build.

**On agent runtimes (Claude Code, OpenClaw, custom agents)**: call `init_signup` to start the OAuth flow:

1. Call `init_signup` — returns an `authUrl`
2. User opens the URL and completes signup
3. Poll `check_account_status` until `authenticated: true`

See [Authentication](/concepts/authentication) for the full OAuth 2.1 flow and discovery endpoints.

## Onboarding

New users need a complete profile before care. Call `get_user_profile` and follow its `nextStep`. On widget-capable hosts, `start_onboarding` opens an interactive setup flow that handles records import, demographics, terms, and payment in one place.

## Webhooks (Agent Runtimes)

Within a session, `wait_for_reply` delivers replies without polling. For waking your agent when it isn't actively waiting, register a webhook:

```json theme={null}
{
  "webhookUrl": "https://your-agent/hooks/arlo",
  "webhookToken": "your-secret-token",
  "deliveryContext": {
    "to": "+15551234567",
    "channel": "whatsapp",
    "deliver": true
  }
}
```

See [Webhooks](/mcp-tools/webhooks) for full documentation. (Connector hosts receive events over the platform's own channel — no webhook needed.)

## Next Steps

<CardGroup cols={2}>
  <Card title="MCP Tools Overview" icon="plug" href="/mcp-tools/overview">
    Explore all available MCP tools
  </Card>

  <Card title="Consultation Lifecycle" icon="arrows-spin" href="/concepts/consultation-lifecycle">
    Understand conversation status flow
  </Card>

  <Card title="Authentication" icon="key" href="/concepts/authentication">
    Deep dive into OAuth 2.1 setup
  </Card>

  <Card title="Payments" icon="credit-card" href="/concepts/payments">
    Learn how pay-per-use works
  </Card>
</CardGroup>
