Skip to main content
POST
/
test_framework
/
v1
/
metrics
/
generate_metrics
cURL
curl --request POST \
  --url https://api.cekura.ai/test_framework/v1/metrics/generate_metrics/ \
  --header 'Content-Type: application/json' \
  --header 'X-CEKURA-API-KEY: <api-key>' \
  --data '
{
  "agent_id": 123,
  "assistant_id": "<string>",
  "num_metrics": 1
}
'
[
  {
    "id": 123,
    "project": 123,
    "agent": 123,
    "agents": [
      123
    ],
    "name": "<string>",
    "description": "<string>",
    "function_name": "<string>",
    "type": "basic",
    "eval_type": "binary_workflow_adherence",
    "enum_values": "<unknown>",
    "audio_enabled": true,
    "observability_enabled": true,
    "simulation_enabled": true,
    "prompt": "<string>",
    "display_order": -1,
    "evaluation_trigger": "always",
    "evaluation_trigger_prompt": "<string>",
    "priority_assignment_prompt": "<string>",
    "vocera_defined_metric_code": "<string>",
    "configuration": "<unknown>",
    "kb_file_ids": [
      123
    ],
    "knowledge_base_files": [
      {
        "id": 123,
        "agent": 123,
        "file_url": "<string>",
        "file_name": "<string>",
        "file_type": "<string>",
        "file_size": 123,
        "created_at": "2023-11-07T05:31:56Z",
        "updated_at": "2023-11-07T05:31:56Z"
      }
    ],
    "metric_cost": 123,
    "alert_type": "disabled",
    "significant_change_alert_status": "enabled",
    "significant_change_alert_direction": ""
  }
]

Authorizations

X-CEKURA-API-KEY
string
header
required

API Key Authentication. It should be included in the header of each request.

Body

agent_id
integer
required

The ID of the AI agent to generate metrics for, either agent_id or assistant_id must be provided

assistant_id
string
required

The assistant ID to generate metrics for, either agent_id or assistant_id must be provided

num_metrics
integer
default:1

Number of metrics to generate

Required range: 1 <= x <= 100

Response

id
integer
project
integer | null
agent
integer | null
agents
(integer | null)[]
name
string

Name of the metric. Example: "Customer Satisfaction" or "Appointment Booking"

Maximum string length: 255
description
string

Description of what the metric measures. Example: "Measures how satisfied customers are with the service provided"

function_name
string | null

Predefined function name Example: "get_latency" or "check_critical_deviations"

Maximum string length: 255
type
enum<string>
  • basic - Basic
  • custom_prompt - Custom Prompt
  • custom_code - Custom Code
Available options:
basic,
custom_prompt,
custom_code
eval_type
enum<string>
  • binary_workflow_adherence - Binary Workflow Adherence
  • binary_qualitative - Binary Qualitative
  • continuous_qualitative - Continuous Qualitative
  • numeric - Numeric
  • enum - Enum
Available options:
binary_workflow_adherence,
binary_qualitative,
continuous_qualitative,
numeric,
enum
enum_values
any

List of possible enum values for enum type metrics. Example: ["satisfied", "unsatisfied"]

audio_enabled
boolean

Whether this metric requires audio analysis. Example: true or false

observability_enabled
boolean

Enable this metric for observability. Example: true or false

simulation_enabled
boolean

Enable this metric for simulations. Example: true or false

prompt
string

Evaluation prompt for the metric. Example: "Evaluate customer satisfaction based on conversation"

display_order
integer

Display order for the metric. Example: 1

Required range: -2147483648 <= x <= 2147483647
evaluation_trigger
enum<string>
  • always - Always
  • automatic - Automatic
  • custom - Custom
Available options:
always,
automatic,
custom
evaluation_trigger_prompt
string

Evaluation trigger prompt for the metric. Example: "Evaluate metric only if call ended reason is main-agent-ended-call"

priority_assignment_prompt
string

Priority assignment prompt for the metric.

vocera_defined_metric_code
string

Vocera defined metric code for the metric. Example: "7fd534f5"

Maximum string length: 255
configuration
any

Custom configuration parameters for specific metrics if metric supports it. Example:

  • For Infrastructure issues
{
"infra_issues_timeout": 10
}
kb_file_ids
integer[]

List of knowledge base file IDs for the metric. Example: [123, 456]

knowledge_base_files
object[]
metric_cost
number<double>

Metric Cost Example: 0.10

alert_type
enum<string>
default:disabled
  • disabled - Alerts Disabled
  • normal - Normal Alerts
  • significant_change - Significant Change Alerts
Available options:
disabled,
normal,
significant_change
significant_change_alert_status
enum<string>

Alert status: enabled or disabled.

  • enabled - Enabled
  • disabled - Disabled
Available options:
enabled,
disabled
significant_change_alert_direction
enum<string>

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
Available options:
,
increase,
decrease