Skip to main content
Use this when a step needs judgement that a rule cannot make (“is this a bug or a question?”, “is this reply safe to send?”) and the answer should come back in a shape you can route on. For open-ended writing use LLM_CALL. Prerequisites: the CLASSIFY plugin is present (GET /api/plugins/CLASSIFY answers 200). Pick a backend:
  • SYSTEMONE (default): a System One decision model on your own Ollama (baseUrl defaults to http://localhost:11434). Answers carry calibrated probabilities and cost no provider tokens.
  • LLM: any chat model, through the same access as LLM_CALL. Probabilities are the model’s own estimates.
Add -H "X-API-Key: $YUKTA_API_KEY" if your server has keys.

Steps

1

Classify into labels and route on them

CLASSIFY picks one label from your list. Describe every label: a small model depends on those descriptions. With routeByLabel, each label becomes an output port, plus uncertain for answers below minProbability (default 0.6). Save as session.json:
session.json
The model name tev1:0.8b is an example; use the decision model you pulled. state is what the model sees (default the whole payload, cut to 15,000 characters). To use a chat model instead, add "backend": "LLM", "provider": "anthropic", "apiKey": "decrypted:anthropic" and its model.
2

Gate on a yes or no

GATE asks a yes/no question and leaves on pass when the probability of yes reaches threshold (default 0.5), else reject. Put one in front of a risky node:
3

Score on a scale

SCORE rates on ordered levels (2 to 26, lowest first). With threshold it leaves on high or low.
4

Ask several things at once, or watch a stream

  • ASK takes up to 64 named questions (choice, yesno, score) in one call and writes metadata.answers; route with a BRANCH on metadata['answers']['sentiment']['choice'].
  • ANOMALY and DEDUPE compare each message with a window of recent ones (ports normal/anomalous and unique/duplicate). By default the window is per node and per run, so a workflow started for every event never builds history; set persist: session to share it across runs.

Verify it worked

The result comes from the bugs terminal, and the message metadata holds the decision: classification with choice, probability, probabilities, label and uncertain. The payload is unchanged. Send {"text":"hmm"}: a vague message should land on unsure. If the run fails with a model error, the Ollama endpoint is unreachable or the model is not pulled: the node fails and the node’s engine policy applies (Handle failures).

Variations

  • Where the result lives. Each plugin writes to metadata[into] (classification, gate, score, answers, anomaly, dedupe); change it with into.
  • Cap what the model sees. maxStateChars (max 15,000), stateKeep: tail for build logs where the cause is last, and onOverflow: fail to reject oversize input instead of cutting it.
  • Latency. keepAlive (such as 30m) keeps an idle Ollama model loaded; concurrency (default 16) sets calls in flight.
  • Gate a tool call. Put a GATE in front of MCP_TOOL_CALL asking whether the arguments the model proposed are safe: Use tools and MCP servers.