curl --request POST \
--url https://api.cekura.ai/test_framework/v2/metrics/ \
--header 'Content-Type: application/json' \
--header 'X-CEKURA-API-KEY: <api-key>' \
--data '
{
"project": 1376,
"name": "Was the caller greeted by name",
"description": "Score TRUE if the agent addressed the caller by their name within the first 3 turns, FALSE otherwise.",
"type": "llm_judge",
"eval_type": "binary",
"simulation_enabled": true,
"observability_enabled": true
}
'{
"name": "<string>",
"eval_type": "binary",
"id": 123,
"slug": "<string>",
"project": 123,
"agents": [
123
],
"description": "<string>",
"type": "basic",
"enum_values": "<unknown>",
"audio_enabled": true,
"prompt": "<string>",
"evaluation_trigger": "always",
"trigger_type": "llm_judge",
"evaluation_trigger_prompt": "<string>",
"evaluation_trigger_custom_code": "<string>",
"priority_assignment_prompt": "<string>",
"configuration": "<unknown>",
"overall_score": "<string>",
"total_score": "<string>",
"knowledge_base_files": "<string>",
"observability_enabled": true,
"simulation_enabled": true,
"sampling_enabled": true,
"sample_rate": 0.5,
"alert_enabled": true,
"alert_type": "disabled",
"alert_filters": "<unknown>",
"slack_workspace": 123,
"slack_channel_id": "<string>",
"significant_change_alert_status": "enabled",
"significant_change_alert_direction": "",
"function_name": "<string>",
"custom_code": "<string>",
"vocera_defined_metric_code": "<string>",
"reviews": [
{
"metric": 123,
"id": 123,
"test_set": {
"agent": 123,
"id": 123,
"name": "<string>",
"transcript": "<string>",
"voice_recording_url": "<string>",
"call_end_reason": "<string>",
"duration": "<string>",
"source_model": "CallLog",
"source_id": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
},
"expected_value": "<unknown>",
"actual_value": "<unknown>",
"explanation": "<unknown>",
"feedback": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}
],
"window_size": 123,
"std_multiplier": 123,
"ewma_alpha": 123,
"add_to_new_agents": true,
"pending_optimisation_proposal": "<unknown>",
"dependencies": [
{
"id": 123,
"name": "<string>",
"slug": "<string>",
"source": "declared"
}
],
"dependents": [
{
"id": 123,
"name": "<string>",
"slug": "<string>",
"source": "declared"
}
]
}{
"field_name": [
"<string>"
]
}Metrics
Create Metric
Create a quality metric for evaluating agent conversations.
POST
/
test_framework
/
v2
/
metrics
/
curl --request POST \
--url https://api.cekura.ai/test_framework/v2/metrics/ \
--header 'Content-Type: application/json' \
--header 'X-CEKURA-API-KEY: <api-key>' \
--data '
{
"project": 1376,
"name": "Was the caller greeted by name",
"description": "Score TRUE if the agent addressed the caller by their name within the first 3 turns, FALSE otherwise.",
"type": "llm_judge",
"eval_type": "binary",
"simulation_enabled": true,
"observability_enabled": true
}
'{
"name": "<string>",
"eval_type": "binary",
"id": 123,
"slug": "<string>",
"project": 123,
"agents": [
123
],
"description": "<string>",
"type": "basic",
"enum_values": "<unknown>",
"audio_enabled": true,
"prompt": "<string>",
"evaluation_trigger": "always",
"trigger_type": "llm_judge",
"evaluation_trigger_prompt": "<string>",
"evaluation_trigger_custom_code": "<string>",
"priority_assignment_prompt": "<string>",
"configuration": "<unknown>",
"overall_score": "<string>",
"total_score": "<string>",
"knowledge_base_files": "<string>",
"observability_enabled": true,
"simulation_enabled": true,
"sampling_enabled": true,
"sample_rate": 0.5,
"alert_enabled": true,
"alert_type": "disabled",
"alert_filters": "<unknown>",
"slack_workspace": 123,
"slack_channel_id": "<string>",
"significant_change_alert_status": "enabled",
"significant_change_alert_direction": "",
"function_name": "<string>",
"custom_code": "<string>",
"vocera_defined_metric_code": "<string>",
"reviews": [
{
"metric": 123,
"id": 123,
"test_set": {
"agent": 123,
"id": 123,
"name": "<string>",
"transcript": "<string>",
"voice_recording_url": "<string>",
"call_end_reason": "<string>",
"duration": "<string>",
"source_model": "CallLog",
"source_id": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
},
"expected_value": "<unknown>",
"actual_value": "<unknown>",
"explanation": "<unknown>",
"feedback": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}
],
"window_size": 123,
"std_multiplier": 123,
"ewma_alpha": 123,
"add_to_new_agents": true,
"pending_optimisation_proposal": "<unknown>",
"dependencies": [
{
"id": 123,
"name": "<string>",
"slug": "<string>",
"source": "declared"
}
],
"dependents": [
{
"id": 123,
"name": "<string>",
"slug": "<string>",
"source": "declared"
}
]
}{
"field_name": [
"<string>"
]
}Authorizations
api_keyoauth2embedded_sessionsupabase_session
Body
application/jsonapplication/x-www-form-urlencodedmultipart/form-data
Python custom code to determine metric relevance. Code should set _result (bool) and _explanation (str). Example:
_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"
Response
Read-only inputs and dependents of a metric, resolved once per project.
Python custom code to determine metric relevance. Code should set _result (bool) and _explanation (str). Example:
_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"