@salesforce/agents
    Preparing search index...

    Class AgentTester

    A service for testing agents using AiEvaluationDefinition metadata. Start asynchronous test runs, get or poll for test status, and get detailed test results.

    Examples

    Create an instance of the service:

    const agentTester = new AgentTester(connection);

    Start a test run:

    const startResponse = await agentTester.start(aiEvalDef);

    Get the status for a test run:

    const status = await agentTester.status(startResponse.runId);

    Get detailed results for a test run:

    const results = await agentTester.results(startResponse.runId);

    Index

    Constructors

    Methods

    • Cancel an in-progress test run.

      Parameters

      • jobId: string

      Returns Promise<{ success: boolean }>

    • Initiates a test run (i.e., AI evaluation).

      Parameters

      • aiEvalDefName: string

        The name of the AI evaluation definition to run.

      Returns Promise<AgentTestStartResponse>

      Promise that resolves with the response from starting the test.