Skip to main content
SendMessage puts words in the user’s mouth — when triggered, it sends a message to the conversation as if the user typed it. This is useful for creating quick-action buttons that trigger follow-up questions or commands. The message appears in the chat attributed to the user, which means the AI assistant will respond to it naturally.

Quick Action Buttons

Build a row of follow-up actions that save the user from typing:

Dynamic Messages with State

Combine with state interpolation to include UI context in the message:

API Reference

SendMessage Parameters

content
str
required
Message text to send to the conversation. Can be passed as a positional argument. Supports {{ key }} interpolation.

Protocol Reference

SendMessage
{
  "action": "sendMessage",
  "content": "string (required)"
}
For the complete protocol schema, see SendMessage.