Generated workflows expose a small deterministic loop for evaluation, trace export and cost reporting. None of it is a hosted service.
Put a dataset at tests/eval.json:
{
"schema_version": "1.0",
"name": "ticket-triage",
"cases": [
{
"id": "urgent",
"input": {"ticket": "prod is down"},
"assertions": [
{"field": "priority", "operator": "equals", "value": "P0"},
{"field": "reason", "operator": "contains", "value": "prod"}
]
}
]
}
Each case input must match the workflow’s inputs_schema. Supported assertion
operators are equals, input_equals (an input.* reference with an optional
identity/upper/lower/strip transform), nonempty and contains.
Invalid datasets fail before any model work starts. Cases run in isolated
checkpoints under <state-dir>/eval/<eval-run>/.
mas eval --dataset tests/eval.json --min-pass-rate 1.0
mas compare --old artifacts/eval_old.json --new artifacts/eval_new.json
mas analyze --report artifacts/eval_new.json
eval exits 0 when the pass rate meets the threshold and no case errored,
otherwise 1. compare exits 0 for a comparable non-regression, 1 for a
regression or a new failing case, and 2 when the two reports come from different
ArchitectureSpec hashes. Reports bind the spec revision/hash, dataset hash, and
per-case status, tokens, turns and duration.
analyze clusters failed and errored cases by normalized error text. It is
deterministic; an LLM judge is a project-local custom metric, not a built-in
model call.
The generated CI runs pytest when tests/ exists, mas eval when
tests/eval.json exists, and healthcheck.py.
mas trace --run-id latest --output trace.json
mas trace --run-id latest --endpoint http://collector:4318/v1/traces
mas cost --run-id latest --input-price-per-m 1 --output-price-per-m 2
trace emits an OTLP/JSON document with a root workflow.run span and one span
per packet, including status, thread/turn IDs and packet tokens. Export is
opt-in; there is no background exporter, metrics pipeline or retry queue.
cost reports tokens, turns and elapsed time, plus an optional price estimate.
It always sets not_a_bill: true; native descendant usage and unmeasured turns
are reported as unmeasured, not guessed.
mas analyze, and an LLM judge is a custom metric.