{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/cekura-ai/json-schema/cekura-ai-schema-combined-results-report-schema.json",
  "title": "SchemaCombinedResultsReport",
  "x-generated": "2026-10-29",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/cekura-ai-openapi.json#/components/schemas/SchemaCombinedResultsReport",
  "type": "object",
  "properties": {
    "status": {
      "type": "string",
      "description": "Always 'completed' — the report is computed on read, not queued."
    },
    "success_rate": {
      "type": "number",
      "format": "double",
      "description": "Percentage of runs that passed, across every result in the report"
    },
    "total_runs_count": {
      "type": "integer",
      "description": "Runs in the report, including those still executing"
    },
    "completed_runs_count": {
      "type": "integer",
      "description": "Runs that reached a terminal state (completed, failed, timeout or cancelled)"
    },
    "success_runs_count": {
      "type": "integer",
      "description": "Completed runs that passed"
    },
    "failed_runs_count": {
      "type": "integer",
      "description": "Completed runs that failed"
    },
    "agent": {
      "type": "integer",
      "description": "ID of the agent the results belong to"
    },
    "agent_version": {
      "oneOf": [
        {},
        {
          "type": "null"
        }
      ],
      "description": "\nAgent version every result ran against, or `null` when the results did not all run against the same version.\n\nExample:\n```json\n{\n  \"history_id\": 812,\n  \"version_id\": \"v3\",\n  \"version_name\": \"Pricing prompt fix\",\n  \"is_current\": true\n}\n```\n"
    },
    "overall_evaluation": {
      "description": "\nAggregate evaluation across all runs in the report.\n\n- `success_rate` — percentage of runs that passed\n- `metric_summary` — keyed by metric ID. Every entry has `id`, `name`, `type`, `score`, `errors` (the scenarios whose runs failed the metric, with the failing run IDs) and `overall_explanation`. Enum metrics add `enums` (per enum value: `score` as a percentage, `count` and `runs`), numeric metrics add percentiles such as `p50`, and critical metrics add `categories` keyed by category ID\n- `worst_performing_metrics` — `binary_adherence` lists the IDs of binary metrics that did not pass on every run, lowest pass rate first\n- `numeric_metrics` — numeric metric averages with their percentiles, plus average ringing duration when available\n- `enum_metrics` — the metric ID of every enum evaluation, one entry per evaluated run\n- `extra_metrics` — derived figures such as average ringing duration and expected-outcome score\n\nExample:\n```json\n{\n  \"success_rate\": 66.67,\n  \"metric_summary\": {\n    \"101\": {\n      \"id\": 101,\n      \"name\": \"Politeness\",\n      \"type\": \"binary\",\n      \"vocera_defined_metric_code\": \"\",\n      \"score\": 0.67,\n      \"overall_explanation\": [],\n      \"errors\": [\n        {\n          \"id\": 3120,\n          \"name\": \"Asks for pricing\",\n          \"agent\": 42,\n          \"personality\": 7,\n          \"personality_name\": \"Busy professional\",\n          \"retell_agent_id\": \"\",\n          \"instructions\": \"\",\n          \"is_simulating\": false,\n          \"runs\": [90012]\n        }\n      ]\n    },\n    \"102\": {\n      \"id\": 102,\n      \"name\": \"Sentiment\",\n      \"type\": \"enum\",\n      \"vocera_defined_metric_code\": \"\",\n      \"score\": null,\n      \"overall_explanation\": [],\n      \"errors\": [],\n      \"enums\": {\n        \"positive\": {\"score\": 100.0, \"count\": 3, \"runs\": [{\"id\": 90011}, {\"id\": 90012}, {\"id\": 90013}]}\n      }\n    },\n    \"103\": {\n      \"id\": 103,\n      \"name\": \"Latency\",\n      \"type\": \"numeric\",\n      \"vocera_defined_metric_code\": \"\",\n      \"score\": 850.0,\n      \"p50\": 800.0,\n      \"overall_explanation\": [],\n      \"errors\": []\n    },\n    \"104\": {\n      \"id\": 104,\n      \"name\": \"Critical Deviations\",\n      \"type\": \"binary\",\n      \"vocera_defined_metric_code\": \"\",\n      \"score\": 0.67,\n      \"overall_explanation\": [],\n      \"errors\": [],\n      \"categories\": {\n        \"55\": {\n          \"id\": 55,\n          \"category\": \"Wrong price quoted\",\n          \"runs\": [{\"id\": 90012}],\n          \"runs_count\": 1,\n          \"priority_counts\": {\"critical\": 1, \"non-critical\": 0, \"not_a_bug\": 0},\n          \"scenarios\": {}\n        }\n      }\n    }\n  },\n  \"worst_performing_metrics\": {\"binary_adherence\": [101, 104]},\n  \"numeric_metrics\": [\n    {\"name\": \"Latency\", \"type\": \"numeric\", \"value\": 850.0, \"percentiles\": {\"p50\": 800.0}},\n    {\"name\": \"Average Ringing Duration\", \"type\": \"numeric\", \"value\": 2.5, \"percentiles\": {\"p50\": 2.5}}\n  ],\n  \"enum_metrics\": [102, 102, 102],\n  \"extra_metrics\": [\n    {\"name\": \"Average Ringing Duration\", \"type\": \"numeric\", \"value\": 2.5, \"percentiles\": {\"p50\": 2.5}},\n    {\"name\": \"Expected Outcome\", \"type\": \"numeric\", \"value\": 3.33}\n  ]\n}\n```\n"
    },
    "metrics": {
      "description": "\nMetrics configured on the agent.\n\nExample:\n```json\n[\n  {\n    \"id\": 101,\n    \"name\": \"Politeness\",\n    \"eval_type\": \"binary\",\n    \"simulation_enabled\": true,\n    \"observability_enabled\": true,\n    \"function_name\": null,\n    \"vocera_defined_metric_code\": \"\"\n  }\n]\n```\n"
    },
    "critical_categories": {
      "description": "\nCritical-issue categories found across the runs, most critical first. Categories marked as not a bug and evaluations marked as wrong are excluded.\n\nExample:\n```json\n[\n  {\n    \"id\": 55,\n    \"category\": \"Wrong price quoted\",\n    \"scenarios\": {},\n    \"runs_count\": 1,\n    \"runs\": [{\"id\": 90012}],\n    \"priority_counts\": {\"critical\": 1, \"non-critical\": 0, \"not_a_bug\": 0}\n  }\n]\n```\n"
    },
    "runs_by_tags": {
      "description": "\nKeyed by scenario tag: the IDs of the runs whose scenario carries the tag and the success rate (percentage) of those runs.\n\nExample:\n```json\n{\n  \"billing\": {\"runs\": [90013, 90012, 90011], \"success_rate\": 66.67}\n}\n```\n"
    },
    "latency_data": {
      "description": "\nResponse latency in milliseconds across all measured turns of all runs.\n\nExample:\n```json\n{\"mean\": 800.0, \"median\": 800.0, \"p50\": 800.0, \"p95\": 890.0, \"p99\": 898.0}\n```\n"
    },
    "failed_reasons": {
      "description": "\nFailure issues merged and deduplicated across the results, ranked by how many runs they affect.\n\nExample:\n```json\n{\n  \"issues\": [\n    {\n      \"rank\": 1,\n      \"title\": \"Missed pricing\",\n      \"description\": \"The agent never shared pricing when asked.\",\n      \"run_ids\": [90012],\n      \"affected_count\": 1\n    }\n  ],\n  \"total_failed_runs\": 1\n}\n```\n"
    },
    "performance_metrics": {
      "description": "\nPer-metric performance across the runs, rubric metrics first. `aggregate_unit` is `percent`, `value`, `score` or an empty string. `passed` and `threshold_text` come from the project rubric; `passed` is `null` and `in_rubric` is `false` for metrics without a rubric rule. Enum metrics add `enum_run_ids` (run IDs per enum value), rating metrics add `score_range_run_ids` and expected-outcome metrics add `review_required_run_ids`.\n\nExample:\n```json\n[\n  {\n    \"metric_id\": 101,\n    \"metric_name\": \"Politeness\",\n    \"eval_type\": \"binary\",\n    \"aggregate_value\": 66.7,\n    \"aggregate_unit\": \"percent\",\n    \"passed\": false,\n    \"threshold_text\": \">= 80%\",\n    \"evaluated_runs_count\": 3,\n    \"evaluated_run_ids\": [90013, 90012, 90011],\n    \"failing_run_ids\": [90012],\n    \"passing_run_ids\": [90013, 90011],\n    \"in_rubric\": true\n  },\n  {\n    \"metric_id\": 105,\n    \"metric_name\": \"Clarity\",\n    \"eval_type\": \"continuous_qualitative\",\n    \"aggregate_value\": 4.0,\n    \"aggregate_unit\": \"score\",\n    \"passed\": null,\n    \"threshold_text\": \"\",\n    \"evaluated_runs_count\": 3,\n    \"evaluated_run_ids\": [90013, 90012, 90011],\n    \"failing_run_ids\": [],\n    \"passing_run_ids\": [],\n    \"in_rubric\": false,\n    \"score_range_run_ids\": {\"0-50\": [], \"50-75\": [], \">75\": [90013, 90012, 90011]}\n  }\n]\n```\n"
    },
    "runs": {
      "description": "\nEvery run in the report, keyed by run ID. Present only when `ql` selects it (e.g. `{*}`); the default `{-runs}` omits it.\n\nExample:\n```json\n{\n  \"90012\": {\n    \"id\": 90012,\n    \"result_id\": 5591,\n    \"result_name\": \"Nightly regression\",\n    \"scenario\": 3120,\n    \"scenario_name\": \"Asks for pricing\",\n    \"personality_name\": \"Busy professional\",\n    \"test_profile_name\": null,\n    \"expected_outcome\": {\"score\": 0},\n    \"success\": false,\n    \"status\": \"completed\",\n    \"evaluation_status\": \"failure\",\n    \"evaluation\": {\n      \"metrics\": [\n        {\n          \"id\": 101,\n          \"name\": \"Politeness\",\n          \"type\": \"binary\",\n          \"score\": false,\n          \"score_normalized\": 0,\n          \"explanation\": [\"The agent interrupted the caller twice.\"],\n          \"extra\": {},\n          \"vocera_defined_metric_code\": \"\",\n          \"function_name\": null,\n          \"thumbs_up\": null\n        },\n        {\n          \"id\": 102,\n          \"name\": \"Sentiment\",\n          \"type\": \"enum\",\n          \"enum\": \"positive\",\n          \"explanation\": [],\n          \"extra\": {},\n          \"vocera_defined_metric_code\": \"\",\n          \"function_name\": null,\n          \"thumbs_up\": null\n        }\n      ]\n    },\n    \"timestamp\": \"2026-09-24T08:43:10.473761Z\",\n    \"executed_at\": \"2026-09-24T08:43:12.000000Z\",\n    \"duration\": \"01:00\",\n    \"error_message\": \"\",\n    \"metadata\": {\"ringing_duration\": 2.5},\n    \"inbound_number\": \"\",\n    \"outbound_dial_window_opens_at\": null,\n    \"outbound_dial_window_seconds\": null,\n    \"outbound_dial_window_closes_at\": null\n  }\n}\n```\n"
    }
  },
  "required": [
    "agent",
    "agent_version",
    "completed_runs_count",
    "critical_categories",
    "failed_reasons",
    "failed_runs_count",
    "latency_data",
    "metrics",
    "overall_evaluation",
    "performance_metrics",
    "runs_by_tags",
    "status",
    "success_rate",
    "success_runs_count",
    "total_runs_count"
  ]
}