window.EkaMedAssist object. Use it to set or override configuration before the user opens the widget — handy when your values are dynamic (a logged-in user’s auth token, runtime context, etc.).
EkaMedAssist.init()
Callinit() with a config object. Values passed here take precedence over both the agent config and any HTML attributes.
Config options
These are the camelCase equivalents of the HTML attributes, plus a couple of init-only fields.Your MedAssist agent identifier.
Authentication token sent with the session.
Alternative auth header / bearer token.
Widget header title.
Launcher button icon URL.
Base URL for the agent-config and nudge endpoints.
Fullscreen overlay or floating launcher.
Context object merged into the session. Merged with any
context set via the HTML attribute, not replaced.CSS injected into the launcher Shadow DOM. See Custom launcher styling.
URL to redirect to when the widget closes.
Allow the widget to be resized when open.
Force-show the close button. (Automatically shown when
redirectUrl is set.)Theme overrides —
backgroundImage, primary, textColor, mode, headerTinted, titleImg, tagline. See Theme object.onClose callback
Run code when the user closes the widget — for analytics, cleanup, or your own navigation:Self-hosting widget assets
By default, the loader fetches the widget’s JS and CSS from the CDN on first open. To serve your own build, point the loader at your asset directory with thedata-widget-assets attribute on the script tag:
medassist-widget.js and medassist-widget.css are served at that path.

