> ## 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.

# with

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

[Language reference](/reference/language/overview) / `with`

## Meaning and placement

### task

Task-level scope injection · `$&#123;&#123; with.X &#125;&#125;`.

| Property        | Declaration                   |
| --------------- | ----------------------------- |
| Requirement     | Optional in this object       |
| Schema location | `/$defs/task/properties/with` |
| type            | "object"                      |

**In the same object:** [after](/reference/language/words/after) · [agent](/reference/language/words/agent) · [exec](/reference/language/words/exec) · [extract](/reference/language/words/extract) · [for\_each](/reference/language/words/for_each) · [group](/reference/language/words/group) · [infer](/reference/language/words/infer) · [invoke](/reference/language/words/invoke) · [lift](/reference/language/words/lift) · [on\_error](/reference/language/words/on_error) · [retry](/reference/language/words/retry) · [returns](/reference/language/words/returns) · [timeout](/reference/language/words/timeout) · [when](/reference/language/words/when)

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

## In a source template

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

```yaml illustration theme={"system"}
          steps: { type: array, items: { type: string } }

  execute:
    with:
      # BOTH bindings, on purpose. The plan is a summary of the goal, never a
      # substitute for it: measured on five real seats, a prompt that carried
      # only the plan produced three GREEN runs with an invented or an empty
      # answer — the agent was asked to compute over data it never received,
      # and the assert below only proves non-emptiness. The goal rides in.
      goal: ${{ inputs.goal }}
```

### Templates containing this field

| Template                                    | Source                                                                                                                                            |
| ------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- |
| `templates/agent-loop.nika.yaml`            | [Line 73](https://github.com/supernovae-st/nika-spec/blob/c5ebbb7b862b68bc6cf7235efba61173b844afc6/templates/agent-loop.nika.yaml#L73)            |
| `templates/chain.nika.yaml`                 | [Line 63](https://github.com/supernovae-st/nika-spec/blob/c5ebbb7b862b68bc6cf7235efba61173b844afc6/templates/chain.nika.yaml#L63)                 |
| `templates/classify-and-route.nika.yaml`    | [Line 93](https://github.com/supernovae-st/nika-spec/blob/c5ebbb7b862b68bc6cf7235efba61173b844afc6/templates/classify-and-route.nika.yaml#L93)    |
| `templates/corpus-qa.nika.yaml`             | [Line 40](https://github.com/supernovae-st/nika-spec/blob/c5ebbb7b862b68bc6cf7235efba61173b844afc6/templates/corpus-qa.nika.yaml#L40)             |
| `templates/docker-report.nika.yaml`         | [Line 69](https://github.com/supernovae-st/nika-spec/blob/c5ebbb7b862b68bc6cf7235efba61173b844afc6/templates/docker-report.nika.yaml#L69)         |
| `templates/document-to-fields.nika.yaml`    | [Line 46](https://github.com/supernovae-st/nika-spec/blob/c5ebbb7b862b68bc6cf7235efba61173b844afc6/templates/document-to-fields.nika.yaml#L46)    |
| `templates/etl-state.nika.yaml`             | [Line 86](https://github.com/supernovae-st/nika-spec/blob/c5ebbb7b862b68bc6cf7235efba61173b844afc6/templates/etl-state.nika.yaml#L86)             |
| `templates/evaluate-and-optimize.nika.yaml` | [Line 51](https://github.com/supernovae-st/nika-spec/blob/c5ebbb7b862b68bc6cf7235efba61173b844afc6/templates/evaluate-and-optimize.nika.yaml#L51) |
| `templates/fanout.nika.yaml`                | [Line 99](https://github.com/supernovae-st/nika-spec/blob/c5ebbb7b862b68bc6cf7235efba61173b844afc6/templates/fanout.nika.yaml#L99)                |
| `templates/gate-and-act.nika.yaml`          | [Line 66](https://github.com/supernovae-st/nika-spec/blob/c5ebbb7b862b68bc6cf7235efba61173b844afc6/templates/gate-and-act.nika.yaml#L66)          |
| `templates/human-gated-ship.nika.yaml`      | [Line 123](https://github.com/supernovae-st/nika-spec/blob/c5ebbb7b862b68bc6cf7235efba61173b844afc6/templates/human-gated-ship.nika.yaml#L123)    |
| `templates/media-asset-pack.nika.yaml`      | [Line 70](https://github.com/supernovae-st/nika-spec/blob/c5ebbb7b862b68bc6cf7235efba61173b844afc6/templates/media-asset-pack.nika.yaml#L70)      |
| `templates/website-brief.nika.yaml`         | [Line 62](https://github.com/supernovae-st/nika-spec/blob/c5ebbb7b862b68bc6cf7235efba61173b844afc6/templates/website-brief.nika.yaml#L62)         |

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

## Contract and implementation

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

Canonical identity: `language:word:with`. Spec revision: [`c5ebbb7b862b`](https://github.com/supernovae-st/nika-spec/tree/c5ebbb7b862b68bc6cf7235efba61173b844afc6).

[How documentation stays connected](/reference/knowledge-system).
