Connect Lemah to Any Website
Deploy your autonomous AI assistant in under 3 minutes. Choose between our official WordPress plugin or universal 1-click script tag for custom web stacks.
Architecture & Core Capabilities
The Lemah Chat Widget is an ultra-lightweight, standalone conversational bubble that plugs into any existing website. It connects directly with your Lemah multi-tier intelligence engine (retrieving data from your uploaded PDFs, FAQs, product catalogs, and website URLs) to resolve customer inquiries 24/7.
Zero Overhead
Pure vanilla JavaScript. Zero external libraries. 100% immune to CSS bleeding or theme conflicts.
Async Execution
Loads with the async attribute to guarantee zero penalty on Google Core Web Vitals or LCP.
Cloud Updates
Change colors, greetings, or knowledge base in your Lemah dashboard; changes reflect instantly on your site.
Official WordPress Plugin
Recommended for WordPress, WooCommerce, Elementor, and Divi sites.
Install the Plugin ZIP
In your WordPress Admin, go to Plugins > Add New > Upload Plugin. Choose the downloaded lemah-ai.zip file, click Install Now, and then click Activate Plugin.
Retrieve Your Bot Key
Log into your Lemah Dashboard, go to Integrations > Website & WordPress Widget, and copy your unique Bot Key (e.g., bot_7f9b8c3a).
Paste Key & Save
In WordPress, navigate to Settings > Lemah AI. Paste your Bot Key into the field, choose your launcher position (Bottom Right or Bottom Left), and click Save Changes.
Administrator Preview: The WordPress plugin includes an option to "Hide for Logged-In Administrators" so you can browse your admin dashboard cleanly without the floating chat icon.
1-Click Universal HTML Snippet
If you are not using WordPress, paste this single script snippet into your site’s HTML, right before the closing </body> tag:
<script src="https://app.lemah.ai/widget.js" data-bot-key="YOUR_WORKSPACE_BOT_KEY" async> </script>
Note on the Bot Key:
ReplaceYOUR_WORKSPACE_BOT_KEY with the unique key found in your Lemah Dashboard under Integrations > Website Widget.Platform-by-Platform Instructions
Select your website builder or e-commerce engine below for exact click-by-click instructions:
Modern Web Frameworks (Next.js & React)
For modern single-page applications or server-rendered frameworks, you can load the widget non-intrusively:
import Script from 'next/script';
export default function RootLayout({ children }: { children: React.ReactNode }) {
return (
<html lang="en">
<body>
{children}
<Script
src="https://app.lemah.ai/widget.js"
data-bot-key="YOUR_WORKSPACE_BOT_KEY"
strategy="lazyOnload"
/>
</body>
</html>
);
}import { useEffect } from 'react';
export function LemahChatWidget({ botKey }: { botKey: string }) {
useEffect(() => {
const script = document.createElement('script');
script.src = 'https://app.lemah.ai/widget.js';
script.setAttribute('data-bot-key', botKey);
script.async = true;
document.body.appendChild(script);
return () => {
// Optional cleanup if unmounting
const existing = document.querySelector('script[src*="widget.js"]');
if (existing) existing.remove();
const widgetDrawer = document.getElementById('lemah-widget-container');
if (widgetDrawer) widgetDrawer.remove();
};
}, [botKey]);
return null;
}Styling, Colors & White-Labeling
You can customize the appearance of the chat widget directly from your Lemah Dashboard under Integrations > Widget Styling:
| Setting | Options | Description |
|---|---|---|
| Brand Color | Hex Code (e.g. #2563EB) | Colors the floating button, send button, header bar, and quick chips. |
| Assistant Name | e.g. "Sophia - Support" | Displayed at the top of the chat drawer alongside the online status indicator. |
| Initial Greeting | Custom welcome text | The first proactive message the visitor sees when opening the drawer. |
| Widget Position | bottom-right | bottom-left | Choose which corner of the screen the floating button anchors to. |
| Remove Branding | Pro & Enterprise Plan | Hides the "Powered by Lemah" footer badge completely for full white-labeling. |
Security, Domains & Quota Guards
Lemah protects your business and brand reputation with enterprise-grade guardrails:
Domain Allowlisting
Prevent unauthorized websites from embedding your bot. You can specify a comma-separated list of allowed domains in your Workspace Settings (e.g. mycompany.com, shop.mycompany.com).
Predictable Quota Protection
If your workspace reaches its monthly message quota, your site visitors are politely informed without errors, and an immediate notification email is sent to your account owner to upgrade with zero downtime.
Frequently Asked Questions & Troubleshooting
Q:The chat widget is not showing up on my site. What should I check?
1. Confirm that your Bot Key in data-bot-key exactly matches the key in your Lemah dashboard. 2. Verify that the script tag is placed before </body>. 3. Check your browser's Developer Console (F12) for any Content Security Policy (CSP) blocks.
Q:Can my human support agents take over a live conversation?
Yes! When visitors chat through the website widget, the conversation streams in real time to your Lemah Live Arena dashboard. An agent can click 'Takeover' to pause the AI and chat directly with the visitor.
Q:How does the AI know about our products and refund policies?
Go to your Lemah Dashboard > Knowledge Lab. Upload your PDF documents, website URLs, or FAQ spreadsheets. Lemah's RAG engine automatically vectors your files and equips the bot with precise knowledge.
Q:Does the widget remember conversations when a user clicks to another page?
Yes. The session is seamlessly preserved in browser localStorage for the duration of the visit, so users can navigate across your site without losing their chat context.
Q:Can I remove the 'Powered by Lemah' badge?
Yes! Workspaces on the Pro or Enterprise plan can toggle 'Remove Lemah Branding' under Integrations > Widget Styling.