the standard library
nika:done
Mark the current agent loop complete (the loop-completion sentinel · agent loops only). One of 28 builtins in the closed nika: namespace.
the core familycontrol flow and run-stream primitives
- corefamily6 tools
- 1argsdeclared contract
- 0requiredall optional
- 1skeletonsship this tool
the contract
1 args · 0 requiredA missing required arg is a nika check finding before anything runs; the vocabulary below comes from the binary itself (nika catalog --tools --json), not from prose.
- result
- optional final value (any JSON)
in a real file
from the agent-loop skeleton execute: with: steps: ${{ tasks.plan.output.steps }} agent: # Say what the JOB is. Do NOT describe the output shape. # # The engine binds `schema:` to the FINAL answer: a free-text answer # that does not conform is RE-ASKED with the schema wired, bounded by a # retry budget. Measured on ollama/qwen3.5:4b — this task, with zero # shape instruction, returns a clean typed object. # # Hand-instructing "reply with the object, then call nika:done" is # actively harmful: a `nika:done` carrying `result:` is validated # DIRECTLY and is NEVER re-asked (nika-verb-agent/src/lib.rs · "a miss # is a verdict, never a re-ask"), so a model that hands its JSON back # as a *string* dies NIKA-INFER-002 with the budget already spent. # Measured twice on that exact instruction. Let the engine own shape. system: "You are a careful analyst. Work the plan step by step and report what you actually found." # SLOT prompt: "Plan · ${{ with.steps }}" tools: # SLOT: the MINIMUM grant for the job # Pure compute — this pair needs no filesystem, so the skeleton runs # anywhere. Granting the agent a tool here is only HALF a grant: every # call still crosses the workflow boundary above. Adding `nika:read` # to this list WITHOUT adding `permits.fs.read` fails at run with # `NIKA-SEC-004 · agent tool "nika:read" refused by the security # boundary` — measured, mid-loop, after the turns are paid for. - "nika:jq" - "nika:done" # the early-exit sentinel · loop-owned max_turns: 15 # SLOT: the loop bound max_tokens_total: 80000 # SLOT: the spend bound schema: # SLOT: the typed final-message contract type: object additionalProperties: false required: [findings] properties: findings: { type: array, items: { type: string } }a verbatim excerpt, real line numbers from agent-loop.nika.yaml, conformance-gated upstream on every spec push. open the full skeleton →
cross-references
ships in skeletons
the check gates
the core family
6 toolscontrol flow and run-stream primitives.
Machines read the same vocabulary at /tools/catalog.json; the contract lives in spec 06 · stdlib. Install and ask the binary itself: nika catalog --tools. Read the spec →