agents/time-of-day: auto-infer quiet hours, peak hours, timezone drift #112

Closed
opened 2026-05-05 09:26:01 +00:00 by alvis · 0 comments
Owner

Goal

Auto-infer per-user quiet hours, peak hours, and timezone drift from observed activity, and write them into agent:time-of-day preferences via the inference framework (#111).

Signals

  • tip_views.served_at — when the user is reachable.
  • tip_feedback.created_at + action — when they actually engage and what they do.
  • integration_tokens.connectedAt and recent integration activity — secondary cadence hints.

Inferred parameters

Key Shape Default
quietStart, quietEnd HH:MM in user TZ 22:00 / 07:00
peakHours int[] (0–23) sorted by completion-rate density [9, 14, 20]
tz IANA string inferred from activity histogram from auth provider, fallback UTC

Method (sketch)

  • Histogram engagement events by local hour, last 30d.
  • Quiet window = longest contiguous run of below-baseline engagement.
  • Peak hours = top quartile of completion rate.
  • TZ drift = mode shift between weekly histograms.

Done when

  • Inference function plugged into the framework with TTL = 24h.
  • Cold-start uses defaults; flips to inferred values once ≥ 50 engagement events.
  • Unit tests with synthetic histograms covering night-owl, early-bird, and shift-worker cases.
  • Snippet output for TimeOfDayAgent reads inferred values.
## Goal Auto-infer per-user quiet hours, peak hours, and timezone drift from observed activity, and write them into `agent:time-of-day` preferences via the inference framework (#111). ## Signals - `tip_views.served_at` — when the user is reachable. - `tip_feedback.created_at` + `action` — when they actually engage and what they do. - `integration_tokens.connectedAt` and recent integration activity — secondary cadence hints. ## Inferred parameters | Key | Shape | Default | |---|---|---| | `quietStart`, `quietEnd` | HH:MM in user TZ | 22:00 / 07:00 | | `peakHours` | int[] (0–23) sorted by completion-rate density | [9, 14, 20] | | `tz` | IANA string inferred from activity histogram | from auth provider, fallback UTC | ## Method (sketch) - Histogram engagement events by local hour, last 30d. - Quiet window = longest contiguous run of below-baseline engagement. - Peak hours = top quartile of completion rate. - TZ drift = mode shift between weekly histograms. ## Done when - Inference function plugged into the framework with TTL = 24h. - Cold-start uses defaults; flips to inferred values once ≥ 50 engagement events. - Unit tests with synthetic histograms covering night-owl, early-bird, and shift-worker cases. - Snippet output for `TimeOfDayAgent` reads inferred values.
alvis added this to the M2 — AI tips + multi-source signals milestone 2026-05-05 09:26:01 +00:00
alvis closed this issue 2026-05-06 06:15:34 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: alvis/oO#112