Skip to content

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.

Terminal window
npm install --global @banh/cli@alpha
banh --version # 0.1.0-alpha.1

Pin the exact version with @banh/cli@0.1.0-alpha.1. APIs and syntax may change during alpha.

Save as urgent-routing.yaml:

version: 1
process: urgent_routing
input:
type: text
decisions:
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: support
Terminal window
banh validate urgent-routing.yaml
banh run urgent-routing.yaml --text 'Our checkout is down.' --json

Output is {"route":"escalation"} when P(urgent) ≥ 0.85, otherwise {"route":"support"}. The threshold is your policy, not a prediction guarantee.

  • validate compiles without loading a model.
  • The first run downloads Laya from Hugging Face to ~/.cache/receptron-laya (override with LAYA_CACHE or --cache-dir). Inference runs on CPU; no Python or model server needed. Verified on Linux; macOS and Windows are unverified.
  • --json prints process, output, decisions and timing. --verbose sends runtime events to stderr.

Set BANH_INFERENCE_TOKEN to your TypeSafe API key, then:

Terminal window
banh run urgent-routing.yaml --text 'Our checkout is down.' --model jev --json

Decisions 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.