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

# Run a test suite for a council sage

> Runs a full test suite for the specified council sage. Can run
synchronously or asynchronously. Optionally associates with a
workflow run for progress tracking.




## OpenAPI

````yaml /openapi/private/specs/services/screen.yml get /screen/test/{council_sage_id}
openapi: 3.1.0
info:
  title: Screen Service API
  description: >
    Manages candidate screening interviews (screens). Handles the full interview

    lifecycle from creation through AI-driven conversation to results generation

    and identity verification.


    ## Authentication

    All endpoints require authentication via one of two methods:

    - **API Key**: Pass the key in the `X-Auth` header (service-to-service
    calls)

    - **JWT Token**: Pass a Bearer token in the `Authorization` header
    (user-facing calls)


    The required permission level is noted per endpoint.


    ## Screen Lifecycle

    1. **Create** -- Initialize a chat session

    2. **Start** -- Begin the screen with an opening prompt (returns screen_id,
    message, council_sage_id)

    3. **Append** -- Send candidate messages and receive AI responses (PATCH)

    4. **End** -- End the interview (auto or manual)

    5. **Results** -- Generate and retrieve evaluation results

    6. **Verify** -- Identity verification via image comparison


    ## Business Rules

    - Screens are backed by Redis for real-time chat history

    - Duration is enforced; messages sent after time expires trigger ENDTIME

    - Verification uses face detection and comparison scoring

    - Test screens simulate the full interview flow for sage validation

    - Results can be generated, refreshed, and regenerated
  version: 1.0.0
  contact:
    name: Platform Team
servers:
  - url: '{protocol}://{host}:{port}'
    description: Screen Service
    variables:
      protocol:
        default: https
        enum:
          - http
          - https
      host:
        default: localhost
      port:
        default: '5000'
security: []
tags:
  - name: Screen
    description: Screen interview lifecycle
  - name: Results
    description: Screen results and evaluation
  - name: Verify
    description: Identity verification
  - name: Test
    description: Test screen execution
  - name: Service
    description: Health checks and initialization
paths:
  /screen/test/{council_sage_id}:
    get:
      tags:
        - Test
      summary: Run a test suite for a council sage
      description: |
        Runs a full test suite for the specified council sage. Can run
        synchronously or asynchronously. Optionally associates with a
        workflow run for progress tracking.
      operationId: runTestSuite
      parameters:
        - name: council_sage_id
          in: path
          required: true
          description: UUID of the council sage to test
          schema:
            type: string
            format: uuid
          example: c3d4e5f6-7890-4abc-def0-123456789abc
        - name: async
          in: query
          required: false
          description: 'Set to `1` to run asynchronously (default: 1)'
          schema:
            type: integer
            enum:
              - 0
              - 1
            default: 1
        - name: run_id
          in: query
          required: false
          description: UUID of the workflow run to track progress
          schema:
            type: string
            format: uuid
        - name: sage_name
          in: query
          required: false
          description: Optional sage display name override
          schema:
            type: string
        - $ref: '#/components/parameters/RequiredPermission_council_screen'
      responses:
        '200':
          description: Test suite started or completed
          content:
            application/json:
              schema:
                type: object
        '401':
          $ref: '#/components/responses/Unauthorized'
        '500':
          $ref: '#/components/responses/InternalError'
      security:
        - jwtAuth: []
components:
  parameters:
    RequiredPermission_council_screen:
      name: X-Permission-Info
      in: header
      required: false
      description: >-
        **Required JWT permission: `council_screen`** (informational only --
        enforced server-side)
      schema:
        type: string
  responses:
    Unauthorized:
      description: Authentication failed
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          examples:
            noApiKey:
              summary: Missing API key
              value:
                error: Unauthorized - API key required
            invalidApiKey:
              summary: Invalid API key
              value:
                error: Unauthorized - Invalid API key
            noToken:
              summary: Missing JWT token
              value:
                error: Unauthorized - No valid token
            invalidToken:
              summary: Invalid or expired JWT
              value:
                error: Unauthorized3
            insufficientPermissions:
              summary: Token lacks required permission
              value:
                error: Unauthorized4
    InternalError:
      description: Unexpected server error
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            error: Internal server error
  schemas:
    ErrorResponse:
      type: object
      required:
        - error
      properties:
        error:
          type: string
          description: Human-readable error message
  securitySchemes:
    jwtAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: User JWT token passed in Authorization header

````