Define the channel
This fragment useschat, your application’s delivery layer. Add the resulting channel to the
agent’s channels configuration:
Channel configuration fragment
sendMessage is required. Optional hooks add typing, reactions, read receipts and status
lines. Use info and params to describe extra capabilities and structured fields your UI supports.
To let the agent fix what it sent, resolve sendMessage with the message’s id
({ status: "sent", messageId }) and add editMessage(to, messageId, text) and
unsendMessage(to, messageId). With them the agent is offered edit_message and unsend_message.
Reject either one to refuse it, and the reason goes back to the agent.
Accept a signed-in request
For request/response delivery, callagent.request from your authenticated backend:
Authenticated request handler fragment
verifiedAccountId from server-verified authentication, never a user-supplied body field.
Serialize requests per channel and account. If you pass a conversationId, Flow checks that it
belongs to the authenticated person.
For pushed delivery instead, verify and map the channel identity in your backend before calling
agent.message({ channel: "web", from, message, messageId }). Use resolve to join that verified
identity to the right account.