> Markdown version of [/videos/100735-synchronising-speech-and-text-agents-with-twilio-agent-connect](https://www.wearedevelopers.com/videos/100735-synchronising-speech-and-text-agents-with-twilio-agent-connect). Every page supports `.md` or `Accept: text/markdown`. Links point to the HTML versions so they work for humans too. Agent guide: [/agents.md](https://www.wearedevelopers.com/agents.md). --- # Synchronising Speech and Text Agents with Twilio Agent Connect Stop making your users repeat themselves when switching from SMS to voice calls. Build a stateful, omnichannel AI agent in under 80 lines of code using Twilio Agent Connect. - **Speakers:** [Marius Obert](https://www.wearedevelopers.com/@marius-obert) - **Event:** Tool Showcase - **Published:** December 2, 2026 - **Duration:** 12:53 - **URL:** https://www.wearedevelopers.com/videos/100735-synchronising-speech-and-text-agents-with-twilio-agent-connect - **Thumbnail URL:** https://customer-goifxnzhrq3d0d54.cloudflarestream.com/c2df32e4f9d6bc5e18432665f0d44e3f/thumbnails/thumbnail.jpg?time=30000ms ## Summary Building omnichannel AI agents often requires complex state management to prevent users from repeating themselves across phone calls and text messages. Marius Obert demonstrates how to unify voice and SMS interactions using Twilio Agent Connect and Twilio Conversations, creating a stateful AI insurance broker in under 80 lines of code. Using the Twilio CLI, Marius provisions a memory store and a conversation orchestrator that groups interactions by phone number. The model-agnostic Twilio Agent Connect package routes all communications through a single `onMessageReady` callback. By configuring TwiML options alongside ElevenLabs for text-to-speech and Deepgram for transcription, the server automatically transcribes voice sentences and treats them like text messages. Inside the callback, a prompt builder dynamically combines the base system prompt with extracted user memory and current session data. This ensures the OpenAI model retains historical context while adapting its formatting to the active channel—avoiding numbered lists during voice calls, for example. Because SMS memory extraction triggers only after a configurable inactivity timeout, feeding the recent messages array alongside stored observations ensures the LLM resolves conflicting information in real time. Ultimately, the platform handles context management automatically so developers can focus on core application logic. **Keywords:** twilio agent connect, twilio conversations, omnichannel ai agents, voice and sms integration, ai context management, conversational memory store, conversation orchestrator service, twiml voice transcription, elevenlabs text to speech, deepgram speech to text, dynamic system prompt injection, openai responses api, cross-channel session state, webhook callback server ## Chapters 1. **Configuring memory store and conversation orchestrator services** (00:01) — Maintaining customer context across SMS and voice channels requires configuring a Twilio memory store and conversation orchestrator with participant address grouping. 1. **Scaffolding the server with Twilio Agent Connect** (01:58) — Unifying voice and text interactions into a single webhook handler is achieved by configuring Twilio Agent Connect with speech-to-text and text-to-speech providers. 1. **Composing prompts with user memory and session context** (05:36) — Ensuring AI responses adapt to the active communication channel and past interactions involves injecting observed memory and session data into the system prompt. 1. **Testing cross-channel context retention across voice and SMS** (07:57) — Switching seamlessly between phone calls and SMS messages during a single workflow demonstrates automatic context extraction and memory persistence. ## Related Moments - [Configuring Twilio CLI memory stores and Agent Connect](https://www.wearedevelopers.com/videos/100733-connecting-voice-and-text-agents-with-marius-obert) (from "Connecting Voice and Text Agents with Marius Obert") - **Thumbnail URL:** https://customer-goifxnzhrq3d0d54.cloudflarestream.com/fb649f2123eb9518303521c08a9da71c/thumbnails/thumbnail.jpg?time=262186ms - [Delivering dynamic voice interactions via ElevenLabs](https://www.wearedevelopers.com/videos/2010-conversational-ai-meets-ms-data-agents-to-improve-customer-experience) (from "Conversational AI meets MS data agents to improve customer experience") - **Thumbnail URL:** https://customer-goifxnzhrq3d0d54.cloudflarestream.com/4a7034090518d75c81335140802f5c04/thumbnails/thumbnail.jpg?time=128660ms - [Testing live context switching between voice and SMS](https://www.wearedevelopers.com/videos/100733-connecting-voice-and-text-agents-with-marius-obert) (from "Connecting Voice and Text Agents with Marius Obert") - **Thumbnail URL:** https://customer-goifxnzhrq3d0d54.cloudflarestream.com/fb649f2123eb9518303521c08a9da71c/thumbnails/thumbnail.jpg?time=262186ms - [Addressing latency and architecture in voice agents](https://www.wearedevelopers.com/videos/1729-wearedevelopers-live-real-time-phone-agents-unsafe-vpns-more) (from "WeAreDevelopers LIVE – Real-Time Phone Agents, Unsafe VPNs & More") - **Thumbnail URL:** https://customer-goifxnzhrq3d0d54.cloudflarestream.com/1a5059d850541ff059b1e5c798bef780/thumbnails/thumbnail.jpg?time=296195ms - [Building real-time phone agents with minimal infrastructure](https://www.wearedevelopers.com/videos/1729-wearedevelopers-live-real-time-phone-agents-unsafe-vpns-more) (from "WeAreDevelopers LIVE – Real-Time Phone Agents, Unsafe VPNs & More") - **Thumbnail URL:** https://customer-goifxnzhrq3d0d54.cloudflarestream.com/1a5059d850541ff059b1e5c798bef780/thumbnails/thumbnail.jpg?time=296195ms - [Extending voice agents with TwiML and multiple languages](https://www.wearedevelopers.com/videos/1729-wearedevelopers-live-real-time-phone-agents-unsafe-vpns-more) (from "WeAreDevelopers LIVE – Real-Time Phone Agents, Unsafe VPNs & More") - **Thumbnail URL:** https://customer-goifxnzhrq3d0d54.cloudflarestream.com/1a5059d850541ff059b1e5c798bef780/thumbnails/thumbnail.jpg?time=296195ms ## Related Articles - [Introducing Redis Agent Memory Server](https://www.wearedevelopers.com/magazine/699-introducing-redis-agent-memory-server) - [Everything a Developer Needs to Know About MCP with Neo4j](https://www.wearedevelopers.com/magazine/604-everything-a-developer-needs-to-know-about-mcp-with-neo4j) - [Infer Once, Run Everywhere: Zero-Token Architecture](https://www.wearedevelopers.com/magazine/783-infer-once-run-everywhere-zero-token-architecture) - [Clone Your Voice with ElevenLabs LLMs and Node](https://www.wearedevelopers.com/magazine/739-clone-your-voice-with-elevenlabs-llms-and-node) ## Related Jobs - [Machine Learning Engineer 4](https://www.wearedevelopers.com/jobs/ext/5214545-machine-learning-engineer-4) at **Twilio** - [Machine Learning Engineer 4](https://www.wearedevelopers.com/jobs/ext/5184365-machine-learning-engineer-4) at **Twilio** - [Software Development Engineer 3](https://www.wearedevelopers.com/jobs/ext/5194912-software-development-engineer-3) at **Twilio** - [Software Development Engineer 3](https://www.wearedevelopers.com/jobs/ext/5217979-software-development-engineer-3) at **Twilio** - [Personalized Support Manager](https://www.wearedevelopers.com/jobs/ext/5005691-personalized-support-manager) at **Twilio** - [Staff, Fullstack Software Engineer L4](https://www.wearedevelopers.com/jobs/ext/4801277-staff-fullstack-software-engineer-l4) at **Twilio**