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

@vozia/web-sdk

v0.1.0

Published

Vozia AI Agent SDK for Web

Readme

@vozia/web-sdk

Vozia AI Agent SDK for Web. Embed intelligent chat assistants into any website.

Installation

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

Quick Start

Headless (Build Your Own UI)

import { VoziaAgent } from "@vozia/web-sdk"

const agent = new VoziaAgent({
  apiKey: "pk_xxx",
  agentId: "agent_xxx"
})

// Subscribe to events
agent.on("message", (msg) => {
  console.log(`${msg.role}: ${msg.content}`)
})

agent.on("token", (chunk) => {
  // Real-time streaming tokens
  process.stdout.write(chunk)
})

agent.on("status", ({ type }) => {
  // "connecting" | "ready" | "thinking" | "responding" | "error"
  console.log("Status:", type)
})

agent.on("error", (err) => {
  console.error("Error:", err.message)
})

// Send a message
agent.send("Hello!")

// Clean up when done
agent.destroy()

Widget (Drop-in UI)

import { VoziaAgent, VoziaWidget } from "@vozia/web-sdk"

const agent = new VoziaAgent({
  apiKey: "pk_xxx",
  agentId: "agent_xxx"
})

const widget = new VoziaWidget(agent, {
  position: "bottom-right", // or "bottom-left"
  theme: "light",           // or "dark" or "auto"
  greeting: "Hi! How can I help?",
})

// Open/close programmatically
widget.open()
widget.close()
widget.toggle()

// Clean up
widget.destroy()
agent.destroy()

API Reference

VoziaAgent

Constructor

new VoziaAgent(config: VoziaConfig)

| Option | Type | Required | Description | |--------|------|----------|-------------| | apiKey | string | Yes | Your Vozia API key | | agentId | string | Yes | The agent ID to connect to | | baseUrl | string | No | Custom API base URL | | sessionId | string | No | Resume an existing session | | user | object | No | End-user info (id, name, email) |

Methods

| Method | Description | |--------|-------------| | send(text: string) | Send a message to the agent | | destroy() | Clean up resources | | isReady() | Check if agent is ready | | getSession() | Get current session info |

Events

| Event | Payload | Description | |-------|---------|-------------| | message | Message | Complete message received | | token | string | Streaming token chunk | | status | Status | Status change | | error | AgentError | Error occurred | | session | Session | Session created |

VoziaWidget

Constructor

new VoziaWidget(agent: VoziaAgent, config?: WidgetConfig)

| Option | Type | Default | Description | |--------|------|---------|-------------| | position | "bottom-right" \| "bottom-left" | "bottom-right" | Widget position | | theme | "light" \| "dark" \| "auto" | "light" | Color theme | | accentColor | string | "#6366f1" | Primary color (hex) | | greeting | string | "Hi! How can I help?" | Initial greeting | | placeholder | string | "Type a message..." | Input placeholder | | zIndex | number | 9999 | CSS z-index |

Methods

| Method | Description | |--------|-------------| | open() | Open the chat panel | | close() | Close the chat panel | | toggle() | Toggle open/close | | destroy() | Remove widget from DOM |

Types

interface Message {
  id: string
  role: "user" | "agent"
  content: string
  timestamp: number
}

interface Status {
  type: "connecting" | "ready" | "thinking" | "responding" | "disconnected" | "error"
  message?: string
}

interface AgentError {
  code: "NETWORK_ERROR" | "AUTH_ERROR" | "INVALID_CONFIG" | "SESSION_ERROR" | "RATE_LIMITED" | "SERVER_ERROR" | "UNKNOWN_ERROR"
  message: string
}

interface Session {
  id: string
  agentId: string
  createdAt: number
}

Framework-Agnostic

This SDK is framework-agnostic. It works with:

  • React
  • Vue
  • Svelte
  • Angular
  • Vanilla JavaScript
  • Any other framework

The SDK emits events - you decide how to handle them in your app.

License

MIT