Basic Embed Snippet
To embed the assistant on any web page, paste the script tag before the closing</body> tag:
Standard Embed Snippet
Configuration Attributes
Example: Advanced Custom Branding & Prompts
Customized Widget Embed
Embedding in Modern Frameworks
Next.js (App Router)
In Next.js, load the widget using thenext/script component inside your root layout.tsx:
Next.js Root Layout Embed (app/layout.tsx)
React Component Wrapper
React Declarative Component
Programmatic JavaScript API
Control the widget programmatically using the globalwindow.MithunAI interface:
JavaScript Lifecycle Controls