@bymos/agentkit-sdk 0.3.2 → 0.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +8 -8
- package/agentkit-widget.iife.js +409 -14
- package/agentkit-widget.js +3427 -2332
- package/index.cjs +409 -14
- package/index.js +3172 -2077
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# @bymos/agentkit-sdk
|
|
2
2
|
|
|
3
|
-
Embeddable AI chat widget for [
|
|
3
|
+
Embeddable AI chat widget for [KlicForge](https://klicforge.ai). Add a fully-featured, themeable chat widget to any website or app — via a `<script>` tag or npm.
|
|
4
4
|
|
|
5
5
|
## Installation
|
|
6
6
|
|
|
@@ -24,7 +24,7 @@ pnpm add @bymos/agentkit-sdk
|
|
|
24
24
|
window.AgentKit.init({
|
|
25
25
|
agentId: 'your-agent-id',
|
|
26
26
|
tenantId: 'your-tenant-id',
|
|
27
|
-
apiBaseUrl: 'https://api
|
|
27
|
+
apiBaseUrl: 'https://api.klicforge.ai',
|
|
28
28
|
title: 'Support',
|
|
29
29
|
greeting: 'Hi! How can I help?',
|
|
30
30
|
});
|
|
@@ -39,7 +39,7 @@ import { init, renderWidget, buildWidgetCSS, normalizeConfig } from '@bymos/agen
|
|
|
39
39
|
const config = {
|
|
40
40
|
agentId: 'your-agent-id',
|
|
41
41
|
tenantId: 'your-tenant-id',
|
|
42
|
-
apiBaseUrl: 'https://api
|
|
42
|
+
apiBaseUrl: 'https://api.klicforge.ai',
|
|
43
43
|
};
|
|
44
44
|
const widget = init(config, renderWidget, buildWidgetCSS(normalizeConfig(config)));
|
|
45
45
|
|
|
@@ -53,9 +53,9 @@ widget.on('message:received', (msg) => console.log(msg.content));
|
|
|
53
53
|
```ts
|
|
54
54
|
type AgentKitWidgetConfig = {
|
|
55
55
|
// Required
|
|
56
|
-
agentId: string; // Agent ID from your
|
|
57
|
-
tenantId: string; // Tenant ID from your
|
|
58
|
-
apiBaseUrl: string; // Base URL of your
|
|
56
|
+
agentId: string; // Agent ID from your KlicForge dashboard
|
|
57
|
+
tenantId: string; // Tenant ID from your KlicForge dashboard
|
|
58
|
+
apiBaseUrl: string; // Base URL of your KlicForge API
|
|
59
59
|
|
|
60
60
|
// Identity (optional)
|
|
61
61
|
userId?: string;
|
|
@@ -86,7 +86,7 @@ type AgentKitWidgetConfig = {
|
|
|
86
86
|
};
|
|
87
87
|
```
|
|
88
88
|
|
|
89
|
-
At init time the widget fetches any widget config set for your agent in the
|
|
89
|
+
At init time the widget fetches any widget config set for your agent in the KlicForge dashboard (title, greeting, avatar, etc.) and uses it as defaults. Any values you pass here override the dashboard config.
|
|
90
90
|
|
|
91
91
|
---
|
|
92
92
|
|
|
@@ -143,7 +143,7 @@ widget.off(event, fn);
|
|
|
143
143
|
window.AgentKit.mount(document.getElementById('chat'), {
|
|
144
144
|
agentId: 'your-agent-id',
|
|
145
145
|
tenantId: 'your-tenant-id',
|
|
146
|
-
apiBaseUrl: 'https://api
|
|
146
|
+
apiBaseUrl: 'https://api.klicforge.ai',
|
|
147
147
|
mode: 'inline',
|
|
148
148
|
});
|
|
149
149
|
</script>
|