Integration Guide
Follow these 6 steps to integrate AI-powered support into your application. Each step links to detailed documentation.
Create Tenant
Log in to the Admin Dashboard and click "Create Tenant". Provide your company name, plan, API base URL, and a service token for server-to-server authentication.
Admin Dashboard →Configure JWT Secret
Copy the JWT shared secret from your tenant settings. Your backend must sign JWTs for each user session with this secret using HS256.
Authentication Guide →Implement 4 Endpoints
Your backend must expose 4 GET endpoints that the Support Gateway calls server-to-server to build context snapshots:
Endpoint Docs →GET /support/user-state?userId=XGET /support/user-history?userId=X&windowHours=72GET /support/user-logs?userId=X&windowHours=72GET /support/business-rulesAdd Widget Script
Add the widget SDK to any page where users need support. Two script tags and you're live:
Widget SDK Docs →<script src="https://cdn.yourdomain.com/ai-support-widget.js"></script><script> AISupportWidget.init({ tenantKey: 'ten_your_key', jwt: yourUserJwt, theme: 'light', position: 'bottom-right', });</script>Test with Demo Page
Visit the /demo page to test your widget integration. Open browser DevTools to verify API calls are succeeding and that the chat opens correctly.
Open Demo →Go Live
Point the widget script to your production CDN, update the API URL to your production gateway, ensure your 4 endpoints return real data, and monitor analytics in the Admin Dashboard.
View Analytics →