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

# items

> Contract, placement, related fields and source examples for this Nika YAML field.

[Language reference](https://docs.nika.sh/reference/language/overview.md) / `items`

## Meaning and placement

### task → for\_each

The collection · a `${{ ... }}` reference OR a literal array. Evaluated EXACTLY ONCE, before the fan-out; no iteration feeds back into it (spec 03 §where this sits).

| Property | Declaration |
| - | - |
| Requirement | Required in this object |
| Schema location | `/$defs/task/properties/for_each/properties/items` |
| type | declaration below |

<details>
  <summary>`type` schema declaration (spec source, not a lesson)</summary>

  ```json theme={"system"}
  [
    "string",
    "array"
  ]
  ```
</details>

**In the same object:** [fail\_fast](https://docs.nika.sh/reference/language/words/fail_fast.md) · [max\_items](https://docs.nika.sh/reference/language/words/max_items.md) · [max\_parallel](https://docs.nika.sh/reference/language/words/max_parallel.md)

[Schema source (use the pointer above)](https://github.com/supernovae-st/nika-spec/blob/5c40ba456c53a4ab663a949d44003078e161305d/schemas/workflow.schema.json)

## In a source template

Excerpt from `templates/agent-loop.nika`, source lines 110–119. This is a fragment, not a runnable workflow.

```yaml illustration theme={"system"}
          findings:
            type: array
            minItems: 1               # an empty list is a schema miss, never a green run
            items: { type: string, minLength: 1 }

  confirm:
    with:
      # The schema above already refuses an empty list and an empty string;
      # this assert is the trust boundary downstream code can SEE, and the
      # place for YOUR law once the goal fixes one (a count · a required id ·
```

### Templates containing this field

| Template | Source |
| - | - |
| `templates/agent-loop.nika` | [Line 113](https://github.com/supernovae-st/nika-spec/blob/5c40ba456c53a4ab663a949d44003078e161305d/templates/agent-loop.nika#L113) |
| `templates/aggregate-by-key.nika` | [Line 35](https://github.com/supernovae-st/nika-spec/blob/5c40ba456c53a4ab663a949d44003078e161305d/templates/aggregate-by-key.nika#L35) |
| `templates/bounded-batch.nika` | [Line 16](https://github.com/supernovae-st/nika-spec/blob/5c40ba456c53a4ab663a949d44003078e161305d/templates/bounded-batch.nika#L16) |
| `templates/deduplicate-records.nika` | [Line 35](https://github.com/supernovae-st/nika-spec/blob/5c40ba456c53a4ab663a949d44003078e161305d/templates/deduplicate-records.nika#L35) |
| `templates/document-to-fields.nika` | [Line 74](https://github.com/supernovae-st/nika-spec/blob/5c40ba456c53a4ab663a949d44003078e161305d/templates/document-to-fields.nika#L74) |
| `templates/fanout.nika` | [Line 98](https://github.com/supernovae-st/nika-spec/blob/5c40ba456c53a4ab663a949d44003078e161305d/templates/fanout.nika#L98) |
| `templates/parallel-review.nika` | [Line 129](https://github.com/supernovae-st/nika-spec/blob/5c40ba456c53a4ab663a949d44003078e161305d/templates/parallel-review.nika#L129) |
| `templates/snapshot-diff.nika` | [Line 43](https://github.com/supernovae-st/nika-spec/blob/5c40ba456c53a4ab663a949d44003078e161305d/templates/snapshot-diff.nika#L43) |
| `templates/validate-records.nika` | [Line 33](https://github.com/supernovae-st/nika-spec/blob/5c40ba456c53a4ab663a949d44003078e161305d/templates/validate-records.nika#L33) |

These are literal key occurrences in the source files, not an execution or conformance claim. [How to instantiate a template](https://docs.nika.sh/guides/templates.md).

## Contract and implementation

This page projects the named specification revision. Check [released engine status](https://docs.nika.sh/reference/status.md) and [the validation workflow](https://docs.nika.sh/guides/agent-authoring.md) before running a file. An optional field is not evidence that every engine supports every value.

Canonical identity: `language:word:items`. Spec revision: [`5c40ba456c53`](https://github.com/supernovae-st/nika-spec/tree/5c40ba456c53a4ab663a949d44003078e161305d).

[How documentation stays connected](https://docs.nika.sh/reference/knowledge-system.md).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.