Skip to main content

Documentation Index

Fetch the complete documentation index at: https://momentic.ai/docs/llms.txt

Use this file to discover all available pages before exploring further.

Extracts data from the current screen, optionally validating it against a JSON schema. Store the result with saveAs to read it on env.<name> in later steps. The simplified form takes the extraction goal as a single string.

Parameters

ParameterTypeRequiredDescription
goalstringYesWhat to extract.
schemaobjectNoJSON Schema the extracted payload must conform to.
saveAsstringNoVariable to store this step’s return value on env.<name>.
retriesnumberNoTimes to retry the step on failure before failing the test.
skippedbooleanNoSkip this step at execution time.
commentstringNoFree-form annotation kept with the step.
extract fails the step when the extracted payload does not conform to schema.

Shorthand

Goal as a single string.
- extract: The discounted subtotal in the order summary

Examples

- extract:
    goal: The discounted subtotal in the order summary
    saveAs: SUBTOTAL # read later as {{ env.SUBTOTAL }}
    schema: # fail the step unless the result matches this shape
      type: object
      properties:
        amount:
          type: number
      required: [amount]