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

create-twilio-agent

v1.3.0

Published

Create a new Twilio agent with a single command

Readme

create-twilio-agent

Quick Start

npx create-twilio-agent my-agent

This will create a new Twilio agent project in the my-agent directory.

Architecture

Prerequisites

  • Node.js 18+
  • Twilio Account with a phone number
  • OpenAI API key
  • ngrok with a static domain (free tier works)

Setup

1. Generate your agent

npx create-twilio-agent my-agent
cd my-agent
cp .env.example .env

2. Set up ngrok

Create a free static domain at https://ngrok.com/blog-post/free-static-domains-ngrok-users and run:

ngrok http 3000 --domain <your-static-domain>.ngrok-free.app

Leave this terminal running. Copy the domain (without https://) into your .env:

NGROK_URL=your-static-domain.ngrok-free.app

3. Fill in required environment variables

Open .env and fill in the following. All other variables are optional.

Twilio core

Find these at https://console.twilio.com under Account Info.

TWILIO_ACCOUNT_SID=ACxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
TWILIO_AUTH_TOKEN=your_auth_token
TWILIO_PHONE_NUMBER=+1xxxxxxxxxx

Twilio API Key

Go to https://console.twilio.com/us1/account/keys-credentials/api-keys and create a new Standard API Key.

TWILIO_API_KEY=SKxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
TWILIO_API_SECRET=your_api_secret

Note: The secret is only shown once at creation time. TWILIO_API_SECRET is the correct variable name — older versions of this project used TWILIO_API_TOKEN, which no longer works.

Twilio Conversation Configuration ID

Required for SMS and for TAC to initialize. Create a Conversation Configuration in the Twilio Console under Conversation Orchestrator and paste the ID here.

TWILIO_CONVERSATION_CONFIGURATION_ID=conv_configuration_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

OpenAI

Get your key at https://platform.openai.com/api-keys.

OPENAI_API_KEY=sk-...
OPENAI_MODEL=gpt-4.1

4. Point your Twilio number at the agent

Go to https://console.twilio.com/us1/develop/phone-numbers/manage/incoming, select your number, and set A call comes in to:

https://<your-ngrok-domain>/call   (GET)

5. Run the agent

npm run dev

Call your Twilio number — the agent will answer immediately.


Customization

Edit these files to customize your agent's behavior:

| File | Purpose | |------|---------| | src/lib/prompts/instructions.md | Agent personality and behavior | | src/lib/prompts/context.md | Business context and knowledge | | src/tools/ | Add custom tools |


Available tools

| Tool | Description | |------|-------------| | sendText | Send SMS messages | | sendRCS | Send Rich Communication Services messages | | sendToLiveAgent | Transfer to a human agent | | sendEmail | Send emails via SendGrid | | switchLanguage | Change conversation language | | getSegmentProfile | Get customer profile from Segment | | getSegmentEvents | Retrieve customer event history from Segment | | postSegmentTrack | Track customer events in Segment | | updateSegmentProfile | Update customer profile in Segment | | getAirtableData | Retrieve data from Airtable | | upsertAirtableData | Insert or update data in Airtable |


Features

  • Voice AI agent powered by OpenAI GPT models
  • Twilio ConversationRelay with agent-speaks-first behavior
  • Multi-language support (10+ languages, TTS + STT)
  • Extensible tool framework
  • Live agent handoff
  • SMS channel support via Twilio Conversation Orchestrator
  • Real-time webhook event notifications