> ## Documentation Index
> Fetch the complete documentation index at: https://docs.lehar.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Get test run

> Fetches one test run with its per-scenario `results` (verdicts and transcripts). Poll this after starting a run to watch `status` move from `pending`/`running` to `passed`/`failed`/`error`. The inner shape of each result's `verdicts` and `transcript` is produced by the Test Runner. Scope `sessions:read`.



## OpenAPI

````yaml /api-reference/openapi.json get /agent-test-runs/{run_id}
openapi: 3.1.0
info:
  title: Lehar API
  version: v0
  description: >-
    Customer-facing REST API for the Lehar voice-AI platform. Platform-admin
    endpoints are intentionally excluded from this reference. Regenerate with
    `npm run sync:openapi`.
servers:
  - url: https://api.lehar.ai/ca/api/v0
security:
  - ApiKeyAuth: []
  - BearerAuth: []
paths:
  /agent-test-runs/{run_id}:
    get:
      tags:
        - Agent Testing
      summary: Get test run
      description: >-
        Fetches one test run with its per-scenario `results` (verdicts and
        transcripts). Poll this after starting a run to watch `status` move from
        `pending`/`running` to `passed`/`failed`/`error`. The inner shape of
        each result's `verdicts` and `transcript` is produced by the Test
        Runner. Scope `sessions:read`.
      operationId: get_run_ca_api_v0_agent_test_runs__run_id__get
      parameters:
        - name: run_id
          in: path
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Test run record with results
          content:
            application/json:
              example:
                id: test_run_01hzyb3c5d6e7f8g9h0j1k2l3m
                suite_id: test_suite_01hzy8x2m4q7r8s9t0v1w2x3y4
                agent_id: agent_sales_hi
                status: passed
                prompt_fingerprint: 9f2c1a7b4e6d8f0a1b2c3d4e5f607182
                total_scenarios: 1
                passed_scenarios: 1
                pass_rate: 1
                cost_credits: 0.42
                temporal_workflow_id: agent-test-test_run_01hzyb3c5d6e7f8g9h0j1k2l3m
                error: null
                created_at: '2026-05-22T10:05:00Z'
                updated_at: '2026-05-22T10:07:30Z'
                results:
                  - id: test_result_01hzyb9k1m2n3p4q5r6s7t8u9v
                    scenario_label: Price objection
                    passed: true
                    pass_rate: 1
                    ended_by: goal_met
                    verdicts:
                      task_completion:
                        passed: true
                        score: 1
                        rationale: >-
                          Agent acknowledged the objection and booked a
                          callback.
                      safety:
                        passed: true
                        score: 1
                        rationale: No unsafe content.
                    transcript:
                      - ended_by: goal_met
                        judgments:
                          task_completion:
                            passed: true
                            score: 1
                        turns:
                          - role: user
                            content: Your renewal price is too high.
                          - role: assistant
                            content: >-
                              I understand — let me walk you through the value
                              and a couple of options.
                    created_at: '2026-05-22T10:07:25Z'
        '400':
          description: >-
            The authenticated context has no `customer_id` (platform staff must
            select a workspace via `X-Customer-ID`).
        '401':
          description: Missing or invalid credentials (code `unauthorized`).
        '403':
          description: >-
            The credential is missing the required `sessions:read` scope (code
            `forbidden`).
        '404':
          description: No run with this id in the workspace.
          content:
            application/json:
              example:
                error:
                  code: not_found
                  message: Test run not found
        '500':
          description: Unexpected server error (code `internal_error`).
components:
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: X-API-KEY
    BearerAuth:
      type: http
      scheme: bearer

````