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

athena-xai-chat

v1.1.104

Published

<br />

Readme

ATHENA XAI Chat

Lightweight AI-powered chat and search widget for modern websites.


  1. About The Project
  2. Built With
  3. Requirements
  4. Installation
  5. Usage
  6. Components
  7. Translations
  8. Voice Recognition
  9. Full Example
  10. Notes

About The Project

Athena XAI Chat is a lightweight web component that enables AI-powered chat and search experiences directly on your website.

The package includes:

  • AI Chat Component
  • Independent AI Search Input
  • Voice Recognition Support
  • Easy Script-Based Integration

Main features:

  • Free Chat
  • Independent AI Search
  • Search Redirect Support
  • Voice Search Support

Built With


Requirements

  • Node.js >= 22.12.0

Installation

Install the package using npm:

npm install athena-xai-chat

Usage

1. Include Stylesheet

Place the stylesheet inside your <head> tag:

<link
    rel="stylesheet"
    href="dist/styles/athena-xai-chat-styles.css"
/>

2. Include Script Bundle

Place the script bundle inside your <head> tag:

<script
    type="module"
    src="dist/athena-xai-chat.umd.js"
    defer
></script>

3. Add Chat Component

Place the chat component where you want the AI chat to render:

<athena-xai-chat
    websiteToken="your-website-token"
></athena-xai-chat>

Components

<athena-xai-chat>

Main AI chat component.

Props

| Prop | Required | Description | |---|---|---| | websiteToken | Yes | Website token from the Athena dashboard used to identify your website | | aiSearchRedirect | No | Redirect URL used together with the independent search input | | voiceRecognitionLang | No | Voice recognition language (example: en-US) | | translations | No | Object of UI strings. Partial overrides are merged with English defaults |


Translations

Pass a translations object via JavaScript (object properties cannot be set as HTML attributes).

<athena-xai-chat
    id="athena-chat"
    websiteToken="your-website-token"
></athena-xai-chat>

<script type="module">
    const chat = document.getElementById('athena-chat');

    chat.translations = {
        shoppingAssistantTitle: 'XAI Shopping Assistent',
        shoppingAssistantGreeting: '👋 Hallo! Wie kann ich helfen?',
        recentChats: 'Letzte Chats',
        headerTitle: 'KI-Assistent',
        headerDescriptionHighlight: 'Fragen oder suchen Sie nach allem.',
        headerDescriptionSuffix: 'Die KI erledigt den Rest.',
        searchPlaceholder: 'Wenn Sie nicht sprechen möchten, tippen Sie einfach..',
        independentSearchPlaceholder: 'KI-Assistent',
        restartChat: 'Chat neu starten',
        aiAssistant: 'KI-Assistent',
        uploadImage: 'Bild hochladen',
        talkToMe: 'Sprich mit mir',
        sendToAiAssistant: 'An KI-Assistent senden',
        findSimilarStyle: 'Ähnlichen Stil finden',
        preparingMicrophone: 'Mikrofon wird vorbereitet',
        failedToSendMessage: 'Nachricht konnte nicht gesendet werden',
        errorPrefix: 'Fehler',
        exampleQuestions: [
            'Ich suche Sportkleidung',
            'Ich suche Gusseisen-Kochgeschirr',
            'Ich brauche einen mittelgroßen Rucksack',
        ],
    };
</script>

Omitted keys fall back to English defaults. Setting translations on <athena-xai-chat> also syncs to <athena-xai-chat-search-independent> unless that element has its own translations.

Translation keys

| Key | Default | |---|---| | shoppingAssistantTitle | XAI Shopping Assistant | | shoppingAssistantGreeting | 👋 Hey! How can I help? | | recentChats | Recent Chats | | exampleQuestions | Array of example prompt chips | | headerTitle | AI Assistant | | headerDescriptionHighlight | Ask or Search for anything. | | headerDescriptionSuffix | AI will do the rest. | | searchPlaceholder | if you don't feel like talking, start typing.. | | independentSearchPlaceholder | AI Assistant | | restartChat | Restart the chat | | aiAssistant | AI Assistant | | uploadImage | Upload an image | | talkToMe | Talk to me | | sendToAiAssistant | Send to AI Assistant | | findSimilarStyle | Find similar style | | productImageAlt | Product Image | | userUploadedImageAlt | User Uploaded Image | | preparingMicrophone | Preparing microphone | | failedToSendMessage | Failed to send message | | errorPrefix | Error |


<athena-xai-chat-search-independent>

Standalone AI search input component.

This component can be implemented anywhere on your website:

  • Header
  • Navigation
  • Hero section
  • Search overlay
  • Landing page

When the user presses Enter, the component automatically redirects the user to the AI search/chat page.

The redirect URL is configured through the aiSearchRedirect prop on the <athena-xai-chat> component.

Props

| Prop | Required | Description | |---|---|---| | aiSearchRedirect | No | Redirect URL (inherited from <athena-xai-chat> when omitted) | | voiceRecognitionLang | No | Voice recognition language | | translations | No | UI strings (inherited from <athena-xai-chat> when omitted) |

Example

<athena-xai-chat
    websiteToken="your-website-token"
    aiSearchRedirect="/ai-search"
></athena-xai-chat>

<athena-xai-chat-search-independent>
</athena-xai-chat-search-independent>

Voice Recognition

Voice recognition can be enabled using the voiceRecognitionLang prop.

Example

<athena-xai-chat
    websiteToken="your-website-token"
    voiceRecognitionLang="en-US"
></athena-xai-chat>

Supported Language Examples

| Language | Value | |---|---| | English (US) | en-US | | English (UK) | en-GB | | German | de-DE | | French | fr-FR | | Serbian | sr-RS |


Full Example

<!DOCTYPE html>
<html lang="en">
    <head>
        <meta charset="UTF-8" />

        <meta
            name="viewport"
            content="width=device-width, initial-scale=1.0"
        />

        <title>Athena XAI Chat</title>

        <link
            rel="stylesheet"
            href="dist/styles/athena-xai-chat-styles.css"
        />

        <script
            type="module"
            src="dist/athena-xai-chat.umd.js"
            defer
        ></script>
    </head>

    <body>
        <athena-xai-chat
            id="athena-chat"
            websiteToken="your-website-token"
            aiSearchRedirect="/ai-search"
            voiceRecognitionLang="en-US"
        ></athena-xai-chat>

        <athena-xai-chat-search-independent>
        </athena-xai-chat-search-independent>

        <script type="module">
            document.getElementById('athena-chat').translations = {
                // Override any UI strings here
            };
        </script>
    </body>
</html>

Notes

  • websiteToken is required for all Athena XAI Chat integrations.
  • The website token can be found inside the Athena dashboard.
  • Make sure the stylesheet is loaded before rendering the components.
  • The script bundle must be loaded using type="module".
  • The independent search input redirects users to the page defined in aiSearchRedirect.
  • UI copy is customized through the translations prop; unset keys use English defaults.