Skip to content

Ask the docs

Answers come only from these docs and are written by an AI model (Gemini), so check the linked pages. Your question is not kept. Do not include personal details or keys.

Run your agent over plain-text SMS with Flow Messaging or your own provider.

SMS gives people a plain-text way to use your product. Flow can send through a Flow Messaging SMS sender or through your existing provider.

SMS is not a flow link --channel trial option. Set up your own SMS sender and credentials. With Flow Messaging, set FLOW_MESSAGING_KEY and FLOW_MESSAGING_SMS_SENDER.

Add the channel explicitly: the starter’s fm.channels() does not automatically include SMS. In the starter’s src/main.ts, replace its channels assignment with:

src/main.ts — replace the channels assignment
const channels = fm ? [...fm.channels(), fm.sms()] : [];

The existing buildAgent({ channels, ... }) call and fm.start connection then include SMS. For production persistence and startup, follow Self-hosting.

Check it worked: send a message to your own SMS number and verify the reply and tool event.

This configuration fragment adapts a provider client you supply:

Channel configuration fragment
import { sms } from "@flow-engineer/flow";
const channel = sms({
sendMessage: (to, message) =>
smsClient.send(to, message.text, message.idempotencyKey),
});

Pass channel to your agent. Verify your provider’s incoming webhook, then call agent.message({ channel: "sms", from, message: text, messageId }) with its trusted fields. Preserve the idempotency key in your provider’s send operation when supported.

SMS uses plain-text segments, without buttons, typing indicators or read receipts. Phone identities are normalized; configure defaultCountryCode if your provider sends national numbers. Flow’s channel rules handle STOP, START and HELP—keep consent and opt-outs consistent with your provider and sender configuration.