Skip to main content
What you will build

15 min | Intermediate

  • 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
Using an AI coding tool?Copy the following prompt to add the Suki developer documentation as a skill and MCP server to your tool for better AI-assisted coding during the integration process. For all AI options (contextual menu, llms.txt, and skill.md), refer to AI-optimized documentation.

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.

Open in Cursor
In this tutorial, you build a React ambient encounter page with the Web SDK. You install the packages, wrap the app with 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 partnerId and partnerToken.
  • 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.
Prefer staging credentials while you learn. Switch environment to production only when your partner configuration is ready.

Architecture

Project setup

  1. Use a React 18+ app that can host the Web SDK UI (see Prerequisites).
  2. Install the required dependencies. Refer to Web SDK installation.
  1. Configure your credentials:
    • Keep partnerId and partnerToken ready for SukiAuthManager (prefer staging while you learn).
    • Confirm host URLs meet Web SDK prerequisites.

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

React

Troubleshooting

Confirm init({ authManager }) runs once under SukiProvider when isInitialized is false.
Check partnerId / partnerToken and allowlisted hosts in Web SDK prerequisites.
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 SukiAuthManager and called init.
  • Mounted SukiAssistant with encounter context and LOINC sections.
Prefer staging credentials until your partner configuration is production-ready.

Other tutorials

Continue with another end-to-end tutorial.
Ambient

Build a Headless Ambient Recorder

Use Headless hooks to sign in, create an ambient session, and control recording in a custom React UI.

20 minIntermediate
Ambient

Build an Ambient Streaming Client

Authenticate, create a session, stream PCM audio over WebSocket, and retrieve clinical note results.

20 minIntermediate
Last modified on July 23, 2026