Loading…

Twilio
Cloud communications platform providing APIs and services for messaging, voice, email, authentication, and customer engagement.
- 174 posts summarised
- latest
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.
From their blog
Latest articles
Integrate Claude, Anthropic’s AI Assistant, with Twilio Voice Using Conversation Relay
Twilio’s Conversation Relay enables real-time voice applications with AI LLMs over a WebSocket connection. This tutorial demonstrates integrating Claude, Anthropic’s AI model, with Twilio Voice using Conversation Relay. The setup uses a Node.js server with Fastify, the Anthropic SDK, and a system prompt that instructs the model to spell out numbers and avoid special characters for better text-to-speech. The server exposes two endpoints: /twiml for TwiML instructions and /ws for the WebSocket relay. The tutorial tests the integration with Claude Sonnet 5.5 and Haiku 5.5 at low effort, both handling real-time voice well. The result is a functioning voice assistant that can be called via a Twilio phone number.
Add Token Streaming and Interruption Handling to a Twilio Voice Anthropic Integration
This tutorial extends a basic Twilio Conversation Relay voice assistant that uses Anthropic Claude in Node.js by adding token streaming and interruption-aware conversation tracking. The author replaces the aiResponse() function with aiResponseStream(), which uses anthropic.messages.stream() to receive content_block_delta text chunks and forwards each token to Conversation Relay with last: false before sending an empty final token with last: true. The prompt handler now awaits the streamed response and pushes the assistant role and content into local session storage. To handle interruptions, the app listens for Conversation Relay interrupt messages and uses utteranceUntilInterrupt to find the last assistant message containing the heard text, truncating that message and removing later assistant turns so the model knows how far the caller heard. Testing requires an ngrok tunnel, a Twilio number configured with a /twiml webhook, and a phone call to verify the changes.
How to build a proactive agent for AI outbound calling
Most AI agents are reactive, waiting for customers to initiate contact, which turns service issues into damage control. A proactive AI agent instead starts conversations based on system events, such as a delayed shipment, reaching out before the customer discovers the problem. The post outlines six ordered components: consent and contact rules, CRM event triggers, context loading, channel selection, scheduling, and human handoff. It details how Twilio Segment detects events, Agent Connect starts conversations, and Conversation Memory’s Recall endpoint provides customer context. The author emphasizes that consent must precede any trigger and that context must load before the first message, with a pre-launch checklist covering opt-outs, frequency limits, and agent identification.
What good looks like: CX benchmarks from 5 enterprise deployments
The post presents real CX benchmarks from five enterprise deployments, addressing the difficulty of interpreting vendor-reported numbers without context. Eltropy reports up to 70% containment for voice automation at community financial institutions, but this is an upper band for well-scoped transactional tasks like balance checks and transaction history. Twilio research shows 92% of consumers expect AI responses under 30 seconds, and consumers will wait 8.5 minutes for a human but only 4.3 minutes for AI, meaning AI has roughly half the patience budget. Internal satisfaction estimates consistently run 30 to 35 points above consumer-reported satisfaction, with 86% of companies believing customers are satisfied versus 51% of consumers, partly because post-interaction surveys only reach customers who stayed. The post recommends splitting containment by outcome because abandoned conversations count identically as resolved ones, and tracking repeat contact within seven days as a reliable metric.
Passkeys vs. passwords: What’s the difference?
Passwords remain the most common authentication method but are responsible for over 80% of data breaches due to reuse and predictability. Passwordless alternatives such as token-based authentication, certificate-based authentication, SMS OTP, email magic links, and biometrics each offer improved security but come with their own trade-offs in cost, deployment complexity, or vulnerability to phishing. Passkeys, built on the WebAuthn standard and FIDO, use public key cryptography to verify identities, with a private key stored on the user’s device and a public key on the service’s server. They eliminate password reuse, reduce phishing and credential stuffing risks, and improve login speed and user experience. However, passkeys face challenges in syncing across operating systems, and service providers can manage fallback options like SMS OTP through APIs such as Twilio Verify.
Business authentication methods: How to choose the best solution
The post examines business authentication methods, including passwordless, password-based, multi-factor authentication (MFA), single sign-on (SSO), and biometrics, each with distinct security and usability trade-offs. It notes that U.S. cyber attack victims lost over $16 billion in 2024 and 46% of small businesses experienced attacks in 2025, highlighting the need for robust verification. Passwordless authentication eliminates passwords by using biometrics, tokens, or email links, while password-based systems, though common, are vulnerable to phishing and brute-force attacks. MFA requires two or more factors like OTPs and push notifications, and SSO allows login via identity providers such as Google or Facebook. The post concludes by advising businesses to evaluate security requirements, user experience, compliance, scalability, cost, and integration when selecting an authentication solution.
How to build an AI agent that checks order status and processes refunds
Build an AI agent that handles order status and refunds by defining four custom tools—get order, check eligibility, initiate refund, update ticket—using Twilio Agent Connect’s function tool decorator to call existing APIs. The agent verifies identity with Twilio Verify’s one-time passcode before any refund, enforced in both prompt and code to prevent prompt injection bypass. Refund decisions are grounded in the company’s return policy from Enterprise Knowledge, while hard rules like return windows are enforced in eligibility tool code to avoid hallucinations. High-value or repeat requests escalate to a human in Twilio Flex via Agent Connect’s handoff tool, which packages conversation ID and reason with an AI-generated summary. The same agent works across voice, SMS, WhatsApp, RCS, and chat through a single handler, with ConversationRelay providing median latency under 0.5 second and Conversation Memory recording outcomes for future context.
5 ways to evaluate a customer engagement platform
The post outlines five practical tests for evaluating customer engagement platforms, focusing on real-world boundaries rather than demo polish. It stresses testing context continuity across channels, citing Twilio research that 74% of consumers repeat themselves to AI and 76% find human agents lack context, and recommends starting a conversation in chat, continuing over SMS, then calling to see what the agent sees. To avoid vendor lock-in, it advises keeping core business logic and decision engines separate, as demonstrated by Nova Gestões integrating programmable communication into existing stacks via documented APIs. Governance must be architectural, not contractual, with automated compliance for consent and data retention, as seen in Sweetwater’s peer-reviewed code and strict audit logs. AI evaluation should prioritize data access over model quality, since 84% of brands claim AI can access customer history but only 40% design personalization around it, and vendor relationships should be vetted through off-the-record references.
How to automate call summaries, sentiment, and CRM updates
Support agents often have less than 30 seconds between calls, leaving no time to document conversations, which results in lost context and poor customer experiences. Twilio Conversation Intelligence automates this by transcribing calls in real time or after the fact, then using Language Operators to extract summaries, sentiment, intent, and resolution status. These operators can be prebuilt or custom, and they run on every communication, at conversation end, or on demand. Extracted facts are automatically written to customer profiles via Conversation Memory, which reconciles new observations with existing ones to keep profiles accurate. Finally, webhooks push summaries and sentiment into CRMs like Salesforce, Zendesk, and HubSpot, so the next agent has full context without manual entry.
How to handle token limits in long AI support conversations
Long customer support conversations often exceed an LLM’s context window, causing the oldest turns—which contain the original problem description—to be dropped first. Four strategies exist to manage context: sliding window, rolling summaries, retrieval from memory, and structured state. Twilio recommends combining structured state for known fields, a sliding window for the live exchange, and retrieval for prior conversations. Twilio’s platform splits context management: live turn history stays in the agent’s code, while Conversation Memory stores compressed observations and summaries from past conversations. The Recall endpoint returns up to 100 observations and 100 summaries per call, each capped at 4,096 characters, using semantic and lexical search. On voice calls, developers choose how often Recall runs to balance context freshness against response latency.
What is an email blast? (how to do it right)
An email blast is a single message sent to a large list at once, often without segmentation, and is frequently associated with spam. The post argues that senders should abandon the ‘blast’ mindset and instead treat mass emails as targeted, personalized campaigns. Key steps include using an email service provider, sending only to a clean permission-based list, and segmenting recipients by demographics or behavior. Domain authentication with SPF, DKIM, and DMARC is required, especially under 2024 Gmail and Yahoo bulk sender rules for those sending over 5,000 emails daily. A clear call to action and compliance with unsubscribe requirements are essential for engagement and deliverability.
How to Detect SIM Swaps in Rust With Twilio's Lookup API
SIM swap attacks let attackers take over a phone number by convincing the carrier to link it to a new SIM, enabling them to receive all calls and SMS, including OTP codes for two-factor authentication. Twilio’s Lookup API provides real-time SIM swap data from mobile network operators, indicating if the SIM linked to a number has recently changed. This tutorial shows how to integrate SIM swap detection into Rust using the rustlio crate, with dependencies dotenvy, serde, serde_json, and tokio. The code loads environment variables from a .env file for Twilio Account SID and Auth Token, calls lookup_phone_data with DataPackage::SimSwap, and prints the last_sim_swap date (e.g., 2020-04-27T10:18:50Z), swapped_period (e.g., PT48H), and swapped_in_period boolean. The post notes legitimate SIM swaps happen for reasons like lost phones or porting numbers, so the data should always be used as part of a larger, more holistic determination rather than alone.
19 best email fonts that won't let you down in 2026
Email-safe fonts like Arial, Helvetica, Georgia, and Verdana render reliably across all email clients because they are preinstalled on nearly every device, avoiding layout shifts from font substitution. Web fonts such as Open Sans and Roboto support Apple Mail but frequently fail in Gmail and Outlook, so a fallback font stack is essential to prevent defaulting to Times New Roman. The post provides a list of 8 email-friendly fonts and 11 custom web fonts, advises using at most two fonts per email, setting body text at 14 pixels or larger, and testing every campaign across clients. For signatures, only email-safe fonts should be used since Gmail and Outlook ignore custom web fonts. Studies show that font choice impacts reader behavior, with one study finding that increasing font size from 10 to 13 point raised form conversions by 133%.
How to modernize CX without ripping and replacing your stack
Thirty percent of businesses say their tech stacks cannot keep up with customer expectations, but CIOs in Twilio’s Innovators Report modernized customer engagement without full platform replacements. They placed an orchestration layer above systems of record, integrated voice and messaging into existing CRMs, retained control of core decision engines through APs, unified real-time data before scaling A, and shipped gradual changes using sandboxes and feature flags. Sweetwater enabled 850 agents with 50,000 texts and 40,000 calls daily, while WestC achieved 50 to 80 percent higher RCS conversion rates than SMS or email. Lendi Group’s CTO advises unifying the data layer first, as 84 percent of brands say their A can access customer history but only 40 percent design personalization around it. Modernizing the seams between systems is cheaper and safer than replacement, since a non-working layer leaves underlying systems intact.
Twilio Video Media SDK Powers Smarter Customer Engagement
Twilio launched the Twilio Video Media SDK in Public Beta, a server-side software package that connects applications to a Twilio Video Room as a secure virtual participant, streaming real-time audio and video to backend systems. This launch supports AI-enabled customer engagement by allowing teams to use consistent AI logic across chat, voice, and video channels while keeping sensitive data secure. The SDK enables use cases such as multimodal AI assistants that see and hear users, ambient healthcare documentation, remote verification with computer vision, and server-side compliance checks. By routing individual media tracks to a secure backend, the SDK supports HIPAA and GDPR requirements without client-side rendering. Early adopter GLOBO Language Solutions uses the SDK to enhance real-time quality and AI integration for patient care in healthcare environments.
How to Build a Voice AI Agent with OpenAI's GPT-Live, Twilio Agent Connect, and TypeScript
The post addresses the common problem of voice AI demos failing in production by introducing a solution using OpenAI’s GPT-Live and Twilio Agent Connect. GPT-Live is a full-duplex speech-to-speech model that separates conversation from background work, and Twilio Agent Connect provides a GPTLiveProvider to bridge Twilio Media Streams to GPT-Live without custom WebSocket plumbing. The tutorial walks through building a TypeScript application that connects inbound callers to a GPT-Live-powered voice agent, including setting up a Fastify server, configuring the session with a welcome instruction, and wiring tool calls via Responses delegation using a get_weather example. It also covers placing outbound calls using the same provider and demonstrates features like per-call customization and transcript logging. The result is a production-ready voice agent that can greet callers, answer questions, and execute backend functions, with the same pattern applicable to scenarios like appointment booking or order status lookups.
What is agentic identity? Securing AI agents in 2026
AI agents are shifting from passive copilots to autonomous actors that book tickets, update calendars, and send messages without step-by-step human intervention. This shift introduces operational risks because traditional security controls designed for deterministic software cannot handle non-deterministic agent behavior, leading to over-permissioned agents, rogue behavior, and lack of real-time monitoring. Agentic identity is proposed as a governance layer built on three pillars: authentication (cryptographic keys), authorization (contextual permissions), and context (delegated link to end user). The framework includes short-lived session tokens, user context binding via token exchange, hard operational bounds on tool calls, human-in-the-loop gateways for high-risk actions, verified communication endpoints, and centralized logging with kill switches. By implementing these controls, organizations can deploy autonomous agents safely while maintaining visibility, containment, and auditability across all agent actions.
How to Retrieve a Phone Number's SMS Pumping Score in Rust
SMS Pumping Fraud exploits phone number input fields to generate revenue from SMS messages sent to numbers controlled by a specific mobile network operator. Twilio’s Lookup v2 API provides an SMS Pumping Risk Score from 0 to 100, based on a proprietary model using network data including Verify Fraud Guard signals and unusual traffic patterns. This Rust tutorial uses the rustlio crate, dotenvy, serde, and tokio to call the API and retrieve the score along with carrier risk category and block status. Canadian numbers do not return carrier information, and Twilio advises against using the score for US or Canadian numbers. Guidelines recommend sending messages for scores 0-60, adding friction for 60-75, treating as suspicious for 75-90, and blocking for 90-100.
Cyber Week Readiness: A Developer's Guide to Scalable Comms
Cyber Week compresses a year’s worth of system failures into 72 hours, making it the ultimate stress test for communication infrastructure. Developers must optimize APIs with rate limiting, caching, and traffic shaping to absorb sudden spikes without dropping connections. Email delivery requires early IP warmup, SPF/DKIM/DMARC configuration, and limiting promotional sends to recently engaged customers to maintain inbox placement. Voice pipelines need proactive capacity planning for Calls Per Second quotas, fallback URLs, and STIR/SHAKEN attestation to prevent fraud and dropped calls. Monitoring should use a unified dashboard with per-channel metrics, correlation IDs, and pre-written runbooks rehearsed in game days to turn inevitable failures into routine events.
Now in GA: Power Live Conversations with Segment Conversation Memory Integration
Segment Conversation Memory Integration is now generally available, bridging Segment CDP profiles with Twilio’s low-latency conversational recall layer. The integration streams customer traits into live voice, SMS, WhatsApp, and Flex interactions in under 300 milliseconds. It eliminates the need for custom webhooks or middleware pipelines by providing a click-to-configure connector within Segment’s Destinations Catalog. Key benefits include sub-300ms latency, 10x to 15x lower LLM token costs by selectively syncing factual traits instead of raw JSON histories, and faster agent deployment. CarFinance247 used the integration to build an AI assistant that handles approximately 288,000 conversations and drives 1.6x faster lead conversions.
Topics they write about
All topics →Weekly digest
The best engineering reads, once a week.