Flows

Flows Overview

A Flow is a visual map of a conversation. You place nodes for the things the agent says and does, connect them with edges that describe when to move on, and Katexs runs that map turn by turn.


What a Flow is

A freeform Agent is a prompt plus tools: the model decides what to say next on every turn. A Flow inverts that. You define the states of the conversation up front, and the model only decides how to phrase things and which edge to take. The path is yours; the language is the model's.

That distinction matters when a conversation carries obligations β€” a disclosure that must be read, a qualifying question that must be asked before a transfer, a consent prompt before recording. In a Flow those are nodes, so they cannot be skipped by a model having an off day.

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”     β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”     β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚  Customer   │────▢│   Phone or  │────▢│   Katexs    β”‚
β”‚  Calls or   β”‚     β”‚    Chat     β”‚     β”‚    Agent    β”‚
β”‚  Messages   β”‚     β”‚   Widget    β”‚     β”‚  (AI Brain) β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜     β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜     β””β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”˜
                                               β”‚
                    β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
                    β–Ό                          β–Ό                          β–Ό
              β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”              β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”                 β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”
              β”‚ Calendarβ”‚              β”‚   CRM   β”‚                 β”‚ Transferβ”‚
              β”‚  Book   β”‚              β”‚  Push   β”‚                 β”‚  Human  β”‚
              β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜              β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜                 β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

Nodes

Every node has a type, a name, and its own local instructions. Local instructions only apply while the caller is in that node, which keeps each prompt short and easy to test.

Node typeWhat it doesTypical use
SaySpeaks a fixed or lightly rephrased line, then advances.Greeting, disclosure, closing.
CollectAsks for a value and validates it before moving on.Name, phone, date of birth, order number.
BranchEvaluates conditions on collected variables.New vs existing customer, in-network vs out.
IntentClassifies what the caller wants and routes on it.Front-door router for a main line.
ToolCalls a tool β€” calendar, CRM, webhook, custom API.Book, look up, create ticket.
TransferWarm or cold transfer to a human or a Team member.Escalation, sales handoff.
EndCloses the call with a final line and an end reason.Resolved, voicemail left, opted out.

Edges

Edges carry the routing logic. Each edge has a condition, and Katexs evaluates them top to bottom on every turn until one matches. A node with no matching edge falls through to its default edge, which is why every branching node needs one.

  • Always β€” Advance as soon as the node completes. Used after Say and Tool nodes.
  • Variable condition β€” A comparison on collected data, such as party_size > 6 or plan == "enterprise".
  • Intent match β€” The caller's utterance classified into one of your labelled intents.
  • Tool result β€” Branches on success, failure, or a field in the tool's response payload.
  • Fallback β€” Fires after the node's retry limit, so no caller ever gets stuck in a loop.

Variables and state

Collect and Tool nodes write into the call's variable bag. Any later node can reference a value with double braces, and the same bag is posted to your webhook at end-of-call, so a Flow doubles as a structured data collector.

json
{
  "caller_name": "Dana Whitfield",
  "intent": "reschedule",
  "existing_appointment_id": "apt_8f2c41",
  "requested_window": "2026-08-11T14:00:00-04:00",
  "confirmed": true
}

Flow vs freeform Agent

SituationUse a FlowUse an Agent
Regulated script or required disclosureYesNo
Open-ended support with a knowledge baseNoYes
Fixed intake with fields you must captureYesNo
Long tail of unpredictable questionsNoYes
You need the exact same path every time for QAYesNo
The conversation is short and mostly one tool callEitherEither
You can mix both. A Flow node can hand control to a freeform Agent for a bounded stretch of the conversation and take it back when that agent finishes β€” useful for a scripted intake that ends in open Q&A.

Versioning and publishing

Edits happen on a draft. Publishing snapshots the graph into an immutable version, and live calls finish on the version they started on. Rolling back is selecting an older version and republishing β€” no calls are interrupted.