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

convo-ai-embed

v3.0.0

Published

Embeddable conversational AI widget and webapp - tree-shakeable

Readme

Convo AI Embed

Embeddable conversational AI widget and webapp components, powered by Agora's RTC technology.

Features

  • Two deployment modes: Widget (floating) and WebApp (modal)
  • Tree-shakeable architecture: Only import the mode you need
  • Voice calling: Agora RTC integration for real-time voice communication
  • Internal agent management: Built-in agent lifecycle handling
  • Internal project status API: JWT-authenticated service integration (placeholder)

Installation

npm install convo-ai-embed

Usage

Widget Mode (Floating Widget)

The widget appears as a floating button in the bottom-right corner of your page.

Option 1: ES Module Import (npm)

import 'convo-ai-embed/widget';
<convo-agent-widget project-id="your-project-id"></convo-agent-widget>

Option 2: CDN via unpkg

<!DOCTYPE html>
<html>
<head>
  <script type="module" src="https://unpkg.com/[email protected]/dist/widget.js"></script>
</head>
<body>
  <convo-agent-widget project-id="your-project-id"></convo-agent-widget>
</body>
</html>

Option 3: React/Vue/Framework Usage

import { useEffect } from 'react';
import 'convo-ai-embed/widget';

export default function App() {
  return (
    <div className="App">
      <h1>My App</h1>
      <convo-agent-widget project-id="your-project-id"></convo-agent-widget>
    </div>
  );
}

WebApp Mode (Modal Dialog)

The webapp shows a button that opens a full-screen modal dialog when clicked.

Option 1: ES Module Import (npm)

import 'convo-ai-embed/webapp';
<convo-agent-webapp project-id="your-project-id"></convo-agent-webapp>

Option 2: CDN via unpkg

<!DOCTYPE html>
<html>
<head>
  <script type="module" src="https://unpkg.com/[email protected]/dist/webapp.js"></script>
</head>
<body>
  <convo-agent-webapp project-id="your-project-id"></convo-agent-webapp>
</body>
</html>

Option 3: React/Vue/Framework Usage

import { useEffect } from 'react';
import 'convo-ai-embed/webapp';

export default function App() {
  return (
    <div className="App">
      <h1>My App</h1>
      <convo-agent-webapp project-id="your-project-id"></convo-agent-webapp>
    </div>
  );
}

Using Both Widget and WebApp Together

You can use both components on the same page:

ES Module Import

import 'convo-ai-embed/widget';
import 'convo-ai-embed/webapp';

export default function App() {
  return (
    <div className="App">
      <h1>Hello CodeSandbox</h1>
      <convo-agent-webapp project-id="your-project-id"></convo-agent-webapp>
      <convo-agent-widget project-id="your-project-id"></convo-agent-widget>
    </div>
  );
}

CDN via unpkg

<!DOCTYPE html>
<html>
<head>
  <script type="module" src="https://unpkg.com/[email protected]/dist/widget.js"></script>
  <script type="module" src="https://unpkg.com/[email protected]/dist/webapp.js"></script>
</head>
<body>
  <h1>My Website</h1>
  <convo-agent-webapp project-id="your-project-id"></convo-agent-webapp>
  <convo-agent-widget project-id="your-project-id"></convo-agent-widget>
</body>
</html>

Attributes

Both web components accept the same attribute:

| Attribute | Type | Required | Description | |-----------|------|----------|-------------| | project-id | string | Yes | Your agent identifier |

Architecture

The SDK is organized with two main entry points and internal modules:

src/
├── widget/         # Widget entry point (exported)
│   ├── widget.ts
│   ├── voiceManager.ts
│   └── index.ts
├── webapp/         # WebApp entry point (exported)
│   ├── webapp.ts
│   └── index.ts
├── agent/          # Internal - Agent lifecycle management
│   └── AgentManager.ts
├── services/       # Internal - API services
│   └── projectStatus.ts
└── types.ts        # Shared TypeScript types

Build Output

The build generates separate tree-shakeable bundles:

  • dist/widget.js - Widget bundle (~19KB + shared voice manager)
  • dist/webapp.js - WebApp bundle (~17KB + shared voice manager)
  • dist/voiceManager-*.js - Shared voice manager (~1.7MB including Agora SDK)

Tree-shaking: Only the imported bundle and shared dependencies are included in your final app.

Development

# Install dependencies
pnpm install

# Development mode
pnpm dev

# Build
pnpm build

# Type checking
pnpm check-types

API Reference

Web Components

<convo-agent-widget>

Floating widget component that appears in the bottom-right corner.

Import:

import 'convo-ai-embed/widget';

Attributes:

  • project-id (required): Your agent identifier

<convo-agent-webapp>

Modal webapp component with button trigger.

Import:

import 'convo-ai-embed/webapp';

Attributes:

  • project-id (required): Your agent identifier

Internal Architecture

The SDK uses internal modules (not exported) for agent and service management:

Internal Agent Manager

  • Handles agent lifecycle (join, leave, status)
  • Currently uses placeholder implementations
  • Will be connected to real agent service

Internal Project Status Service

  • Checks project status with JWT authentication
  • Currently returns dummy data
  • Will be connected to real managed service API

These modules are used internally by the widget and webapp components and are not accessible to consumers.

Browser Support

  • Chrome 54+
  • Firefox 63+
  • Safari 10.1+
  • Edge 79+

License

MIT

Support