Skip to content

Workflow syntax

version: 1
process: department_routing
input:
type: json
decisions:
department:
decide: one_of
question: Which team should handle this ticket?
options:
billing: Payments, refunds, invoices
support: Product problems and bugs
sales: New purchases
flow:
- else:
do: return
value:
route: "{{ department.value }}"
Field Meaning
version Must be 1.
process Workflow name.
model Optional. See below.
input.type Optional: json or text.
decisions At least one one_of, whether or scale decision.
flow At least one rule, with an optional final else.

Decision IDs use letters, digits and underscores, and can’t start with a digit.

model:
provider: jev
model: jev-latest

Names a model family and model, not where it’s hosted. The CLI accepts:

  • laya/laya: native, the default when model is omitted.
  • jev/jev-latest, jev-preview, or a version such as jev-1.13.0. Needs BANH_INFERENCE_TOKEN.
  • kev/kev-4b: compatibility only.

Flags and environment variables override this for local runs. Cloud accepts only its managed models. Infrastructure fields such as baseUrl or token are rejected. See providers.

  • json: --input reads a JSON file.
  • text: --input reads a file as-is; --text takes a string.
  • Omitted: either is accepted; the CLI parses --input as JSON.

input.type doesn’t define a schema.

Terminal window
banh validate workflow.yaml

Rejects unknown fields, duplicate keys, non-string keys, YAML aliases, unsupported expressions and bad references. Never loads a model.

Next: decisions, flow rules.