The SDK always opens the production AI-first widget. There is no public
version selector or conversation-start mode. Existing embed URLs and SDK
initialization calls continue to work with the production renderer.
Global API
IllumiChat.Widget
The main widget class. Create an instance by passing a configuration object.IllumiChat.getInstance()
Returns the current singleton widget instance. When the widget is loaded via a script tag withdata-assistant-id, the SDK automatically creates a singleton.
getInstance() returns null if no widget has been initialized yet.IllumiChat.destroyInstance()
Destroys the current singleton instance, removes the widget from the DOM, and cleans up all event listeners.IllumiChat.VERSION
Returns the current SDK version string.Instance Methods
initialize()
Must be called before any other method. Creates the iframe, injects styles, and renders the launcher button.open()
Opens the chat panel.close()
Closes the chat panel. The launcher button remains visible.toggle()
Toggles the chat panel. If open it closes; if closed it opens.sendMessage(text)
Sends a text message as if the visitor typed and submitted it.getState()
Returns the current widget state as a string.destroy()
Removes the widget entirely from the page. After callingdestroy(), the instance cannot be reused.
Widget States
Event System
Subscribing to Events
One-Time Listeners
Removing a Specific Handler
Available Events
Event Examples
Track conversations in analytics:Production capability notes
- Text messages, forms, quick-reply actions, and live-support lifecycle events are supported by the production v2 experience.
- Attachments and browser voice input are fast-follow composer capabilities. Do not use SDK configuration to infer that those controls are visible.
- The plugin registration API remains available for compatibility and host-side lifecycle integrations. Plugin-rendered widget UI is a fast-follow v2 capability and should not be treated as generally available.