Inspiration

A federal government customer asked us how its contact center could lift change-of-address calls from single-digit success rates to something the agency is proud of. The form looks simple, but the caller has to prove who they are, answer lengthy knowledge-based questions, and spell a new street address. Done by voice alone, that call is slow, error-prone and hard to verify. When that change is done on a website, it leaves out the people who called because they wanted to talk to someone.

Using carrier lookup in AWS End User Messaging SMS, we learned that 80% of callers are calling from a mobile phone, one that can take photos, open a chat and browse the web. We built Twine so a caller's voice conversation and smartphone work together to capture information and reach an outcome, without ever dropping the call.

Forms are everywhere, from government to regulated industries like healthcare and financial services. Businesses already know them, and Twine turns them into multimodal interactions, reducing average handle time and making what a voice contact center captures more accurate.

What it does

  1. A customer calls a contact center and reaches an AI agent. That agent is either Twine's own voice agent over the Agent2Agent (A2A) protocol or the contact center's custom AI agent, connected to Twine through the Twine MCP server.
  2. If the call needs a form, Twine plans the capture. It decides which fields to ask aloud and which belong on a screen.
  3. Twine orchestrates the interaction. The agent asks questions over voice and moves the caller to a supported channel (WhatsApp, RCS or a secure web page) when a field is easier and more accurate to capture there. Think of showing a customer a list of appointment slots instead of the back-and-forth of matching schedules out loud.
  4. The voice agent stays on the call the whole time. It tells the caller how they are doing, helps when a step goes wrong, and answers their questions from the organization's own knowledge base in Amazon Bedrock Knowledge Bases. The customer puts the call on speaker and can ask questions along the way.
  5. If the call escalates to a person, the human agent works with Twine the same way. Through a third-party app in the Amazon Connect agent workspace, they see the caller's answers arrive live, and Twine's agent assist can recommend a form to send to the caller's phone.
  6. After a form is complete, the submission runs through a workflow the business builds in Twine's workflow editor, with connectors for email (Amazon SES), Slack and SMS (AWS End User Messaging SMS), so completed forms land in their systems of record.

Twine supports both AI and human agents. We designed it for a fully AI-handled call, with a person brought in only when the caller needs or asks for one.

Businesses set everything up in an easy-to-use admin portal: forms, branding, channels, the agent's persona and knowledge, workflows, users and analytics. Twine bills through AWS Marketplace, and only for completed outcomes: when a customer actually finishes what they set out to do.

Our demo tenant, Meridian Family Health, runs a new-patient intake workflow end to end, so you can see how it works.

Try it

Twine's own deploy runs a demo org, Meridian Family Health, with nothing to install.

  • Call +1 770-814-6390 from a mobile phone with WhatsApp. Say you hurt your knee and want to book an appointment, and say yes when the agent offers to send the rest to your phone. Put the call on speaker and carry on in WhatsApp.
  • Sample documents: the call asks for a photo of an insurance card and a driver's license. Fictional ones are at https://twine.cx/samples/insurance-card.png and https://twine.cx/samples/drivers-license.png. With the sample license, the face check does not match, because the face isn't yours. That is the check working.

The full call script, line by line, is on the judges' page in the repository: https://github.com/CXBuilder/cxb-twine/blob/main/docs/submission.md

How we built it

Twine is a TypeScript monorepo, deployed with AWS CDK into one AWS account per stage.

AWS Communication Developer Services, all called at runtime

  • AWS End User Messaging Social for WhatsApp: templates, messages, media and WhatsApp Flows compiled from Twine's own form schema.
  • AWS End User Messaging SMS for RCS messages and rich cards, carrier lookup on the calling number, and SMS. WhatsApp is tried first. If it can't deliver, or the caller asks for a text instead, Twine sends an RCS card. SMS is the last step, once a line has a registered SMS number.
  • Amazon SES for submission summaries, confirmation emails and the marketing site's request-access form.

AI capture

  • Amazon Connect answers the call and hands it to Twine's voice agent over A2A (agent-to-agent). Twine is A2A-compatible, so any contact center that supports A2A can hand calls to it, but the demo was built on Amazon Connect to stay in the AWS ecosystem.
  • The voice agent runs on Amazon Bedrock AgentCore Runtime, built with the Strands Agents SDK and Anthropic's Claude models on Amazon Bedrock. Amazon Bedrock Knowledge Bases hold each organization's own knowledge.
  • A contact center that runs its own agent connects it to the Twine MCP server, also on AgentCore Runtime, to drive its own interaction.
  • The same agent answers WhatsApp and RCS threads, so if a call drops, a customer can still complete the form they were on.
  • An orchestrator package turns a form into a capture plan. It moves callers in one direction, from voice to chat to web, and never back and forth more than it has to.

Human agent capture

  • A third-party app in the Amazon Connect agent workspace shows the rep the caller's answers as they arrive, and lets the agent send a form to a customer in real time.

Identity verification and document processing

Our federal government customer also struggles with identity verification. We built the capability to capture and validate identity documents, and to extract information from photos the caller sends over WhatsApp or RCS.

  • Identity verification with Amazon Rekognition: Face Liveness on a video selfie, then a face comparison against the photo on the ID. This runs on a secure web page, since WhatsApp and RCS can't run a liveness check.
  • Intelligent document processing with Amazon Textract, which reads driver's licenses and insurance cards and fills in the form. Read aloud, a member ID takes a lot of back-and-forth; a smartphone can photograph it in seconds.

Platform

Twine is serverless. AWS Lambda behind Amazon API Gateway serves the API and a WebSocket live channel that streams answers to the agent, the portal and the agent workspace. Amazon DynamoDB stores every record scoped to its organization, Amazon EventBridge carries session events, Amazon Cognito handles sign-in, and Amazon CloudFront serves the web apps.

The repository's README has the architecture diagram, the deploy steps, and a CDS usage map that names the file and line of every CDS call.

Challenges we ran into

  • WhatsApp's 24-hour window. Meta lets a business start a conversation only with an approved template. We designed a general, reusable template, so that Twine can open every capture with an invite template with Start and Not now quick-reply buttons. Once the caller taps Start, the 24-hour window is open and Twine can send the interactive messages and Flows Twine needs to make the experience engaging.
  • Talking while the caller taps. The agent has to sound natural while the caller is on their phone: no filler, no repeating itself, and a quick reaction to each answer. A live channel tells the agent about every tap as it happens. It was challenging to get the data model and interaction right to be useful to AI agents, but we think we found a good compromise.
  • No ping-pong. Each move between voice, chat and web costs the caller time. The orchestrator groups fields to keep moves to a minimum, and the form builder warns before publishing a form that would bounce the caller back and forth. This took a lot of trial and error to ensure that by default, interactions are relatively seamless for customers.
  • Falling back without asking. Twine can't ask Meta whether a number is on WhatsApp. It sends, and when WhatsApp can't deliver, it falls back to RCS, and then to SMS where the line has a registered SMS number. This was needed to support the widest range of potential devices and carriers.

Accomplishments that we're proud of

  • A real phone call where the caller answers some questions aloud, completes others in a WhatsApp Flow, verifies their identity on a web page, and hears the agent react to each step. It's a pretty seamless experience for customers.
  • Twine is multi-tenant from the start. Each organization brings its own WhatsApp numbers, RCS agents and contact center, and can easily onboard them and start building their own chat-based forms and voice agents.
  • Anyone can deploy Twine into their own AWS account, with a private deployment model supported for regulated industries.

What we learned

  • The right channel to pick for any question depends on what you are trying to ask. A name is easy to say out loud, but something complex like an insurance member ID is easier to photograph.
  • A caller looking at their phone still needs the voice. A few seconds of silence sounds like a dropped call, so short spoken progress updates matter more than we expected.
  • Sending and falling back works better than predicting. Checking whether a number can receive WhatsApp in advance is less reliable than trying and moving on.

Pre-existing code and third-party material

The repository's first commit is dated September 16, 2026. The following existed before it or came from outside the team:

  • shadcn/ui (MIT): the UI primitives, added from its registry during the build.
  • @ebratz/dynamodb-better-auth (MIT): an npm dependency of the API, installed from npm, not copied or forked.

Built With

  • a2a
  • amazon-api-gateway
  • amazon-bedrock
  • amazon-bedrock-agentcore
  • amazon-cloudfront
  • amazon-cognito
  • amazon-connect
  • amazon-dynamodb
  • amazon-eventbridge
  • amazon-rekognition
  • amazon-ses
  • amazon-textract
  • aws-cdk
  • aws-end-user-messaging
  • aws-lambda
  • aws-marketplace
  • claude
  • mcp
  • node.js
  • rcs
  • react
  • sms
  • strands-agents
  • typescript
  • whatsapp
Share this project:

Updates

Submission history