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

@ddrinnova/agentsgt-widget

v0.1.20

Published

<div align="center">

Downloads

1,163

Readme

@ddrinnova/agentsgt-widget

Drop-in chat widget for AgentsGT AI agents.

Embed a fully-featured AI assistant on any website with a single script tag.

npm version bundle size license


Features

  • 3 display modes — Popup bubble, sidebar panel, or inline chat
  • Streaming responses — Real-time AI output via Vercel AI SDK
  • Markdown rendering — Rich text, code blocks, tables, and lists
  • Tool display — Web search results, image generation, document lookup
  • Multi-language — Auto-detects agent language (EN, ES, FR, DE, PT, IT)
  • Session persistence — Conversations survive page refreshes
  • Theming — Customize colors to match your brand
  • Lightweight — ~150 KB gzipped, zero external CSS conflicts

Quick Start

Script Tag

The fastest way to add an agent to any site:

<div id="agent-chat"></div>

<script src="https://unpkg.com/@ddrinnova/agentsgt-widget/dist/widget.umd.js"></script>
<link rel="stylesheet" href="https://unpkg.com/@ddrinnova/agentsgt-widget/dist/widget.css" />

<script>
  AgentSGTWidget.mountApp(document.getElementById('agent-chat'), {
    runtimeUrl: 'https://agentsgt.com/api/v1/agents/chat/YOUR_AGENT_ID',
    apiKey: 'pk_xxx:sk_xxx',
  });
</script>

npm Install

npm install @ddrinnova/agentsgt-widget
import { mountApp } from '@ddrinnova/agentsgt-widget';
import '@ddrinnova/agentsgt-widget/dist/widget.css';

const unmount = mountApp(document.getElementById('agent-chat')!, {
  runtimeUrl: 'https://agentsgt.com/api/v1/agents/chat/YOUR_AGENT_ID',
  apiKey: 'pk_xxx:sk_xxx',
  uiMode: 'popup',
});

// Call unmount() to remove the widget later

React Component

import App from '@ddrinnova/agentsgt-widget';
import '@ddrinnova/agentsgt-widget/dist/widget.css';

function MyPage() {
  return (
    <App
      runtimeUrl="https://agentsgt.com/api/v1/agents/chat/YOUR_AGENT_ID"
      apiKey="pk_xxx:sk_xxx"
      uiMode="popup"
      title="Support"
      initialMessage="Hi! How can I help you today?"
      theme={{ primaryColor: '#7C3AED' }}
    />
  );
}

Loader (dynamically load widget assets)

<div id="agent-widget"></div>

<script>
  window.onload = function () {
    if (window.AgentSGTWidgetLoader) {
      AgentSGTWidgetLoader.load('agent-widget', {
        runtimeUrl: 'https://agentsgt.com/api/v1/agents/chat/YOUR_AGENT_ID',
        apiKey: 'pk_xxx:sk_xxx',
        name: 'My Assistant',
        uiMode: 'popup',
        theme: { primaryColor: '#FBB76B' },
      });
    }
  };
</script>
<script src="https://unpkg.com/@ddrinnova/agentsgt-widget/dist/loader.umd.js"></script>

Options

| Option | Type | Default | Description | |:---|:---|:---|:---| | runtimeUrl | string | required | Full URL to the agent chat endpoint | | apiKey | string | required | API key in pk_xxx:sk_xxx format | | uiMode | "popup" | "sidebar" | "chat" | "popup" | Display mode | | title | string | Agent name | Header title | | initialMessage | string | "Need any help?" | Greeting shown on first visit | | identifier | string | — | External user ID for conversation tracking | | theme.primaryColor | string | #FBB76B | Accent color |


Display Modes

"popup"  (default)

Floating chat bubble in the bottom-right corner. Click to open a 400 × 520 chat window. Best for customer support overlays.

"sidebar"

Full-height panel that slides in from the right. Great for dashboards and admin panels.

"chat"

Inline chat that fills its parent container. Use when embedding directly into your page layout.


Theming

Quick — via prop

{ theme: { primaryColor: '#7C3AED' } }

Full control — via CSS custom properties

:root {
  --agt-primary: #FBB76B;                     /* Accent color */
  --agt-bg: #ffffff;                           /* Widget background */
  --agt-text: #1f2937;                         /* Primary text */
  --agt-text-secondary: #6b7280;               /* Muted text */
  --agt-border: #e5e7eb;                       /* Borders */
  --agt-muted: #f3f4f6;                        /* Subtle backgrounds */
  --agt-user-bg: rgba(251, 183, 107, 0.1);    /* User bubble */
  --agt-assistant-bg: #f3f4f6;                 /* Assistant bubble */
  --agt-radius: 1rem;                          /* Border radius */
}

API Keys

  1. Open the AgentsGT dashboard
  2. Navigate to Settings → API Keys
  3. Create a new key pair — you'll get a pk_xxx:sk_xxx string
  4. Pass it as the apiKey prop

API keys used in client-side widgets are visible to end users. Enable domain whitelisting in your dashboard to restrict usage to your domains.


Development

git clone https://github.com/ddrinnova/agentsgt-widget.git
cd agentsgt-widget
npm install
npm run dev            # Start dev server at localhost:5173
npm run build          # Production build → dist/
npm run release        # Bump patch version + publish to npm
npm run release:minor  # Bump minor version + publish
npm run release:quick  # Bump + publish without git tag

Built with Vercel AI SDK + React

agentsgt.com  •  GitHub  •  npm