Experience the easiest way to add AI chat to your website. Just one line of code!
Add this single line to your HTML before the closing </body> tag:
<!-- Method 1: Auto-initialize with data attributes -->
<script
src="./bubble/bubble-widget.js"
data-api-url="YOUR_API_URL"
data-chat-endpoint="/api/v1/assistant/chat"
data-document-endpoint="/api/v1/documents"
data-position="bottom-right"
data-bubble-color="#007bff"
data-bubble-size="60"
></script>
<link rel="stylesheet" href="./bubble/bubble-widget.css">
OR use JavaScript initialization:
<script src="http://localhost:5173/bubble-widget.js"></script>
<script>
SmartPosAgentChat.init({
apiUrl: 'http://localhost:3007',
chatEndpoint: '/api/v1/assistant/chat',
documentEndpoint: '/api/v1/documents',
position: 'bottom-right',
bubbleColor: '#007bff',
bubbleSize: 60
});
</script>
Bubble position: bottom-right, bottom-left, top-right, top-left
Hex color code for the chat bubble (e.g., #007bff)
Size of the chat bubble in pixels (default: 60)
Base URL of your backend API server
Chat API endpoint path
Document API endpoint path
Works out of the box with sensible defaults
Perfect on desktop, tablet, and mobile
Optimized bundle size and lazy loading
Match your brand with custom colors
Streaming responses for instant feedback
Works with any website or framework
Click the chat bubble to start a conversation with BiteBolt AI