{"slug": "nika-intent-as-code-for-ai-workflows", "title": "Nika – Intent as Code for AI Workflows", "summary": "Nika is a new open-source workflow language for AI that turns repeatable AI tasks into portable, auditable files. The tool, built as a single Rust binary, allows users to define workflows with four verbs and run them locally on any LLM without cloud dependency, with static auditing before execution.", "body_md": "Intent as Code.The workflow language for AI: one file, 4 verbs, one binary.\n\nUseful AI work shouldn't disappear into chats. **Nika turns repeatable AI\nwork into files you can run, review, diff and share.** If you do the same\nAI task twice, make it a workflow.\n\nA Nika workflow is just a file: readable, portable, verifiable. It runs\nlocally, on whichever LLM you choose, with no cloud required. The language\nis an open [Apache-2.0 spec](https://github.com/supernovae-st/nika-spec);\nthis repo is the reference engine, a single Rust binary (AGPL-3.0). The\nway SQL pairs with PostgreSQL, or the Dockerfile with Docker.\n\nYes.\n\n```\nbrew install supernovae-st/tap/nika    # or: curl -LsSf https://nika.sh/install.sh | sh\nnika examples run 01-hello --model mock/echo            # zero setup: no key, no model server\nnika examples run 01-hello --model ollama/qwen3.5:4b    # got Ollama? the same run, real + local\n```\n\nNika audits a workflow **before a single token is spent** (plan, cost\nceiling, secret flows, types, tool args), then runs it:\n\n``` bash\n$ nika check brief.nika.yaml\n ✔ PLAN     2 wave(s) · 2 task(s) · max parallelism 1\n ✔ SECRETS  no information-flow escapes\n ✔ TYPES    every deep output reference fits its declared shape\n ✔ TOOLS    every nika: tool names a canonical builtin\n ✔ ARGS     every invoke arg key is declared + every required arg is present\n ✔ SCHEMA   every authored schema: is satisfiable\n ✔ clean — audited before a single token was spent\n\n$ nika run brief.nika.yaml\n  🦋 nika · daily-brief · 2 tasks\n  ✔  fetch_notes  exec · cat\n  ✔  brief        infer · ollama/llama3.2:3b\n  ── 2/2 done · $0.000 · elapsed 16.2s ───────────────────────────\n# review.nika.yaml: read a PR diff, judge its risk, comment only when it's high.\nnika: v1\nworkflow: pr-risk-review\nmodel: ollama/qwen3.5:9b             # local by default. swap to any provider\n\ntasks:\n  - id: diff                          # exec: a read-only shell command\n    exec:\n      command: \"git diff origin/main...HEAD\"\n      capture: structured\n\n  - id: assess                        # infer: structured LLM judgment\n    with: { patch: ${{ tasks.diff.output.stdout }} }\n    infer:\n      prompt: \"Risk-assess this diff (secrets, breaking changes, missing tests). Be terse.\\n${{ with.patch }}\"\n      schema:\n        type: object\n        required: [risk]\n        properties:\n          risk: { type: string, enum: [low, medium, high] }\n\n  - id: comment                       # invoke: the only write, gated on the verdict\n    when: ${{ tasks.assess.output.risk == 'high' }}\n    invoke:\n      tool: \"mcp:github/pr-comment\"\n      args: { body: ${{ tasks.assess.output }} }\n```\n\n`nika check`\n\nis a static audit. It catches broken references, missing\ndependencies, schema and permission problems **before any model is called**\n— and when something is off, it points at the exact fix:\n\nThe two fixtures behind this capture live in\n[ scripts/media/fixtures/](/supernovae-st/nika/blob/main/scripts/media/fixtures), gated in both\ndirections by\n\n`scripts/media/validate-media.sh`\n\n: the broken one must keep\nfailing `nika check`\n\n, the fixed one must stay clean.The same audit holds the workflow's **declared blast radius**. A `permits:`\n\nblock makes the file itself the security boundary — hosts, paths, programs,\ntools, all default-deny once declared. A task that reaches beyond it is\ncaught statically, with the machine-applicable fix, before anything runs:\n\nAnd failure handling is part of the file, not an ops runbook. When a task\ndies, `on_error: recover:`\n\ndegrades to a declared fallback — the run\ncompletes, and the output says what it is:\n\n`nika:image_generate`\n\nrenders through the same discipline as everything\nelse — a declared `permits:`\n\nboundary gates every save, the run ledger\nmeters real spend, and provenance is structural, not a promise:\n\n**Local-first**—`provider: local`\n\nspeaks the OpenAI-images wire any self-hosted server exposes (LocalAI · Ollama · stable-diffusion.cpp · SGLang · vLLM-Omni). The base URL is engine config, never workflow data. Clouds when you choose:`openai`\n\n·`gemini`\n\n·`xai`\n\n— and`mock`\n\nrenders real, decodable PNG files offline for CI.**Provenance survives**— every saved PNG carries a`cp`\n\n`nika`\n\ntEXt chunk (tool · engine · provider · model · prompt · seed), the practice ComfyUI and InvokeAI standardized and no other workflow engine ships. The sidecar manifest adds sha256, resolved request and timing.**Honesty is enforced**— magic bytes beat declared MIME types, lossy provider mappings warn loudly, a provider returning fewer images than asked is a visible`count_shortfall:`\n\n, result URLs are**never** fetched, and base64 never rides workflow outputs — assets, not blobs.**Real spend in the ledger**— a render's exact cost (xAI bills in ticks) lands on the task line and the run total, the same honest-spend channel`infer:`\n\nuses.\n\n```\nnika inspect flow.nika.yaml          # anatomy · tasks · waves · cost floor\nnika check flow.nika.yaml            # the audit · exit 0 clean · 2 findings\nnika explain NIKA-VAR-001            # any code · cause · category · fix-form\nnika run flow.nika.yaml --var topic=rust   # launch inputs · repeatable\nnika test flow.nika.yaml --update    # pin the golden · then `nika test` = offline CI\nnika run flow.nika.yaml --task hero    # regenerate ONE task + its upstream cone\nnika run flow.nika.yaml --resume .nika/traces/<run>.ndjson   # skip journaled successes\nnika run flow.nika.yaml --resume <trace> --answer approve=true  # re-arm a paused gate\nnika trace show .nika/traces/<run>.ndjson   # re-render any past run\nnika doctor --ping                   # are the local servers actually listening?\n```\n\nEvery run writes its own journal to `.nika/traces/`\n\n(opt out per run with\n`--no-trace-file`\n\n, globally with `NIKA_NO_TRACE_FILE`\n\n) — `--resume`\n\nand\n`nika trace`\n\nread it directly. A paused run exits `4`\n\n(a blocking\n`nika:prompt`\n\njournals its question); cache hits on resume are always\nvisible — nothing is skipped silently.\n\nThe binary embeds a versioned pack of runnable examples. Browse with\n`nika examples list`\n\n, read one with `nika examples show <slug>`\n\n, preview any\nof them with `--model ollama/qwen3.5:4b`\n\n(or offline with `--model mock/echo`\n\n):\n\n| I want to… | Run | For |\n|---|---|---|\n| Review a PR before merging |\n`examples/pr-risk-review.nika.yaml` |\n\n`nika examples run showcase/t1-meeting-actions`\n\n`nika examples run showcase/t1-standup-digest`\n\n`nika examples run showcase/t2-release-notes`\n\n`nika examples run showcase/t2-support-triage`\n\n`nika examples run showcase/t2-invoice-chaser`\n\n`nika examples run showcase/t3-competitor-radar`\n\n`nika examples run showcase/t3-resume-screener`\n\n`nika examples run showcase/t4-ceo-monday-brief`\n\nThe full gallery (27 workflows + 6 templates) lives in\n[ examples/](/supernovae-st/nika/blob/main/examples): foundation patterns, business showcases, and the\nskeletons\n\n`nika new --from <template>`\n\ninstantiates.Shared workflows live on [ nika-registry](https://github.com/supernovae-st/nika-registry) —\nevery entry pinned to a full commit + sha256 and re-proven by CI (the\nconformance oracle + this engine's static certificate: exec · tools ·\ncost, visible before anything runs).\n\n`nika add`\n\nis on the roadmap; today\nthe registry's `get.py`\n\ndoes resolve → verify → audit in one command.Four verbs, and nothing else. A small core that composes into arbitrary real-world workflows. The Unix and SQL discipline of \"small surface, large composition.\"\n\n| Verb | What it does |\n|---|---|\n`infer` |\nCall an LLM. Any provider, local or hosted |\n`exec` |\nRun a shell command |\n`invoke` |\nCall a tool or MCP server (an HTTP fetch, GitHub, a builtin…) |\n`agent` |\nRun an autonomous loop with tools, until the task is done |\n\nEverything sits under one frozen, versioned envelope, `nika: v1`\n\n, that won't\nbreak. Three properties hold across every workflow:\n\n**Provider-agnostic, local-first.** Local Ollama or LM Studio, or any API. Your workflow doesn't change when the model does.**Safe by construction.** A read-XOR-write capability model. A step that reads cannot silently write; every effect is explicit and gated.**Reproducible.** The file and its execution trace are an auditable, re-runnable record.\n\n```\nflowchart LR\n    F[\"workflow.nika.yaml<br/><i>portable · readable · verifiable</i>\"] --> E[\"<b>nika</b><br/>single Rust binary\"]\n    E -->|infer| L[\"LLMs<br/>Ollama · LM Studio · any API\"]\n    E -->|exec| S[\"shell\"]\n    E -->|invoke| T[\"tools · MCP\"]\n    E -->|agent| A[\"autonomous loop\"]\n```\n\nDependencies make every workflow a graph: independent tasks run in\nparallel, an `agent`\n\nstep fans out, joins wait for every branch — and the\nwhole plan is known, costed and audited before execution starts:\n\nThe closest analogues aren't products. They're **standards**. SQL. The\nDockerfile. A portable specification with a reference engine. The language is\nthe contribution, not a product to sell.\n\nAs AI agents start acting on the real world, the interface where they act\ncan't be free text (too vague) or raw code (too risky). It has to be a\n**verifiable action language**: one an AI writes, a human reviews and approves,\nand a machine runs deterministically. Kept open and sovereign, not locked\ninside one vendor's cloud.\n\nWhat no existing workflow tool offers together: a single Rust binary · portable declarative YAML · local-first · read-XOR-write capability security · AGPL · no cloud required · bring-your-own-LLM.\n\nNika is built in the open.\n\nThe **language** (the `nika: v1`\n\nenvelope and its four verbs) is stable and\nwon't break. The **engine** is a strict, modular Rust workspace. The latest\ntagged public release is **v0.91.0**; `main`\n\nmoves immediately to the next\n`-dev`\n\nversion after each release so local contributor binaries cannot be\nconfused with Homebrew assets. The 1.0.0 launch remains gated by the release\nchecklist, not by a date. The code, the\n[spec](https://github.com/supernovae-st/nika-spec), and the\n[example workflows](/supernovae-st/nika/blob/main/examples) are all readable, and development happens on\n`main`\n\nin the open.\n\nThe `nika: v1`\n\nlanguage envelope is frozen forever. It is a separate axis from the\nengine version. Every release is complete for its declared scope; no\nhalf-features parked behind a future version.\n\nInstall (macOS · Linux):\n\n```\n# Homebrew (macOS · Linux): on your PATH immediately\nbrew install supernovae-st/tap/nika\nnika --version\n\n# …or, without Homebrew: the install script. It downloads the verified release\n# binary into ~/.nika/bin and prints the single PATH line to add to your shell\n# profile (then reopen the terminal, or `source` it, and `nika --version` works).\ncurl -LsSf https://nika.sh/install.sh | sh\n```\n\nPrefer a guided page? Every install path, step by step: [nika.sh/install](https://nika.sh/install).\n\nFully manual / air-gapped? Download the platform tarball +\n\n`SHA256SUMS`\n\nfrom the[latest release], verify with`sha256sum -c SHA256SUMS --ignore-missing`\n\n, then move`nika`\n\nonto your`PATH`\n\n.\n\nYour first workflow runs with **zero setup**: no model, no API key:\n\n```\ncat > hello.nika.yaml <<'YAML'\nnika: v1\nworkflow: hello\ntasks:\n  - id: greet\n    exec:\n      command: \"echo hello from nika\"\nYAML\n\nnika check hello.nika.yaml   # static audit, before a single token is spent\nnika run hello.nika.yaml     # execute locally\n```\n\nAdding an AI step? Point it at a local model and nothing leaves your machine:\n\n```\nmodel: ollama/llama3.2:3b    # local · or mistral/..., anthropic/..., any provider\ntasks:\n  - id: greet\n    infer:\n      prompt: \"Say hello in one sentence.\"\n```\n\n(No model handy? The built-in `mock/echo`\n\npreviews any workflow offline.)\n\nFor real inference, run a local model (Ollama / LM Studio) or set a provider key, then see what's wired:\n\n```\nnika doctor                  # provider keys + local servers, with the exact fix\nnika init                    # schema wiring + AGENTS.md for this repo\nnika wire cursor             # explicit MCP wiring · also: vscode · windsurf · claude · codex · zed · all\nnika examples list           # browse the embedded examples\nnika examples run 01-hello --model ollama/llama3.2:3b   # a real local run\n```\n\nFrom source (contributors): `git clone https://github.com/supernovae-st/nika.git && cd nika && cargo test --workspace --lib`\n\n. End-user docs: [docs.nika.sh](https://docs.nika.sh).\n\nNika is built to be **written by agents and reviewed by you**. `nika init`\n\ndrops the schema wiring, `AGENTS.md`\n\n, the Cursor rule and a repo-level\n[agent skill](https://agentskills.io) into your repo so Claude Code, Cursor,\nCodex and friends author valid workflows on the first try. `nika wire <cursor|vscode|windsurf|claude|codex|all>`\n\npoints each client's MCP config at\nthe engine — idempotent, and it preserves your other servers. `nika mcp`\n\nexposes a read-only oracle — 8 tools, `nika_check`\n\nand `nika_explain`\n\nthrough\n`nika_catalog`\n\nand `nika_tools`\n\n— any MCP client can call. `nika lsp`\n\nspeaks LSP to every editor.\n\nOr install everything as a plugin — this repo hosts one plugin (the\n`nika-authoring`\n\nskill + the MCP oracle) for both ecosystems:\n\n```\ncodex plugin marketplace add supernovae-st/nika-agents && codex plugin add nika@nika\nclaude plugin marketplace add supernovae-st/nika-agents && claude plugin install nika@nika\n```\n\nAgents discover a working prompt chain once; Nika keeps it as a file your team can check, run and replay.\n\nDo you repeat an AI task every week, in ChatGPT, Claude, Cursor, Codex, or\nscripts? Describe it at [nika.sh/convert](https://nika.sh/convert) or\n[open a \"convert my workflow\" issue](https://github.com/supernovae-st/nika/issues/new/choose).\nWe convert the best ones into runnable `.nika.yaml`\n\nexamples, credited to you.\n\nThis repo is the **engine**. It ships the language server (`nika lsp`\n\n, over stdio).\nThe VS Code / Cursor / Windsurf / VSCodium **extension** lives in its own repo and\nis published as [ supernovae.nika-lang](https://marketplace.visualstudio.com/items?itemName=supernovae.nika-lang)\n(and on\n\n[Open VSX](https://open-vsx.org/extension/supernovae/nika-lang)for Cursor / Windsurf / VSCodium):\n\n- Install it from your editor's marketplace. It auto-downloads the matching\n`nika`\n\nrelease binary on first use (or reuses the`nika`\n\nalready on your`PATH`\n\n). - Source + issues:\n[supernovae-st/nika-vscode](https://github.com/supernovae-st/nika-vscode). - Any other editor:\n`nika lsp`\n\nspeaks LSP over stdio. Wire it into any LSP client.\n\n**Language spec**:[supernovae-st/nika-spec](https://github.com/supernovae-st/nika-spec)(Apache-2.0), the runtime-agnostic Nika language.** End-user docs**:[docs.nika.sh](https://docs.nika.sh).** Website**:[nika.sh](https://nika.sh).** Examples**:, the embedded gallery (also`examples/`\n\n`nika examples list`\n\n).\n\n**Building Nika?** The engine is crafted under a strict workspace discipline:\ncontext-window-sized crates, a per-crate admission checklist, zero `.unwrap()`\n\nin `src/`\n\n(CI-enforced), downward-only layering. The design lives in\n[ docs/architecture/](/supernovae-st/nika/blob/main/docs/architecture) and the decisions in\n\n[; the roadmap is in](/supernovae-st/nika/blob/main/docs/adr/README.md)\n\n`docs/adr/`\n\n[.](/supernovae-st/nika/blob/main/ROADMAP.md)\n\n`ROADMAP.md`\n\nThe **engine** is AGPL-3.0-or-later (see [ LICENSE](/supernovae-st/nika/blob/main/LICENSE)): modify it and\nrun it as a hosted service, and users of that service get the source. The\n\n**spec** is\n\n[Apache-2.0](https://github.com/supernovae-st/nika-spec), maximally permissive for a standard.\n\nA commercial license (Grafana model) is available for organizations that can't\naccept AGPL's network clause. Contact `contact@supernovae.studio`\n\n. Security\nreports: `security@supernovae.studio`\n\n.\n\n© 2024–2026 [SuperNovae Studio](https://supernovae.studio) · 🦋 Nika, the\nbutterfly on the SuperNovae flag. *Prompt once. Run forever.*", "url": "https://wpnews.pro/news/nika-intent-as-code-for-ai-workflows", "canonical_source": "https://github.com/supernovae-st/nika", "published_at": "2026-07-08 21:30:00+00:00", "updated_at": "2026-07-08 21:42:30.507798+00:00", "lang": "en", "topics": ["developer-tools", "artificial-intelligence", "large-language-models", "ai-tools", "ai-infrastructure"], "entities": ["Nika", "Supernovae", "Ollama", "Apache-2.0", "AGPL-3.0", "GitHub", "LocalAI", "vLLM-Omni"], "alternates": {"html": "https://wpnews.pro/news/nika-intent-as-code-for-ai-workflows", "markdown": "https://wpnews.pro/news/nika-intent-as-code-for-ai-workflows.md", "text": "https://wpnews.pro/news/nika-intent-as-code-for-ai-workflows.txt", "jsonld": "https://wpnews.pro/news/nika-intent-as-code-for-ai-workflows.jsonld"}}