Skip to main content
The avatar will act as a friendly medical screening assistant that guides the patient through the screening process, with access to a vision tool to view the patient’s symptoms on camera if requested, as well as a RAG tool for clinic details and an appointment booking tool to schedule the appointment.

Tags

transition-function, vision-function, rag-function, endpoint-function, endpoint-simple-transition, end-after-bot-response, stt-keywords, runtime-vars-in-instructions, runtime-vars-in-http-endpoints, llm-template-variables, secret-variables, role-instruction

What this example shows

  • Scenario creation and node configuration
  • Endpoint usage for HTTP calls
  • Knowledge base integration for RAG-driven answers
  • Runtime variables for patient_id, today
  • Connecting the scenario to the Web SDK examples

Node flow

The avatar’s role instruction:
“You are a friendly and professional medical screening assistant…”
The scenario is structured around the following node sequence:
  • intro
    • “Greet the patient warmly and introduce yourself as a medical screening assistant…”
    • Uses transition tools.
  • data_intake
    • “Collect the patient’s basic information…”
    • Uses transition, vision tools.
  • appointment_booking
    • “Help the patient schedule an appointment…”
    • Uses http tools.
  • qa
    • “Answer the patient’s questions about the screening process, our clinic, or anything else they want to know…”
    • Uses transition, rag tools.
  • end
    • “Thank the patient for completing the screening…”
    • Ends the conversation after the assistant responds.

Secrets

Create these secrets in the Akapulu Labs secrets tab:
  • Create secret
    • Name: webhook_token
    • Example value: webhook_secret_123

Endpoints

Patient Intake Get Availability

Use your hosted endpoint URL below.
  • Setup tab
    • Name: Patient Intake Get Availability
    • URL: https://<YOUR_HOSTED_ENDPOINT_DOMAIN>/get-availability
    • Method: POST
  • Headers/Body tab
    • headers:
    • body:
  • Local server behavior
    • Returns a list of available appointment slots for the requested preferred date and appointment type.

Patient Intake Book Appointment

Use your hosted endpoint URL below.
  • Setup tab
    • Name: Patient Intake Book Appointment
    • URL: https://<YOUR_HOSTED_ENDPOINT_DOMAIN>/book-appointment
    • Method: POST
  • Headers/Body tab
    • headers:
    • body:
  • Local server behavior
    • Accepts appointment booking details, logs request metadata, and returns a generated appointment confirmation id.

Knowledge bases

Healthcare Intake Demo Knowledge Base

  • Knowledge base details
    • Name: Healthcare Intake Demo Knowledge Base
    • Description: Reference information for the Healthcare Intake & Scheduling demo scenario, including clinic policies, appointment details, and patient-facing FAQ content.
  • Document details
    • Name: Clinic Details
    • Description: Clinic operations, hours, policies, and scheduling information used by the demo assistant for patient Q&A.
  • Upload this file

Node JSON to paste

Replace these placeholders:
  • <YOUR_GET_AVAILABILITY_ENDPOINT_ID>
  • <YOUR_BOOK_APPOINTMENT_ENDPOINT_ID>
  • <YOUR_ABOUT_OUR_CLINIC_KNOWLEDGE_BASE_ID>

Use in UI

After your scenario is saved, integrate it in your own application using the Akapulu Labs Web SDK. Web SDK examples you can pair with this scenario: In the payload to the connectConversation method, pass scenario_id, avatar_id, and runtime variables required by this scenario (patient_id, today), for example:

View on GitHub