> ## Documentation Index
> Fetch the complete documentation index at: https://developer.watson-orchestrate.ibm.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Agentic workflow expressions

When working with agentic workflows, expressions used in branching, looping, and data mapping must follow a defined syntax. This structure also applies to the generated data map within the model.

Below are the keywords and reference patterns used in agentic workflow expressions:

* Refers to the top-level agentic workflow context:

  ```py Python theme={null}
  flow
  ```

* Refers to the parent context, equivalent to the top-level agentic workflow for nodes within it:

  ```py Python theme={null}
  parent
  ```

* Refers to the current node:

  ```py Python theme={null}
  self
  ```

* Refers to inputs and outputs of the current agentic workflow within agentic workflow nodes:

  ```py Python theme={null}
  parent.[input|output].<name>
  parent.[input|output]["<name>"]
  ```

* Refers to the current index in a `foreach` loop, returns `null` if not in a loop:

  ```py Python theme={null}
  parent._current_index
  ```

* Refers to the current item in a `foreach` loop, returns `null` if not in a loop:

  ```py Python theme={null}
  parent._current_item
  ```

* Refers to inputs and outputs of other nodes within the current agentic workflow:

  ```py Python theme={null}
  parent.<nodeName>.[input|output].<name>
  parent["<nodeName>"].[input|output]["<name>"]
  ```

* Refers to inputs of the current node:

  ```py Python theme={null}
  self["input"].<name>
  self["input"]["name"]
  ```
