# Router
URL: /reference/blocks/system-router
Type: reference
Description: Branch into N paths via boolean predicates or AI classification.
Keywords: router, system/router, system, block, workflow builder
`system/router` — Branch into N paths via boolean predicates or AI classification.

Where it appears [#where-it-appears]

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

Fields [#fields]

| Field               | Type                                   | Required | Default     | Description                                                                                                                                             |
| ------------------- | -------------------------------------- | -------- | ----------- | ------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `routerMode`        | select                                 | Yes      | `predicate` | Predicate: each route has its own boolean expression; first match wins. AI: an LLM picks the route by description. Options: `predicate`, `ai`.          |
| `prompt`            | text (multi-line, supports references) | Yes      | —           | The 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). |
| `routes`            | routes                                 | Yes      | —           | Each route has its own outgoing branch. The Default branch fires when no route matches.                                                                 |
| `defaultRouteLabel` | text                                   | No       | `Default`   | Display name for the fallback branch that fires when no route condition matches. Shown on the canvas edge.                                              |

Inputs and outputs [#inputs-and-outputs]

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

**Outputs**

Reference an output downstream with `<Router.field>`.

| Name         | Type    | Description                                                                                      |
| ------------ | ------- | ------------------------------------------------------------------------------------------------ |
| `matched`    | boolean | true when one of the named routes fired; false when execution fell through to the Default branch |
| `route`      | string  | Selected route id (or "default" if none matched)                                                 |
| `routeLabel` | string  | Selected route label                                                                             |
| `reasoning`  | string  | AI reasoning (AI mode only)                                                                      |

Example [#example]

A minimal configuration for this block:

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

Limits and failure modes [#limits-and-failure-modes]

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

Related [#related]

* [All workflow blocks](/reference/blocks)
* [Workflow Builder overview](/workflow-builder-overview)