Skip to content

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.

  • 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.
Terminal window
pnpm install
pnpm build
node packages/cli/dist/index.js validate examples/support-triage.yaml

Validation parses and compiles the workflow without loading a model. A successful validation confirms the definition is supported; it does not evaluate prediction quality.

Terminal window
node packages/cli/dist/index.js run examples/support-triage.yaml \
--input examples/inputs/support-ticket.json --json

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

Save this 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
node packages/cli/dist/index.js validate urgent-routing.yaml
node packages/cli/dist/index.js run urgent-routing.yaml \
--text 'Our checkout is down.' --json

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

Terminal window
pnpm --dir packages/cli link --global
banh --help
banh validate urgent-routing.yaml

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