An evaluation turns a question about agent quality into a number you can track. This recipe runs a conversation, ends it, defines a boolean evaluation, and scores the resulting transcript, returning both the verdict and the model’s reasoning.

The recipe

main.sh

How it works

  • Create evaluation defines the criterion. A boolean evaluation needs prompt, truePrompt, falsePrompt, and enabled: the two branch prompts tell the judging model what each verdict means.
  • An evaluation can only score a finished conversation. Sending an end action closes it; deleting the conversation state does not, because the state and the transcript are different things.
  • Run evaluation returns the score synchronously, in the run response itself. There is nothing to poll for.
  • The result carries reason alongside value, so a score always comes with the justification behind it. That is what makes a failing score actionable.
  • Scores are also written onto the transcript, next to whichever default evaluations the project runs automatically. See the Insights section.

When it fails

Use the up and down arrow keys to select a result, Enter to open it, and Escape to close the search.