@bitpalm/ai-agents 0.1.0 → 0.1.1
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 +68 -0
- package/package.json +3 -6
package/README.md
ADDED
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
# @bitpalm/ai-agents
|
|
2
|
+
|
|
3
|
+
Drop-in AI chat agent widget for any website. Works with React, Next.js, Vue, vanilla JS, or a simple script tag.
|
|
4
|
+
|
|
5
|
+
## Installation
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
npm install @bitpalm/ai-agents
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## React / Next.js
|
|
12
|
+
|
|
13
|
+
```tsx
|
|
14
|
+
import { BitPalmAgent } from '@bitpalm/ai-agents/react';
|
|
15
|
+
|
|
16
|
+
export default function Layout({ children }) {
|
|
17
|
+
return (
|
|
18
|
+
<>
|
|
19
|
+
{children}
|
|
20
|
+
<BitPalmAgent slug="your-agent-slug" />
|
|
21
|
+
</>
|
|
22
|
+
);
|
|
23
|
+
}
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
Place it in your root layout so the widget persists across page navigations.
|
|
27
|
+
|
|
28
|
+
## Vanilla JavaScript
|
|
29
|
+
|
|
30
|
+
```js
|
|
31
|
+
import { createWidget } from '@bitpalm/ai-agents';
|
|
32
|
+
|
|
33
|
+
const widget = createWidget({ slug: 'your-agent-slug' });
|
|
34
|
+
|
|
35
|
+
// Programmatic control
|
|
36
|
+
widget.open();
|
|
37
|
+
widget.close();
|
|
38
|
+
widget.destroy();
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
## Script Tag
|
|
42
|
+
|
|
43
|
+
No build step required — add a single script tag to any HTML page:
|
|
44
|
+
|
|
45
|
+
```html
|
|
46
|
+
<script src="https://unpkg.com/@bitpalm/ai-agents" data-slug="your-agent-slug"></script>
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
## Options
|
|
50
|
+
|
|
51
|
+
| Option | Type | Default | Description |
|
|
52
|
+
|--------|------|---------|-------------|
|
|
53
|
+
| `slug` | `string` | — | **Required.** Your agent slug from the [BitPalm dashboard](https://agents.bitpalm.ae). |
|
|
54
|
+
| `locale` | `string` | auto-detected | Widget language (`"en"`, `"de"`, `"ar"`, …). Falls back to `document.documentElement.lang`. |
|
|
55
|
+
| `baseUrl` | `string` | `"https://agents.bitpalm.ae"` | Agent platform URL. Only change this for self-hosted setups. |
|
|
56
|
+
| `zIndex` | `number` | `9999` | z-index for the widget iframe and chat button. |
|
|
57
|
+
|
|
58
|
+
## Features
|
|
59
|
+
|
|
60
|
+
- **Visitor Intelligence** — automatically sends page URL, title, and navigation history to the agent for context-aware responses
|
|
61
|
+
- **SPA support** — detects client-side navigation (`pushState` / `replaceState`) and keeps the widget alive across route changes
|
|
62
|
+
- **Trigger bubbles** — proactive chat bubbles configured from the dashboard
|
|
63
|
+
- **Scroll & exit tracking** — scroll depth and exit intent signals for smart triggers
|
|
64
|
+
- **Light & fast** — no dependencies (React is optional), tiny bundle size
|
|
65
|
+
|
|
66
|
+
## License
|
|
67
|
+
|
|
68
|
+
MIT — [AI Agent Platform by BitPalm](https://agents.bitpalm.ae)
|
package/package.json
CHANGED
|
@@ -1,14 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bitpalm/ai-agents",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.1",
|
|
4
4
|
"description": "Drop-in AI chat agent widget for any website. Includes visitor intelligence, SPA navigation tracking, trigger bubbles, and more.",
|
|
5
5
|
"license": "MIT",
|
|
6
|
-
"author": "BitPalm <
|
|
7
|
-
"repository": {
|
|
8
|
-
"type": "git",
|
|
9
|
-
"url": "https://github.com/BitPalm-LLC/ai-agents-sdk"
|
|
10
|
-
},
|
|
6
|
+
"author": "BitPalm <agents@bitpalm.ae>",
|
|
11
7
|
"keywords": ["ai", "chatbot", "widget", "bitpalm", "agents", "chat"],
|
|
8
|
+
"website": "https://agents.bitpalm.ae",
|
|
12
9
|
"type": "module",
|
|
13
10
|
"main": "./dist/index.cjs",
|
|
14
11
|
"module": "./dist/index.js",
|