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

@sentdm/voice-agents

v0.2.0

Published

Sent Voice Agents for TypeScript: an AI agent that takes and places phone calls through Sent

Readme

Sent Voice Agents for TypeScript

An AI agent that takes and places phone calls through Sent, on the Sent Voice Agents protocol 1.0.0, for Node.

Status: Preview, with the protocol. Generated and rendered by sent-dm-sdk-pipeline from the protocol at v1.0.0; every release passes the protocol's conformance scenarios in CI.

Read the Voice Agents docs to get started.

Install

npm install @sentdm/voice-agents

Node 20.19 or later. The one dependency is ws. The package is ES modules; require() works on the Node versions it supports.

Quickstart

import { Agent, Session, UserSaid } from '@sentdm/voice-agents';

class Support extends Agent {
  override async onSessionStart(session: Session) {
    session.say('Hi, this is Acme support. How can I help?');
  }

  override async onUserSaid(session: Session, said: UserSaid) {
    if (said.text.includes('person')) {
      session.say('Transferring you now.');
      await session.transfer('+14155550100');
    } else {
      session.say(`You said ${said.text}`);
    }
  }
}

await new Support({ apiKey: process.env.SENT_API_KEY!, agentId: 'agent_...' }).serve();

serve() connects to Sent with the account API key and serves calls until SIGINT or SIGTERM; run() does the same without the signal handlers, and stop() ends it. Each session's handlers run in order on their own chain, so sessions never wait for one another. The runtime answers heartbeats, opens a new connection when one drains or is lost, and resumes the sessions that can move; the handlers only see calls.

| Handler | When | | ------------------------------- | ---------------------------------------------------------------------------------------------- | | onSessionStart(session) | A call reached the agent. In a text session, say() to speak | | onUserSaid(session, said) | Text sessions: the caller said something; said.correction means it replaces the previous one | | onAudio(session, samples) | Audio sessions: the caller's audio, 16-bit mono PCM at session.sampleRate | | onToolResult(session, result) | Sent answered a tool call; the awaiting promise gets the same result | | onSessionEnd(session, end) | The call left the agent; end.reason says why | | onSessionLost(session) | The connection was lost and the session could not be resumed |

On a Session: say(text, { last, interruptible }), clear(), sendAudio(samples), and the tools transfer(to), hangup(), sendDtmf(digits), hold(held), each resolving with Sent's ToolResult. session.from, to, direction, sessionType, language, context, sampleRate carry what session.start said.

@sentdm/voice-agents/frames holds every frame as a type, with decode() and encode() that check the protocol's rules; it is generated from the protocol and not edited by hand.

Develop

npm install
npm run typecheck && npm test && npm run build    # types, the tests, dist/
npm run format                                    # prettier

The conformance scenarios run in CI through the protocol's action, against node dist/conformance.js. Releases are cut by release-please from main and published to npm from GitHub Actions.