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

# List Metrics

> 
metrics_list: List quality metrics (LLM-judge prompts, custom code, or predefined metrics) used to evaluate AI voice agents. Filter by `agent_id` or `project_id` to scope results.

Filtering behavior:
- If only agent_id is provided: Returns metrics associated with that agent only
- If only project_id is provided: Returns metrics associated with that project only
- If both agent_id and project_id are provided: Returns metrics from both the agent and the project
- If agents is provided: Returns metrics where any of the specified agents are in the M2M agents field
- If slug is provided: Returns the metric with that specific slug

Performance tip: `agent_id` (when a specific agent is in context) or `project_id` will narrow the result. Orgs can accumulate hundreds of metrics so a filter usually helps.
        



## OpenAPI

````yaml get /test_framework/v1/metrics/
openapi: 3.1.0
info:
  title: Cekura API
  version: v1
  description: >-
    Complete API documentation for the Cekura platform. This API provides
    endpoints for testing, observing, and evaluating AI voice agents — including
    managing agents, running evaluators, defining metrics, and analyzing call
    quality.
servers:
  - url: https://api.cekura.ai
security: []
paths:
  /test_framework/v1/metrics/:
    get:
      tags:
        - test_framework
      summary: List metrics
      description: >-

        metrics_list: List quality metrics (LLM-judge prompts, custom code, or
        predefined metrics) used to evaluate AI voice agents. Filter by
        `agent_id` or `project_id` to scope results.


        Filtering behavior:

        - If only agent_id is provided: Returns metrics associated with that
        agent only

        - If only project_id is provided: Returns metrics associated with that
        project only

        - If both agent_id and project_id are provided: Returns metrics from
        both the agent and the project

        - If agents is provided: Returns metrics where any of the specified
        agents are in the M2M agents field

        - If slug is provided: Returns the metric with that specific slug


        Performance tip: `agent_id` (when a specific agent is in context) or
        `project_id` will narrow the result. Orgs can accumulate hundreds of
        metrics so a filter usually helps.
                
      operationId: metrics-list
      parameters:
        - in: query
          name: agent_id
          schema:
            type: integer
          description: |

            Filter by agent ID
            Example: `123`
        - in: query
          name: project_id
          schema:
            type: integer
          description: |

            Filter by project ID
            Example: `456`
        - in: query
          name: assistant_id
          schema:
            type: string
          description: |

            Filter by assistant ID
            Example: `asst_1234567890`
        - in: query
          name: agents
          schema:
            type: string
          description: >

            Filter metrics by agent IDs. Supports comma-separated list.

            Example: `1,2,3` to filter metrics associated with any of these
            agents
        - in: query
          name: slug
          schema:
            type: string
          description: |

            Filter by metric slug
            Example: `latency_metric` or `customer_satisfaction`
        - in: query
          name: filters
          schema:
            type: object
          description: >-
            JSON filter parameter for advanced filtering.


            Example:

            ```json

            {"operator":"and","conditions":[{"field":"agents__id","op":"in","value":[1,2,3]}]}

            ```


            Supported fields: agents__id, eval_type, type, name

            Supported operators: in, eq, contains
        - in: query
          name: include_scores
          schema:
            type: boolean
          description: |-

            Include Overall and Total scores in Metric List
            Example: `true` or `false`
                            
      responses:
        '200':
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/MetricList'
              examples:
                MetricList:
                  value:
                    - id: 123
                      name: <string>
                      description: <string>
                      function_name: <string>
                      type: basic
                      eval_type: binary_workflow_adherence
                      enum_values:
                        - <string>
                      audio_enabled: true
                      observability_enabled: true
                      simulation_enabled: true
                      prompt: <string>
                      evaluation_trigger: always
                      evaluation_trigger_prompt: <string>
                      priority_assignment_prompt: <string>
                      vocera_defined_metric_code: <string>
                      configuration:
                        infra_issues_timeout: <integer>
                        key: value
                      kb_file_ids:
                        - <integer>
                      knowledge_base_files:
                        - id: <integer>
                          agent: <integer>
                          file_url: <string>
                          file_name: <string>
                          file_type: <string>
                          file_size: <integer>
                          created_at: <datetime>
                          updated_at: <datetime>
                      metric_cost: <float>
                MetricListWithOverallScore:
                  value:
                    - id: <integer>
                      name: <string>
                      description: <string>
                      function_name: <string>
                      type: basic
                      eval_type: binary_workflow_adherence
                      enum_values:
                        - <string>
                      audio_enabled: true
                      observability_enabled: true
                      simulation_enabled: true
                      prompt: <string>
                      evaluation_trigger: always
                      evaluation_trigger_prompt: <string>
                      priority_assignment_prompt: <string>
                      vocera_defined_metric_code: <string>
                      configuration:
                        infra_issues_timeout: <integer>
                        key: value
                      kb_file_ids:
                        - <integer>
                      knowledge_base_files:
                        - id: <integer>
                          agent: <int>
                          file_url: <string>
                          file_name: <string>
                          file_type: <string>
                          file_size: <integer>
                          created_at: <datetime>
                          updated_at: <datetime>
                      metric_cost: <float>
                      overall_score: <integer>
                      total_score: <integer>
          description: ''
      security:
        - api_key: []
components:
  schemas:
    MetricList:
      type: object
      description: ''
      properties:
        id:
          type: integer
          readOnly: true
        slug:
          type:
            - string
            - 'null'
          description: >-
            URL-friendly unique identifier in snake_case format. Example:
            "customer_satisfaction_1562"
          maxLength: 255
        project:
          type:
            - integer
            - 'null'
        agents:
          type: array
          items:
            type:
              - integer
              - 'null'
        agent_names:
          type: string
          readOnly: true
        name:
          type: string
          description: |-

            Name of the metric.
            Example: `"Customer Satisfaction"` or `"Appointment Booking"`
                    
          maxLength: 255
        description:
          type: string
          description: >-

            Description of what the metric measures.

            Example: `"Measures how satisfied customers are with the service
            provided"`
                    
        function_name:
          type:
            - string
            - 'null'
          description: |

            Predefined function name
            Example: `"get_latency"` or `"check_critical_deviations"`
          maxLength: 255
        type:
          enum:
            - basic
            - custom_prompt
            - custom_code
            - llm_judge
          type: string
          x-spec-enum-id: b44700c0a6443b40
          description: >-

            Type of metric



            * `basic` - Basic (Deprecated in favor of LLM Judge)

            * `custom_prompt` - Custom Prompt ( Deprecated in favor of LLM
            Judge)

            * `custom_code` - Custom Code

            * `llm_judge` - LLM Judge
        eval_type:
          enum:
            - binary_workflow_adherence
            - binary_qualitative
            - continuous_qualitative
            - numeric
            - enum
          type: string
          x-spec-enum-id: 1e3e27b342bfd8ec
          description: |-

            Type of evaluation


            * `binary_workflow_adherence` - Binary Workflow Adherence
            * `binary_qualitative` - Binary Qualitative
            * `continuous_qualitative` - Continuous Qualitative
            * `numeric` - Numeric
            * `enum` - Enum
        enum_values:
          description: |

            List of possible enum values for enum type metrics.
            Example: `["satisfied", "unsatisfied"]`
        audio_enabled:
          type: boolean
          description: |-

            Whether this metric requires audio analysis.
            Example: `true` or `false`
                    
        observability_enabled:
          type: boolean
          description: |-

            Enable this metric for observability.
            Example: `true` or `false`
                    
        simulation_enabled:
          type: boolean
          description: |-

            Enable this metric for simulations.
            Example: `true` or `false`
                    
        sampling_enabled:
          type: boolean
          description: Enable sampling for this metric using project-level sample rate
        prompt:
          type: string
          description: |

            Evaluation prompt for the metric.
            Example: `"Evaluate customer satisfaction based on conversation"`
        display_order:
          type: integer
          maximum: 2147483647
          minimum: -2147483648
          description: |

            Display order for the metric.
            Example: `1`
        evaluation_trigger:
          enum:
            - always
            - automatic
            - custom
          type: string
          description: |-
            * `always` - Always
            * `automatic` - Automatic
            * `custom` - Custom
          x-spec-enum-id: ecd3c02e0e393ef5
        trigger_type:
          enum:
            - llm_judge
            - custom_code
          type: string
          description: |-
            * `llm_judge` - LLM Judge
            * `custom_code` - Custom Code
          x-spec-enum-id: 2adad4b8df61914f
        evaluation_trigger_prompt:
          type: string
          description: >

            Evaluation trigger prompt for the metric.

            Example: `"Evaluate metric only if call ended reason is
            main-agent-ended-call"`
        evaluation_trigger_custom_code:
          type: string
          description: >

            Python custom code to determine metric relevance. Code should set
            _result (bool) and _explanation (str).

            Example:

            ```python

            _result = True

            _explanation = "Metric is relevant"

            if "call_end_reason" in data and data["call_end_reason"] ==
            "customer-hung-up":
                _result = False
                _explanation = "Customer hung up, metric not applicable"
            ```
        priority_assignment_prompt:
          type: string
          description: |

            Priority assignment prompt for the metric.
        vocera_defined_metric_code:
          type: string
          description: |

            Vocera defined metric code for the metric.
            Example: `"7fd534f5"`
          maxLength: 255
        configuration:
          description: >

            Custom configuration parameters for specific metrics if metric
            supports it.

            Example:

            - For Infrastructure issues

            ```json

            {
                "infra_issues_timeout": 10
            }

            ```
        kb_file_ids:
          type: array
          items:
            type: integer
          description: |

            List of knowledge base file IDs for the metric.
            Example: `[123, 456]`
        knowledge_base_files:
          type: array
          items:
            $ref: '#/components/schemas/KnowledgeBaseFile'
          readOnly: true
        scenarios:
          writeOnly: true
          description: Either "all" or a list of scenario IDs to attach to this metric
        custom_code:
          type: string
          writeOnly: true
        metric_cost:
          type: number
          format: double
          description: |

            Metric Cost
            Example: `0.10`
          readOnly: true
        alert_type:
          enum:
            - disabled
            - normal
            - significant_change
          type: string
          description: |-
            * `disabled` - Alerts Disabled
            * `normal` - Normal Alerts
            * `significant_change` - Significant Change Alerts
          x-spec-enum-id: 9e2661f1aeca64cf
          default: disabled
        significant_change_alert_status:
          enum:
            - enabled
            - disabled
          type: string
          x-spec-enum-id: 6d6f4d361b4ea1fb
          description: |-

            Alert status: enabled or disabled.


            * `enabled` - Enabled
            * `disabled` - Disabled
        significant_change_alert_direction:
          enum:
            - ''
            - increase
            - decrease
          type: string
          x-spec-enum-id: 1e86e60ca5cfba12
          description: >-
            Alert direction: increase only, decrease only, or both (empty =
            both).

            Example: `"increase"`, `"decrease"`, or `"both"`


            * `` - Both (Increase and Decrease)

            * `increase` - Increase Only

            * `decrease` - Decrease Only
        window_size:
          type: integer
          readOnly: true
          description: |

            Window size for rolling statistics calculation.
            Example: `50`
        std_multiplier:
          type: number
          format: double
          readOnly: true
          description: |

            Standard deviation multiplier for threshold calculation.
            Example: `2.0`
        ewma_alpha:
          type: number
          format: double
          readOnly: true
          description: >

            Alpha value for exponentially weighted moving average (EWMA)
            calculation.

            Example: `0.1`
        add_to_new_agents:
          type:
            - boolean
            - 'null'
          description: >-
            When enabled, this metric is automatically assigned to new agents
            created in the project.
        alert_filters:
          oneOf:
            - {}
            - type: 'null'
          description: Filters to apply before computing alerts (CallLogQueryFilter format)
        slack_workspace:
          type:
            - integer
            - 'null'
          description: Slack workspace to send alerts to
        slack_channel_id:
          type:
            - string
            - 'null'
          description: Override channel ID for this metric's alerts
          maxLength: 255
        affects_call_success:
          type: string
          readOnly: true
          description: >

            Whether this metric is configured in the project's rubric and
            therefore contributes

            to overall call success evaluation.

            Example: `true`
        uses_llm_judge:
          type: string
          readOnly: true
          description: >

            Whether this metric produces an LLM-judge narrative: a `custom_code`
            metric whose

            code delegates to the LLM judge internally. Computed server-side
            because the

            `custom_code` body is write-only and not exposed on read.

            Example: `true`
      required:
        - name
    KnowledgeBaseFile:
      type: object
      properties:
        id:
          type: integer
          readOnly: true
        agent:
          type: integer
        file:
          type: string
          format: uri
          writeOnly: true
          description: Knowledge base file
          pattern: (?:pdf|txt|json|csv|xml|md)$
        file_url:
          type: string
          readOnly: true
          description: URL of the Knowledge file
        file_name:
          type: string
          readOnly: true
          description: Name of the Knowledge file
        file_type:
          type: string
          readOnly: true
          description: MIME type of the Knowledge file
        file_size:
          type: integer
          readOnly: true
          description: |-
            Size in bytes.
            Example: `1048576`
        created_at:
          type: string
          format: date-time
          readOnly: true
          description: |-
            When this record was created.
            Example: `2024-03-15T10:30:45Z`
        updated_at:
          type: string
          format: date-time
          readOnly: true
          description: |-
            When this record was last updated.
            Example: `2024-03-15T10:35:11Z`
      required:
        - agent
        - file
  securitySchemes:
    api_key:
      type: apiKey
      name: X-CEKURA-API-KEY
      in: header
      description: >-
        API Key Authentication. It should be included in the header of each
        request.

````