Chat SDK integration
Embed the current SDK through an authenticated host application.
The repository contains a headless SDK and a Web Component interface. There is no public hosted CDN installation offered here. Build and serve the interface bundle from your deployment.
Host setup
The host must obtain an authorized session and provide its Gateway origin, conversation scope, workspace, and access token. The session endpoint and bundle path below are examples your application must implement; they are not AI Ops hosted services.
<div id="chat-host"></div>
<script type="module" src="/assets/chat-sdk-ui.js"></script>
<script type="module">
const response = await fetch('/session/chat-sdk', {
credentials: 'same-origin',
});
if (!response.ok) throw new Error('Chat session unavailable');
const session = await response.json();
const chat = document.createElement('ai-chat');
chat.endpoint = session.gatewayOrigin;
chat.sessionId = session.conversationScope;
chat.workspaceId = session.workspaceId;
chat.setAccessToken(session.accessToken);
document.querySelector('#chat-host').append(chat);
</script>Credentials and control
Assign the token in memory with setAccessToken. Do not put access tokens in URLs or HTML attributes. The Gateway controls permission checks, confirmations, approvals, and execution. A browser component does not authorize an operation.
The maintained embedding specification is docs/product/chat-sdk-embedding.md in the repository; chat-sdk/README.md contains the current package and theme guidance. Verify session renewal, logout, expiry, and tenant changes in your host before a pilot.