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

@convai/web-sdk

v1.5.0

Published

Build web apps with lifelike AI characters. The Convai Web SDK gives you real-time voice, lipsync, emotions, and dynamic context — with first-class support for React and vanilla TypeScript.

Readme

@convai/web-sdk

Real-time conversational AI characters for the web.

npm TypeScript License

TypeScript-first SDK for embedding Convai AI characters into React and vanilla JS applications. Voice, text, lipsync, emotions, video, and screen share — all in one package.


Features

  • React & vanilla JSuseConvaiClient hook, ConvaiWidget, and a framework-agnostic core
  • Real-time audio/video — full-duplex WebRTC with echo cancellation, camera, and screen share
  • Lipsync — ARKit and MetaHuman blendshape streams for facial animation
  • Emotions — per-turn emotion detection with intensity scale
  • Dynamic context — inject game state, user preferences, or scene data mid-session
  • Long-term memory — persistent cross-session memories scoped to each end user
  • File upload — send images to the character during a live session
  • WebSocket transport — opt-in alternative to WebRTC for constrained networks
  • Auth tokens — server-side token exchange for production deployments

Installation

npm install @convai/web-sdk
# or
pnpm add @convai/web-sdk
# or
yarn add @convai/web-sdk

React peer dependencies: react and react-dom ^18 || ^19

Runtime requirement: secure context (https:// or http://localhost) for microphone/camera access.


Quick start

React

import { useConvaiClient, ConvaiWidget } from '@convai/web-sdk';

export function App() {
  const client = useConvaiClient({
    apiKey: import.meta.env.VITE_CONVAI_API_KEY,
    characterId: import.meta.env.VITE_CONVAI_CHARACTER_ID,
  });

  return <ConvaiWidget convaiClient={client} />;
}

Vanilla TypeScript

import { ConvaiClient, createConvaiWidget } from '@convai/web-sdk/vanilla';

const client = new ConvaiClient({
  apiKey: import.meta.env.VITE_CONVAI_API_KEY,
  characterId: import.meta.env.VITE_CONVAI_CHARACTER_ID,
});

const widget = createConvaiWidget(document.body, { convaiClient: client });

window.addEventListener('beforeunload', () => {
  widget.destroy();
  void client.disconnect();
});

Documentation

Full documentation is at docs.convai.com.

| Guide | Description | |---|---| | Quick Start | First working integration in under 5 minutes | | Configuration | All ConvaiConfig options | | React Integration | useConvaiClient, ConvaiWidget, and React-specific patterns | | Vanilla JS | ConvaiClient, createConvaiWidget, and audio setup | | Events | Full event reference — botReady, stateChange, messagesChange, interactionCreated, and more | | Context Management | Dynamic context, updateContext, file upload, session management | | Emotions | Per-turn emotion detection with provider options | | Lipsync | ARKit / MetaHuman blendshape streams and BlendshapeQueue API | | Actions | Trigger character behaviors and scene actions | | Memory | Long-term memory scoped to end users | | Audio & Video | Microphone, camera, screen share controls | | Error Handling | error, disconnect, serverResponse, retry patterns | | Auth Tokens | Server-side token exchange for production | | WebSocket Transport | Alternative transport for WebRTC-constrained environments |


Package entry points

| Import path | Contents | |---|---| | @convai/web-sdk | React hooks, components, and re-exported core types | | @convai/web-sdk/react | Same as default (React-explicit alias) | | @convai/web-sdk/vanilla | ConvaiClient, createConvaiWidget, AudioRenderer | | @convai/web-sdk/core | Framework-agnostic ConvaiClient, managers, and all types | | @convai/web-sdk/lipsync-helpers | Blendshape format utilities and queue helpers | | @convai/web-sdk/vanilla/websocket | Opt-in. Registers the WebSocket transport. Import alongside /vanilla when using transport: "websocket". |


WebSocket transport

The default transport is WebRTC (LiveKit). A WebSocket-based transport is available for environments where WebRTC is unavailable or undesirable.

// Add this import once (e.g. in your app entry file)
import '@convai/web-sdk/vanilla/websocket';
import { ConvaiClient } from '@convai/web-sdk/vanilla';

const client = new ConvaiClient({
  apiKey: '...',
  characterId: '...',
  transport: 'websocket',
});

The WebSocket packages (@pipecat-ai/client-js, @pipecat-ai/websocket-transport) are excluded from your bundle unless you import the /vanilla/websocket subpath — so LiveKit-only apps pay no bundle cost.

See the WebSocket Transport guide for the full feature comparison.


Example app

A full React Three Fiber integration demo is in examples/react-three-fiber. It demonstrates lipsync on a 3D character, emotion display, dynamic context, and file upload.


License

Licensed under the Apache License 2.0. Copyright 2025 Convai.