Decision Nodes: Routing Without a Classifier Agent

A pattern I used to build all the time: a “classifier” agent reads the input, then a switch node branches on what it said. It works, but it costs a full agent turn just to pick a lane, and you get no idea how confident that pick was.

Decision nodes replace that pair. A decision node sends its input to a decision model, asks it typed questions in one call, and routes on the answer.

Register the model once

A decision model is a kind: model with modelType: decision. The provider is TypeSafe or OpenAI:

kind: model
name: claim-router
spec:
  modelType: decision
  provider: typesafe
  modelName: jev-1.13.0
  apiBase: https://api.typesafe.ai
  authConfig:
    type: apikey
    api_key: ${TYPESAFE_API_KEY}

Ask questions, route on one

Questions can be boolean, choice or score. Only a choice question picks the branch, but every answer is available downstream:

decision:
  model_alias: claim-router
nodes:
  - id: classify
    type: decision
    input:
      claim: "{{workflow.input.claim}}"
    questions:
      claim_type:
        type: choice
        instructions: What kind of carrier claim is this?
        criteria:
          billing: Overcharges, duplicate invoices, or accessorial disputes
          customs: Customs holds, missing documents, or duty questions
          delay: Late or missed delivery milestones
          other: Anything else
      urgent:
        type: boolean
        instructions: The claim needs an answer today.
    route_on: claim_type
    routes: { billing: billing, customs: customs, delay: tracking }
    default: support
    min_confidence: 0.75
    escalate: support
    escalation_mode: handoff

min_confidence is the part I like most. Anything the model isn’t sure about goes to a full agent, so you get cheap routing for the clear cases and real reasoning for the fuzzy ones.

I sent it a duplicate reefer container invoice. Result: billing at 100% confidence, urgent at 81%, in 245 ms. The other three branches were skipped.

One thing to keep in mind: the node’s input goes to the decision model’s provider. Pass it only the fields your questions need.

Docs:

Download the Solace Agent Mesh desktop app and try swapping one of your classifier agents for a decision node.

What would you route with one: support tickets, documents, incidents? Tell me your use case and I’ll help you sketch the questions.