@bitpalm/ai-agents
v0.5.0
Published
Drop-in AI chat agent widget for any website. Includes visitor intelligence, SPA navigation tracking, trigger bubbles, and more.
Maintainers
Readme
@bitpalm/ai-agents
Drop-in AI chat agent widget for any website. Works with React, Next.js, Vue, vanilla JS, or a simple script tag.
Don't have an agent yet? Create one for free — takes less than 10 minutes.
30-second install
Script tag (any HTML page)
<script
async
src="https://unpkg.com/@bitpalm/ai-agents"
data-slug="your-agent-slug"
data-token="your-embed-token"
></script>React / Next.js
import { BitPalmAgent } from "@bitpalm/ai-agents/react";
export default function RootLayout({ children }) {
return (
<html>
<body>
{children}
<BitPalmAgent slug="your-agent-slug" token="your-embed-token" />
</body>
</html>
);
}Vanilla JS
import { createWidget } from "@bitpalm/ai-agents";
const widget = createWidget({ slug: "your-agent-slug", token: "your-embed-token" });Light & dark theme
Set up dark colors for your agent in the dashboard playground. The widget then follows your website's theme on its own (class="dark", data-theme="dark", the page background or color-scheme) and switches live.
To set it yourself:
<script async src="https://unpkg.com/@bitpalm/ai-agents" data-slug="your-agent-slug" data-theme="dark"></script>widget.setTheme("dark"); // "light", "dark" or "auto"Full documentation
- Quickstart for Script Tag
- Quickstart for React / Next.js
- Quickstart for Vanilla JS
- Configuration options
- Light & dark theme
- Identify logged-in users
- Custom Context (cart, listings, account data)
- Events (lead capture, conversation start)
- API Reference
- Common Errors
Features
- Visitor Intelligence with intent scoring
- Returning visitor detection + chat history persistence
- SPA navigation tracking (
pushState/replaceState) - Trigger bubbles (session/page count, scroll depth, exit intent)
- Form auto-identify + signed identify for trusted data
- Custom context for business-aware AI responses
- Privacy-friendly with opt-out support
- Tiny bundle, no React dependency for vanilla build
License
MIT — built and operated by BitPalm.
