Language
Kaze
A domain-specific language for bounded agent and device routines, with explicit capabilities and deterministic limits.
On this page6 sections
Kaze is intended to be general-purpose within AI, spanning software and AI-powered physical systems, not all computing. Today's embedded engine supports a narrower set of bounded, indentation-sensitive routines. Capabilities require declarations, grants, policy and an available backend.
The planned direction is one language with human-oriented and machine-oriented source syntaxes sharing semantics and authorization. Machine syntax, conversion and parity are not implemented; the grammar remains open.
What the language covers
A program is an optional needs: line followed by at least one action, check, filter, when, or every item. Blocks open after a colon and continue on indented lines; tabs outside strings and comments are rejected, and # starts a comment. Values are numbers, text, booleans, lists, host-supplied records, points, and nothing. There is no map literal, no field assignment, no break or continue, and no direct routine-to-routine call — use "file.kaze" is an include resolved at compile time.
The embedded engine defaults to 200,000 fuel units, a 256 KiB string arena, a 4 MiB collection heap, a 256-value operand stack, and 255 compiler slots per item. The standalone 1.0 reference documents its own numbers for the same budgets, so read the limits from the engine you are actually running.
Declaring capabilities
Capability families are named in the header. A declaration enables the operation names at check time; it does not grant them at run time.
needs: policy
filter limit_length(text):
if length of text > 120:
reject with "too long"
otherwise:
allow text
Every capability call needs three things: the family in needs:, an explicit host grant (--cap), and a policy that permits the operation. A missing backend is refused rather than simulated — --no-policy leaves capability calls denied, and only an explicitly selected --cap drone=sim or --cap rover=sim supplies test state, which the run report labels as simulated.
Routines, entrypoints, and schedules
action and check routines execute a body and may return a value; falling through returns nothing. A filter must terminate on every path with allow, reject, or return, though a plain return can end it without a verdict. Without --entry, the runner prefers a root main, then the sole root routine, and refuses an ambiguous multi-routine file with E_KAZE_ENTRY.
when and every items are hooks, not entrypoints. They run on supervisor ticks, which are opt-in: ticks default to 0, virtual time starts at zero, and virtual time advances without sleeping unless --pace is passed. An entry and its hooks share one run's VM and fuel budget.
needs: drone
action recover():
try:
arm drone
otherwise with problem:
return problem.code
when link lost for 3 seconds:
return to launch
The front end checks that example without executing it. Running the hook needs a drone grant, a policy, and a configured backend.
action main(amount):
let total = 0
for each value in [1, 2, 3]:
set total to total + value
return total + amount
sofuu script run example.kaze --arg amount=4 --json reports the rendered result 10.
Commands
| Command | Purpose |
|---|---|
sofuu script run agent.kaze | Parses, checks, compiles, and executes a routine. Accepts --entry, --arg name=value, --cap, --policy, --fuel, --ticks, and --sim. |
sofuu script check agent.kaze | Parses and checks without executing. --json reports item, capability, and constant counts. |
sofuu script compile agent.kaze -o agent.kazebc | Emits embedded-engine bytecode. Without -o the command prints the size and writes no file. |
sofuu script repl | Interactive session over the same engine, with .needs, .cap, .run, and .clear. |
sofuu compile agent.kaze -o agent | Packages a supported routine as a standalone executable. |
Configuration for compiled agents
A Sofuu-compiled agent resolves a routine parameter in this order: --arg name=value or a positional value, then AGENT_<PARAM> or SOFUU_*, then --config <path> or ./agent.config.json. Missing parameters are reported as E_KAZE_PARAM on the current source.
The standalone kaze CLI has different configuration support: it has no --config option, and it does not bind AGENT_* or SOFUU_* to routine parameters. Use --arg there.
Status
Selected embedded paths have recorded real model-and-authorized-MCP journeys on local debug builds, using a remote provider and separately existing local GGUF weights. Unavailable backends fail; physical drone/rover simulation must be explicitly selected and labelled. This does not verify published artifacts, other providers, the separate standalone engine or physical hardware.