Router

The Router block selects a path by matching context to route descriptions. Use it for intent or unstructured text. Use Condition for an exact boolean rule that needs no model tokens.

Triage a request

Pass <start.input> as Context, describe Sales, Support, and Billing routes, and connect each port to its handler. Also connect the error port for requests that fit no route.

Configuration

FieldBehavior
ContextText to analyze, often <start.input> or <agent.content>.
RoutesEach route has a title and a description of when to choose it. It adds a separate output port.
ModelDefaults to claude-sonnet-5-5. Select a supported model, including a compatible local Ollama or vLLM model.

Make descriptions specific and distinguishable. For example, “Payments, invoices, and refunds” separates Billing from general product support. Test the routes on representative requests rather than assuming a larger model always routes more accurately.

Sim Cloud supplies credentials for supported hosted models. Other models and self-hosted deployments can require your own credentials.

Fallback models

Under Additional fields, add up to five fallbacks. Retry on fail exhausts the selected model's attempts first; each fallback is then tried once using the same context and routes. This behavior also applies to legacy Router blocks.

Hosted models use workspace BYOK or platform credentials where available. Same-provider fallbacks reuse the selected model's key; a different provider can need a secret selected on its row. Auto cannot be a fallback. A completed NO_MATCH decision does not trigger another model request.

Outputs

ReferenceValue
<router.selectedRoute>Selected route ID
<router.reasoning>Explanation of the decision
<router.context>Analyzed context
<router.model>Model that answered
<router.tokens>Token usage
<router.cost>Estimated cost in USD, as an object with input, output, and total; read <router.cost.total> for the total
<router.selectedPath>Destination object with blockId, blockType, and blockTitle

An unconnected route returns selectedPath with blockId: "", blockType: "unknown", and blockTitle set to the chosen route's title.

The Logs UI and run-resource API use credits. See Costs for units and billing behavior.

Only the selected path runs. There is no fixed route-count limit, but overlapping descriptions become harder to distinguish as routes grow.

Handle unmatched requests

If no route fits, the model's NO_MATCH decision raises a routing error. Connect the error port to a fallback handler; it is not a normal successful route output.

The model is instructed to prefer a fitting route and use NO_MATCH when all routes are unrelated. This remains a model judgment, so validate routes before using them for consequential actions.

Route to child workflows

A Product route can call a product-intake workflow while Bug report calls bug triage. The same structure can separate enterprise leads from self-service onboarding.