---
title: "Get Observability Categories"
method: GET
path: "/observability/categories"
tags: ["observability"]
---

# Get Observability Categories

`GET /observability/categories`

Spend / tokens / task count per work category.

Fixed to the 7-day classification window; the response restates the window
so the UI labels it. ``non_coding`` is a first-class slice, never hidden.

## Query parameters

- `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

- CategoriesResponse — Category rollups. Strictly the 7-day classification window. ``non_coding`` is a first-class slice, never folded into ``other``. ``window_days`` / ``window_start`` restate the constraint so the UI labels it.
  - `categories` CategoryRollup[], required
    - `category` string, required — A member of ``WORK_CATEGORIES`` (incl. ``non_coding``).
    - `spend` number, required
    - `total_tokens` integer, required
    - `task_count` integer, required
  - `window_days` integer, required
  - `window_start` string, date-time, required
  - `unclassified_spend` number — Spend in the window on tasks with no category — no stored prompt to classify (never persisted inline or offloaded to S3). Shown as an explicit slice, never silently dropped.
  - `unclassified_tokens` integer — Tokens for unclassified tasks in the window.
  - `unclassified_task_count` integer — Number of tasks with no category in the window.
  - `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/versions/31dfe831e079/schema)
