Skip to main content
A report generator returns success but may omit the body or provide conclusions without sources. Check structure with JSON Schema, then use a business validator to assess task requirements.

Declare the output structure

Replace the corresponding workflow step and have its executor report { body, sources }. Runtime checks outputSchema before accepting success. A string, missing sources, or empty body cannot advance as an accepted result. Schema checks types and required fields. Whether sources support conclusions or all requirements are covered needs business validation.

Register a business validator

This validator implements an example requirement: the body must mention at least one source identifier. It does not verify source authenticity; add that check for your application.
Pass validators: [contentValidator] to createRuntime. The step’s id/version must match the registered validator. Validators read the actual Action, Outcome, and Run without changing authoritative state or performing external side effects.

Try valid and invalid results

Start separate Runs and have the generator report: After rejection, inspect the error and original Action. Do not relabel failed output as success. Correct the executor or business result and follow an allowed recovery path. For disk files, JSON structure alone cannot prove existence or content. Declare real files and conditions with artifact validation.
Last modified on October 22, 2026