TwilioMatthew Setter, Dhruv PatelTutorial
Augment Voice Calls with Twilio Conversation Intelligence Using Node.js
Summary
Twilio Conversation Intelligence, Conversation Orchestrator, and Conversation Memory together analyze voice calls for a Node.js voice agent built with Conversation Relay. After a call, Twilio sends a webhook to /intelligence-results containing a call summary, sentiment analysis, and script adherence for categories like introduction with the required phrase “Thanks for calling Owl Air! I’m Hoot.” The developer creates a Memory Store and Conversation Configuration, then an Intelligence rule selecting Sentiment, Summary, and Script-Adherence operators triggered at conversation end. A Node.js handler extracts the data and persists it to a SQLite database using tables for intelligence_results, operators, and operator_script_adherence_categories. Testing involves calling the Twilio number and verifying the summary, sentiment, and script adherence records in the database.
Context
Voice AI agents in production often provide no post-call analytics. This tutorial shows how to use Twilio’s Conversation Intelligence, Orchestrator, and Memory to capture call summaries, sentiment, and script adherence, and persist them to a SQLite database for later review and improvement.
Approach / What changed
Configure a Memory Store and Conversation Configuration in Twilio Console. Create an Intelligence rule selecting Sentiment, Summary, and Script-Adherence operators triggered at conversation end, sending a webhook to a Node.js endpoint. The Node.js handler processes the JSON payload and persists it to a SQLite database with tables for intelligence_results, operators, and operator_script_adherence_categories.
Takeaways
Twilio Conversation Intelligence provides call summaries, sentiment analysis, and script adherence scoring via a webhook triggered at conversation end.
The webhook payload includes structured data that must be persisted; the tutorial uses SQLite with tables for intelligence results, operator metadata, and script adherence categories.
Setting up the integration requires creating a Memory Store, Conversation Configuration, and Intelligence rule in the Twilio Console before writing any application code.
FAQ
How is the webhook triggered?
The webhook is triggered when the conversation ends, as configured in the Intelligence rule's trigger and action step. The webhook URL must be publicly accessible via ngrok and points to the /intelligence-results endpoint.
What data does the webhook payload contain?
The payload includes a call summary, sentiment analysis, and script adherence results for each category (e.g., introduction, offer_assistance). It also contains conversational context from Conversation Memory.
What are the prerequisites for this tutorial?
You need a Twilio account with a voice-capable phone number, an existing Conversation Relay agent built with Node.js and Express, Node.js 22+, an OpenAI API key, and ngrok for exposing the local server.
Source and freshness
- Source
- twilio.com
- Published
- Added to Yomu
Summaries are generated from the original by a language model. Check the original before relying on it.
Keep reading
Related reading
The Good Stuff
Paid picks we use ourselves. Links carry a referral code — a subscription through one earns us a commission at no extra cost to you.
The best engineering reads, once a week
One useful email. Unsubscribe anytime.