VayaFlow
SMS Agents

SMS Agents

AI-powered SMS agents for automated text messaging workflows.

SMS Agents

SMS agents handle automated text message conversations with contacts. They receive inbound messages, batch them, and forward the conversation context to an external AI agent (via webhook) that generates responses.

How SMS Agents Work

  1. An SMS agent is created with a phone number and webhook URL
  2. The agent is assigned to a playbook's AI Agents configuration
  3. When a contact sends an SMS to the agent's phone number, the message is received via the telephony provider's webhook
  4. Messages are batched using a configurable debounce window (default 7 seconds)
  5. The batched messages and full conversation context are POSTed to the agent's webhook URL
  6. The external AI agent generates a response and sends it back via the SMS API
  7. The response is delivered to the contact and recorded in the conversation

Agent Types

Each playbook can have two SMS agents:

  • Production Agent — Used for real contacts
  • Test Agent — Used for contacts with the isTest flag. Falls back to the production agent if no test agent is configured.

Assigning to Playbooks

Navigate to a playbook's AI Agents tab to configure the SMS agent assignment. Select from your list of SMS agents for both production and test slots.

Key Concepts

  • Agent Mode — When enabled on a conversation, inbound messages trigger the AI agent webhook. Can be toggled per-conversation from the UI.
  • Debounce Window — Batches rapid-fire messages into a single webhook call to prevent the AI from responding to each message individually.
  • Webhook URL — The external endpoint (e.g., n8n workflow) that receives conversation context and generates responses.
  • Inbound Routing — Maps incoming phone numbers to playbooks and contacts for automatic conversation threading.

On this page