Embedding instructions for: https://chat-burning-meme-app.dexguru.biz
Customize your widget settings. The code below will update automatically.
Copy this code and paste it into your HTML, just before the closing </body> tag.
<script
src="https://chat-burning-meme-app.dexguru.biz/luka_embed.js"
data-luka-id="default"
data-mode="bubble"
data-position="bottom-right"
data-theme="auto"
data-sub-agent="crypto_analyst"
data-api-url="https://chat-burning-meme-app.dexguru.biz"
></script>The code automatically updates as you change settings above. Just copy and paste!
Use these buttons to interact with the widget programmatically:
Detailed documentation for advanced features and configuration options.
| Attribute | Values | Default | Description |
|---|---|---|---|
| data-mode | bubble, copilot, inline | bubble | Display mode |
| data-locale | en, ru, auto | auto (browser) | UI and LLM language |
| data-theme | auto, light, dark, ocean, sunset | auto | Color theme |
| data-position | bottom-right, bottom-left | bottom-right | Widget position (bubble mode) |
| data-sub-agent | crypto_analyst, etc. | (default) | AI agent persona |
| data-title | any string | Luka Assistant | Widget header title |
| data-greeting | any string | (none) | Initial greeting message |
| data-api-url | URL | (auto) | Backend API URL |
Sub-agents allow you to customize the AI assistant's persona, welcome screen suggestions, and behavior for different use cases.
When you specify a <code>data-sub-agent</code> attribute, the embed widget:
Sub-agents are configured on the backend. Common examples include:
To see all available sub-agents, check the backend API endpoint: <code>https://chat-burning-meme-app.dexguru.biz/api/copilotkit/sub-agents</code>
// Embed with crypto analyst sub-agent<script src="https://chat-burning-meme-app.dexguru.biz/luka_embed.js"data-sub-agent="crypto_analyst"data-api-url="https://chat-burning-meme-app.dexguru.biz" ></script>If no <code>data-sub-agent</code> is specified, the widget uses the default sub-agent configured on the backend (typically <code>general_luka</code>).
The sub-agent affects the welcome screen suggestions and initial conversation context, similar to using <code>?subAgent=crypto_analyst</code> in the main chat interface.
This section explains how authentication will work with the embed widget and how user context flows through to the backend.
The embed widget supports passing authentication tokens that will be forwarded to the <code>ag_ui_gateway</code> backend for user identification and authorization.
// Configure widget with auth token (before script loads)
window.LukaWidgetConfig = {
ย ย authToken: "your-jwt-token-here"
};
// Widget sends token in Authorization header
// Authorization: Bearer your-jwt-token-here
// Authorization: Bearer your-jwt-token-here
// ag_ui_gateway middleware extracts and validates token
// User context injected into request.stateThe widget expects a JWT token that will be sent in the <code>Authorization</code> header with the <code>Bearer</code> prefix:
// Token structure (JWT){user_id: 123,platform: "web",token_type: "authenticated" | "guest",permissions: ["read:threads", "write:messages"],exp: 1234567890}The <code>ag_ui_gateway</code> processes authentication in the following order:
Authentication token passing is planned for future implementation. Currently, the widget operates in guest mode. When implemented, tokens will be:
Page context allows you to provide the LLM with information about the current page for more context-aware conversations.
{url: string, // url: string - Current page URLtitle: string, // title: string - Page titledescription: string, // description: string - Meta descriptiontopic: string, // topic: string - Primary content topicstage: string, // stage: string - User journey stageproduct: { // product: object - Product/service infoid: string,name: string,category: string,price: number},userSegment: string, // userSegment: string - User persona/segmentcustom: { // custom: object - Custom domain-specific data[key: string]: any}}window.LukaWidgetConfig = {pageContext: {url: window.location.href,title: document.title,topic: "Product Information",product: {id: "PROD-12345",name: "Wireless Headphones",category: "Electronics",price: 199.99},stage: "browsing"}};window.LukaWidgetConfig = {pageContext: {url: "/support/faq",topic: "Frequently Asked Questions",stage: "support",userSegment: "premium"}};window.LukaWidgetConfig = {pageContext: {url: "/checkout",topic: "Order Completion",stage: "checkout",custom: {cartValue: 299.97,items: 3,shippingMethod: "express"}}};Page context passing is planned for future implementation. When implemented, the context will be:
Checking widget status...
This documentation page is available at <code>https://chat-burning-meme-app.dexguru.biz/embed</code> on every deployment.
The widget supports three modes:
Bubble mode: Floating button with popup panel (default)
Copilot mode: Right sidebar with collapse handle
Inline mode: Toggleable floating panel with no header, full chat interface
If the widget doesn't appear, check the browser console for any errors. Make sure CORS is properly configured on the backend.