nika:*
namespace, engine-native (no MCP round-trip, no subprocess), all invoked
the same way:
Canonical source:
nika-spec/stdlib/builtins-v0.1.md β
the Apache-2.0 language spec. The set was curated by the Rams
βless but betterβ sweep (ADR-086/087/088): one super-powerful builtin
with mode args beats five single-purpose ones.Overview
Builtins
tools Β· 5 categories
Extract modes
on
nika:fetchNamespace
nika:* Β· engine-nativeCore (6)
The workflow-control family: speak, signal, guard, ask, finish, pause.| Builtin | What it does |
|---|---|
nika:log | Emit a log entry (debug/info/warn/error) to the event stream β human-readable diagnostic. |
nika:emit | Emit a custom machine event (consumed by subscribers and the journal). log is for humans, emit is for machines. |
nika:assert | Fail the task if a CEL ${{ }} condition is false β the fail-fast guard (when: is the skip-guard). |
nika:prompt | Interactive human confirm β blocks until answered; engines may use default in CI. |
nika:done | Mark the current agent: loop complete and exit β valid only inside an agent tool whitelist. |
nika:wait | Temporal pause β relative duration: XOR absolute until: (ISO 8601), validated at parse time. |
File (5)
| Builtin | What it does |
|---|---|
nika:read | Read a file β returns string content. |
nika:write | Write a file β returns the path; binary upstream values are written as-is. |
nika:edit | In-place find/replace β returns the modified path. |
nika:glob | Glob match β returns an array of paths. |
nika:grep | Recursive grep β returns an array of { path, line, match }. |
Data (8)
jq is THE data language β map, filter, reshape, merge. The other seven
cover what jq genuinely cannot do: diff, validate, delete-on-null merge,
format conversion, generation, time, hashing.
| Builtin | What it does |
|---|---|
nika:jq | Run a jq expression β the single transform-and-extraction language, same jq as output: bindings. |
nika:json_diff | JSON diff β returns RFC 6902 JSON Patch (jq canβt diff). |
nika:validate | Validate data against a JSON Schema β format: json | yaml, returns { valid, errors }. |
nika:json_merge_patch | RFC 7396 merge patch β null deletes a key, the semantics jqβs * merge does not provide. |
nika:convert | Universal format converter β json Β· yaml Β· toml Β· csv, from:/to: mode args. |
nika:uuid | Generate a UUID β v7 default (timestamped/sortable, RFC 9562) or v4. |
nika:date | Timestamp arithmetic β op-discriminated (now/add/subtract/format/parse/diff), timezone-aware, ISO 8601 out. |
nika:hash | Content hashing β default blake3, or sha256/sha512; md5/sha1 are not supported. |
Network (2)
| Builtin | What it does |
|---|---|
nika:fetch | HTTP request + content extraction β extract modes (article, markdown, links, feed, sitemap, selector, text, metadata, jq). Fetching a URL is calling a tool, not a verb. |
nika:notify | Send notifications β channel: enum (webhook/slack/email/discord/sms), one builtin not five. |
Introspection (1)
| Builtin | What it does |
|---|---|
nika:inspect | Workflow introspection β one builtin, four view: modes: cost (running USD by task/provider), records (full execution record), dag_info (nodes/edges/waves), threads (engine pool state, advisory). |
Design rules the set obeys
- One super-powerful builtin, multi-mode args β
fetch+extract,jq,convert,wait,date,inspectall follow the same pattern. No per-direction or per-shape builtin slots. - jq subsumes β anything that is a pure JSON transform is a jq expression, not a builtin. A builtin earns its slot only by doing what jq cannot.
- Additive forever β new builtins may join in stdlib v0.x; existing
arg shapes never break (the language envelope
nika: v1is frozen).
See also
Full stdlib spec
Per-builtin args, error codes (
NIKA-BUILTIN-*), trust classes, and
what jq subsumed out of v0.1.Verbs
How
invoke: dispatches nika:* builtins vs MCP tools.MCP catalog
External tools β the MCP server registry Nika knows by id.
Bindings
Templating that pipes output from one
invoke: to the next.