What you will build
- A React page wrapped with the Web SDK provider
- One shared auth manager and a single SDK initialize call
- The hosted ambient UI for one patient encounter with LOINC note sections
Install the Suki developer docs as a skill to get context on Suki's developer tools, APIs, and SDKs. Add the MCP server for documentation search.
SukiProvider, authenticate with SukiAuthManager, call init, and mount SukiAssistant with patient encounter context.
By the end of this tutorial, you will have a working React page that signs in to Suki and opens the hosted ambient UI for one encounter.
Prerequisites
Before you begin, make sure you have:- Completed Partner onboarding and received your
partnerIdandpartnerToken. - A React 18+ app that can host the Web SDK UI.
- Host URLs on the Suki allowlist and a partner JWT that meets Web SDK prerequisites.
Architecture
Project setup
- Use a React 18+ app that can host the Web SDK UI (see Prerequisites).
- Install the required dependencies. Refer to Web SDK installation.
-
Configure your credentials:
- Keep
partnerIdandpartnerTokenready forSukiAuthManager(prefer staging while you learn). - Confirm host URLs meet Web SDK prerequisites.
- Keep
Tutorial steps
Work through each step in order. Read the explanation, review the code example, then continue to the next step. The full code example is available in the accordion below.1
Wrap Your App with SukiProvider
In Web SDK v3, wrap your tree with
SukiProvider. Run init in a child component, not on the provider.2
Create SukiAuthManager and Call Init
Create
SukiAuthManager once with useMemo, then call init with authManager from useSuki() when the SDK is not initialized yet.3
Mount SukiAssistant with Encounter and Sections
Pass a valid
encounter (patient identifier required; gender MALE | FEMALE | UNKNOWN) and ambientOptions.sections with LOINC codes. Keep identifiers at most 36 characters. Refer to Note sections.Full code example
Troubleshooting
UI Never Opens
UI Never Opens
Confirm
init({ authManager }) runs once under SukiProvider when isInitialized is false.Auth or Allowlist Failures
Auth or Allowlist Failures
Check
partnerId / partnerToken and allowlisted hosts in Web SDK prerequisites.Invalid Encounter
Invalid Encounter
Patient identifier is required; gender must be
MALE, FEMALE, or UNKNOWN; keep identifiers at most 36 characters.Summary
In this tutorial, you:- Wrapped the app with
SukiProvider. - Authenticated with
SukiAuthManagerand calledinit. - Mounted
SukiAssistantwith encounter context and LOINC sections.