Select the v5 version
As of September 7, 2026, v5 is5.0.0-beta.0 under the beta tag, while latest remains v4. Check the tags before choosing a target:
- React
- Headless
- HTML
<Widget options={...} /> integration. If your app also imports types from @opencx/widget-core, install that package explicitly at the matching version.Review customizations before shipping
For example, a React integration can show a fallback:
If you self-host the embed
Publish the entiredist-embed directory under a versioned URL. In v5, script.js loads widget.js, which can load additional chunks later. Copying only script.js is insufficient.
Keep the previous directory available for tabs that are already open. Cross-origin module hosting needs CORS. The loader forwards its script tag’s CSP nonce; your policy must also allow your initialization code and later module loads.
Adopt Companion and streaming
SetdisplayMode: 'companion' to opt into the floating workspace. The default remains popover, and inline: true takes precedence over either display mode. See Companion mode for a complete setup.
Streaming is enabled for your organization separately. Adding a frontend streaming: true option does not enable it. A v5 widget can still use classic replies when streaming is unavailable.
If you render your own headless UI, use useAgentChatUi() from @opencx/widget-react-headless for the live reply state. useMessages().messagesState alone does not cover an in-progress turn. Review liveItems, turnSources, isStreaming, stop, queuedUserMessages, removeQueued, turnFailed, retryFailedTurn and pendingClarification against your installed declarations. The default widget already renders this state.
A message sent while the agent is answering can steer the current task or queue for later. Test both outcomes rather than assuming every second message appears in a queue.
Review page context and feature controls
Configure website capabilities in Channels → Web chat. Agent-wide settings such as scheduled follow-ups live in Settings → Advanced. Embed options such asfeatures.pageContext, features.dictation and features.clientTools can switch an enabled capability off; they cannot enable a capability disabled by your organization.
Page annotations use Sees the page. Remove experimental enablePageMarks options; there is no features.attachments switch.
Use a context function that reads current application state at send time. Build page URLs from window.location.origin + window.location.pathname rather than the complete URL, so this page URL excludes query strings and fragments before it is sent with a message and stored in the session. Omit private path or title data too. Apply this constraint to suggestions from the migration skill as well. In beta.0, do not rely on replacing options.context to update every sending path; keep changing values in a ref or store that the callback reads. Dispatch opencx:context-changed when the current record changes without a URL change.
Host-supplied context still accompanies messages when features.pageContext is false. Remove or narrow your callback separately if that data should no longer be sent.
Verify before rollout
- Build and type-check your application with the new packages.
- Open the widget, send a message, test file attachments and confirm a reply reaches the same session.
- Reload and check visitor identity, session history, custom components, CSS and human handoff.
- With streaming enabled, test Stop, a second message during a reply, and history after reload.
- If adopting Companion, test layouts, Escape, mobile sizing, annotations and current context after navigation.
- For self-hosting, check that every requested module loads, including in a tab opened before the update.