v:
nika check, nika run, nika doctor, nika lsp,
and nika mcp ship in the binary. Run nika init once per repo for schema
and agent rules.Goal
Write a.nika.yaml file, run it, get structured output. No setup beyond
nika installed. Your first run needs no API key and no model server.
1. Pick how the AI step runs
Three paths, from zero-setup to production: Instant (no model at all): the built-inmock/echo model returns a
deterministic response, so you can see a workflowβs shape right now:
nika doctor tells you exactly whatβs wired and how to fix
what isnβt:
2. Write the workflow
Createhello.nika.yaml:
hello.nika.yaml
nika: v1declares the workflow language + pins the contract version (a single version marker Β·v1forever).workflow:is an object βid:(kebab-case) names the run.tasks:is a map keyed by task id; each task declares one verb (here,infer).
3. Check it, then run it
nika check catches broken references, missing dependencies and schema
problems before any model is called, and points at the exact fix:
Example output:
Read the story back (0.98+)
nika explain <file> narrates any checked workflow β the waves, the
cost before a token is spent (an unbounded task reads FLOOR, a
local model reads unpriced β not Β« free Β» β the whole vocabulary
lives in Cost honesty), what it touches, and
the flight recorder hand-off. Captured verbatim against the released
0.107.0 on the chain skeleton after one recorded run:
max_tokens: 800) β the uncapped
part is the unpriced local model, and the report says so instead of
printing a fake $0. Swap in any priced cloud seat and the same report
reads β€ $0.0005 worst case Β· β₯ $0.0005 cheapest path β a hard
ceiling.
4. Add a second task that depends on the first
hello.nika.yaml
with: block. Each ${{ tasks.X.* }} reference in it is a
binding: it names the data the task consumes
(${{ with.greeting }} in the prompt) and declares the edge that
orders it β greet β critique, one declaration, no invisible edges. The
engine injects the value at runtime, with explicit taint tracking.
The graph you just built
Onewith: binding and the order falls out of the file. Tasks with no
edge between them run in parallel automatically. You never schedule
anything. (For an ordering with no data β run the deploy after the tests,
consume nothing β use after: { tests: success }, the control door.)
5. Get structured output
hello.nika.yaml
What you just built
- Workflows are YAML files:
.nika.yaml. - Tasks are units of work; the map key is the identity.
- Four verbs (
infer,exec,invoke,agent) define what each task does (HTTP fetch is thenika:fetchbuiltin underinvoke). with:(data) andafter:(control) build the DAG β the binding IS the edge.${{ tasks.X.output }}crosses a task boundary inwith:; the body reads${{ with.<name> }}, with taint tracking.schema:enforces JSON schemas on AI output.
Next checks
1
Check before running
nika check hello.nika.yaml: static audit before any token or effect.2
Inspect the DAG
nika inspect hello.nika.yaml (add --format mermaid|dot|json for the machine projections).3
Wire your agent
Run
nika wire cursor or nika wire all for explicit MCP setup, or use
the editor extensionβs agent setup.Read next
Examples Β· real jobs
Climb the ladder: starter chains to multi-agent swarms, every file
conformance-validated.
How to write Nika
The twelve patterns: where the determinism lives, where the model
is allowed to think.
The 4 verbs
Deep dive on
infer, exec, invoke, agent.Bindings
How data flows between tasks with taint tracking.
Providers
Why one
InferRequest works across providers.Live state
Which verbs are admitted today.