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

@realtalk-ai/embed

v0.5.0

Published

Embeddable <realtalk-embed> web component for Real Talk agents

Readme

@realtalk-ai/embed

CI npm

Add your Real Talk agent to any website as a floating chat widget by pasting two lines of HTML:

<realtalk-embed agent-id="YOUR_AGENT_ID"></realtalk-embed>
<script src="https://cdn.jsdelivr.net/npm/@realtalk-ai/embed" async></script>

There is nothing to install or build. The script is a single self-contained file served from jsDelivr (unpkg also works), and the snippet always loads the newest release: improvements and fixes reach your site automatically, and you never need to touch the snippet again. If your organization requires strict change control, you can pin an exact version instead, e.g. @realtalk-ai/[email protected].

The script registers the <realtalk-embed> element and renders into a shadow root, so the widget's styles and your site's styles can't interfere with each other.

Enabling embedding for your agent

Embedding is enabled per agent, together with an allowlist of the sites that may embed it. Visitors chat directly with Real Talk, so your site needs no backend integration and no keys or secrets appear in your page.

If the widget doesn't render, the most common cause is that the page's origin isn't on your agent's allowlist. The widget logs an error message to the browser console when this happens.

Attributes

| Attribute | Required | Description | | --------------- | -------- | ---------------------------------------------------------------------------------------------------------------------- | | agent-id | yes | The agent to embed. | | server-url | no | Alternative Real Talk server origin. Defaults to the production server and is only needed for development and testing. | | accent-color | no | Hex color for the launcher, buttons and the visitor's messages, e.g. #1d4ed8. Defaults to black. | | rounding | no | How rounded the corners are: small, medium or large. Defaults to medium. | | disable-voice | no | Hides voice mode on this site even when the agent allows it. |

Conversations and tabs

The widget keeps the conversation in sessionStorage, so a chat survives page reloads and navigation within the same tab, while each browser tab gets its own conversation.

Placement and styling

By default the widget floats in the bottom-right corner. The <realtalk-embed> element lives in your page's normal DOM, so you can position it with your own CSS (position, bottom, right, z-index, etc.). The widget's look is set through attributes, and its internals stay isolated inside the shadow root.

Voice conversations

The widget supports both text chat and voice. Every conversation starts as text, and when voice mode is turned on in the agent's Chat Widget settings the message field has a phone button that turns voice mode on and off, so the visitor speaks with the agent and hears the replies on the same connection. Turning voice on asks the visitor for microphone permission via the browser's standard prompt, so the page must be served over HTTPS (or localhost) for voice to work. To hide the voice controls on a site even though the agent allows voice, add the disable-voice attribute to the element.

The microphone and the agent's audio can also be switched separately from the widget's menu. The two are independent, so with the microphone on and the audio off a visitor can dictate messages and read the replies as text.

Demo

Try the widget on a live stand-in website at realtalk-ai.github.io/embed-demo. See examples/embed-demo for a minimal page using the snippet.

Development

For contributors working in this repo:

pnpm --filter @realtalk-ai/embed build   # bundle to dist/embed.js (CDN) and dist/embed.es.js (bundlers)
pnpm --filter @realtalk-ai/embed test    # unit tests
pnpm embed-demo                          # build + serve the demo page