twilio-agent-connect

Integrate LLM agent runtimes with Twilio Voice, SMS, WhatsApp, and Conversation Memory.

5.3k|765|Updated Mar 4, 2026
One-click install
npx skills add https://github.com/openai/plugins --skill twilio-agent-connect
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: twilio-agent-connect
Source: https://github.com/openai/plugins/tree/main/plugins/twilio-developer-kit/skills/twilio-agent-connect
Command: npx skills add https://github.com/openai/plugins --skill twilio-agent-connect

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Connecting an existing LLM agent (OpenAI, Bedrock, LangChain, Microsoft Foundry) to real communication channels like voice calls, SMS, RCS, and WhatsApp requires building webhook handling, WebSocket protocols, identity resolution, and memory management from scratch. This Skill provides guidance for using Twilio Agent Connect (TAC), the middleware SDK that bridges agent runtimes with Twilio Conversations services.

Core Features & Use Cases

  • Multi-Channel Agent Integration: Wire one on_message_ready callback to Voice (ConversationRelay), SMS, RCS, WhatsApp, and Chat channels in Python or TypeScript.
  • Conversation Memory & Orchestration: Inject persistent user profiles, traits, observations, and session history into LLM prompts via adapters like with_tac_memory and MemoryPromptBuilder.
  • Cloud Connectors: Connect AWS Strands/Bedrock/AgentCore or Microsoft Agent Framework and Voice Live agents to Twilio channels with dedicated packages.
  • Use Case: Build a customer support agent that answers inbound phone calls and SMS messages, remembers each customer's preferences across sessions, searches an enterprise knowledge base, and hands off to a human via Studio Flow when needed.

Quick Start

Ask the agent to scaffold a Python TAC server with a VoiceChannel and SMSChannel that routes incoming messages to an OpenAI model using the quickstart pattern from this Skill.

Frequently Asked Questions about twilio-agent-connect

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I connect an OpenAI agent to Twilio voice and SMS?

Use the Twilio Agent Connect SDK to register VoiceChannel and SMSChannel instances, then handle messages in a single on_message_ready callback that calls the OpenAI API. The TACFastAPIServer (Python) or TACServer (TypeScript) exposes the webhook and WebSocket endpoints Twilio needs.

What is Twilio Agent Connect used for?

Twilio Agent Connect is middleware that links existing LLM agent runtimes to Twilio Conversations services. It handles identity resolution, conversation memory retrieval, multi-channel routing, and the ConversationRelay WebSocket protocol so your agent code stays channel-agnostic.

Does Twilio Agent Connect work with AWS Bedrock or Microsoft Foundry?

Yes, dedicated packages exist for both ecosystems. Install twilio-agent-connect-aws for Strands, Bedrock Agents, or AgentCore connectors, and twilio-agent-connect-microsoft for Agent Framework and Voice Live integrations.

Can I use ConversationRelay voice without Conversation Memory?

Yes, TAC supports a ConversationRelay-only mode that handles TwiML generation, WebSocket protocol, and voice lifecycle without requiring Conversation Orchestrator or Memory setup. This is the fastest way to prototype a voice agent.

Why is my Twilio voice agent not connecting to the WebSocket?

Verify TWILIO_VOICE_PUBLIC_DOMAIN points to a publicly reachable address such as an ngrok domain, confirm the TwiML endpoint returns valid XML, and check the Conversation Configuration is active. Enable DEBUG logging with TWILIO_TAC_LOG_LEVEL=DEBUG for details.

How do I prevent duplicate SMS messages in a Twilio agent?

Return an HTTP 200 response immediately from the webhook so Twilio does not retry, and rely on TAC's idempotency-based deduplication using the i-twilio-idempotency-token header. Ensure the deduplication capacity matches your traffic volume.