> For the complete documentation index, see [llms.txt](https://docs.concurrence.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.concurrence.com/developer-guide/platform-api/safety/analytics.md).

# Analytics & Observability

Analyze call quality, production evaluations, operational health, recordings, event streams, and external-write review activity across a workspace.

Workspace-level analytics, call management, recording access, and stored external write proposals.

```mermaid
%%{init: {"flowchart":{"useMaxWidth":true,"nodeSpacing":20,"rankSpacing":30},"theme":"base","themeVariables":{"fontFamily":"Inter, sans-serif","fontSize":"16px","background":"#FAF8F6","primaryColor":"#F1EAE7","primaryTextColor":"#1A1817","primaryBorderColor":"#D7D2D0","secondaryColor":"#FDFCFB","tertiaryColor":"#F6F2F0","lineColor":"#575452","textColor":"#3D3937","clusterBkg":"#FDFCFB","clusterBorder":"#E8E2DF","edgeLabelBackground":"#FAF8F6","actorBkg":"#F1EAE7","actorTextColor":"#1A1817","actorBorder":"#D7D2D0","actorLineColor":"#575452","signalColor":"#575452","signalTextColor":"#3D3937","labelBoxBkgColor":"#F1EAE7","labelBoxBorderColor":"#D7D2D0","labelTextColor":"#3D3937","loopTextColor":"#3D3937","noteBkgColor":"#F6F2F0","noteBorderColor":"#D7D2D0","noteTextColor":"#3D3937","activationBkgColor":"#F1EAE7","activationBorderColor":"#D7D2D0","altSectionBkgColor":"#FAF8F6","altSectionColor":"#3D3937"},"fontFamily":"Inter, sans-serif"}}%%
flowchart LR
    subgraph Sources
        C[Calls & Recordings]
        P[Pipeline Events]
        T[Tool Executions]
    end
    subgraph Processing
        CI[Call Intelligence]
        A[Aggregation Engine]
    end
    subgraph Outputs
        D[Dashboards]
        API[Analytics API]
        SS[Event Stream SSE]
    end

    C --> CI --> A
    P --> A
    T --> A
    A --> D
    A --> API
    A --> SS

    style C fill:#FDFCFB,stroke:#D7D2D0,color:#3D3937,stroke-width:1px
    style P fill:#FDFCFB,stroke:#D7D2D0,color:#3D3937,stroke-width:1px
    style T fill:#FDFCFB,stroke:#D7D2D0,color:#3D3937,stroke-width:1px
    style CI fill:#FDFCFB,stroke:#D7D2D0,color:#3D3937,stroke-width:1px
    style A fill:#FDFCFB,stroke:#D7D2D0,color:#3D3937,stroke-width:1px
    style D fill:#FDFCFB,stroke:#D7D2D0,color:#3D3937,stroke-width:1px
    style API fill:#FDFCFB,stroke:#D7D2D0,color:#3D3937,stroke-width:1px
    style SS fill:#FDFCFB,stroke:#D7D2D0,color:#3D3937,stroke-width:1px
```

## Analytics

* **Usage summary**: Event counts by type with daily breakdown
* **Call statistics**: Volume and duration metrics
* **Event breakdown**: Distribution by type and source
* **Data quality**: Overall and by-source confidence distributions, review-pipeline fields, and daily confidence/event-volume trends

## Call KPIs <a href="#call-kpis" id="call-kpis"></a>

These reads compute call KPIs from one shared definition over the same per-call production records, which leave out simulation, Playground, and test traffic:

* `GET /v1/{workspace_id}/analytics/dashboard`, which the Console home KPI strip reads, plus [Call Quality](#call-quality) and [Latency](#latency)
* Agent analytics, `GET /v1/{workspace_id}/analytics/agents`
* Call benchmarks, `GET /v1/{workspace_id}/calls/benchmarks`
* The voice section of the [workspace health aggregate](#workspace-health-aggregate)
* The [Insights digest](/developer-guide/platform-api/safety/insights.md#get-health-digest)

The same window reports the same call counts and rates, such as the escalation rate, on each. The other call intelligence analytics on this page read those per-call records directly. For SQL, the [Insights schema](/developer-guide/platform-api/safety/insights.md#list-query-schema) lists the call KPI view and its per-call rows.

## Per-Service Results <a href="#per-service-results" id="per-service-results"></a>

[Advanced call metrics](#advanced-call-metrics), [tool performance](#tool-performance), and [production eval quality](#production-eval-quality) take `group_by=service_id`, which adds `groups`: one entry for each service with data in the window, ordered by `service_id`, each holding that service's `summary` and `trend`, plus `by_eval_key` on production eval quality, the same numbers the route returns for that `service_id`. The rest of the response is the same as without `group_by`, and `groups` is null without it. Calls and verdicts with no service count in the workspace numbers and in no group. A grouped answer holds at most 22,000 points: on advanced call metrics and tool performance that counts every trend point and breakdown row, and on production eval quality it counts the groups' trend points. A larger one returns `422`; use a coarser `interval`, a shorter range, or `service_id`.

On every analytics route that filters by `service_id`, the value must be a UUID, and any other value returns `422`.

## Trend Limits <a href="#trend-limits" id="trend-limits"></a>

[Call quality](#call-quality), [emotion trends](#emotion-trends), [latency](#latency), [tool performance](#tool-performance), [operator performance](#operator-performance), and [advanced call metrics](#advanced-call-metrics) each return a trend of at most 2,200 points. A range with more buckets than that at the chosen `interval` returns `422` with the bucket count; use a coarser `interval` or a shorter range. `days` stops at 90, so only a `date_from` and `date_to` range can be that long, and an hourly range fits up to 91 days, counting both dates. [Production eval quality](#production-eval-quality) takes only `days`, so its trend always fits.

## Unavailable Analytics <a href="#unavailable-analytics" id="unavailable-analytics"></a>

These analytics routes return `503` with `{"detail": "Analytics unavailable"}` when they can't read their data: the usage summary (`/analytics/usage`), the event breakdown (`/analytics/events`), the dashboard (`/analytics/dashboard`), agent analytics (`/analytics/agents`), call statistics (`/analytics/calls`), [advanced call metrics](#advanced-call-metrics), [period comparison](#period-comparison), [call quality](#call-quality), [emotion trends](#emotion-trends), [latency](#latency), [tool performance](#tool-performance), [operator performance](#operator-performance), [production eval quality](#production-eval-quality), and call benchmarks (`/calls/benchmarks`). On these routes a `200` is always a measured answer, so treat a `503` as no answer rather than as zero.

## Call Intelligence

Per-call intelligence summaries are recorded at call end for analytics use. Fully analyzed records can include a rule-based quality score (0-100), emotion summary, latency metrics, conversation shape, tool performance, and operator data. `risk_summary` and `safety_summary` remain in the wire shape for compatibility but are empty in the current runtime; safety escalation is authored in the agent and its context graph rather than produced by a separate call-risk classifier. Some external voice runtimes persist only a terminal call envelope, so `quality_score` can be `null` and analysis summaries can be empty. See [Voice Agent, Call Intelligence Persistence](/developer-guide/platform-api/conversations/voice-agent.md#call-intelligence-persistence) for field details and scoring rules.

### Call Intelligence Analytics (5 Endpoints)

These workspace-scoped operations require `viewer+` access. Quality distribution tiers are excellent (90-100), good (70-89), fair (50-69), and poor (0-49).

#### Call Quality

{% openapi src="<https://platform.api-us.concurrence.com/v1/openapi.json>" path="/v1/{workspace\_id}/analytics/call-quality" method="get" %}
<https://platform.api-us.concurrence.com/v1/openapi.json>
{% endopenapi %}

#### Emotion Trends

{% openapi src="<https://platform.api-us.concurrence.com/v1/openapi.json>" path="/v1/{workspace\_id}/analytics/emotion-trends" method="get" %}
<https://platform.api-us.concurrence.com/v1/openapi.json>
{% endopenapi %}

#### Latency

{% openapi src="<https://platform.api-us.concurrence.com/v1/openapi.json>" path="/v1/{workspace\_id}/analytics/latency" method="get" %}
<https://platform.api-us.concurrence.com/v1/openapi.json>
{% endopenapi %}

#### Tool Performance

{% openapi src="<https://platform.api-us.concurrence.com/v1/openapi.json>" path="/v1/{workspace\_id}/analytics/tool-performance" method="get" %}
<https://platform.api-us.concurrence.com/v1/openapi.json>
{% endopenapi %}

#### Operator Performance

{% openapi src="<https://platform.api-us.concurrence.com/v1/openapi.json>" path="/v1/{workspace\_id}/analytics/operator-performance" method="get" %}
<https://platform.api-us.concurrence.com/v1/openapi.json>
{% endopenapi %}

## Production Eval Quality

Reports channel-agnostic production-evaluation quality across voice, text, SMS, and email. `pass_rate` is the share of judged verdicts that passed, where `judged` counts verdicts with a pass or fail outcome, and `avg_score` is the mean value of numeric metric verdicts. A judge's assertion verdict carries no score. When no verdicts exist, arrays are empty and rate fields are `null` rather than producing an error.

{% openapi src="<https://platform.api-us.concurrence.com/v1/openapi.json>" path="/v1/{workspace\_id}/analytics/eval-quality" method="get" %}
<https://platform.api-us.concurrence.com/v1/openapi.json>
{% endopenapi %}

## Calls & Recordings

* **Call listing**: Filter by date, status, and duration. Calls include the final state and, when computed, a quality score from call intelligence. Supports `continuation_token` for cursor-based pagination alongside `offset`.
* **Call detail**: A compatibility read of a call's turns, timeline, and playback data. For a saved platform-managed call's turns, their place in the recording, and the timeline, read [conversation detail](/developer-guide/platform-api/conversations.md#voice-call-detail).
* **Call intelligence**: Terminal operational summary with quality breakdown, key moments, emotion, latency, conversation, tool, and operator data when available
* **Phone volume**: Call volume per phone number over a time window
* **Recordings**: Time-limited signed URLs for audio playback, plus recording metadata

## Review Queue

The review queue API lists stored external write proposals and records a reviewer's decision on one. See the [Review Queue guide](/developer-guide/platform-api/integrations/review-queue.md) and the [Review Queue API reference](https://docs.concurrence.com/api-reference/readme/platform/review-queue) for endpoint schemas. Conversation-scoped integration approval is a different mechanism documented in [Approval-Gated Integration Writes](/developer-guide/platform-api/integrations/approval-gated-integration-writes.md).

The operator-shell **Review Queue** in the Console refers to patient-facing Surface approvals, not external write proposals.

## Population Health Analytics

A layered epidemiology pipeline materializes six per-workspace analytics output tables for downstream risk stratification, dashboard visualizations, and explainable cohort analysis:

* **`patient_condition_fact`**: exploded patient × condition fact with onset, age at onset, normalized code system, and cohort bucket.
* **`disease_trends_monthly`**: incident counts by code × month × cohort.
* **`disease_prevalence_current`**: active-condition prevalence with Wilson 95% confidence intervals, which stay reliable for small samples.
* **`disease_cohort_drivers`**: Standardized Prevalence Ratio (SPR - the ratio of a cohort's observed condition prevalence to the prevalence expected from the overall population) per `(code, cohort)` with Byar 95% confidence intervals. The canonical measure of whether a cohort over- or under-indexes for a condition.
* **`patient_condition_burden`**: per-patient Charlson Comorbidity Index (CCI - a weighted comorbidity score that predicts mortality risk from a patient's condition list; Quan 2005 ICD-10 mapping) and age-adjusted CCI (Charlson 1994). Feature-ready for risk models.
* **`condition_cooccurrence_pairs`**: association statistics for condition pairs - Jaccard similarity, lift, pointwise mutual information (PMI - how much more often two conditions co-occur than chance would predict), and chi-square.

All association and ratio tables emit a `min_support_met` flag at the standard small-cell suppression threshold (observed ≥ 5). Filter on it to avoid reporting unstable rates.

Methodology follows the standard epidemiology literature: Wilson (1927), Breslow & Day (1987), Charlson et al. (1987, 1994), Quan et al. (2005).

## Platform Health Monitoring

These operations provide real-time visibility without querying the analytics warehouse. Both require `viewer+` access and use the standard read-rate policy.

### Connector Health

{% openapi src="<https://platform.api-us.concurrence.com/v1/openapi.json>" path="/v1/{workspace\_id}/sensorium/connector-health" method="get" %}
<https://platform.api-us.concurrence.com/v1/openapi.json>
{% endopenapi %}

### Sense-to-Act Latency

{% openapi src="<https://platform.api-us.concurrence.com/v1/openapi.json>" path="/v1/{workspace\_id}/sensorium/loop-latency" method="get" %}
<https://platform.api-us.concurrence.com/v1/openapi.json>
{% endopenapi %}

## Voice Judge

Audio-native quality evaluation can score eligible recorded calls across ten dimensions directly from stereo audio when the feature and required recording are available. Unlike post-interaction quality scoring, the Voice Judge evaluates the audio artifact and produces per-dimension scores with evidence for UI drill-down. The ten dimensions are also represented as aggregate built-in metrics in the [metric store](/developer-guide/platform-api/safety/metric-store.md).

{% content-ref url="/pages/WHZkvgbpbaJe0oVXfwSE" %}
[Voice Judge](/developer-guide/platform-api/safety/voice-judge.md)
{% endcontent-ref %}

## Pipeline Health

Read-only endpoints under `/v1/{workspace_id}/pipeline/` report stored pipeline data: event and entity totals, per-source history and events, outbound summaries and logs, entity resolution metrics, and event throughput. They do not report live connector state. See [Connector Runner, Pipeline Observability](/developer-guide/platform-api/data-world-model/connector-runner.md#pipeline-observability) for the endpoint reference.

## Workspace Health Aggregate

The compatibility-named `command-center` operation returns a composite workspace health snapshot; it is not a Console page.

{% openapi src="<https://platform.api-us.concurrence.com/v1/openapi.json>" path="/v1/{workspace\_id}/command-center" method="get" %}
<https://platform.api-us.concurrence.com/v1/openapi.json>
{% endopenapi %}

The `cached` field is `true` when the response reuses a recently generated snapshot and `false` when it was generated for the current request. The response defines six alert checks. **Permissions**: `viewer+`.

## Percentile Analytics

### Advanced Call Metrics

{% openapi src="<https://platform.api-us.concurrence.com/v1/openapi.json>" path="/v1/{workspace\_id}/analytics/calls/advanced" method="get" %}
<https://platform.api-us.concurrence.com/v1/openapi.json>
{% endopenapi %}

### Period Comparison

{% openapi src="<https://platform.api-us.concurrence.com/v1/openapi.json>" path="/v1/{workspace\_id}/analytics/calls/comparison" method="get" %}
<https://platform.api-us.concurrence.com/v1/openapi.json>
{% endopenapi %}

## Entity Intelligence & World Sync

Entity-level intelligence endpoints (relationship graph, provenance, lineage, duplicate detection, entity search) and the outbound world sync events endpoint are documented with the rest of the world model API.

{% content-ref url="/pages/UZmj9knjuYak24tQk90Y" %}
[Data & World Model](/developer-guide/platform-api/data-world-model.md)
{% endcontent-ref %}

## Real-Time Event Stream

The Server-Sent Events stream carries real-time workspace updates.

{% openapi src="<https://platform.api-us.concurrence.com/v1/openapi.json>" path="/v1/{workspace\_id}/events/stream" method="get" %}
<https://platform.api-us.concurrence.com/v1/openapi.json>
{% endopenapi %}

Subscribes to the workspace event channel and streams events as they occur. The call events are:

| Event Type       | When It Fires              |
| ---------------- | -------------------------- |
| `call.started`   | A call begins              |
| `call.ended`     | A call completes           |
| `call.escalated` | An operator joins the call |

`review.submitted` is a reserved legacy review event type; external-write proposal decisions are audit-logged and do not emit it. See [SSE Events](/developer-guide/platform-api/conversations/sse-events.md) for the full list of event types and their fields.

**Protocol details:**

* Media type: `text/event-stream`
* Heartbeat: Comment every 30s to keep connection alive
* Reconnection: Send `Last-Event-ID` header on reconnect for replay of recent events
* Backpressure: Oldest events dropped when the event buffer is full
* Falls back to error event if the event system is unavailable

**Permissions**: `viewer+`.

## Dashboards

Workspace-scoped analytics dashboards that can be rendered in the Console or embedded in external applications.

Dashboards are managed through CRUD endpoints under `/v1/{workspace_id}/dashboards/`. Each dashboard has a slug (URL-friendly identifier), title, description, and chart configuration. The list endpoint returns all dashboards for the workspace. The get-by-slug endpoint returns the full dashboard definition including data queries and chart layout.

The `@amigo-ai/dashboards` package provides an embeddable React component (`DashboardEmbed`) that renders a dashboard given a workspace ID and slug. The component supports two authentication modes: explicit API token or backend-for-frontend proxy (where the hosting application handles authentication and the component omits the token).


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.concurrence.com/developer-guide/platform-api/safety/analytics.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
