WhatsApp Lead Agent demo

Sample demo

For Marula Journeys, a fictional travel agency: qualify WhatsApp enquiries, hand over to a consultant. Tap a sample message to start. How it works

How it works

Cloudflare Workers, one Durable Object per conversation, Workers AI over the binding. The same agent answers the web phone on this page and real WhatsApp messages through Twilio.

Real WhatsApp channel: off on this deployment

The WhatsApp channel runs through Twilio's sandbox and is switched off on this deployment until its credentials are added. The web phone above runs the same agent.

  1. Bursts become one turn.

    Each message is stored at once and held. The agent answers two to three seconds after the last one, so "hi / zanzibar / 2 adults / july" gets one reply, not four.

  2. Code reads first; the model is checked.

    Patterns pull destination, dates, party, budget and name from the words. Workers AI reads the same words through a tool with a strict schema, and any value it proposes that the customer did not write is refused and logged.

  3. One question at a time, never twice.

    Code picks the first missing field and the model only phrases the question. A reply that asks two things, or asks for something already given, is replaced with fixed wording.

  4. The score is arithmetic.

    Every point is listed: fields given, how soon they travel, whether the budget fits a typical trip, booking language, and the model's intent read as one labelled input.

  5. A person can always take over.

    Takeover pauses the agent in that conversation's Durable Object, including a reply it is still writing. Hand back and it carries on from what it knows.