🤖 QIXS Agent - Embed Example
This page demonstrates how to embed the QIXS AI Agent widget on any website.
Quick Start
Add this single line to your website's HTML, just before the closing </body> tag:
<script src="https://your-cdn.com/qixs-embed.js?token=YOUR_ENCODED_TOKEN"></script>
Example with Token
<!-- Example: Embed QIXS Agent with agent configuration -->
<script src="https://your-cdn.com/qixs-embed.js?token=eyJhZ2VudF9pZCI6IjY4ZDc5YTBkZTU4YmZjZWFmOGY0ODIyOCJ9"></script>
📝 Note: Replace YOUR_ENCODED_TOKEN with the actual token provided by your QIXS admin panel.
What Happens?
- The embed script extracts your token from the URL
- Loads React and ReactDOM from CDN (if not already present)
- Loads the QIXS Agent widget with your configuration
- Automatically mounts the widget on your page
Features
- ✅ Zero Configuration: Just one script tag
- ✅ Style Isolation: Uses Shadow DOM to prevent CSS conflicts
- ✅ Lightweight: Loads dependencies only once
- ✅ Responsive: Works on desktop and mobile
- ✅ No Conflicts: Won't interfere with your existing JavaScript
✅ Success! If you see the QIXS Agent widget (usually in the bottom-right corner), the integration is working correctly.
Testing Locally
For local development, update the CDN URL in qixs-embed.js to point to your local server:
WIDGET_CDN: 'http://localhost:5173/qixs-agent.iife.js'
Production Deployment
- Build the widget:
npm run build
- Upload
dist/qixs-embed.js and dist/qixs-agent.iife.js to your CDN
- Update the
WIDGET_CDN URL in qixs-embed.js to point to your CDN
- Share the embed script with your users
Need Help?
Check the browser console for initialization logs and any error messages.