:hedgehog: PostHog is the leading platform for building self-driving products. Our developer tools – AI observability, analytics, session replay, flags, experiments, error tracking, logs, and more – capture all the context agents need to diagnose problems, uncover opportunities, and ship fixes. Steer it all from Slack, web, desktop, or the MCP.
Python ab-testingai-analyticsanalyticscdpdata-warehouseexperimentsfeature-flagsjavascriptproduct-analyticspythonreactsession-replaysurveystypescriptweb-analytics
chore(replay-vision): refresh product docs against current behavior (#73994)
Arno Hillenbe36eb32351f
diff --git a/products/replay/skills/investigating-replay/SKILL.md b/products/replay/skills/investigating-replay/SKILL.mdindex b2ad02ec09ac..37bc1eaf84e7 100644--- a/products/replay/skills/investigating-replay/SKILL.md+++ b/products/replay/skills/investigating-replay/SKILL.md@@ -199,7 +199,7 @@ with a throwaway scanner — but **ask the user's permission before creating any"prompt": "Summarize what the user was trying to do, whether they succeeded, and any friction they hit."},"query": { "kind": "RecordingsQuery" },- "model": "gemini-3.6-flash",+ "model": "gemini-3-flash-preview","enabled": false}```diff --git a/products/replay_vision/README.md b/products/replay_vision/README.mdindex 910c083a2664..b38651a5e576 100644--- a/products/replay_vision/README.md+++ b/products/replay_vision/README.md@@ -4,15 +4,53 @@ A sub-product of Session Replay. Users configure named **scanners** that PostHog## Concepts-**Scanner** — a configured probe scoped to a team. Carries a prompt, a scanner type (`monitor` / `classifier` / `scorer` / `summarizer`), a `RecordingsQuery` that selects matching sessions, and a sampling rate. Each enabled scanner has a Temporal schedule that fires every 5 minutes and sweeps for newly settled recordings past the scanner's watermark (`last_swept_at`); disabling a scanner removes its schedule, and re-enabling restarts the sweep from now rather than backfilling the gap (see **Backfill** for the explicit way to cover history). Summarizers always emit per-facet embeddings for downstream free-text search.+**Scanner** — a configured probe scoped to a team.+Carries a prompt, a scanner type (`monitor` / `classifier` / `scorer` / `summarizer`), a `RecordingsQuery` that selects matching sessions, a Gemini model (which sets the per-observation credit price), and two volume levers: `sampling_mode` (a quality pre-filter over the matched sessions) and `sampling_rate` (a random downsample applied after it).+Each enabled scanner has a Temporal schedule that fires every 5 minutes and sweeps for newly settled recordings past the scanner's watermark (`last_swept_at`); disabling a scanner removes its schedule, and re-enabling restarts the sweep from now rather than backfilling the gap (see **Backfill** for the explicit way to cover history).+Summarizers always emit per-facet embeddings for downstream free-text search.+A scanner with `emits_signals` also pushes one signal per finding into the Signals inbox (`replay_vision` / `scanner_finding`), which is what the editor's Self-driving step turns on.**Inline scan** — a prompt pointed at named sessions with nothing saved, for a one-off question (`POST /vision/scanners/inline_scan/`, and the path agents take instead of creating a throwaway scanner). An observation belongs to a scanner, so a scan mints one keyed by a fingerprint of its config: the same question reuses the observations it already has, a different question gets its own. Those rows carry `origin=inline`, are never listed or swept, and are reaped once they have nothing to show. See `backend/inline_scan.py` for why they exist and `backend/scanner_access.py` for how results are read back.-**Observation** — one application of a scanner to a session, unique per (scanner, session). Created in `pending` when triggered (by the scanner's schedule or the `/observe/` action), transitions to `running` while `ApplyScannerWorkflow` executes (rasterize the recording to video → upload to Gemini → multi-turn scan), and lands in `succeeded` (result persisted, then a `$recording_observed` event plus embeddings/tags emitted fail-soft), `failed` (with a `kind:message` `error_reason`), or `ineligible` (the session doesn't qualify — too short, too idle, no recording). Each observation snapshots the full scanner state (`scanner_snapshot`) that produced it, so subsequent edits to the scanner don't retro-mutate history. Rows stranded in `pending`/`running` by a dead workflow are failed as `orphaned` by a reaper on the reconciler tick.+**Observation** — one application of a scanner to a session, unique per (scanner, session).+Created in `pending` when triggered (by the scanner's schedule, the `/observe/` and `/bulk_observe/` actions, or a retry of a failed observation), transitions to `running` while `ApplyScannerWorkflow` executes (rasterize the recording to video → upload to Gemini → multi-turn scan), and lands in `succeeded` (result persisted under `scanner_result.model_output`, then a `$recording_observed` event plus embeddings/tags emitted fail-soft), `failed` (with a `kind:message` `error_reason`), or `ineligible` (the session doesn't qualify — too short, too idle, no recording).+Each observation snapshots the full scanner state (`scanner_snapshot`) that produced it, so subsequent edits to the scanner don't retro-mutate history.+Rows stranded in `pending`/`running` by a dead workflow are failed as `orphaned` by a reaper on the reconciler tick.+Teams rate observations thumbs up/down, and those ratings drive the scanner's quality view and its AI prompt suggestions.+A finding can also be turned into a PostHog Task once (the observation remembers the task it minted).**Backfill** — one historical scan of a scanner over a closed, past time window, walked newest-first. The window is closed, so the candidate query enumerates the exact eligible set at creation: the quoted cost (`total_count` x the model's credit price) is a ceiling, and actual spend only falls below it as already-observed sessions dedup, expired recordings land `ineligible`, and failures write no receipt. The scanner's full config is frozen into `scanner_snapshot` at creation, so later edits change neither the enumerated set nor the price nor what the observations record. A per-backfill Temporal schedule ticks every minute, dispatching the same `ApplyScannerWorkflow` children within the shared in-flight caps plus a per-backfill sub-cap; its `window_end` is clamped to the scanner's sweep watermark so live and backfill never contest a session. Backfill and live observations have equal quota priority: an active backfill's remaining commitment counts toward the projected monthly spend, the per-observation creation check enforces the org limit for both, and exhausting the monthly quota moves the backfill to `paused_quota` until an explicit resume.-**Quota** — succeeded observations write an immutable usage receipt; usage (receipts + in-flight rows) is counted against a monthly per-organization quota, with per-scanner volume estimates summed into a projected-usage prognosis shown at configuration time.+**Quota** — succeeded observations write an immutable usage receipt priced in credits (1 credit = $0.01, set by the observation's model).+Usage (receipts + in-flight rows + in-flight prompt tests) counts against the organization's credit limit for the current billing period, falling back to the calendar month when billing hasn't synced the product.+Per-scanner volume estimates are credit-weighted and summed into a projected-spend prognosis shown at configuration time.+Scheduled observations over budget are skipped; on-demand ones are rejected.++## Scenes and tabs++**Scanner list** (`/replay-vision`), two tabs switched through `?tab=`:++| Tab | `?tab=` | What it shows |+| -------- | ------- | ------------------------------------------------------------------------- |+| Scanners | (none) | The team's scanner roster plus the team-wide vision metrics. |+| Usage | `usage` | Credit spend over time for the org, bucketed daily/weekly/monthly/yearly. |++**Scanner** (`/replay-vision/<scanner-id>`), seven tabs switched through `?tab=`. Overview is the default and writes no param.++| Tab | `?tab=` | What it shows |+| ------------------ | --------------- | --------------------------------------------------------------------------------------------------------------------------- |+| Overview | `overview` | At-a-glance panels: impact, verdict mix, top fixed and freeform tags, score distribution. Leads with the daily digest card. |+| Observations | `observations` | The scanner's observations, filterable by status, verdict, tags, and date. |+| On-demand | `on-demand` | Scan now: by session ID, or by picking from recent recordings. |+| Backfills | `backfills` | The scanner's historical backfills: create one over a past window, watch progress, pause/resume. |+| Configuration | `configuration` | Read-only view of the scanner's current config. |+| Calibration | `calibration` | Thumbs up/down ratings, accuracy over time, feedback themes, and the AI prompt recommendation with its prompt test. |+| Digests and alerts | `actions` | The vision actions bound to this scanner. |++**Scanner editor** (`/replay-vision/<scanner-id>/<step>`) is a stepper rather than tabs: Template, Configure, Scan conditions (`triggers`), Self-driving.+Observations, vision actions, and action runs each have their own scene under `/replay-vision/observations/…` and `/replay-vision/actions/…`.++Outside these scenes, the product also renders inside the session replay player: `ObservationsDock` shows what the team's scanners found about the recording being watched (standard players only — embedded, shared, and chromeless players skip every vision surface).## Experiment-created scanners@@ -22,13 +60,19 @@ The template lives in `frontend/src/scenes/experiments/replayVisionScanner.ts` a## Layout-- `backend/models/` — `ReplayScanner`, `ReplayObservation`, `ReplayScannerBackfill`, usage receipts, quota grants.-- `backend/api/` — DRF viewsets and serializers (scanners, observations, backfills, stats, live progress over SSE).+- `backend/models/` — `ReplayScanner`, `ReplayObservation`, `ReplayScannerBackfill`, observation labels (ratings), usage receipts, quota grants, prompt suggestions, vision actions.+- `backend/api/` — DRF viewsets and serializers (scanners, observations, backfills, prompt suggestions, quota, vision actions, stats, live progress over SSE).- `backend/queries/` — ClickHouse candidate selection (watermark + settle window + eligibility + sampling), the backfill's bounded descending walk and its exact count, and volume estimates.-- `backend/temporal/` — the apply workflow and its activities, per-scanner sweep, per-backfill tick, schedule reconciler (+ observation and backfill-schedule reapers), estimate refresher, and the Gemini file cleanup sweep.-- `backend/quota.py` — monthly quota accounting.+- `backend/temporal/` — the apply workflow and its activities, per-scanner sweep, per-backfill tick, schedule reconciler (+ observation and backfill-schedule reapers), estimate refresher, prompt evaluation, vision actions, and the Gemini file cleanup sweep.+- `backend/quota.py` + `backend/billing.py` — credit accounting: the per-model price table, the receipt ledger, and the quota snapshot the meter reads.+- `backend/enqueue_claims.py` — atomic slot claims that keep on-demand scans inside the in-flight caps.- `backend/embeddings.py` — the embedding identity shared by the write and search sides.+- `backend/prompt_suggestions.py` + `backend/proposers/` — rating-driven prompt rewrites, one proposer per scanner type. `backend/prompt_evaluation.py` re-runs a suggestion against rated sessions before it's applied, and `backend/feedback_themes.py` clusters written thumbs-down feedback.+- `backend/impact.py` — affected sessions and users per scanner, exportable as a static cohort.+- `backend/tags.py` + `backend/tag_suggestions.py` — tag slug normalization and data-grounded vocabulary suggestions for classifiers.- `backend/max_tools.py` — Max AI tools (draft a scanner prompt, digest summaries, semantic search over observations).+- `backend/scanner_access.py` — scanner-level RBAC shared by the API and the vision-action engine.+- `backend/facade/` — the cross-product entry point (session observations, formatted for Max reports).- `backend/admin.py` — Django admin registrations.-- `backend/temporal/vision_actions/` + `backend/api/vision_actions.py` — scheduled follow-up actions over observations (under active development).-- `frontend/` — kea-first scenes and logics for the scanner management UI.+- `backend/temporal/vision_actions/` + `backend/api/vision_actions.py` — scheduled follow-up actions over observations: group summaries and alerts, including the built-in daily digest.+- `frontend/` — kea-first scenes and logics for the scanner management UI; `frontend/generated/` carries the generated API types.diff --git a/products/replay_vision/mcp/tools.yaml b/products/replay_vision/mcp/tools.yamlindex f3928d95a48a..05f1baf8d794 100644--- a/products/replay_vision/mcp/tools.yaml+++ b/products/replay_vision/mcp/tools.yaml@@ -67,9 +67,9 @@ tools:title: List vision actionsdescription: >List the vision actions (the "and then…" automations that run over a scanner's observations) for the current- project. A vision action in `mode: group_summary` produces the group summary shown on the "Summaries and- alerts" tab — one report synthesized from up to `max_observations` observations of its bound scanner; `mode:- alert` delivers only when its alert condition holds. Each row carries the bound `scanner`, `mode`,+ project. A vision action in `mode: group_summary` produces the group summary shown on the scanner's "Digests+ and alerts" tab — one report synthesized from up to `max_observations` observations of its bound scanner;+ `mode: alert` delivers only when its alert condition holds. Each row carries the bound `scanner`, `mode`,`trigger_type`, cadence, and `is_scanner_digest` (the built-in daily digest). Pass `?scanner=<id>` to filterto one scanner. To read a specific action's produced reports, list its runs with `vision-actions-runs-list`.vision-actions-retrieve:@@ -255,14 +255,14 @@ tools:idempotent: truetitle: Get replay vision quotadescription: >- Get the organization's monthly Replay vision credit budget (1 credit = $0.01; observations cost credits by- model). Returns `credit_limit` (null when uncapped), `credits_used` (in-flight + succeeded observations- counted against it), `remaining`, `exhausted`, `projected_monthly_credits`, and the- `period_start`/`period_end` of the current calendar-month window. Check `remaining`/`exhausted` before- creating a scanner or calling `vision-scanners-scan-session`: over budget, a scanner's scheduled sweeps- silently skip their observations until the next period, while `vision-scanners-scan-session` is rejected- outright with a 402. Pair with `vision-scanners-estimate-create` to size a new scanner against the remaining- budget.+ Get the organization's Replay vision credit budget (1 credit = $0.01; observations cost credits by model).+ Returns `credit_limit` (null when uncapped), `credits_used` (in-flight + succeeded observations counted+ against it), `remaining`, `exhausted`, `projected_monthly_credits`, and the `period_start`/`period_end` of+ the current budget window (the org's billing period, or the calendar month when billing hasn't synced).+ Check `remaining`/`exhausted` before creating a scanner or calling `vision-scanners-scan-session`: over+ budget, a scanner's scheduled sweeps silently skip their observations until the next period, while+ `vision-scanners-scan-session` is rejected outright with a 402. Pair with `vision-scanners-estimate-create`+ to size a new scanner against the remaining budget.vision-scanners-affected-cohort-create:operation: vision_scanners_affected_cohort_createenabled: true@@ -314,24 +314,26 @@ tools:title: Create replay vision scannerdescription: >Create a replay vision scanner. Pick a `scanner_type` — `monitor` (open-ended observations), `classifier`- (assign a tag from a fixed label set), `scorer` (numeric rubric), or `summarizer` (free-text summary, which- always emits facet embeddings) — and fill `scanner_config` to match: all types need a `prompt`; classifiers- also need `tags`; scorers also need `scale`; summarizers optionally set `length`. Unknown `scanner_config`- keys are rejected. `query` is a `RecordingsQuery` shape that defines which sessions the scanner watches —- `date_from` and `date_to` are ignored (the schedule controls time). `sampling_rate` is a 0..1 random- downsample applied after the query matches (default 1.0). `model` chooses the LLM, and sets what each- observation costs in credits. Names must be unique within the team. Before creating a broad scanner (a- permissive `query` and/or high `sampling_rate`), first call `vision-scanners-estimate-create` to project its- monthly credit spend and `vision-quota-retrieve` to check the org's remaining budget — an enabled scanner- sweeps matching recordings every 5 minutes, and creation itself does not check quota, so a too-broad scanner- can exhaust the monthly budget on its first sweeps. Creating a scanner also creates its built-in daily- digest: an enabled vision action with no delivery targets that synthesizes the scanner's observations once a- day and spends credits of its own, on top of the observations. Disable or delete it with- `vision-actions-update` / `vision-actions-delete` if you don't want it. To get notified about what the- scanner finds (a Slack alert or a summary on another schedule), create a further vision action bound to it- with `vision-actions-create`. For a scanner scoped to one experiment's exposed sessions, load the- `scanning-experiments-with-replay-vision` skill first — it derives the query from the experiment's exposure- criteria.+ (assign a tag from a fixed label set), `scorer` (numeric rubric), or `summarizer` (free-text summary, always+ with facet embeddings for search) — and fill `scanner_config` to match: all types need a `prompt`; monitors+ optionally set `allow_inconclusive`; classifiers also need `tags` (and optionally `multi_label`,+ `allow_freeform_tags`); scorers also need `scale`; summarizers optionally set `length`. Unknown+ `scanner_config` keys are rejected. `query` is a `RecordingsQuery` shape that defines which sessions the+ scanner watches — `date_from` and `date_to` are ignored (the schedule controls time). `sampling_mode` is a+ quality pre-filter over matched sessions (`focused` / `balanced` / `comprehensive`, default `comprehensive`)+ and `sampling_rate` is a 0..1 random downsample applied after it (default 1.0). `model` chooses the LLM and+ sets the credit price of every observation. Names must be unique within the team. Before creating a broad+ scanner (a permissive `query`, loose `sampling_mode`, and/or high `sampling_rate`), first call+ `vision-scanners-estimate-create` to project its monthly credit spend and `vision-quota-retrieve` to check+ the org's remaining budget — an enabled scanner sweeps matching recordings every 5 minutes, and creation+ itself does not check quota, so a too-broad scanner can exhaust the budget on its first sweeps. Creating a+ scanner also creates its built-in daily digest: an enabled vision action with no delivery targets that+ synthesizes the scanner's observations once a day and spends credits of its own, on top of the observations.+ Disable or delete it with `vision-actions-update` / `vision-actions-delete` if you don't want it. To get+ notified about what the scanner finds (a Slack alert or a summary on another schedule), create a further+ vision action bound to it with `vision-actions-create`. For a scanner scoped to one experiment's exposed+ sessions, load the `scanning-experiments-with-replay-vision` skill first — it derives the query from the+ experiment's exposure criteria.exclude_params:- id- scanner_version@@ -370,15 +372,17 @@ tools:idempotent: truetitle: Estimate replay vision scanner volumedescription: >- Preview how many observations a proposed scanner would generate before saving it. Send a `query`- (`RecordingsQuery` shape; `date_from`/`date_to` are ignored — the estimate uses a fixed 30-day lookback) and- an optional `sampling_rate` and `model`. Returns `matched_sessions_in_window`, the `window_days` it was- measured over, `estimated_observations_per_month`, `credits_per_observation` (the price at that model),- `estimated_credits_per_month`, and `other_enabled_scanners_monthly_credits`. Enabled scanners sweep every 5- minutes, so a broad query can exhaust the monthly budget quickly — run this and compare the *credit* figures- against `remaining` from `vision-quota-retrieve` before `vision-scanners-create`. Comparing observation- counts against `remaining` understates the cost: `remaining` is denominated in credits, and one observation- costs several.+ Preview how many observations a proposed scanner would generate, and what they would cost, before saving it.+ Send a `query` (`RecordingsQuery` shape; `date_from`/`date_to` are ignored — the estimate uses a fixed+ 30-day lookback) plus the proposed `sampling_rate`, `sampling_mode` and `model`, and `scanner_id` when+ re-estimating an existing scanner so its own projection isn't double-counted. Returns+ `matched_sessions_in_window`, the `window_days` it was measured over, `estimated_observations_per_month`,+ `credits_per_observation`, `estimated_credits_per_month`, and `other_enabled_scanners_monthly_credits` (the+ org's other enabled scanners' projected spend). Enabled scanners sweep every 5 minutes, so a broad query can+ exhaust the budget quickly — run this before `vision-scanners-create` and compare the *credit* figures+ (never raw observation counts) against `remaining` from `vision-quota-retrieve`. These projections are per+ month while `remaining` covers only the rest of the current period, so prorate them by the days left between+ `period_start` and `period_end` before comparing.vision-scanners-get:operation: vision_scanners_retrieveenabled: true@@ -448,10 +452,11 @@ tools:title: List replay vision scannersdescription: >List all replay vision scanners in the current project. A scanner watches a slice of session recordings- (defined by its `query` and `sampling_rate`) and runs one of four LLM analyses against each matching- session: `monitor` (open-ended observations), `classifier` (tag from a fixed label set), `scorer` (numeric- rubric), or `summarizer` (free-text summary, with facet embeddings for downstream search). Each scanner- returns its current configuration, enabled state, sampling rate, and `last_swept_at` timestamp.+ (defined by its `query`, `sampling_mode` and `sampling_rate`) and runs one of four LLM analyses against each+ matching session: `monitor` (open-ended observations), `classifier` (tag from a fixed label set), `scorer`+ (numeric rubric), or `summarizer` (free-text summary with facet embeddings for downstream search). Each+ scanner returns its current configuration, enabled state, sampling settings, `last_swept_at` timestamp, and+ its credit figures (`credits_per_observation`, `estimated_monthly_credits`, `credits_this_month`).vision-scanners-observations-create-task-create:operation: vision_scanners_observations_create_task_createenabled: false@@ -654,12 +659,13 @@ tools:title: Update replay vision scannerdescription: >Partially update a replay vision scanner by ID. Send only the fields you want to change. Common changes:- toggle `enabled` to pause/resume scanning, adjust `sampling_rate`, tweak the `scanner_config` prompt or- tags, or refine the `query` to watch a different slice of sessions. `scanner_type` is locked after creation- — to change it, delete and recreate. Editing any config field bumps `scanner_version`; existing observations- keep a snapshot of the previous config for reproducibility. If you widen the `query` or raise- `sampling_rate`, re-check projected volume with `vision-scanners-estimate-create` and remaining budget with- `vision-quota-retrieve` first — the scanner resumes sweeping every 5 minutes at the new, broader scope.+ toggle `enabled` to pause/resume scanning, adjust `sampling_rate` or `sampling_mode`, tweak the+ `scanner_config` prompt or tags, or refine the `query` to watch a different slice of sessions.+ `scanner_type` is locked after creation — to change it, delete and recreate. Editing any config field bumps+ `scanner_version`; existing observations keep a snapshot of the previous config for reproducibility. If you+ widen the `query`, raise `sampling_rate`, loosen `sampling_mode`, or move to a pricier `model`, re-check+ projected spend with `vision-scanners-estimate-create` and remaining budget with `vision-quota-retrieve`+ first — the scanner resumes sweeping every 5 minutes at the new, broader scope.exclude_params:- id- scanner_versiondiff --git a/products/replay_vision/skills/creating-replay-vision-scanners/SKILL.md b/products/replay_vision/skills/creating-replay-vision-scanners/SKILL.mdindex b53e68248903..b3696865a5ec 100644--- a/products/replay_vision/skills/creating-replay-vision-scanners/SKILL.md+++ b/products/replay_vision/skills/creating-replay-vision-scanners/SKILL.md@@ -1,6 +1,6 @@---name: creating-replay-vision-scanners-description: "Guides agents through creating and safely sizing a Replay Vision scanner: choosing the scanner type (monitor/classifier/scorer/summarizer), shaping the RecordingsQuery that selects sessions, and — crucially — estimating observation volume and checking the org's monthly quota before creating, so a broad scanner doesn't exhaust the budget on its first scheduled sweep.\nTRIGGER when: user asks to create, set up, or configure a Replay Vision scanner, OR when you are about to call vision-scanners-create, OR when widening an existing scanner's query or sampling_rate via vision-scanners-update.\nDO NOT TRIGGER when: only reading scanners or observations, deleting a scanner, or running an existing scanner against a single session on demand (vision-scanners-scan-session). For a one-off question about sessions you already have, use vision-scanners-inline-scan-create rather than creating a scanner — the skill's first section covers when that applies."+description: "Guides agents through creating and safely sizing a Replay Vision scanner: choosing the scanner type (monitor/classifier/scorer/summarizer), shaping the RecordingsQuery that selects sessions, and — crucially — estimating the credits it will spend and checking the org's remaining budget before creating, so a broad scanner doesn't exhaust the budget on its first scheduled sweep.\nTRIGGER when: user asks to create, set up, or configure a Replay Vision scanner, OR when you are about to call vision-scanners-create, OR when widening an existing scanner's query, sampling_rate, or sampling_mode (or moving it to a pricier model) via vision-scanners-update.\nDO NOT TRIGGER when: only reading scanners or observations, deleting a scanner, or running an existing scanner against a single session on demand (vision-scanners-scan-session). For a one-off question about sessions you already have, use vision-scanners-inline-scan-create rather than creating a scanner — the skill's first section covers when that applies."---# Creating Replay Vision scanners@@ -8,11 +8,11 @@ description: "Guides agents through creating and safely sizing a Replay Vision sA scanner is a standing LLM probe over session recordings. Once created and enabled, it runs on a**Temporal schedule that sweeps every 5 minutes**, applying its prompt to each new matching recording andrecording the result as an observation (a queryable `$recording_observed` event). Each observation spends-credits from a **monthly org credit budget** (1 credit = $0.01), and an observation's price depends on the-scanner's model — so budget in credits, not in observation counts.+**credits** (1 credit = $0.01) from the org's budget for the current billing period, and an observation's+price depends on the scanner's `model` — so budget in credits, not in observation counts.That schedule is exactly why creation needs a gut-check: a scanner with a permissive query and full sampling-starts consuming quota automatically and can drain the whole month's budget within its first few sweeps.+starts spending automatically and can drain the whole period's budget within its first few sweeps.Creation itself does **not** check quota — that protection only kicks in at observation time, by which pointthe budget may already be gone.@@ -44,14 +44,12 @@ confirmation before creating. This is the heart of the skill; the rest is supporPick a `scanner_type` and write its `scanner_config`. Every type needs a `prompt`; the rest is type-specific:-| Type | What it produces | `scanner_config` shape |-| ------------ | ----------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------- |-| `monitor` | Open-ended observation against a prompt (e.g. "flag rage clicks") | `{"prompt": "..."}` |-| `classifier` | Assigns tags from a fixed label set | `{"prompt": "...", "tags": ["tag-a", "tag-b"]}` — `tags` needs ≥1 entry; optional `"multi_label": true`, `"allow_freeform_tags": false` |-| `scorer` | Numeric score on a rubric | `{"prompt": "...", "scale": {"min": 1, "max": 5, "label": "frustration"}}` — `min` < `max`; `label` optional |-| `summarizer` | Free-text summary plus facet embeddings for search | `{"prompt": "..."}`; optional `"length": "short" \| "medium" \| "long"` (default `"medium"`) |--Summarizers always emit facet embeddings; there is no option to turn that off.+| Type | What it produces | `scanner_config` shape |+| ------------ | ----------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |+| `monitor` | Open-ended observation against a prompt (e.g. "flag rage clicks") | `{"prompt": "..."}`; optional `"allow_inconclusive": true` (off by default, so the model must answer yes or no) |+| `classifier` | Assigns tags from a fixed label set | `{"prompt": "...", "tags": ["tag-a", "tag-b"]}` — `tags` needs ≥1 entry; optional `"multi_label": false` (defaults to true), `"allow_freeform_tags": true` (off by default) |+| `scorer` | Numeric score on a rubric | `{"prompt": "...", "scale": {"min": 1, "max": 5, "label": "frustration"}}` — `min` < `max`; `label` optional |+| `summarizer` | Free-text summary, plus facet embeddings for search | `{"prompt": "..."}`; optional `"length": "short" \| "medium" \| "long"` (default `"medium"`). Embeddings are always on |`scanner_type` is **locked after creation** — to change it you delete and recreate, so confirm the type isright up front, and get the `scanner_config` shape right (a wrong shape is a create error, not a silent@@ -70,34 +68,59 @@ When the target is one experiment's exposed population, that's its own job — u`scanning-experiments-with-replay-vision` skill, which derives this query from the experiment's exposurecriteria instead of hand-building it.-`sampling_rate` (0..1, default 1.0) is a random downsample applied _after_ the query matches. Lower it to-trade coverage for budget.+Two levers narrow it further, applied in this order:++- `sampling_mode` (default `comprehensive`) is a quality pre-filter on the matched sessions: `focused` keeps+ only the top sessions by surfacing score, `balanced` drops the lowest-quality ones, `comprehensive` keeps+ everything. Use it to spend the budget on sessions worth watching rather than shrinking coverage at random.+- `sampling_rate` (0..1, default 1.0) is a random downsample applied after that. Lower it to trade coverage+ for budget. Exactly 0 pauses scanning; non-zero rates below 0.0001 are rejected.++#### Which model?++`model` sets the price of every observation the scanner makes, so it's a cost lever as much as a quality one:+`gemini-3.5-flash-lite` (2 credits), `gemini-3-flash-preview` (5 credits, the default) and `gemini-3.6-flash`+(15 credits). Start at the default and only reach for `gemini-3.6-flash` when the cheaper tiers demonstrably+miss what the scanner is looking for.### Step 3: Size it — the gut-check (do not skip)Before creating, run both checks and reason about them together:1. **Estimate spend** — call `vision-scanners-estimate-create` with the proposed `query`, `sampling_rate`,- and `model`. It returns `matched_sessions_in_window`, the `window_days` measured,- `estimated_observations_per_month`, `credits_per_observation` (the price at that model), the resulting- `estimated_credits_per_month`, and `other_enabled_scanners_monthly_credits` (what the org's other enabled- scanners are already projected to spend).-2. **Check budget** — call `vision-quota-retrieve` for `remaining` and `exhausted` against the org's monthly- `credit_limit` (credits, 1 credit = $0.01; `null` when uncapped).--Compare credits against credits — `remaining` is denominated in credits, not observations, so comparing it-against `estimated_observations_per_month` understates the cost by the model's per-observation price.+ `sampling_mode` and `model`. It returns `matched_sessions_in_window`, the `window_days` measured,+ `estimated_observations_per_month`, `credits_per_observation`, `estimated_credits_per_month`, and+ `other_enabled_scanners_monthly_credits` (what the org's other enabled scanners are already projected to+ spend). When editing an existing scanner, pass its `scanner_id` so its own estimate isn't counted twice.+2. **Check budget** — call `vision-quota-retrieve` for `remaining` and `exhausted` against the org's+ `credit_limit` (credits, 1 credit = $0.01; `null` when uncapped), plus the `period_start`/`period_end`+ of the current period.++Compare credits with credits over the same horizon, the way the product UI does — `remaining` is denominated+in credits, not observations, so comparing it against `estimated_observations_per_month` understates the cost+by the model's per-observation price.+`remaining` is what's left for the rest of the current period, so prorate the monthly projection to that+window rather than comparing a full month against it:++```text+fleet_monthly = estimated_credits_per_month + other_enabled_scanners_monthly_credits+period_days = period_end - period_start (in days)+days_left = period_end - now (in days, floored at 0)+rest_of_period = fleet_monthly * days_left / period_days+```-Then decide:+Then decide on `rest_of_period` against `remaining`:-- If `estimated_credits_per_month` plus `other_enabled_scanners_monthly_credits` comfortably fits within- `remaining`, proceed.+- If it comfortably fits within `remaining`, proceed.- If it's a large fraction of (or exceeds) `remaining`, **stop and tell the user the concrete numbers**- — e.g. "This scanner is projected to spend ~X credits/month (~N observations at C credits each), on top of- ~Y credits from your other scanners; you have Z left this month." — and confirm before creating, or suggest- tightening the `query`, lowering `sampling_rate`, or picking a cheaper `model` first.-- If the org is already `exhausted`, say so — a new enabled scanner won't produce anything until the budget- resets, and its observations will be silently skipped.+ (e.g. "This scanner is projected to spend ~X credits/month, about $Y; over the N days left this period+ that's ~R credits against the Z you have left."), then confirm before creating. Tightening the `query`,+ switching `sampling_mode` to `focused`, lowering `sampling_rate`, or picking a cheaper `model` are all+ ways to bring it down.+- Quote `estimated_credits_per_month` too, since it's what the scanner costs in a full period once this+ one resets. Mid-period a scanner can fit in `remaining` and still blow the next period's budget.+- If the org is already `exhausted`, say so. A new enabled scanner won't produce anything until the budget+ resets: its scheduled observations are silently skipped, and on-demand scans are rejected outright.Confirmation here is a conversation step, not an API capability — surface the trade-off and let the userchoose. When the projected volume is clearly small relative to the budget, you don't need to ask.@@ -113,7 +136,8 @@ Call `vision-scanners-create`. Minimal example:"scanner_config": { "prompt": "Flag sessions where the user repeatedly clicks the same element in frustration." },"query": { "kind": "RecordingsQuery", "events": [{ "id": "$rageclick", "type": "events" }] },"sampling_rate": 1.0,- "model": "gemini-3.6-flash",+ "sampling_mode": "comprehensive",+ "model": "gemini-3-flash-preview","enabled": true}```@@ -121,6 +145,11 @@ Call `vision-scanners-create`. Minimal example:`name` must be unique within the team. Set `enabled: false` if the user wants to create it paused (noschedule, no quota consumption) and turn it on later.+`emits_signals: true` is the other switch worth knowing: it augments the prompt with the Signals side mission+and pushes one signal per finding into the PostHog Signals inbox, where findings corroborate across sessions+into reports. Turn it on when the user wants the scanner to feed their inbox rather than just accumulate+observations they have to go read.+## After creation- Show the scanner's PostHog URL from the response so the user can review it in the UI.@@ -132,14 +161,16 @@ schedule, no quota consumption) and turn it on later.## Updating an existing scanner`vision-scanners-update` is a partial update — send only changed fields. **Re-run the Step 3 gut-check-whenever you widen scope**: a broader `query` or a higher `sampling_rate` raises the sweep volume just like a-fresh broad scanner would. Toggling `enabled`, tweaking the prompt, or narrowing the query don't need a-re-estimate. Editing config bumps `scanner_version`; past observations keep a snapshot of the old config.+whenever you widen scope or raise the price**: a broader `query`, a higher `sampling_rate`, a looser+`sampling_mode`, or a pricier `model` all raise the monthly spend just like a fresh broad scanner would.+Toggling `enabled`, tweaking the prompt, or narrowing the query don't need a re-estimate. Editing config bumps+`scanner_version`; past observations keep a snapshot of the old config.## Gotchas- **One observation per (scanner, session).** Re-running a scanner on a session it already observed — even a- failed or ineligible one — is a no-op and won't produce a fresh scan.+ failed or ineligible one — is a no-op and won't produce a fresh scan. A failed observation can be retried+ from the UI (which replaces it), but there's no MCP tool for that.- **Ineligible ≠ failed.** Observations can land `ineligible` (e.g. `too_short`, `no_recording`) — a terminalnon-error outcome. Check `error_reason` when triaging why a scanner produced nothing.- **Provider/model are Google/Gemini only** in the current version.diff --git a/products/replay_vision/skills/exploring-replay-vision-observations/SKILL.md b/products/replay_vision/skills/exploring-replay-vision-observations/SKILL.mdindex 45d3841f093d..5397788c95e2 100644--- a/products/replay_vision/skills/exploring-replay-vision-observations/SKILL.md+++ b/products/replay_vision/skills/exploring-replay-vision-observations/SKILL.md@@ -13,12 +13,15 @@ and doing something useful with it. For creating or sizing scanners, use [[creat- **Scanner → observations.** One observation = one scan of one session. There is at most one observationper `(scanner, session)`.-- **The finding lives in `scanner_result`.** Its shape depends on the scanner's `scanner_type`, but it always- carries a `confidence`:- - `monitor` → a `verdict` (`yes` / `no` / `inconclusive`) plus an open-ended observation.- - `classifier` → one or more `tags` from the scanner's label set.- - `scorer` → a numeric score on the scanner's `scale`.- - `summarizer` → a free-text summary (optionally with facet embeddings).+- **The finding lives in `scanner_result.model_output`.** Its shape depends on the scanner's `scanner_type`,+ but it always carries a `confidence`:+ - `monitor` → a `verdict` (`yes` / `no`, plus `inconclusive` only when the scanner sets+ `allow_inconclusive`) and the `reasoning` behind it.+ - `classifier` → one or more `tags` from the scanner's label set, plus `tags_freeform` when the scanner+ allows freeform tags, and the `reasoning`.+ - `scorer` → a numeric `score` on the scanner's `scale`, and the `reasoning`.+ - `summarizer` → a `title` and free-text `summary`, plus the facets that get embedded for search+ (`intent`, `outcome`, `friction_points`, `keywords`).- **Only `succeeded` observations carry a finding.** Triage the rest by `status`/`error_reason` (see below).- **Observations are LLM judgments, not ground truth.** One observation is one model's read of one session —corroborate before you act on it.@@ -35,6 +38,11 @@ the inbox path — see _Acting on findings_ below.If the user gave a `/project/<id>/replay-vision/<scanner-id>` URL, that path segment is the scanner ID.Otherwise list them with `vision-scanners-list` and pick the relevant one.+A `?tab=` on that URL tells you which surface they're looking at, which usually says what they want:+`overview` (the default, charts and stat panels), `observations` (the list), `on-demand` (scan a session now),+`backfills` (historical scans over a past window), `configuration`, `calibration` (ratings and the prompt+recommendation), or `actions` (digests and alerts).+Then call `vision-scanners-get` to read its configuration **before** reading results — the `scanner_type` and`scanner_config.prompt` tell you how to interpret `scanner_result` (a `verdict` field only makes sense once youknow it's a monitor; a score only means something against the scorer's `scale`).@@ -49,18 +57,26 @@ Pick the axis that matches the question:`order_by` (e.g. `-result_score`, `-completed_at`) to surface the strongest hits first.- **What did every scanner find about one session?** → `vision-observations-list` (the `session_id` queryparameter is REQUIRED). Use this while investigating a single recording.+- **The distribution, not the rows?** → `vision-scanners-observations-stats` gives one scanner's status mix+ and success rate, distinct sessions covered, rating totals, and the per-type distributions (monitor verdict+ counts, classifier tag rankings, scorer score summary and histogram) without paging through observations.+- **Has something already summarized this?** → if the scanner has digests or alerts attached, read them instead of+ re-deriving the pattern: `vision-actions-list` (`?scanner=<id>`, or `vision-actions-retrieve` for one+ action's selection and cadence), then `vision-actions-runs-list` and+ `vision-actions-runs-retrieve` for a run's `synthesized_markdown`. The report cites its sources inline as+ `[obs N]`, matching `observations[N-1]`, so you can check each claim against the observation it came from.- **The full detail of one finding** → `vision-scanners-observations-get` or `vision-observations-retrieve` —returns the frozen `scanner_snapshot` (config at run time) and the complete `scanner_result`, including anyevent citations that link the finding back to specific events in the recording.Triage `status` so you don't mistake a non-result for "nothing wrong":-| status | meaning | typical `error_reason` |-| --------------------- | ------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- |-| `succeeded` | has a `scanner_result` | — |-| `ineligible` | session couldn't be analysed — a normal outcome, not an error | `too_short`, `no_recording`, `too_inactive`, `too_long`, `no_events` |-| `failed` | the scan errored | `provider_rejected`, `validation_failed`, `rasterization_failed`, `provider_transient`, `internal_error` |-| `pending` / `running` | still in flight | — |+| status | meaning | typical `error_reason` |+| --------------------- | ------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- |+| `succeeded` | has a `scanner_result` | — |+| `ineligible` | session couldn't be analysed — a normal outcome, not an error | `too_short`, `no_recording`, `too_inactive`, `too_long`, `no_events` |+| `failed` | the scan errored | `provider_rejected`, `validation_failed`, `rasterization_failed`, `provider_transient`, `internal_error`, `orphaned` |+| `pending` / `running` | still in flight | — |A scanner that looks like it "found nothing" is often producing mostly `ineligible` observations — check themix before concluding.@@ -102,13 +118,26 @@ Match the action to the user's intent, and **corroborate before you create work*- **Summarize a pattern.** Report the finding back with the numbers and a few representative `session_id`s(e.g. "12 of 40 succeeded observations flagged checkout confusion; sessions A, B, C"). Cite, don't assert.+- **Size it.** `vision-scanners-impact-retrieve` counts the sessions and users a scanner hit over a trailing+ window, so the finding lands as "this affected N users", not "here are some sessions". Monitors take no+ qualifier, classifiers need `tag`, scorers need `min_score`/`max_score`. Watch `sessions_without_user`:+ sessions with no distinct ID are why the user count can trail the session count.- **Make it trackable.** When a finding is corroborated across several sessions (not one low-confidencehit), capture it durably with the tools that exist: create an `insight` or `notebook` to track itsfrequency, bundle the supporting recordings into a session-recording playlist so a human can watch the- evidence, and add an `annotation` if it marks a regression. There is **no MCP tool to open a PostHog+ evidence, and add an `annotation` if it marks a regression. To act on the affected people rather than the+ sessions, `vision-scanners-affected-cohort-create` snapshots them into a static cohort (dated, not+ live-updating) you can use for funnels, retention, surveys, or experiment exclusion. There is **no MCP tool to open a PostHogtask directly** — to route a finding into tracked work, use the Inbox path below (for signal-emittingscanners) or hand the summary to a human or coding agent to act on. Group by distinct issue, not perobservation.+- **Fix the scanner instead.** When the findings are wrong rather than interesting, rate the observations+ with `vision-observations-label-create` (thumbs up/down plus written feedback; team-wide, last write wins,+ clearable with `vision-observations-label-destroy`). Then check+ `vision-scanners-prompt-suggestions-current` — it returns the newest suggestion, whether it's `stale`, and+ the `rated_count` behind it — before spending a `vision-scanners-prompt-suggestions-generate` call. Apply+ the rewrite with `vision-scanners-prompt-suggestions-apply`, or leave it with+ `vision-scanners-prompt-suggestions-dismiss`. Applying is team-wide and takes effect from the next sweep.- **Work the Inbox.** If the scanner emits signals, its findings may already be clustered into signal reports —read and act on those with `inbox-reports-list` + `inbox-report-artefacts-list` (the report's work log is theevidence). See the [[inbox-exploration]] skill; that path also records your work against the report.@@ -126,5 +155,6 @@ claim — the same rigor the signals pipeline applies before it promotes observa(even ineligible/failed) is a no-op.- **Findings are snapshotted.** Each observation keeps the `scanner_snapshot` it ran under, so olderobservations may reflect a previous prompt/config (`scanner_version`).-- **Quota is shared.** On-demand scans count against the org's monthly budget — check `vision-quota-retrieve`- before triggering a batch of them.+- **Quota is shared and priced in credits.** Every observation spends credits (1 credit = $0.01) by model,+ from one org-wide budget for the billing period. An on-demand scan over budget is rejected outright, so+ check `vision-quota-retrieve` before triggering a batch of them.diff --git a/products/signals/skills/signals-scout-replay-vision/SKILL.md b/products/signals/skills/signals-scout-replay-vision/SKILL.mdindex d20abbcf5673..a34b12045d7d 100644--- a/products/signals/skills/signals-scout-replay-vision/SKILL.md+++ b/products/signals/skills/signals-scout-replay-vision/SKILL.md@@ -32,7 +32,7 @@ You author reports directly via the report channel (`scout-emit-report` / `scout## The push/pull boundary (read first — it defines what you author)-Scanners can have `emits_signals: true`. Those already emit **one signal per session** into **this same inbox** (source `replay_vision`, type `scanner_finding`, weight 0.5 — they corroborate across sessions before a report promotes). That is the _push_ path. **You are the pull path.** Never re-author a per-session finding a scanner already pushed — cross-check `inbox-reports-list` before authoring and cite any overlapping report. The push path emits under the `replay_vision` source product; that source filter only exists once the push-path work has shipped, so try it, but if the filter is rejected or returns nothing, fall back to listing recent reports unfiltered (and the `session_replay` source) and match on the scanner name and example `session_id`s — don't assume "no `replay_vision` reports" means the push path is silent. Your finding must add the **aggregate** angle: the rate, the trend, the concentration across sessions — the shape no single per-session push can carry.+Scanners can have `emits_signals: true`. Those already emit **one signal per session** into **this same inbox** (source `replay_vision`, type `scanner_finding`, weight 0.5 — they corroborate across sessions before a report promotes). That is the _push_ path. **You are the pull path.** Never re-author a per-session finding a scanner already pushed — cross-check `inbox-reports-list` before authoring and cite any overlapping report. The push path emits under the `replay_vision` source product, so filter on it; when it returns nothing, also scan recent reports unfiltered (and the `session_replay` source) and match on the scanner name and example `session_id`s, since a per-session finding can reach the inbox clustered under a neighboring surface. Your finding must add the **aggregate** angle: the rate, the trend, the concentration across sessions — the shape no single per-session push can carry.Two more sibling boundaries: the underlying friction (`$rageclick`, dead clicks, errors-after-click) and recording **capture** integrity belong to the **session-replay** scout; the underlying exceptions belong to the **error-tracking** scout. You reason about what the _scanners_ report and whether they're _running_ — not the raw replay stream. Honor their `dedupe:` entries and check `inbox-reports-list` before authoring on a surface they own.@@ -124,7 +124,7 @@ A candidate is an **enabled** scanner whose `obs_7d` dropped well below `obs_pri- `vision-scanners-get` (`scanner_id`) — read the scanner row directly. `enabled: false` means an operator turned it off — not a gap. `updated_at` near the drop with a bumped `scanner_version` means a config edit (narrowed query, lowered sampling) — deliberate; cite it as context and stop. `last_swept_at` going stale while `enabled` is true is the schedule itself stalling. (Scanner edits aren't in the activity log, so this row is the **only** place to date them — don't reach for `advanced-activity-logs-list`.)- `vision-scanners-observations-list` (`scanner_id`, `status: "failed"` then `status: "ineligible"`) — a wall of failures is a broken scanner (model/provider error); a wall of `ineligible` (`too_short`, `no_recording`) is usually a query that now matches sessions it can't observe. Read `error_reason`.-- `vision-quota-retrieve` — `exhausted: true` means every scheduled observation is being skipped org-wide until the monthly reset; that silences _all_ scanners at once.+- `vision-quota-retrieve` — the budget is org-wide credits (1 credit = $0.01, priced per model) for the current billing period. `exhausted: true` means every scheduled observation is being skipped org-wide until the period resets; that silences _all_ scanners at once.Bundle all scanner-health items for the run into **one** P3 finding (multiple silent scanners is one story), unless a single high-value scanner's gap warrants its own P2.@@ -173,11 +173,11 @@ ORDER BY sessions_7d DESCLIMIT 30```-A tag whose `sessions_7d` jumps clearly above its `prior_weekly_sessions` (already the weekly-equivalent baseline) is a candidate. For **summarizers**, raw `scanner_output_summary` text is freeform — don't group on it. Instead read the top recent summaries (`vision-scanners-observations-list` for the scanner, or the `scanner_output_title`/`scanner_output_summary` columns) and look for a **recurring theme** across many distinct sessions: the same complaint, flow, or failure described again and again. That's the aggregation the summarizer can't do for itself. If the team runs an `emits_embeddings` summarizer, recurring themes may also be searchable via the signals semantic surface — but the cross-session _count_ is what makes it a finding.+A tag whose `sessions_7d` jumps clearly above its `prior_weekly_sessions` (already the weekly-equivalent baseline) is a candidate. For **summarizers**, raw `scanner_output_summary` text is freeform — don't group on it. Instead read the top recent summaries (`vision-scanners-observations-list` for the scanner, or the `scanner_output_title`/`scanner_output_summary` columns) and look for a **recurring theme** across many distinct sessions: the same complaint, flow, or failure described again and again. That's the aggregation the summarizer can't do for itself. Summarizers always emit facet embeddings, so recurring themes may also be searchable via the signals semantic surface — but the cross-session _count_ is what makes it a finding.#### Emits-signals dedupe courtesy-For any scanner with `emits_signals: true`, its per-session findings are already in this inbox. Before authoring anything touching that scanner, `inbox-reports-list` and look for an overlapping report — try the `replay_vision` source filter, but it only exists once the push-path work has shipped, so fall back to an unfiltered recent-reports scan matched on the scanner name / example `session_id`s if the filter isn't recognized. Author only if you add the aggregate angle the per-session pushes lack, and cite the overlapping report's id. If the push path itself looks broken (a scanner with `emits_signals` whose observations succeed but no matching reports appear over a soak window), that _is_ a finding — a silent push gap — P3, name the scanner; but only once you've confirmed the `replay_vision` source is actually live (don't mistake "push path not shipped yet" for "push path broken").+For any scanner with `emits_signals: true`, its per-session findings are already in this inbox. Before authoring anything touching that scanner, `inbox-reports-list` on the `replay_vision` source and look for an overlapping report, backed by an unfiltered recent-reports scan matched on the scanner name / example `session_id`s. Author only if you add the aggregate angle the per-session pushes lack, and cite the overlapping report's id. If the push path itself looks broken (a scanner with `emits_signals` whose observations succeed but no matching reports appear over a soak window), that _is_ a finding — a silent push gap — P3, name the scanner.### Save memory as you go@@ -237,10 +237,10 @@ Direct calls (read-only):- `vision-scanners-get` (`scanner_id`) — the one scanner's full row: `enabled`, `scanner_version`, `updated_at`, `last_swept_at`. The **only** place to date a config edit (scanner changes aren't in the activity log).- `vision-scanners-observations-list` (`scanner_id`, `status`, `verdict`, `tags`, `triggered_by`) — the **only** way to see failed/ineligible observations (footgun #5) and read `error_reason`.- `vision-observations-list` (`session_id`) — every scanner's observation on one session, for example links.-- `vision-quota-retrieve` — org monthly quota `remaining` / `exhausted`.+- `vision-quota-retrieve` — the org's credit budget for the billing period: `remaining` / `exhausted`.- `query-session-recordings-list` / `session-recording-get` — resolve `session_id`s to watchable recordings for a finding's example links.- `read-data-schema` — confirm `$recording_observed` and its `scanner_output_*` properties exist before aggregating.-- `inbox-reports-list` — pre-author dedupe; the push path (source `replay_vision`, once shipped) and the session-replay scout land findings here too. Don't assume the `replay_vision` source filter exists yet — fall back to an unfiltered scan if it's rejected.+- `inbox-reports-list` — pre-author dedupe; the push path (source `replay_vision`) and the session-replay scout land findings here too. Back the source filter with an unfiltered recent scan, since an overlapping finding can sit under a neighboring source.Inbox & reviewer routing (mechanics in `authoring-scouts` → `references/report-contract.md`):diff --git a/services/mcp/schema/generated-tool-definitions.json b/services/mcp/schema/generated-tool-definitions.jsonindex f406fde36375..696349a8bb66 100644--- a/services/mcp/schema/generated-tool-definitions.json+++ b/services/mcp/schema/generated-tool-definitions.json@@ -10460,7 +10460,7 @@}},"vision-actions-list": {- "description": "List the vision actions (the \"and then…\" automations that run over a scanner's observations) for the current project. A vision action in `mode: group_summary` produces the group summary shown on the \"Summaries and alerts\" tab — one report synthesized from up to `max_observations` observations of its bound scanner; `mode: alert` delivers only when its alert condition holds. Each row carries the bound `scanner`, `mode`, `trigger_type`, cadence, and `is_scanner_digest` (the built-in daily digest). Pass `?scanner=<id>` to filter to one scanner. To read a specific action's produced reports, list its runs with `vision-actions-runs-list`.",+ "description": "List the vision actions (the \"and then…\" automations that run over a scanner's observations) for the current project. A vision action in `mode: group_summary` produces the group summary shown on the scanner's \"Digests and alerts\" tab — one report synthesized from up to `max_observations` observations of its bound scanner; `mode: alert` delivers only when its alert condition holds. Each row carries the bound `scanner`, `mode`, `trigger_type`, cadence, and `is_scanner_digest` (the built-in daily digest). Pass `?scanner=<id>` to filter to one scanner. To read a specific action's produced reports, list its runs with `vision-actions-runs-list`.","category": "Replay vision","feature": "replay_vision","summary": "List vision actions",@@ -10587,7 +10587,7 @@}},"vision-quota-retrieve": {- "description": "Get the organization's monthly Replay vision credit budget (1 credit = $0.01; observations cost credits by model). Returns `credit_limit` (null when uncapped), `credits_used` (in-flight + succeeded observations counted against it), `remaining`, `exhausted`, `projected_monthly_credits`, and the `period_start`/`period_end` of the current calendar-month window. Check `remaining`/`exhausted` before creating a scanner or calling `vision-scanners-scan-session`: over budget, a scanner's scheduled sweeps silently skip their observations until the next period, while `vision-scanners-scan-session` is rejected outright with a 402. Pair with `vision-scanners-estimate-create` to size a new scanner against the remaining budget.",+ "description": "Get the organization's Replay vision credit budget (1 credit = $0.01; observations cost credits by model). Returns `credit_limit` (null when uncapped), `credits_used` (in-flight + succeeded observations counted against it), `remaining`, `exhausted`, `projected_monthly_credits`, and the `period_start`/`period_end` of the current budget window (the org's billing period, or the calendar month when billing hasn't synced). Check `remaining`/`exhausted` before creating a scanner or calling `vision-scanners-scan-session`: over budget, a scanner's scheduled sweeps silently skip their observations until the next period, while `vision-scanners-scan-session` is rejected outright with a 402. Pair with `vision-scanners-estimate-create` to size a new scanner against the remaining budget.","category": "Replay vision","feature": "replay_vision","summary": "Get replay vision quota",@@ -10615,7 +10615,7 @@}},"vision-scanners-create": {- "description": "Create a replay vision scanner. Pick a `scanner_type` — `monitor` (open-ended observations), `classifier` (assign a tag from a fixed label set), `scorer` (numeric rubric), or `summarizer` (free-text summary, which always emits facet embeddings) — and fill `scanner_config` to match: all types need a `prompt`; classifiers also need `tags`; scorers also need `scale`; summarizers optionally set `length`. Unknown `scanner_config` keys are rejected. `query` is a `RecordingsQuery` shape that defines which sessions the scanner watches — `date_from` and `date_to` are ignored (the schedule controls time). `sampling_rate` is a 0..1 random downsample applied after the query matches (default 1.0). `model` chooses the LLM, and sets what each observation costs in credits. Names must be unique within the team. Before creating a broad scanner (a permissive `query` and/or high `sampling_rate`), first call `vision-scanners-estimate-create` to project its monthly credit spend and `vision-quota-retrieve` to check the org's remaining budget — an enabled scanner sweeps matching recordings every 5 minutes, and creation itself does not check quota, so a too-broad scanner can exhaust the monthly budget on its first sweeps. Creating a scanner also creates its built-in daily digest: an enabled vision action with no delivery targets that synthesizes the scanner's observations once a day and spends credits of its own, on top of the observations. Disable or delete it with `vision-actions-update` / `vision-actions-delete` if you don't want it. To get notified about what the scanner finds (a Slack alert or a summary on another schedule), create a further vision action bound to it with `vision-actions-create`. For a scanner scoped to one experiment's exposed sessions, load the `scanning-experiments-with-replay-vision` skill first — it derives the query from the experiment's exposure criteria.",+ "description": "Create a replay vision scanner. Pick a `scanner_type` — `monitor` (open-ended observations), `classifier` (assign a tag from a fixed label set), `scorer` (numeric rubric), or `summarizer` (free-text summary, always with facet embeddings for search) — and fill `scanner_config` to match: all types need a `prompt`; monitors optionally set `allow_inconclusive`; classifiers also need `tags` (and optionally `multi_label`, `allow_freeform_tags`); scorers also need `scale`; summarizers optionally set `length`. Unknown `scanner_config` keys are rejected. `query` is a `RecordingsQuery` shape that defines which sessions the scanner watches — `date_from` and `date_to` are ignored (the schedule controls time). `sampling_mode` is a quality pre-filter over matched sessions (`focused` / `balanced` / `comprehensive`, default `comprehensive`) and `sampling_rate` is a 0..1 random downsample applied after it (default 1.0). `model` chooses the LLM and sets the credit price of every observation. Names must be unique within the team. Before creating a broad scanner (a permissive `query`, loose `sampling_mode`, and/or high `sampling_rate`), first call `vision-scanners-estimate-create` to project its monthly credit spend and `vision-quota-retrieve` to check the org's remaining budget — an enabled scanner sweeps matching recordings every 5 minutes, and creation itself does not check quota, so a too-broad scanner can exhaust the budget on its first sweeps. Creating a scanner also creates its built-in daily digest: an enabled vision action with no delivery targets that synthesizes the scanner's observations once a day and spends credits of its own, on top of the observations. Disable or delete it with `vision-actions-update` / `vision-actions-delete` if you don't want it. To get notified about what the scanner finds (a Slack alert or a summary on another schedule), create a further vision action bound to it with `vision-actions-create`. For a scanner scoped to one experiment's exposed sessions, load the `scanning-experiments-with-replay-vision` skill first — it derives the query from the experiment's exposure criteria.","category": "Replay vision","feature": "replay_vision","summary": "Create replay vision scanner",@@ -10644,7 +10644,7 @@}},"vision-scanners-estimate-create": {- "description": "Preview how many observations a proposed scanner would generate before saving it. Send a `query` (`RecordingsQuery` shape; `date_from`/`date_to` are ignored — the estimate uses a fixed 30-day lookback) and an optional `sampling_rate` and `model`. Returns `matched_sessions_in_window`, the `window_days` it was measured over, `estimated_observations_per_month`, `credits_per_observation` (the price at that model), `estimated_credits_per_month`, and `other_enabled_scanners_monthly_credits`. Enabled scanners sweep every 5 minutes, so a broad query can exhaust the monthly budget quickly — run this and compare the *credit* figures against `remaining` from `vision-quota-retrieve` before `vision-scanners-create`. Comparing observation counts against `remaining` understates the cost: `remaining` is denominated in credits, and one observation costs several.",+ "description": "Preview how many observations a proposed scanner would generate, and what they would cost, before saving it. Send a `query` (`RecordingsQuery` shape; `date_from`/`date_to` are ignored — the estimate uses a fixed 30-day lookback) plus the proposed `sampling_rate`, `sampling_mode` and `model`, and `scanner_id` when re-estimating an existing scanner so its own projection isn't double-counted. Returns `matched_sessions_in_window`, the `window_days` it was measured over, `estimated_observations_per_month`, `credits_per_observation`, `estimated_credits_per_month`, and `other_enabled_scanners_monthly_credits` (the org's other enabled scanners' projected spend). Enabled scanners sweep every 5 minutes, so a broad query can exhaust the budget quickly — run this before `vision-scanners-create` and compare the *credit* figures (never raw observation counts) against `remaining` from `vision-quota-retrieve`. These projections are per month while `remaining` covers only the rest of the current period, so prorate them by the days left between `period_start` and `period_end` before comparing.","category": "Replay vision","feature": "replay_vision","summary": "Estimate replay vision scanner volume",@@ -10701,7 +10701,7 @@"requires_ai_consent": true},"vision-scanners-list": {- "description": "List all replay vision scanners in the current project. A scanner watches a slice of session recordings (defined by its `query` and `sampling_rate`) and runs one of four LLM analyses against each matching session: `monitor` (open-ended observations), `classifier` (tag from a fixed label set), `scorer` (numeric rubric), or `summarizer` (free-text summary, with facet embeddings for downstream search). Each scanner returns its current configuration, enabled state, sampling rate, and `last_swept_at` timestamp.",+ "description": "List all replay vision scanners in the current project. A scanner watches a slice of session recordings (defined by its `query`, `sampling_mode` and `sampling_rate`) and runs one of four LLM analyses against each matching session: `monitor` (open-ended observations), `classifier` (tag from a fixed label set), `scorer` (numeric rubric), or `summarizer` (free-text summary with facet embeddings for downstream search). Each scanner returns its current configuration, enabled state, sampling settings, `last_swept_at` timestamp, and its credit figures (`credits_per_observation`, `estimated_monthly_credits`, `credits_this_month`).","category": "Replay vision","feature": "replay_vision","summary": "List replay vision scanners",@@ -10829,7 +10829,7 @@"requires_ai_consent": true},"vision-scanners-update": {- "description": "Partially update a replay vision scanner by ID. Send only the fields you want to change. Common changes: toggle `enabled` to pause/resume scanning, adjust `sampling_rate`, tweak the `scanner_config` prompt or tags, or refine the `query` to watch a different slice of sessions. `scanner_type` is locked after creation — to change it, delete and recreate. Editing any config field bumps `scanner_version`; existing observations keep a snapshot of the previous config for reproducibility. If you widen the `query` or raise `sampling_rate`, re-check projected volume with `vision-scanners-estimate-create` and remaining budget with `vision-quota-retrieve` first — the scanner resumes sweeping every 5 minutes at the new, broader scope.",+ "description": "Partially update a replay vision scanner by ID. Send only the fields you want to change. Common changes: toggle `enabled` to pause/resume scanning, adjust `sampling_rate` or `sampling_mode`, tweak the `scanner_config` prompt or tags, or refine the `query` to watch a different slice of sessions. `scanner_type` is locked after creation — to change it, delete and recreate. Editing any config field bumps `scanner_version`; existing observations keep a snapshot of the previous config for reproducibility. If you widen the `query`, raise `sampling_rate`, loosen `sampling_mode`, or move to a pricier `model`, re-check projected spend with `vision-scanners-estimate-create` and remaining budget with `vision-quota-retrieve` first — the scanner resumes sweeping every 5 minutes at the new, broader scope.","category": "Replay vision","feature": "replay_vision","summary": "Update replay vision scanner",diff --git a/services/mcp/schema/tool-definitions-all.json b/services/mcp/schema/tool-definitions-all.jsonindex f0cf3e799a99..597a753c40e1 100644--- a/services/mcp/schema/tool-definitions-all.json+++ b/services/mcp/schema/tool-definitions-all.json@@ -11090,7 +11090,7 @@}},"vision-actions-list": {- "description": "List the vision actions (the \"and then…\" automations that run over a scanner's observations) for the current project. A vision action in `mode: group_summary` produces the group summary shown on the \"Summaries and alerts\" tab — one report synthesized from up to `max_observations` observations of its bound scanner; `mode: alert` delivers only when its alert condition holds. Each row carries the bound `scanner`, `mode`, `trigger_type`, cadence, and `is_scanner_digest` (the built-in daily digest). Pass `?scanner=<id>` to filter to one scanner. To read a specific action's produced reports, list its runs with `vision-actions-runs-list`.",+ "description": "List the vision actions (the \"and then…\" automations that run over a scanner's observations) for the current project. A vision action in `mode: group_summary` produces the group summary shown on the scanner's \"Digests and alerts\" tab — one report synthesized from up to `max_observations` observations of its bound scanner; `mode: alert` delivers only when its alert condition holds. Each row carries the bound `scanner`, `mode`, `trigger_type`, cadence, and `is_scanner_digest` (the built-in daily digest). Pass `?scanner=<id>` to filter to one scanner. To read a specific action's produced reports, list its runs with `vision-actions-runs-list`.","category": "Replay vision","feature": "replay_vision","summary": "List vision actions",@@ -11217,7 +11217,7 @@}},"vision-quota-retrieve": {- "description": "Get the organization's monthly Replay vision credit budget (1 credit = $0.01; observations cost credits by model). Returns `credit_limit` (null when uncapped), `credits_used` (in-flight + succeeded observations counted against it), `remaining`, `exhausted`, `projected_monthly_credits`, and the `period_start`/`period_end` of the current calendar-month window. Check `remaining`/`exhausted` before creating a scanner or calling `vision-scanners-scan-session`: over budget, a scanner's scheduled sweeps silently skip their observations until the next period, while `vision-scanners-scan-session` is rejected outright with a 402. Pair with `vision-scanners-estimate-create` to size a new scanner against the remaining budget.",+ "description": "Get the organization's Replay vision credit budget (1 credit = $0.01; observations cost credits by model). Returns `credit_limit` (null when uncapped), `credits_used` (in-flight + succeeded observations counted against it), `remaining`, `exhausted`, `projected_monthly_credits`, and the `period_start`/`period_end` of the current budget window (the org's billing period, or the calendar month when billing hasn't synced). Check `remaining`/`exhausted` before creating a scanner or calling `vision-scanners-scan-session`: over budget, a scanner's scheduled sweeps silently skip their observations until the next period, while `vision-scanners-scan-session` is rejected outright with a 402. Pair with `vision-scanners-estimate-create` to size a new scanner against the remaining budget.","category": "Replay vision","feature": "replay_vision","summary": "Get replay vision quota",@@ -11245,7 +11245,7 @@}},"vision-scanners-create": {- "description": "Create a replay vision scanner. Pick a `scanner_type` — `monitor` (open-ended observations), `classifier` (assign a tag from a fixed label set), `scorer` (numeric rubric), or `summarizer` (free-text summary, which always emits facet embeddings) — and fill `scanner_config` to match: all types need a `prompt`; classifiers also need `tags`; scorers also need `scale`; summarizers optionally set `length`. Unknown `scanner_config` keys are rejected. `query` is a `RecordingsQuery` shape that defines which sessions the scanner watches — `date_from` and `date_to` are ignored (the schedule controls time). `sampling_rate` is a 0..1 random downsample applied after the query matches (default 1.0). `model` chooses the LLM, and sets what each observation costs in credits. Names must be unique within the team. Before creating a broad scanner (a permissive `query` and/or high `sampling_rate`), first call `vision-scanners-estimate-create` to project its monthly credit spend and `vision-quota-retrieve` to check the org's remaining budget — an enabled scanner sweeps matching recordings every 5 minutes, and creation itself does not check quota, so a too-broad scanner can exhaust the monthly budget on its first sweeps. Creating a scanner also creates its built-in daily digest: an enabled vision action with no delivery targets that synthesizes the scanner's observations once a day and spends credits of its own, on top of the observations. Disable or delete it with `vision-actions-update` / `vision-actions-delete` if you don't want it. To get notified about what the scanner finds (a Slack alert or a summary on another schedule), create a further vision action bound to it with `vision-actions-create`. For a scanner scoped to one experiment's exposed sessions, load the `scanning-experiments-with-replay-vision` skill first — it derives the query from the experiment's exposure criteria.",+ "description": "Create a replay vision scanner. Pick a `scanner_type` — `monitor` (open-ended observations), `classifier` (assign a tag from a fixed label set), `scorer` (numeric rubric), or `summarizer` (free-text summary, always with facet embeddings for search) — and fill `scanner_config` to match: all types need a `prompt`; monitors optionally set `allow_inconclusive`; classifiers also need `tags` (and optionally `multi_label`, `allow_freeform_tags`); scorers also need `scale`; summarizers optionally set `length`. Unknown `scanner_config` keys are rejected. `query` is a `RecordingsQuery` shape that defines which sessions the scanner watches — `date_from` and `date_to` are ignored (the schedule controls time). `sampling_mode` is a quality pre-filter over matched sessions (`focused` / `balanced` / `comprehensive`, default `comprehensive`) and `sampling_rate` is a 0..1 random downsample applied after it (default 1.0). `model` chooses the LLM and sets the credit price of every observation. Names must be unique within the team. Before creating a broad scanner (a permissive `query`, loose `sampling_mode`, and/or high `sampling_rate`), first call `vision-scanners-estimate-create` to project its monthly credit spend and `vision-quota-retrieve` to check the org's remaining budget — an enabled scanner sweeps matching recordings every 5 minutes, and creation itself does not check quota, so a too-broad scanner can exhaust the budget on its first sweeps. Creating a scanner also creates its built-in daily digest: an enabled vision action with no delivery targets that synthesizes the scanner's observations once a day and spends credits of its own, on top of the observations. Disable or delete it with `vision-actions-update` / `vision-actions-delete` if you don't want it. To get notified about what the scanner finds (a Slack alert or a summary on another schedule), create a further vision action bound to it with `vision-actions-create`. For a scanner scoped to one experiment's exposed sessions, load the `scanning-experiments-with-replay-vision` skill first — it derives the query from the experiment's exposure criteria.","category": "Replay vision","feature": "replay_vision","summary": "Create replay vision scanner",@@ -11274,7 +11274,7 @@}},"vision-scanners-estimate-create": {- "description": "Preview how many observations a proposed scanner would generate before saving it. Send a `query` (`RecordingsQuery` shape; `date_from`/`date_to` are ignored — the estimate uses a fixed 30-day lookback) and an optional `sampling_rate` and `model`. Returns `matched_sessions_in_window`, the `window_days` it was measured over, `estimated_observations_per_month`, `credits_per_observation` (the price at that model), `estimated_credits_per_month`, and `other_enabled_scanners_monthly_credits`. Enabled scanners sweep every 5 minutes, so a broad query can exhaust the monthly budget quickly — run this and compare the *credit* figures against `remaining` from `vision-quota-retrieve` before `vision-scanners-create`. Comparing observation counts against `remaining` understates the cost: `remaining` is denominated in credits, and one observation costs several.",+ "description": "Preview how many observations a proposed scanner would generate, and what they would cost, before saving it. Send a `query` (`RecordingsQuery` shape; `date_from`/`date_to` are ignored — the estimate uses a fixed 30-day lookback) plus the proposed `sampling_rate`, `sampling_mode` and `model`, and `scanner_id` when re-estimating an existing scanner so its own projection isn't double-counted. Returns `matched_sessions_in_window`, the `window_days` it was measured over, `estimated_observations_per_month`, `credits_per_observation`, `estimated_credits_per_month`, and `other_enabled_scanners_monthly_credits` (the org's other enabled scanners' projected spend). Enabled scanners sweep every 5 minutes, so a broad query can exhaust the budget quickly — run this before `vision-scanners-create` and compare the *credit* figures (never raw observation counts) against `remaining` from `vision-quota-retrieve`. These projections are per month while `remaining` covers only the rest of the current period, so prorate them by the days left between `period_start` and `period_end` before comparing.","category": "Replay vision","feature": "replay_vision","summary": "Estimate replay vision scanner volume",@@ -11331,7 +11331,7 @@"requires_ai_consent": true},"vision-scanners-list": {- "description": "List all replay vision scanners in the current project. A scanner watches a slice of session recordings (defined by its `query` and `sampling_rate`) and runs one of four LLM analyses against each matching session: `monitor` (open-ended observations), `classifier` (tag from a fixed label set), `scorer` (numeric rubric), or `summarizer` (free-text summary, with facet embeddings for downstream search). Each scanner returns its current configuration, enabled state, sampling rate, and `last_swept_at` timestamp.",+ "description": "List all replay vision scanners in the current project. A scanner watches a slice of session recordings (defined by its `query`, `sampling_mode` and `sampling_rate`) and runs one of four LLM analyses against each matching session: `monitor` (open-ended observations), `classifier` (tag from a fixed label set), `scorer` (numeric rubric), or `summarizer` (free-text summary with facet embeddings for downstream search). Each scanner returns its current configuration, enabled state, sampling settings, `last_swept_at` timestamp, and its credit figures (`credits_per_observation`, `estimated_monthly_credits`, `credits_this_month`).","category": "Replay vision","feature": "replay_vision","summary": "List replay vision scanners",@@ -11459,7 +11459,7 @@"requires_ai_consent": true},"vision-scanners-update": {- "description": "Partially update a replay vision scanner by ID. Send only the fields you want to change. Common changes: toggle `enabled` to pause/resume scanning, adjust `sampling_rate`, tweak the `scanner_config` prompt or tags, or refine the `query` to watch a different slice of sessions. `scanner_type` is locked after creation — to change it, delete and recreate. Editing any config field bumps `scanner_version`; existing observations keep a snapshot of the previous config for reproducibility. If you widen the `query` or raise `sampling_rate`, re-check projected volume with `vision-scanners-estimate-create` and remaining budget with `vision-quota-retrieve` first — the scanner resumes sweeping every 5 minutes at the new, broader scope.",+ "description": "Partially update a replay vision scanner by ID. Send only the fields you want to change. Common changes: toggle `enabled` to pause/resume scanning, adjust `sampling_rate` or `sampling_mode`, tweak the `scanner_config` prompt or tags, or refine the `query` to watch a different slice of sessions. `scanner_type` is locked after creation — to change it, delete and recreate. Editing any config field bumps `scanner_version`; existing observations keep a snapshot of the previous config for reproducibility. If you widen the `query`, raise `sampling_rate`, loosen `sampling_mode`, or move to a pricier `model`, re-check projected spend with `vision-scanners-estimate-create` and remaining budget with `vision-quota-retrieve` first — the scanner resumes sweeping every 5 minutes at the new, broader scope.","category": "Replay vision","feature": "replay_vision","summary": "Update replay vision scanner",