# Nodes (/docs/guides/nodes)



Every decision is a graph of nodes. This is the whole palette. Each node has its own page, with diagrams of how it works, in [Nodes](/docs/nodes).

| Node                | What it does                                                                                                                 |
| ------------------- | ---------------------------------------------------------------------------------------------------------------------------- |
| **Input / Output**  | The entry point and the exit. The input node receives the caller's payload; the output node writes the answer.               |
| **Condition**       | Branches on a boolean expression (`True` / `False`).                                                                         |
| **Switch**          | Branches on a value: one port per case, plus `Default`. Takes the **first** matching case, not every one.                    |
| **Decision table**  | Runs a decision table and branches on `Matched` / `No match`.                                                                |
| **Calculate**       | Evaluates an expression and writes the result to a variable.                                                                 |
| **Append to array** | Appends a value to a list variable. Fails on a variable that is not a list.                                                  |
| **API call**        | Calls an external HTTP service and branches on `Success` / `Error`.                                                          |
| **AI judgement**    | Asks a model to judge the input and records its answer and confidence.                                                       |
| **Sub-decision**    | Runs another published decision and writes its outputs.                                                                      |
| **For each**        | Runs a published decision once per element of a list; outputs are collected in order (the mapping reads `item` and `index`). |
| **Parallel**        | Starts several published decisions at once and joins them before the flow continues; each writes its own variable.           |
| **Action**          | Describes a side effect to perform (webhook, API call, event, alert, review).                                                |
| **Lookup**          | Looks a value up in a **dataset** (reference data) and branches on found / not found.                                        |
| **Scorecard**       | Base points plus, per characteristic, the points of the first bin whose condition holds.                                     |
| **Model**           | A linear or logistic regression evaluated in-process, or an inference endpoint.                                              |
| **Query**           | Reads a Postgres or Redis **connection** (a single `SELECT`, or read-only Redis commands).                                   |

## Scoring nodes [#scoring-nodes]

**Scorecard** writes `{ score, breakdown, reason_codes }`. The reason codes are those of the
characteristics that lost the most points against their best bin, which is how an adverse decision
is usually explained. Points are summed in decimal.

**Model** is a linear or logistic regression from its coefficients, evaluated in-process (a PMML
`RegressionModel` from scikit-learn, R or SAS imports into it in the console), or an inference
endpoint that receives `{ features }` and answers a score at a configurable path. It writes
`{ score }`, plus `probability` for logistic and `positive` when a threshold is set.

## Datasets [#datasets]

**Lookup** reads a **dataset** — reference data such as a blocklist or country codes, uploaded as
CSV, Excel or JSON. Every upload is an immutable version, pinned at publish like a table.

## AI judgement [#ai-judgement]

An AI node records its answer rather than pretending to be reproducible: a model asked twice may
answer differently, and storing the answer and its confidence is the only honest way to use one.
