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

@edebbyi/assistant-bot

v1.0.5

Published

Reusable AI assistant bot with React chat UI for Anatomie applications

Readme

@edebbyi/assistant-bot

A reusable AI assistant bot with React chat UI for Anatomie applications.

Installation

npm install @edebbyi/assistant-bot

Quick Start

1. Create a Knowledge Base

Create a JSON file with your bot's knowledge:

{
  "features": {
    "create_project": {
      "name": "Create Project",
      "description": "Start a new project",
      "keywords": ["new", "start", "create"],
      "steps": [
        "Click the + button in the top right",
        "Enter your project name",
        "Click Create"
      ],
      "tips": ["Use descriptive names for easy searching"]
    }
  },
  "faq": {
    "what_is_this": "This is your awesome app for managing projects."
  },
  "apps": {
    "myapp": {
      "name": "My App",
      "description": "The main application"
    }
  }
}

2. Set Up the Server

import { createBot } from '@edebbyi/assistant-bot/server';
import express from 'express';

const app = express();
app.use(express.json());

// Create the bot
const bot = createBot({
  name: 'S-bot',
  knowledgePath: './knowledge.json',
  openaiKey: process.env.OPENAI_API_KEY,
  model: 'gpt-4o',
});

// Add the chat endpoint
app.post('/api/chat', bot.createHandler());

app.listen(3000);

3. Add the Chat UI (React)

import { ChatBot } from '@edebbyi/assistant-bot/client';

function App() {
  return (
    <div>
      <h1>My App</h1>

      <ChatBot
        botName="S-bot"
        apiEndpoint="/api/chat"
        welcomeMessage="Hi! I'm S-bot. How can I help?"
        quickQuestions={[
          'How do I create a project?',
          'What can I do here?',
        ]}
        theme={{
          primary: '#4F46E5',
          userBubble: '#4F46E5',
        }}
      />
    </div>
  );
}

Server API

createBot(config)

Creates a bot instance.

| Option | Type | Default | Description | |--------|------|---------|-------------| | name | string | 'Assistant' | Bot display name | | knowledgePath | string | required | Path to knowledge JSON | | systemPrompt | string | auto-generated | Custom system prompt | | openaiKey | string | process.env.OPEN_AI_KEY | OpenAI API key | | model | string | 'gpt-4o' | OpenAI model |

Returns:

  • chat(messages) - Process messages and get a reply
  • createHandler() - Express-compatible route handler

React Component Props

<ChatBot />

| Prop | Type | Default | Description | |------|------|---------|-------------| | botName | string | 'Assistant' | Bot display name | | apiEndpoint | string | '/api/chat' | Chat API URL | | theme | object | stone colors | Custom colors | | position | string | 'bottom-right' | Widget position | | quickQuestions | string[] | [] | Suggested questions | | welcomeMessage | string | auto | Welcome text | | placeholder | string | 'Type a message...' | Input placeholder |

Theme Options

{
  primary: string;        // Button/accent color
  background: string;     // Main background
  surface: string;        // Card backgrounds
  border: string;         // Border color
  text: string;           // Primary text
  textSecondary: string;  // Secondary text
  userBubble: string;     // User message background
  userBubbleText: string; // User message text
  botBubble: string;      // Bot message background
  botBubbleText: string;  // Bot message text
}

Knowledge Base Structure

{
  features: {
    [key: string]: {
      name: string;
      description: string;
      keywords?: string[];
      steps: string[];
      tips?: string[];
    }
  },
  faq: {
    [key: string]: string;
  },
  apps: {
    [key: string]: {
      name: string;
      description: string;
    }
  },
  brand?: {
    name: string;
    description: string;
  }
}

Environment Variables

| Variable | Description | |----------|-------------| | OPEN_AI_KEY | OpenAI API key | | OPENAI_MODEL | Model override (default: gpt-4o) |

License

MIT