Local quickstart
Requires Node.js 20+, about 2–3 GB of free RAM, and a one-time ~1.7 GB model download for native Laya.
Install the CLI
Section titled “Install the CLI”npm install --global @banh/cli@alphabanh --version # 0.1.0-alpha.1Pin the exact version with @banh/cli@0.1.0-alpha.1. APIs and syntax may change during alpha.
Write a text workflow
Section titled “Write a text workflow”Save as urgent-routing.yaml:
version: 1process: urgent_routinginput: type: textdecisions: urgent: decide: whether question: Does this need immediate attention?flow: - when: urgent.probability >= 0.85 do: return value: route: escalation - else: do: return value: route: supportbanh validate urgent-routing.yamlbanh run urgent-routing.yaml --text 'Our checkout is down.' --jsonOutput is {"route":"escalation"} when P(urgent) ≥ 0.85, otherwise {"route":"support"}. The threshold is your policy, not a prediction guarantee.
validatecompiles without loading a model.- The first run downloads Laya from Hugging Face to
~/.cache/receptron-laya(override withLAYA_CACHEor--cache-dir). Inference runs on CPU; no Python or model server needed. Verified on Linux; macOS and Windows are unverified. --jsonprintsprocess,output,decisionsandtiming.--verbosesends runtime events to stderr.
Run it with Jev
Section titled “Run it with Jev”Set BANH_INFERENCE_TOKEN to your TypeSafe API key, then:
banh run urgent-routing.yaml --text 'Our checkout is down.' --model jev --jsonDecisions run on the TypeSafe API; rules still run locally. No model download needed. See inference providers to pin a model.
Next: workflow syntax, decisions, examples.