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

# Meeting actions

> T1 starter · every office job: transcript in, tracker-ready typed action items out.

> **T1 starter · every office job**: the first example with
> `infer.schema:`. The model doesn't get to answer in prose. It returns
> the JSON shape you declared, or the engine rejects it.

## The job

The meeting ended an hour ago and nobody remembers who owns what. The
transcript is sitting in a file. This workflow extracts every action
item as `{owner, task, due}`: typed, validated, importable by whatever
tracker you use.

## The shape

```mermaid theme={"system"}
flowchart LR
  transcript["transcript · nika:read"]:::invoke
  extract["extract · typed"]:::infer
  save["save · nika:write"]:::invoke
  trace["trace · nika:log"]:::invoke
  transcript --> extract
  extract --> save
  save -.->|success| trace
  classDef infer fill:#5b8cff22,stroke:#5b8cff,color:#5b8cff
  classDef invoke fill:#22d3ee22,stroke:#22d3ee,color:#22d3ee
```

## The file

```yaml meeting-actions.nika theme={"system"}
nika: meeting-actions

# The house seat — a THINKING model: the think block and the JSON both count
# against `max_tokens` (engine#428), so a schema call sizes its ceiling for
# think + answer, never for the answer alone.
model: ollama/qwen3.5:4b

inputs:
  transcript_path:
    type: string
    default: "examples/fixtures/meeting-transcript.txt"
    description: "Path to the raw meeting transcript"
permits:
  tools: ["nika:log", "nika:read", "nika:write"]
  fs:
    # The sample transcript, named as a LITERAL. `permits:` cannot interpolate
    # (NIKA-AUTH-007), so this line does not follow `inputs.transcript_path`
    # around: pointing the var at your own file means editing this entry too,
    # or the read is refused at run with NIKA-SEC-004. That is the wall doing
    # its job — a boundary you can read is a boundary a reviewer can check.
    read: ["examples/fixtures/meeting-transcript.txt"]
    write: ["out/action-items.json"]

tasks:
  transcript:
    invoke:
      tool: "nika:read"
      args: { path: "${{ inputs.transcript_path }}" }

  extract:
    with:
      transcript: ${{ tasks.transcript.output }}
    infer:
      # a reasoning model needs 16384 here, or a documented run.reasoning.effort: low
      max_tokens: 3000                 # think block + the actions JSON · a ceiling makes the cost report a number, not UNBOUNDED
      prompt: |
        Extract every action item from this meeting transcript ·
        ${{ with.transcript }}
        One entry per commitment somebody actually made. `due` only when a
        date or deadline was stated — never invent one.
      schema:                          # the contract the model must satisfy
        type: object
        additionalProperties: false
        required: [actions]
        properties:
          actions:
            type: array
            items:
              type: object
              additionalProperties: false
              required: [owner, task]
              properties:
                owner: { type: string }
                task: { type: string }
                due: { type: string }

  save:
    with:
      extract_actions: ${{ tasks.extract.output.actions }}
    invoke:
      tool: "nika:write"
      args:
        # `.json` content is ONE interpolation of a real value — the engine
        # serializes it. Typing `{ "actions": ${{ … }} }` by hand emits
        # unquoted fields and the artifact stops being JSON.
        path: out/action-items.json
        content: "${{ with.extract_actions }}"
        create_dirs: true

  trace:
    after:
      save: success
    invoke:
      tool: "nika:log"
      args:
        level: info
        message: "Action items extracted to out/action-items.json"

outputs:
  actions:
    value: ${{ tasks.extract.output.actions }}
    description: "Typed action items, tracker-ready"
```

## How it works

**1. A typed input with a default**

`transcript_path` is `type: string` with a `default:` path — the
caller may omit it. The engine still validates the value before any
task runs. There is no `required: true` on this input.

**2. The schema IS the contract**

`infer.schema:` is standard JSON Schema. The model must return a
matching object. On violation the engine rejects (and may retry).
Downstream tasks index into it directly: `${{ tasks.extract.output.actions }}`.

**3. Write, then a success-only log**

`save` writes the JSON. `trace` is not a parallel sibling: it runs
`after: { save: success }` — only if the write succeeded.

## Constructs you just used

| Construct | Where | Reference |
| - | - | - |
| typed `inputs:` | `transcript_path` | [YAML syntax](https://docs.nika.sh/reference/yaml-syntax.md) |
| `infer.schema:` | `extract` | [The 4 verbs](https://docs.nika.sh/concepts/verbs.md) |
| schema-path indexing | `save.args.content` | [Bindings](https://docs.nika.sh/concepts/bindings.md) |
| `nika:log` | `trace` | [Builtins](https://docs.nika.sh/reference/builtins.md) |

## Run it

> [!NOTE]
>
> **What it needs:** A local model ([Ollama](https://ollama.com) serving `qwen3.5:4b`) and the sample transcript.

**1. Rehearse it**

```bash theme={"system"}
nika try meeting-actions
```

A mock model answers, the sample files come with it, and nothing is written in your folder.

**2. Get your own copy**

Save the file above as `meeting-actions.nika` in a new folder, then download the sample it reads:

```bash theme={"system"}
FIXTURES=https://raw.githubusercontent.com/supernovae-st/nika/v0.124.3/crates/nika-pack/pack/examples/fixtures
mkdir -p examples/fixtures
curl -fsSLo examples/fixtures/meeting-transcript.txt "$FIXTURES/meeting-transcript.txt"
```

**3. Check it, then run it**

```bash theme={"system"}
nika check meeting-actions.nika
nika run meeting-actions.nika --model mock/echo   # a mock model, no key
ollama pull qwen3.5:4b   # once, for the real run
nika run meeting-actions.nika
```

The run writes `out/action-items.json`.

Any other model works: pass `--model <provider>/<name>` with its key, and cap a cloud model with `--max-cost-usd`.

`--var transcript_path=…` points it at your own meeting; add that path to `permits.fs.read` too, or the read is refused at run (`NIKA-SEC-004`).

## Make it yours

* Add `due` to the `required:` list if your team always sets deadlines.
* Chain a `nika:notify` task that posts each owner their items.
* Swap the transcript file for a `nika:fetch` of your meeting tool's export API. The schema doesn't change.

> [card] [Next · Price watch](https://docs.nika.sh/examples/price-watch.md)
>
> The next starter has zero model calls: pure tools, bindings and one
> CEL comparison.


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