npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@bitpalm/ai-agents

v0.1.19

Published

Drop-in AI chat agent widget for any website. Includes visitor intelligence, SPA navigation tracking, trigger bubbles, and more.

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.

Installation

npm install @bitpalm/ai-agents

React / Next.js

import { BitPalmAgent } from '@bitpalm/ai-agents/react';

export default function Layout({ children }) {
  return (
    <>
      {children}
      <BitPalmAgent slug="your-agent-slug" token="your-embed-token" />
    </>
  );
}

Place it in your root layout so the widget persists across page navigations.

Vanilla JavaScript

import { createWidget } from '@bitpalm/ai-agents';

const widget = createWidget({ slug: 'your-agent-slug', token: 'your-embed-token' });

// Programmatic control
widget.open();
widget.close();
widget.identify({
  externalUserId: 'cust_123',
  name: 'Max Mustermann',
  email: '[email protected]',
});
widget.destroy();

Script Tag

No build step required — add a single script tag to any HTML page:

<script async src="https://unpkg.com/@bitpalm/ai-agents" data-slug="your-agent-slug" data-token="your-embed-token"></script>

Options

| Option | Type | Default | Description | |--------|------|---------|-------------| | slug | string | — | Required. Your agent slug from the BitPalm dashboard. | | token | string | — | Required for restricted/private agents. Embed token from dashboard access settings. | | locale | string | auto-detected | Widget language ("en", "de", "ar", …). Falls back to document.documentElement.lang. | | baseUrl | string | "https://agents.bitpalm.ae" | Agent platform URL. Only change this for self-hosted setups. | | zIndex | number | 9999 | z-index for the widget iframe and chat button. | | autoIdentify | boolean | true | Auto-detects form submissions and sends found identity fields (email/phone/name/company) for visitor stitching. |

Features

  • Visitor Intelligence — automatically sends page URL, title, and navigation history to the agent for context-aware responses
  • Returning visitor detection — recognizes returning visitors, restores chat history, and enables session/page-count-based triggers
  • SPA support — detects client-side navigation (pushState / replaceState) and keeps the widget alive across route changes
  • Trigger bubbles — proactive chat bubbles configured from the dashboard, including visitor-data-driven triggers (session count, visited pages)
  • Scroll & exit tracking — scroll depth and exit intent signals for smart triggers
  • Automatic form identity stitching — captures common form fields on submit and links them to the current visitor profile
  • Privacy-friendly — respects visitor opt-out (_bp_optout in localStorage); when opted out, no tracking beacons are sent and no visitor ID is stored
  • Light & fast — no dependencies (React is optional), tiny bundle size

Optional Field Hints

The widget already detects common field names automatically. For custom forms, you can add explicit markers:

  • data-bp-email
  • data-bp-phone
  • data-bp-name (or data-bp-first-name / data-bp-last-name)
  • data-bp-company
  • data-bp-field="email|phone|name|first-name|last-name|company" (generic fallback)

Disable auto-identity for one specific form:

<form data-bp-identify="off">...</form>

Manual Identify (Logged-in Users)

If your website has authenticated users, call identify() after login to attach trusted profile data to the current visitor:

widget.identify({
  externalUserId: "user_42",
  name: "Alex Example",
  email: "[email protected]",
  phone: "+491701234567",
  company: "Example GmbH",
});

Optional signed identify fields (forwarded to your BitPalm backend):

  • signature: backend-generated HMAC signature
  • signedAt: unix timestamp (seconds)
  • signatureVersion: currently "v1"

For script-tag integrations, trigger identify via a browser event:

window.dispatchEvent(
  new CustomEvent("bitpalm-identify", {
    detail: {
      slug: "your-agent-slug",
      externalUserId: "user_42",
      name: "Alex Example",
      email: "[email protected]",
    },
  })
);

License

MIT — AI Agent Platform by BitPalm