Start here

Quickstart

Install, mount, and verify a first run.

What You Build

A working provider setup plus a chat surface connected to your real user and feature data.

Outcome
Assistant running in your app shell.
Time
About 10 minutes.
Next
Continue with Workflow.

Before You Begin

Why identity matters

userProfile.userId lets workflows track completion correctly and avoids repeat onboarding.

Install the SDK

Install the SDK in the same app that renders the product UI.

bash
npm install @modelnex/sdk react react-dom zod

Mount the Provider

Mount ModelNexProvider above routed content so the assistant and workflows survive route changes.

tsx
import { ModelNexProvider, ModelNexChatBubble } from '@modelnex/sdk'

export default function AppShell() {
  return (
    <ModelNexProvider
      websiteId="your-website-id"
      userProfile={{ userId: 'user-123' }}
    >
      <Routes />
      <ModelNexChatBubble appName="My Product" />
    </ModelNexProvider>
  )
}
Why this shape matters

The top-level provider keeps assistant state alive while users move through your product.

Render a Surface

Most teams start with ModelNexChatBubble. It supports general assistant chat and workflow playback from one surface.

Verify the Integration

  1. Load your app and confirm the bubble renders.
  2. Inject a valid browser dev mode key and confirm the backend verification succeeds before you try to record.
  3. Run a forced preview with ?modelnex_test_workflow=FLOW_ID.
  4. Verify targets resolve on the real recorded routes.
Success check

If you can trigger a forced workflow run end-to-end, the integration is ready for real content.

Common Mistakes

Next: Workflow.

View all guides Next: SDK Configuration