Skip to main content

Overview

Every Arlo Health consultation follows a defined lifecycle from creation to completion. Understanding this flow is essential for building robust integrations.

Status Flow

1

TRIAGING

AI gathers symptom information through conversation
2

PAYMENT_REQUIRED

Assessment complete — user reviews summary and decides whether to proceed
3

MATCHING

User confirmed — waiting for available provider
4

ACTIVE

Provider connected — asynchronous messaging
5

CLOSED

Consultation complete — notes and prescriptions available
Alternative exits:
  • EMERGENCY — Triage detects urgent symptoms → advise 911
  • CANCELED — User cancels before ACTIVE state

Status Definitions

TRIAGING

The AI triage system is gathering symptom information.
  • Entry: start_healthcare_consultation is called
  • Duration: Varies based on complexity (typically 2-5 minutes of active conversation)
  • Exit: Assessment completes → PAYMENT_REQUIRED, or emergency detected → EMERGENCY
What happens:
  • AI asks follow-up questions about symptoms
  • Agent responds with send_message
  • Richer context = fewer questions = faster triage
Agent actions:
  • Monitor for AI questions
  • Relay questions to user
  • Send responses via send_message

PAYMENT_REQUIRED

Assessment is complete. A best-effort analysis is provided to support decision-making.
  • Entry: AI triage has gathered sufficient information
  • Exit: User confirms → MATCHING
What happens:
  • The paymentGate object contains a consultation summary — a best-effort analysis of what the provider may be able to help with
  • This summary is designed to help the user decide whether to proceed
  • Clinical decisions remain at the provider’s discretion once connected
Important: The consultation summary represents Arlo’s best assessment based on the information gathered. It is not a guarantee of diagnosis or treatment. The provider will make their own clinical determination. paymentType options:
  • pay_per_use: Call confirm_provider_connection to proceed
  • subscription_required: Set up subscription first
Agent actions:
  1. Present consultationSummary to user for informed decision-making
  2. Confirm user wants to proceed
  3. Call appropriate confirmation tool

MATCHING

User is in the provider matching queue.
  • Entry: User confirmed they want to proceed
  • Duration: Typically minutes, but can vary based on demand
  • Exit: Provider accepts → ACTIVE
What happens:
  • User is added to provider queue
  • Available providers see the consultation request
  • First available provider accepts
Agent actions:
  • Inform user they’re in queue
  • Wait for webhook notification or poll status
  • No user action required

ACTIVE

Provider is connected. Asynchronous messaging is available.
  • Entry: Provider joins the consultation
  • Duration: Varies (minutes to hours)
  • Exit: Provider closes → CLOSED
What happens:
  • Provider reviews triage information
  • Provider may ask additional questions
  • Provider makes clinical decisions based on their assessment
  • Provider can prescribe medications if appropriate
  • Provider can order lab tests if needed
  • All messaging is asynchronous
Agent actions:
  • Relay provider messages to user
  • Send user responses via send_message
  • Handle prescription flows if needed
Messaging is asynchronous during ACTIVE status. send_message returns immediately without waiting for a provider response. Use webhooks to receive notifications when the provider responds.

CLOSED

The consultation is complete.
  • Entry: Provider closes the consultation
  • Default state: Notes and prescriptions available
What happens:
  • Provider has completed their assessment
  • Clinical notes may be available
  • Prescriptions (if any) are ready for pharmacy selection
Agent actions:
  • Call get_consultation_notes for summary
  • Handle prescription flow if applicable
  • Inform user consultation is complete
Following up on a closed consultation: Closed consultations can always be followed up on. Send a message to a CLOSED consultation using send_message and it enters follow-up mode — the provider is brought back in as needed.
Follow up for continued care on the same subject

EMERGENCY

Urgent care is advised. User should call 911.
  • Entry: AI triage detects emergency indicators
  • Final state: Consultation cannot proceed through Arlo
What happens:
  • Symptoms indicate potential emergency
  • User is advised to seek immediate care
  • Consultation is terminated
Agent actions:
  • Immediately inform user to call 911 or go to ER
  • Do not attempt to continue with Arlo
  • This is a safety-critical state
When a consultation enters EMERGENCY status, immediately advise the user to call 911 or visit an emergency room. Do not attempt to restart a consultation for emergency symptoms.

CANCELED

The consultation was canceled by the user.
  • Entry: cancel_consultation called during TRIAGING, PAYMENT_REQUIRED, or MATCHING
  • Final state: Consultation is terminated
What happens:
  • If payment hold was placed, it is released
  • Consultation cannot be resumed
Agent actions:
  • Confirm cancellation with user
  • Start new consultation if user wants to try again

Transition Summary

FromToTrigger
TRIAGINGstart_healthcare_consultation
TRIAGINGPAYMENT_REQUIREDAssessment completes
TRIAGINGEMERGENCYEmergency detected
TRIAGINGCANCELEDcancel_consultation
PAYMENT_REQUIREDMATCHINGconfirm_provider_connection
PAYMENT_REQUIREDCANCELEDcancel_consultation
MATCHINGACTIVEProvider accepts
MATCHINGCANCELEDcancel_consultation
ACTIVECLOSEDProvider closes
CLOSEDACTIVEsend_message on a closed consultation (always available)

Cancelable States

Only these states allow cancellation:
  • TRIAGING — Assessment in progress
  • PAYMENT_REQUIRED — Before user confirms
  • MATCHING — Before provider connects
Once ACTIVE, the consultation cannot be canceled by the user.

Polling vs Webhooks

Without Webhooks (Polling)

async function monitorConsultation(conversationId) {
  let status = await getConsultationStatus({ conversationId });

  while (status.status !== "CLOSED") {
    await sleep(300000); // Poll every 5 minutes
    status = await getConsultationStatus({ conversationId });
    
    // continue and process updates
  }
}
app.post("/webhook/arlo", (req, res) => {
  res.status(200).send(); // Acknowledge immediately

  const { conversationId } = req.body;
  const status = await getConsultationStatus({ conversationId });
  
  // continue and process updates
});
Webhooks are strongly recommended. They provide real-time notifications and reduce API calls.