Login
Free Sign Up
Docs
/

AI - Router

Type identifier: ai:router Category: AI Operations

Description

The AI - Router node evaluates input variables and configured route options, then chooses a single option to continue the run. Each option can optionally define a structured output schema for AI-generated data when that option is selected.

Input Handles

Handle

Type

Description

trigger

control

Starts routing evaluation.

model

string

Appears when the model is configured as dynamic.

<variableName>

schema-defined

One input handle is created for each configured variable.

Output Handles

Handle

Type

Description

error

control

Triggered when routing fails.

reasoning

string

The model's reasoning for the route. Appears when Show Model Reasoning is enabled.

selectedOptionIndex

number

Zero-based selected option index. Appears when Show Selected Option Details is enabled.

selectedOptionLabel

string

Selected option label. Appears when Show Selected Option Details is enabled.

option-<id>

control

Trigger for each configured option.

option-<id>:output

schema-defined

Output for selected option when that option has an output schema.

Configuration Options

Option

Type

Default

Description

Model

string (literal or dynamic)

gpt-5.4-nano

LLM model used for routing. When dynamic, the model input handle is shown.

Instructions

content

-

Router guidance passed to the model.

Variables

array of schema

query string

Input variable definitions exposed as target handles.

Options

array of objects

General query, Contact form

Candidate routes. Each has a label, an optional description, and an optional output schema.

Show Model Reasoning

boolean

false

Adds the reasoning output.

Show Selected Option Details

boolean

false

Adds the selectedOptionIndex and selectedOptionLabel outputs.

Default Template

New AI - Router nodes start with a query string variable and two options:

  1. General query
  2. Contact form with an object output named contact

The default contact output object includes these required string fields:

  • name
  • email
  • phone
  • message

Behaviour

  1. Resolves all configured variable inputs.
  2. Sends instructions, options, and variable values to an LLM.
  3. Chooses one option.
  4. If Show Selected Option Details is enabled, emits selectedOptionIndex and selectedOptionLabel. If Show Model Reasoning is enabled, emits reasoning.
  5. Triggers the selected option's control handle.
  6. If the selected option has an output schema and output is returned, writes it to option-<id>:output.
  7. On failure, triggers the error handle.

Related pages