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

@zeroruntime/js-sdk

v0.1.2

Published

Build real-time voice agents in JavaScript and TypeScript.

Readme

@zeroruntime/js-sdk

Build real-time voice agents in JavaScript and TypeScript. You describe the agent - instructions, tools, and a pipeline of providers - and the runtime runs it.

Install

npm install @zeroruntime/js-sdk

or pin the version:

npm install @zeroruntime/js-sdk

Requires Node 20.11 or newer. The package ships compiled JavaScript plus complete type declarations, so both languages are first class: TypeScript runs directly with tsx, JavaScript needs no build step at all.

Most providers need no extra package: their credential is a string you set in the environment, so the base install is enough.

Quickstart

import * as zeroruntime from '@zeroruntime/js-sdk';
import { Agent, Pipeline, Room, function_tool } from '@zeroruntime/js-sdk';
import { TurnDetector } from '@zeroruntime/js-sdk/inference';
import { CartesiaTTS, DeepgramSTT, GoogleLLM, SileroVAD } from '@zeroruntime/js-sdk/plugins';

// The agent registers as ZERORUNTIME_AGENT_ID (default 'zeroruntime_agent').
// Agent cloud sets it to the deployment's agent id.

class VoiceAgent extends Agent {
  constructor() {
    super({
      instructions: 'You are a helpful voice assistant.',
      pipeline: Pipeline({
        stt: DeepgramSTT(),
        llm: GoogleLLM(),
        tts: CartesiaTTS(),
        vad: SileroVAD(),
        turn_detector: TurnDetector(),
      }),
    });
  }

  async on_enter(): Promise<void> {
    await this.session!.say('Hello, how can I help you today?');
  }

  get_weather = function_tool({
    name: 'get_weather',
    description: 'Fetch the current weather for a location.',
    parameters: {
      latitude: { type: 'string', description: 'Latitude of the location. Estimate it; do not ask.' },
      longitude: { type: 'string', description: 'Longitude of the location. Estimate it; do not ask.' },
    },
    execute: async ({ latitude, longitude }) => ({ latitude, longitude, temperature_c: 28 }),
  });
}

async function invoke_agent(): Promise<void> {
  await zeroruntime.invoke({
    room: Room({ name: 'Cascade Agent', playground: true }),
  });
}

await zeroruntime.serve(VoiceAgent, { on_ready: invoke_agent });

Run it and the playground URL is printed once, on stdout. Open it to talk to the agent.

Credentials

Set your runtime token in the environment before serving:

export ZERORUNTIME_AUTH_TOKEN="..."

Vendor keys go in the environment too, one per provider you use — each provider names the variable it reads when the key is missing.

Providers

@zeroruntime/js-sdk/plugins calls the vendor directly with your key on your account. @zeroruntime/js-sdk/inference reaches a subset of the same providers through the runtime gateway instead. The names mirror each other, so swapping the import swaps who makes the call and who is billed:

import { DeepgramSTT } from '@zeroruntime/js-sdk/plugins';    // your Deepgram account
import { DeepgramSTT } from '@zeroruntime/js-sdk/inference';  // through the gateway