Back to the journal
Momo Business Guides

Flow steps: Think

The AI steps inside a scripted conversation — one answer, a bounded agent hand-over, classification, extraction, a knowledge-base answer, translation.

Message flows run on WhatsApp in this release. Other channels are on the roadmap; a flow bound to any other channel is refused at publish.

Think steps call an AI agent from inside a scripted conversation: one answer, a bounded hand-over, a classification, an extraction, a knowledge-base answer or a translation. Each one costs an AI call.

This is the reference for the Think group of the flow builder's palette. Every step below is listed with what it does, the settings it takes, the branches it can leave by and the one thing to keep in mind. Settings marked "templated" accept {{vars.x}}, {{contact.name}} and {{last.text}}.

AI reply

One AI answer, then the flow continues. When the model decides a person must take over, its reply goes out and the flow leaves by handoff — or ends, when that branch is not drawn.

Setting What it does
profile_id Agent profile id to use; blank means whichever agent answers this inbox today.
timeout_seconds How long this step may wait on the model, 5–70 (default 60). The clock starts when the step runs, not when the customer last wrote. It shares the advance's 60-second budget with the steps before it.
history_turns How many recent turns of the thread the model sees, 0–30. Utility steps (translate, extract, answer, reply) default to 0 — the instruction and the last message are the whole task; ai_agent defaults to 10.
instruction What the agent should do with the customer's last message.
fallback What to send if the agent cannot answer (else the node leaves by failed).
store_as Optional variable to store the reply text in.

Branches: next handoff failed window_closed

Keep in mind: One AI call, counted against the session's and the plan's AI allowance.

AI agent

Hand the thread to an agent for up to max_turns customer turns. It comes back by resolved (the agent says the goal is met, or resolved_when holds), handoff (the agent asked for a person), budget (the turns ran out) or timeout (the customer went quiet). There is no flow_return tool: the exit is what the flow can observe.

Setting What it does
profile_id Agent profile id to use; blank means whichever agent answers this inbox today.
timeout_seconds How long this step may wait on the model, 5–70 (default 60). The clock starts when the step runs, not when the customer last wrote. It shares the advance's 60-second budget with the steps before it.
history_turns How many recent turns of the thread the model sees, 0–30. Utility steps (translate, extract, answer, reply) default to 0 — the instruction and the last message are the whole task; ai_agent defaults to 10.
goal What the agent must achieve before handing the thread back.
opener Optional first message the agent sends.
max_turns Turns the agent may take before leaving by budget (1–20).
resolved_when Optional {var, op, value} condition on the variables that means the goal is met and the node leaves by resolved. The agent can also say so itself (flow.resolved in its answer), so this is optional.
return_vars Optional list of variable names the agent should fill in for the flow; they are part of its answer schema (flow.vars) and land in vars. as the conversation establishes them.
retries Not read by this step today — an agent turn is never re-asked. Kept for the shared wait shape.
timeout_minutes Not read by this step today — the agent leaves by budget after max_turns. Kept for the shared wait shape.
retry_prompt Not read by this step today. Kept for the shared wait shape.

Branches: resolved handoff budget timeout window_closed

Keep in mind: The agent leaves only on what the flow can observe — there is no flow_return tool. retries, timeout_minutes and retry_prompt are not read.

AI classify

Classify the last message; one out per intent. unsure is the model's answer; unavailable is no answer (classifier off, timeout, error) — vars.classification.source says which.

Setting What it does
labels The intents to branch on, from buy, price, order_status, complaint, support, greeting, spam, other; each becomes an out.
threshold Confidence needed (0–1, default 0.5); below it the node leaves by unsure.
store_as Optional variable to store the winning intent in.

Branches: unsure unavailable — One out per label in config.labels, plus unsure and unavailable.

Keep in mind: Needs the workspace classifier switched on; publish refuses otherwise. unavailable means no answer at all.

AI extract

Pull named fields out of free text into typed variables. failed is the model not answering; incomplete is the message not saying.

Setting What it does
profile_id Agent profile id to use; blank means whichever agent answers this inbox today.
timeout_seconds How long this step may wait on the model, 5–70 (default 60). The clock starts when the step runs, not when the customer last wrote. It shares the advance's 60-second budget with the steps before it.
history_turns How many recent turns of the thread the model sees, 0–30. Utility steps (translate, extract, answer, reply) default to 0 — the instruction and the last message are the whole task; ai_agent defaults to 10.
fields [{name, description, as}] — the fields to pull out; each lands in vars.. as types the value the way a check node does (phone, integer, money, date, email, …): a phone lands normalised, a quantity as a number, and a value that fails its type counts as missing. Variables are written only when every field was found, or on the incomplete branch when you drew one — never half of them down next. vars.__extract = {found, missing}.
instruction Optional context for the model (language, units, what the fields mean).

Branches: ok incomplete failed

Keep in mind: Variables are written only when every field was found, or on the incomplete branch when it is drawn — never half of them.

Answer from KB

One attempt from the knowledge base, with an honest miss: not_found is the KB not knowing, failed is the model not answering.

Setting What it does
profile_id Agent profile id to use; blank means whichever agent answers this inbox today.
timeout_seconds How long this step may wait on the model, 5–70 (default 60). The clock starts when the step runs, not when the customer last wrote. It shares the advance's 60-second budget with the steps before it.
history_turns How many recent turns of the thread the model sees, 0–30. Utility steps (translate, extract, answer, reply) default to 0 — the instruction and the last message are the whole task; ai_agent defaults to 10.
question The question to look up; blank uses the customer's last message.
send Whether to send the answer (default true); false only stores it.
store_as Optional variable to store the answer text in.

Branches: answered not_found failed window_closed

Keep in mind: Answers only from the knowledge the agent profile can reach; not_found is an honest miss.

Translate

Kiswahili ⇄ English, into whatever the customer wrote in. A failed translation stores nothing and leaves by failed; vars.__translate = {ok, direction}.

Setting What it does
profile_id Agent profile id to use; blank means whichever agent answers this inbox today.
timeout_seconds How long this step may wait on the model, 5–70 (default 60). The clock starts when the step runs, not when the customer last wrote. It shares the advance's 60-second budget with the steps before it.
history_turns How many recent turns of the thread the model sees, 0–30. Utility steps (translate, extract, answer, reply) default to 0 — the instruction and the last message are the whole task; ai_agent defaults to 10.
text The text to translate (templated); blank uses the customer's last message.
direction sw (into Kiswahili), en (into English) or auto (into whatever they wrote in).
store_as Variable to store the translation in.

Branches: next failed

Keep in mind: A failed translation stores nothing and leaves by failed.

Where next

Thanks for reading.Explore more stories