Concepts
How flows work
A flow is a funnel described as a graph of steps. It runs as one MCP tool, so a multi-step quote or sign-up survives being driven by a model.
Why flows
Left to themselves, models rush through structured questions: they skip fields, paraphrase options and accept answers that don't fit. A flow keeps the order, checks every answer and asks again with a reason, so the buyer ends up with a valid quote or a complete lead every time.
Steps
- Question (an interrupt): asks the buyer one thing, such as team size. It can be a number, a choice, several choices, text or an email address. Its answer is validated, and an invalid one is asked again with the reason.
- Action: does work and adds the result to the flow's state, such as pricing a plan, saving a lead or calling a webhook.
- Card: ends the run with a card for the chat and a short summary for the model.
A question can be conditional. The quote only asks for team size when a company prices per seat, and only asks about must-haves when its plans differ by feature.
Edges
Each step points to the next, either directly or through a function of the answers so far, which lets a flow branch or loop. Wiring is checked when the flow loads, so a step that leads nowhere fails immediately rather than in the middle of a buyer's quote.
State
Answers are stored on the server under the conversation's MCP session, for 24 hours, so the assistant never has to carry them between calls. Each call:
- Takes any answers in the tool's arguments, for any question in the flow, so a buyer who says “we're 20 people on annual billing” skips both questions.
- Walks the steps from the start, running actions and skipping questions that are already answered.
- Stops at the first missing or invalid answer and asks for it, or ends with a card.
Pass restart: true to clear a flow's answers. Flows can read each other's state: lead capture attaches the buyer's quote.
Storage
State lives in a key-value store with three operations: get, set and delete. The default keeps it in memory, which suits a single server. For several servers, use Redis, Upstash, Cloudflare KV or DynamoDB behind the same interface.
Flows today
- Guided quote (
get_a_quote) - Lead capture (
capture_lead)