Agent Chat SDK
Overview
Embed a conversational AI chat widget in any website with the Agent Chat SDK.
The Agent Chat SDK (@zelto/agent-chat-sdk) is a lightweight JavaScript library that adds a fully-featured AI chat widget to your website. It renders inside a Shadow DOM so it won't conflict with your styles.
Features
- Plug-and-play UI — Floating toggle button and chat panel, ready out of the box
- Real-time streaming — Responses stream in via WebSocket for a natural feel
- Session management — Conversations persist across page navigations
- Theming — Match your brand with custom colors and border radius
- Personalization — Set a greeting, title, logo, and agent avatar
- Actions — Register handlers for agent tool calls to trigger in-app behavior
- Internationalization — Built-in support for English, Spanish, and Portuguese
- Tiny footprint — Under 50 kB gzipped with zero external CSS dependencies
Quick start
npm install @zelto/agent-chat-sdkimport { init, mountChat } from '@zelto/agent-chat-sdk';
init({
apiKey: 'your-api-key',
userId: 'user-123',
baseUrl: 'https://api.zelto.ai',
});
mountChat();That's it — a chat bubble appears in the bottom-right corner of the page.