Local quickstart
Run these commands from an existing banh/ source checkout. Packages are not published yet; there is no registry installation step in this guide.
Prerequisites
Section titled “Prerequisites”- Access to the Banh source repository.
- Node.js 20 or newer and pnpm 10 (the repository pins its pnpm version).
- Approximately 2–3 GB of available RAM for local inference.
- Internet access for the first model download, approximately 1.7 GB, unless you already have a model bundle.
Build and validate
Section titled “Build and validate”pnpm installpnpm buildnode packages/cli/dist/index.js validate examples/support-triage.yamlValidation parses and compiles the workflow without loading a model. A successful validation confirms the definition is supported; it does not evaluate prediction quality.
Run the example
Section titled “Run the example”node packages/cli/dist/index.js run examples/support-triage.yaml \ --input examples/inputs/support-ticket.json --jsonThe first execution downloads model files from Hugging Face. Subsequent runs reuse the cache at ~/.cache/receptron-laya, or the directory selected by LAYA_CACHE or --cache-dir. Inference runs locally on CPU; Python and a separate model server are not required.
The result contains process, output, decisions, and timing. For the bundled duplicate-charge ticket, inspect the returned decisions and route; the model’s exact answer is not guaranteed.
Write a text workflow
Section titled “Write a text workflow”Save this 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: supportnode packages/cli/dist/index.js validate urgent-routing.yamlnode packages/cli/dist/index.js run urgent-routing.yaml \ --text 'Our checkout is down.' --jsonThe result is {"route":"escalation"} if the model assigns P(urgent) at least 0.85; otherwise it is {"route":"support"}. This threshold is your routing policy, not a prediction guarantee.
Use the shorter command
Section titled “Use the shorter command”pnpm --dir packages/cli link --globalbanh --helpbanh validate urgent-routing.yamlIf your pnpm global bin directory is not configured, continue using node packages/cli/dist/index.js wherever these docs show banh.
For automated JSON processing, use the compiled executable rather than pnpm dev, whose script banners can appear in stdout. Add --verbose to send runtime events to stderr.
Next: workflow syntax, decision primitives, or examples.