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

@livekit/agents-plugin-phonic

v1.0.48

Published

Phonic STS plugin for LiveKit Node Agents

Readme

@livekit/agents-plugin-phonic

Realtime voice AI integration for Phonic with LiveKit Agents.

Usage

import { type JobContext, ServerOptions, cli, defineAgent, llm, voice } from '@livekit/agents';
import * as phonic from '@livekit/agents-plugin-phonic';
import { fileURLToPath } from 'node:url';
import { z } from 'zod';

const toggleLight = llm.tool({
  description: 'Toggle a light on or off. Available lights are A05, A06, A07, and A08.',
  parameters: z.object({
    light_id: z.string().describe('The ID of the light to toggle'),
    state: z.enum(['on', 'off']).describe('Whether to turn the light on or off'),
  }),
  execute: async ({ light_id, state }) => {
    console.log(`Turning ${state} light ${light_id}`);
    return `Light ${light_id} turned ${state}`;
  },
});

export default defineAgent({
  entry: async (ctx: JobContext) => {
    const agent = new voice.Agent({
      instructions: 'You are a helpful voice AI assistant named Alex.',
      tools: {
        toggle_light: toggleLight,
      },
    });

    const session = new voice.AgentSession({
      // Uses PHONIC_API_KEY environment variable when apiKey is not provided
      llm: new phonic.realtime.RealtimeModel({
        voice: 'sabrina',
        welcomeMessage: 'Hey there, how can I help you today?',
        audioSpeed: 1.2,
      }),
    });

    await session.start({
      agent,
      room: ctx.room,
    });

    await ctx.connect();
  },
});

cli.runApp(new ServerOptions({ agent: fileURLToPath(import.meta.url) }));

Configuration

Set the PHONIC_API_KEY environment variable, or pass apiKey directly to RealtimeModel. All other options are optional.

| Option | Type | Description | | --- | --- | --- | | apiKey | string | Phonic API key. Falls back to PHONIC_API_KEY environment variable | | model | string | Model name (default: merritt) | | phonicAgent | string | Phonic agent name. Options set explicitly here override agent settings | | voice | string | Voice ID — sabrina, grant, virginia, landon, eleanor, shelby, nolan | | welcomeMessage | string | Message the agent says when the conversation starts. Ignored when generateWelcomeMessage is true | | generateWelcomeMessage | boolean | Auto-generate the welcome message (ignores welcomeMessage) | | project | string | Project name (default: main) | | languages | string[] | ISO 639-1 language codes the agent should recognize and speak | | audioSpeed | number | Audio playback speed | | phonicTools | string[] | Phonic Webhook tool names available to the assistant | | boostedKeywords | string[] | Keywords to boost in speech recognition | | generateNoInputPokeText | boolean | Auto-generate poke text when user is silent | | noInputPokeSec | number | Seconds of silence before sending poke message | | noInputPokeText | string | Poke message text (ignored when generateNoInputPokeText is true) | | noInputEndConversationSec | number | Seconds of silence before ending conversation |

If you already have an agent set up on the Phonic platform, you can use the phonicAgent option to specify the agent name. As a note, configuration options you set in the LiveKit Agents SDK will override the agent settings set on the Phonic platform. This means the system prompt you have set on the Phonic platform will be ignored in favor of the instructions field set on the LiveKit voice.Agent. Likewise, options explicitly set in the RealtimeModel constructor will override the Phonic agent's settings.

If you have Webhook tools set up on the Phonic platform, you can use phonicTools to make them available to your agent. Only Phonic Webhook tools are supported with LiveKit Agents.