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

carmen-chatbot-widget

v1.0.12

Published

AI Chatbot Widget

Readme

🤖 Carmen Chatbot Widget

The official embeddable chatbot widget for Carmen Enterprise System. Easily integrate a smart AI support assistant into any web application with just a few lines of code. Supports multi-tenant knowledge bases, custom LLM models, and rich media rendering.

✨ Features

  • ⚡ Framework Agnostic: Works seamlessly with React, Vue, Angular, Next.js, or Vanilla JS.
  • 🏢 Multi-Tenant (BU) Support: Separates chat history, logs, and RAG knowledge base by Business Unit (e.g., HR, Account, Sales).
  • 🧠 Model Selection: Ability to specify which LLM model to use (e.g., GPT-4o, Claude-3.5) directly from the frontend configuration.
  • 💾 Persistent Sessions: Automatically manages user sessions and loads chat history.
  • 🎥 Rich Media Support: Renders Markdown formatting and automatically embeds YouTube videos from links.
  • 💬 Interactive UI: Includes typing animations, copy-to-clipboard tools, suggested questions, and feedback buttons (👍/👎).

📦 Installation

Install via NPM:

npm install carmen-chatbot-widget
# or
yarn add carmen-chatbot-widget

🚀 Usage

1. Using with React / Next.js

Import and initialize the widget inside a useEffect hook.

import { useEffect } from 'react';
import { CarmenBot } from 'carmen-chatbot-widget';

function App() {
  useEffect(() => {
    // Initialize the widget
    new CarmenBot({
      bu: "HR",                   // (Required) Business Unit ID
      user: "John Doe",           // (Optional) User Display Name
      title: "HR Assistant 👩‍💼",   // (Optional) Widget Header Title
      model: "openai/gpt-4o-mini" // (Optional) Specify the AI Model to use
    });
  }, []);

  return (
    <div className="App">
      <h1>Welcome to Carmen Enterprise</h1>
    </div>
  );
}

export default App;

2. Using with Vanilla HTML / JavaScript

You can use it directly in a script tag if your project supports ES Modules.

<!DOCTYPE html>
<html lang="en">
<body>
    <h1>My Website</h1>

    <script type="module">
        import { CarmenBot } from './node_modules/carmen-chatbot-widget/src/index.js'; 
        // Or point to your build file / CDN if available

        new CarmenBot({
            bu: "hotel-seaside",
            user: "Guest User",
            title: "Hotel Concierge",
            model: "anthropic/claude-3-haiku"
        });
    </script>
</body>
</html>

⚙️ Configuration Options

Pass these options to the new CarmenBot(config) constructor.

⚙️ Configuration Options

Pass these options to the new CarmenBot(config) constructor.

| Parameter | Type | Default | Example | Description | | :--- | :--- | :--- | :--- | :--- | | bu | string | "global" | "HR", "Sales", "Hotel-A" | Important: The Business Unit ID. This isolates chat history, token usage logs, and the RAG knowledge base. | | user | string | "Guest" | "John Doe", "Manager" | The display name of the user shown in the chat interface and recorded in logs (if enabled). | | model | string | null | "openai/gpt-4o", "anthropic/claude-3-haiku" | (New) Specifies the LLM model ID. If omitted, the system uses the default "Active" model from the database. | | title | string | "Carmen AI" | "HR Support 👩‍💼", "Concierge" | Custom title text displayed in the widget's header bar. | | apiUrl | string | (Production URL) | "http://localhost:8000" | Overrides the backend API URL. Essential for local development or custom deployments. | | theme | string | null | "dark", "blue" | (Optional) Theme key passed to the backend/frontend for custom styling logic. | | prompt_extend | string | null | "Answer in Thai only", "Be concise" | (Optional) Additional system instructions injected into the AI context to control behavior. |


🛠️ Development

If you want to modify the source code locally:

  1. Clone the repository.
  2. Install dependencies:
npm install
  1. Link package locally for testing:
# In this package folder
npm link

# In your test project folder
npm link carmen-chatbot-widget