Widget Service v1.0
Aigen Chat Widget
Embeddable AI chat widget with glassmorphic design, multi-language support, and agent selection
1 Quick Start
Add the widget to any website with just two lines of code:
// Add to your HTML
<script src="https://widget.platform.aigen.solutions/sdk/loader.js"></script>
<script>
aigen('init', 'YOUR_API_KEY');
</script>
⚙ Configuration Options
Pass options as the third parameter to customize the widget:
aigen('init', 'YOUR_API_KEY', {
language: 'az', // Widget language
agentId: 'uuid-here', // Specific agent to use
embedded: false, // Embedded mode for mobile
containerId: 'chat' // Container ID (if embedded)
});
| Option | Type | Description |
|---|---|---|
language |
string | UI language: en, az, ru, tr |
agentId |
string | UUID of the agent config to use (overrides widget default) |
embedded |
boolean | Fill parent container instead of floating |
containerId |
string | Target container ID when embedded is true |
🌐 Language Support
The widget supports multiple languages for UI elements:
🇬🇧
English
en
🇦🇿
Azərbaycanca
az
🇷🇺
Русский
ru
🇹🇷
Türkçe
tr
// Example: Azerbaijani language
aigen('init', 'YOUR_API_KEY', { language: 'az' });
🤖 Agent Selection
Use different AI agents for different pages or purposes:
// Use specific agent (override widget default)
aigen('init', 'YOUR_API_KEY', {
agentId: '550e8400-e29b-41d4-a716-446655440000'
});
// Example: Different agents for different pages
const agentMap = {
'/sales': 'sales-agent-uuid',
'/support': 'support-agent-uuid',
'/docs': 'docs-agent-uuid'
};
const agentId = agentMap[window.location.pathname];
aigen('init', 'YOUR_API_KEY', { agentId });
📱 Embedded Mode (Mobile Apps)
For mobile app WebViews or full-page chat experiences:
// HTML container
<div id="chat-container" style="width: 100%; height: 100vh;"></div>
// Initialize in embedded mode
<script>
aigen('init', 'YOUR_API_KEY', {
embedded: true,
containerId: 'chat-container',
language: 'az'
});
</script>
- Widget fills the container completely (no floating button)
- No close/minimize buttons (designed for full-page use)
- Opens automatically when initialized
- Perfect for mobile WebView integration
💡 Full Example
<!DOCTYPE html>
<html>
<head>
<title>My App</title>
</head>
<body>
<!-- Your page content -->
<!-- Aigen Widget -->
<script src="https://widget.platform.aigen.solutions/sdk/loader.js"></script>
<script>
aigen('init', 'wgt_3HXgQQGnwUqamXsNq3kKRPfWitKJpYBx', {
language: 'az',
agentId: 'your-agent-uuid' // optional
});
</script>
</body>
</html>