---
title: "Get Observability Summary"
method: GET
path: "/observability/summary"
tags: ["observability"]
---

# Get Observability Summary

`GET /observability/summary`

Headline totals, previous-period trend, and daily spend series.

Separates total coding-harness spend from actual software-engineering spend
(``engineering_spend`` = total minus ``non_coding``).

## Query parameters

- `start_date` string, nullable — Range start (ISO date or datetime, UTC). Defaults to 30 days ago.
- `end_date` string, nullable — Range end (ISO date or datetime, UTC). Defaults to now.
- `scope` 'team' | 'personal' — ``team`` (default) aggregates the active team's coding-agent tasks; ``personal`` narrows to tasks on keys the requesting user created.

## Response `200`

Successful Response

- ObservabilitySummary — Headline totals for the overview, with a previous-period trend. ``engineering_spend`` excludes ``non_coding`` tasks; the gap between ``total_spend`` and ``engineering_spend`` is the "coding-agent traffic is not all software-engineering spend" finding the overview must surface.
  - `total_spend` number, required
  - `engineering_spend` number, required
  - `non_coding_spend` number, required
  - `routed_spend` number — Spend served via the Pioneer model router (USD).
  - `direct_spend` number — Spend on raw direct-model calls that bypass the router (USD).
  - `total_tokens` integer, required
  - `cache_read_tokens` integer — Sum of prompt-cache read tokens across the window. Dominant volume for coding harnesses; already stored on ``coding_agent_tasks``.
  - `cache_write_tokens` integer — Sum of prompt-cache write tokens across the window.
  - `context_tokens` integer — ``input + cache_read + cache_write`` — total tokens the model had to read across the window. The honest volume number.
  - `cache_hit_pct` number, nullable — ``cache_read / context_tokens`` in [0, 1]. Null when no context.
  - `context_amplification` number, nullable — ``context_tokens / output_tokens``. Null when either side is zero.
  - `cost_per_1k_output` number, nullable — USD per 1,000 generated tokens. Null when no output tokens.
  - `session_wall_ms_p50` integer — Median session ``duration_ms`` (one-shots excluded — they have ``duration_ms = 0`` by construction).
  - `session_wall_ms_p90` integer — 90th-percentile session ``duration_ms`` (one-shots excluded).
  - `total_wall_ms` integer — Sum of ``duration_ms`` over session tasks. Additive base measure used as the denominator of any future duty-cycle metric.
  - `active_ms` integer — Sum of ``inferences.latency_ms`` — model compute time in ms. Trust degrades with ``latency_coverage``.
  - `duty_cycle` number, nullable — ``active_ms / total_wall_ms`` over sessions. High => autonomous loop; low => human-in-the-loop. Null when no session wall time.
  - `output_throughput_per_s` number, nullable — ``output_tokens / (active_ms / 1000)`` — model tokens per second across the window. Null when no active_ms.
  - `cost_per_active_minute` number, nullable — ``total_cost / (active_ms / 60000)`` USD per minute of model time.
  - `latency_coverage` number, nullable — ``latency_sample_count / request_count`` — trust indicator for time-derived metrics. Null when no requests.
  - `task_count` integer, required
  - `session_count` integer, required
  - `one_shot_count` integer, required
  - `active_keys` integer, required
  - `active_harnesses` integer, required
  - `previous_total_spend` number, required — Total spend over the immediately preceding window of equal length.
  - `spend_trend_pct` number, nullable — Percent change vs previous period; null when previous is zero.
  - `daily` SummaryDailyPoint[], required
    - `date` string, required — UTC calendar day, ``YYYY-MM-DD``.
    - `spend` number, required — Total coding-harness spend (USD) that day.
    - `engineering_spend` number, required — Spend that quarter excluding ``non_coding`` tasks (USD).
    - `routed_spend` number — Spend that day served via the model router (USD).
    - `direct_spend` number — Spend that day on raw direct-model calls (USD).
  - `meta` ObservabilityMeta, required — Data-quality envelope attached to every observability response. Lets the UI label boundaries instead of silently under-reporting: the category window (classification only runs over recent inline payloads), the per-harness payload coverage, and the earliest date harness attribution is available (before which no data exists, so a picker must not offer it).
    - `category_window_days` integer, required — Category classification only covers the last N days of inline payloads.
    - `category_window_start` string, date-time, required — UTC start of the category-classification window (now - category_window_days).
    - `coverage_start_date` string, date-time, required — Earliest UTC date with caller metadata / harness attribution; date ranges before this return nothing.
    - `harness_coverage` HarnessCoverage[], required — Per-harness category-coverage gating for UI labelling.
      - `harness` string, required
      - `coverage` 'full' | 'partial' | 'excluded', required
    - `generated_at` string, date-time, required — UTC time this response was computed.

## Other responses

- `422` — Validation Error

---

[API](https://skmtc.net/pioneer/apis/brain-api.md) · [All operations](https://skmtc.net/pioneer/apis/brain-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/pioneer/brain-api/revisions/b92f75fd3b61/schema)
