> ## Documentation Index
> Fetch the complete documentation index at: https://docs.frayme.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Expressions and variables

> The namespaces you can reference, worked examples, autocomplete and interpolation.

## Namespaces

| Namespace  | What it holds                                                                                             | Example                                                  |
| ---------- | --------------------------------------------------------------------------------------------------------- | -------------------------------------------------------- |
| `input`    | The payload submitted to the flow, as declared on the Input node                                          | `input.amount`                                           |
| `vars`     | Values produced upstream by Assignment, Rule, Scorecard, Integration and other nodes                      | `vars.risk.risk_score`                                   |
| `params`   | Workflow-level parameters                                                                                 | `params.threshold`                                       |
| `subject`  | The typed case subject                                                                                    | `subject.transaction.amount`, `subject.business.country` |
| `metadata` | Metadata your systems sent with the case                                                                  | `metadata.channel`                                       |
| `caseType` | The case type, bare                                                                                       | `caseType == "Transaction"`                              |
| `entity`   | Facts resolved about the subject across cases                                                             | `entity.subject.kyc.status == 'approved'`                |
| `agg`      | Velocity aggregates from Risk Management, as `agg.<metric>.count_<window>` or `agg.<metric>.sum_<window>` | `agg.pix_out_count.count_24h > 10`                       |

## Worked examples

* Route by a provider score: `vars.risk.risk_score >= 0.66`
* Compare to a parameter: `input.amount > params.threshold`
* Interpolate in a Deny reason: `Risk score ${vars.risk_pct} exceeded ${params.threshold}`
* A broker attribute: `entity.subject.attr.broker.<brokerId>.<type>.value`

## Expression help and autocomplete

Every expression field offers autocomplete for the namespaces and the variables upstream nodes produce. The **ƒx** button opens the reference with the namespaces and examples above.

## Interpolation in strings

Text fields such as a Deny reason, an HTTP body or a template accept `${expression}`; AI prompts use `{{variable}}`.

## Typed values and coercion

Values you type in Rule and Decision Table clauses are typed as JSON: `70` is a number, `"70"` a string, `true` a boolean. Comparing a number field to a string aborts the run, so match the type of the field you compare.
