Skip to main content
Put repeatable AI work in your app. Nika turns a task you would re-do in a chat — summarize, triage, draft, report — into one .nika file: reviewable in a pull request, checked before anything executes, and callable from TypeScript. The first run needs no account, no API key and no server.

Your first result

Requires Node.js 22+ on macOS or Linux (arm64/x64).
Save hello.nika:
Save demo.mjs:
Expected output, exactly:
Your app asked; the engine admitted the file, ran it, and returned typed outputs. mock/echo is a rehearsal model — it echoes the prompt so the mechanics are real before you spend anything. Swap model: for a provider from the catalog when you want a real answer. Prefer the terminal? The CLI runs the same file: nika run hello.nika. Install the CLI · write the file by hand.

A real job, when you are ready

Meeting actions turns a transcript into typed, tracker-ready action items. It defaults to a local model (ollama/qwen3.5:4b, no provider key — your own compute); point it at a cloud provider and nika check prices the run before anything executes. Same file shape as above; the model and tools change, the lifecycle does not.

What just happened, one concept at a time

  1. The file is the contract. The verbs infer, exec, invoke and agent — nothing else: fetching a URL or writing a file is a tool under invoke, declared and auditable.
  2. Admission before execution. run() audits the file before anything executes; a broken file throws before a run exists. nika check is the same audit on its own, for CI.
  3. Permits are the blast radius. permits: {} declares zero authority. A workflow that touches a file, a host or a shell must say so, or admission refuses it (NIKA-AUTH-006).
  4. Runs leave evidence. Each run writes a hash-chained trace under .nika/traces/; when a receipt is present, traceVerify reads it back. Verification proves the record was not tampered with — not that a model was right.

Ask the file three questions

The run refuses to start — the CLI exits 3 naming the missing key (NIKA-1708), the SDK throws NikaOperationError. Nothing is half-executed; a red admission never becomes a run.
The task that needs it is refused at check. An absent permits: block means zero authority — effects stay refused until the file declares them (NIKA-AUTH-006). nika check --infer-permits drafts the tightest block for you.
One line. mock/echo rehearses offline, ollama/qwen3.5:4b runs locally, cloud providers take their env key. The file, the check and the receipt keep the same shape — check re-prices the run for the new seat.

Where next

SDK quickstart

Checks, live events, inputs and receipt verification — the full typed lifecycle on the published npm package.

First workflow

Write a workflow by hand: tasks, bindings, structured output.

Examples · real jobs

Starter chains to multi-step reports, every file runnable.

Providers

Local-first model choice: Ollama needs no provider API key, cloud providers when you need them.
These docs track the current stable engine, v. The npm package releases on its own channel; each page names the channel it means.

The Nika ecosystem

🦋