Skip to content

Examples

The Banh source checkout includes complete YAML workflows and JSON inputs. Run these commands from the checkout after building it.

examples/support-triage.yaml asks for a department, urgency, and severity. Rules prioritize urgent tickets, then billing and sales, with support as the fallback.

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

The bundled input describes a duplicate subscription charge. Inspect the actual decisions and output; do not assume a fixed model prediction.

examples/warranty-claim.yaml demonstrates another bounded routing workflow:

Terminal window
node packages/cli/dist/index.js validate examples/warranty-claim.yaml
node packages/cli/dist/index.js run examples/warranty-claim.yaml \
--input examples/inputs/warranty-claim.json --json

The same file can be deployed to the development cloud service. Its process name is warranty_triage, which becomes the workflow slug in API URLs.

  1. Replace the question and option descriptions with your task’s vocabulary.
  2. Keep input short enough for the model context window.
  3. Put the highest-priority rules first and include an explicit fallback.
  4. Validate the YAML before running it.
  5. Evaluate outputs on representative inputs before choosing thresholds.

For a complete text-input example, see the local quickstart.