StyloDocs
Workflow blocks

Router

Branch into N paths via boolean predicates or AI classification.

View as Markdown

system/router — Branch into N paths via boolean predicates or AI classification.

Where it appears

The Router block lives in the Logic & control group of the Workflow Builder.

Fields

FieldTypeRequiredDefaultDescription
routerModeselectYespredicatePredicate: each route has its own boolean expression; first match wins. AI: an LLM picks the route by description. Options: predicate, ai.
prompttext (multi-line, supports references)YesThe text the LLM reads to decide which route to take. Use <StepName.field> to pass in the content to classify (e.g. ticket subject, customer message).
routesroutesYesEach route has its own outgoing branch. The Default branch fires when no route matches.
defaultRouteLabeltextNoDefaultDisplay name for the fallback branch that fires when no route condition matches. Shown on the canvas edge.

Inputs and outputs

Inputs are the configurable fields above. The block produces these outputs:

Outputs

Reference an output downstream with <Router.field>.

NameTypeDescription
matchedbooleantrue when one of the named routes fired; false when execution fell through to the Default branch
routestringSelected route id (or "default" if none matched)
routeLabelstringSelected route label
reasoningstringAI reasoning (AI mode only)

Example

A minimal configuration for this block:

{
  "type": "system/router",
  "config": {
    "routerMode": "predicate",
    "prompt": "<PreviousStep.field>",
    "routes": "...",
    "defaultRouteLabel": "Default"
  }
}

Limits and failure modes

  • Required fields (routerMode, prompt, routes) must be set, or the block fails validation before it runs.

On this page