AgentTester class to test Agents

Constructors

Methods

  • Cancel an in-progress test run

    Parameters

    • jobId: string

    Returns Promise<{ success: boolean }>

  • Creates and deploys an AiEvaluationDefinition from a specification file.

    Parameters

    • apiName: string

      The API name of the AiEvaluationDefinition to create

    • specFilePath: string

      The path to the specification file to create the definition from

    • options: { outputDir: string; preview?: boolean }

      Configuration options for creating the definition

      • outputDir: string

        The directory where the AiEvaluationDefinition file will be written

      • Optionalpreview?: boolean

        If true, writes the AiEvaluationDefinition file to -preview-.xml in the current working directory and does not deploy it

    Returns Promise<{ contents: string; deployResult?: DeployResult; path: string }>

    Promise containing:

    • path: The filesystem path to the created AiEvaluationDefinition file
    • contents: The AiEvaluationDefinition contents as a string
    • deployResult: The deployment result (if not in preview mode)

    When deployment fails