Skip to main content
A regression test replays a scripted conversation and asserts what the agent does, so a prompt change that breaks a scenario fails loudly. This recipe builds one from a user turn, an agent turn, and two kinds of check, then runs it and reads the verdict.
Last verified 2026-08-15 by executing the recipe end to end.

The recipe

main.sh

How it works

  • Create test makes the container. Turns belong to a test, and checks belong to a turn, so the three build a hierarchy rather than a flat list.
  • Create turn adds either side of the conversation. A user turn carries the utterance in payload.response; an agent turn carries no expected text at all, only a sequential flag controlling whether its checks must hold in order.
  • Create check is where the assertion lives. A response check compares what the agent said, while routing and tool checks assert behaviour: that it handed off to a given playbook, or called a given tool.
  • A response check is equal or llm_eval. Use equal for a scripted reply and llm_eval for anything the agent phrases freely, since exact matching against a model is a test that fails on rewording alone.
  • Create run starts execution and returns immediately with status: "idle". Poll get run for the verdict.

When it fails