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

# type

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

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

## Meaning and placement

### → inputs · additionalProperties

The schema declares this field at the location below.

| Property | Declaration |
| - | - |
| Requirement | Required in this object |
| Schema location | `/properties/inputs/additionalProperties/properties/type` |
| \$ref | `"#/$defs/typeExpr"` |

**In the same object:** [default](https://docs.nika.sh/reference/language/words/default.md) · [description](https://docs.nika.sh/reference/language/words/description.md) · [required](https://docs.nika.sh/reference/language/words/required.md)

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

### → const · additionalProperties · then

The schema declares this field at the location below.

| Property | Declaration |
| - | - |
| Requirement | Optional in this object |
| Schema location | `/properties/const/additionalProperties/then/properties/type` |
| \$ref | `"#/$defs/typeExpr"` |

**In the same object:** [description](https://docs.nika.sh/reference/language/words/description.md) · [value](https://docs.nika.sh/reference/language/words/value.md)

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

### → outputs · additionalProperties · anyOf · 1

The output's type · the full TypeExpr of 09-types (R3b · LAW-GRAMMAR-0211 · the flat 6-enum is dead alongside the inputs half · LAW-SURFACE-0211).

| Property | Declaration |
| - | - |
| Requirement | Optional in this object |
| Schema location | `/properties/outputs/additionalProperties/anyOf/1/properties/type` |
| \$ref | `"#/$defs/typeExpr"` |

**In the same object:** [description](https://docs.nika.sh/reference/language/words/description.md) · [value](https://docs.nika.sh/reference/language/words/value.md)

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

## In a source template

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

```yaml illustration theme={"system"}

inputs:
  goal:
    type: string
    required: true
    # A `required:` input still carries a `default:` here so the skeleton
    # RUNS the moment it is scaffolded. Replace the default with your job;
    # `--var goal=…` overrides it at any time.
    default: "<SLOT: what the agent must accomplish>"
    description: "What the agent must accomplish"   # SLOT
```

The pinned schema text says a `required` input is not satisfied by `default` (the caller must supply a value). The released 0.124.3 engine still applies `default:` when the key is omitted. That is a source-versus-implementation discrepancy ([nika-spec#348](https://github.com/supernovae-st/nika-spec/issues/348)), not one law. Prefer `required: false` plus `default:` for knobs, and required without `default:` for caller-owned values (`NIKA-1708` at run).

### Templates containing this field

| Template | Source |
| - | - |
| `templates/agent-loop.nika` | [Line 37](https://github.com/supernovae-st/nika-spec/blob/4e259e5b8012fcdf92f094142a52dfef24099b85/templates/agent-loop.nika#L37) |
| `templates/aggregate-by-key.nika` | [Line 33](https://github.com/supernovae-st/nika-spec/blob/4e259e5b8012fcdf92f094142a52dfef24099b85/templates/aggregate-by-key.nika#L33) |
| `templates/bounded-batch.nika` | [Line 31](https://github.com/supernovae-st/nika-spec/blob/4e259e5b8012fcdf92f094142a52dfef24099b85/templates/bounded-batch.nika#L31) |
| `templates/classify-and-route.nika` | [Line 31](https://github.com/supernovae-st/nika-spec/blob/4e259e5b8012fcdf92f094142a52dfef24099b85/templates/classify-and-route.nika#L31) |
| `templates/corpus-qa.nika` | [Line 105](https://github.com/supernovae-st/nika-spec/blob/4e259e5b8012fcdf92f094142a52dfef24099b85/templates/corpus-qa.nika#L105) |
| `templates/deduplicate-records.nika` | [Line 33](https://github.com/supernovae-st/nika-spec/blob/4e259e5b8012fcdf92f094142a52dfef24099b85/templates/deduplicate-records.nika#L33) |
| `templates/document-to-fields.nika` | [Line 67](https://github.com/supernovae-st/nika-spec/blob/4e259e5b8012fcdf92f094142a52dfef24099b85/templates/document-to-fields.nika#L67) |
| `templates/evaluate-and-optimize.nika` | [Line 44](https://github.com/supernovae-st/nika-spec/blob/4e259e5b8012fcdf92f094142a52dfef24099b85/templates/evaluate-and-optimize.nika#L44) |
| `templates/media-asset-pack.nika` | [Line 62](https://github.com/supernovae-st/nika-spec/blob/4e259e5b8012fcdf92f094142a52dfef24099b85/templates/media-asset-pack.nika#L62) |
| `templates/parallel-review.nika` | [Line 59](https://github.com/supernovae-st/nika-spec/blob/4e259e5b8012fcdf92f094142a52dfef24099b85/templates/parallel-review.nika#L59) |
| `templates/project-public-fields.nika` | [Line 34](https://github.com/supernovae-st/nika-spec/blob/4e259e5b8012fcdf92f094142a52dfef24099b85/templates/project-public-fields.nika#L34) |
| `templates/recover-optional-file.nika` | [Line 48](https://github.com/supernovae-st/nika-spec/blob/4e259e5b8012fcdf92f094142a52dfef24099b85/templates/recover-optional-file.nika#L48) |
| `templates/snapshot-diff.nika` | [Line 34](https://github.com/supernovae-st/nika-spec/blob/4e259e5b8012fcdf92f094142a52dfef24099b85/templates/snapshot-diff.nika#L34) |
| `templates/validate-records.nika` | [Line 31](https://github.com/supernovae-st/nika-spec/blob/4e259e5b8012fcdf92f094142a52dfef24099b85/templates/validate-records.nika#L31) |
| `templates/website-brief.nika` | [Line 74](https://github.com/supernovae-st/nika-spec/blob/4e259e5b8012fcdf92f094142a52dfef24099b85/templates/website-brief.nika#L74) |

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:type`. Spec revision: [`4e259e5b8012`](https://github.com/supernovae-st/nika-spec/tree/4e259e5b8012fcdf92f094142a52dfef24099b85).

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