Skip to main content

Nox Daily Brief

Audience: Sales · Management · Support · QA · Engineering · Where in app: the Morning email + Nox surfaces (brief-ready badge, spoken brief, the morning greeting with today's plan) · Plan availability: every company (needs widget_installed for the email)

Since 2026-11-01 the email is plan-first. One "Morning email" replaced the separate Daily Brief + plan emails: Nox's plan for today from the day plan on top (groups "For you", "For Nox — waiting for your OK", "Nox already did", ≤5 rows each — backend/app/lib/noxPlanEmail.js, read from nox_days / nox_plan_items for the company owner; subject from the plan when there is one), then "Yesterday in numbers" — the brief below. In the app the morning plan is spoken as a greeting the first time the admin opens it, and Run my morning brief now (Settings → Assistant, POST /knox-v2/day/redo → /internal/knox/day/reset) rebuilds it on demand.

Each morning, Nox composes a short brief summarizing the previous day — how much traffic came in, how many people converted, who the hottest lead was, and anything unusual. It is delivered as an email and via the Nox surfaces (the dashboard briefing strip was removed — the brief lives on Nox, not the dashboard), so the team starts the day with a read on what happened overnight without opening the full dashboard.

What it does​

A typical brief contains:

  • Traffic — sessions and unique visitors.
  • Conversions — bookings and contact captures.
  • Top traffic sources — where the visitors came from.
  • Hottest lead identified — the highest-scoring visitor.
  • Notable behavior — e.g. a rage-click cluster on a page, a conversion drop.
  • Compared to baseline — measured against the tenant's knox.baseline_metrics ("what's normal").

It is a summary, not a deep dive — it points at what's interesting; the Dashboard and Nox chat are where you drill in.

How it works​

Backend DailyBriefEmailJob (10-minute tick) owns delivery; ms-ai owns composition:

  1. The job sends once per company-local day at knox.daily_brief.send_hour (default 9; enabling the funnel no longer moves it — the admin brief-send-hour backfill moves funnel-enabled companies still on 9 to 5), with a 3-hour catch-up window. Guards: knox.daily_brief.last_sent_local_day + a per-company lock; skipped for archived companies, playgrounds, expired subscriptions, and companies without widget_installed (no widget = no session data = nothing to brief on). It replaced ReportingEmailJob (now unscheduled; the monthly reports_email defaults off for new companies).
  2. ms-ai's KnoxBriefSnapshotService builds the render model via the shared "What Matters Today" insight engine — traffic and bookings come from the canonical backend stats endpoints, the same source the dashboard reads, so the numbers line up.
  3. On Nox funnel tenants the brief adds deterministic funnel blocks (knox-funnel-insights.ts — snapshot, pace, priorities, very-warm, what's-working, learning, …; no LLM near the numbers) and persists executable offers to brief_offers (~48h validity). "Yes, do the first one" in chat/voice executes via the knox_brief_offers tool.
  4. The backend renders a locked EJS template and enqueues the email.
  5. In the dashboard the briefing strip is gone — a brief-ready badge ("Your daily brief is ready") appears on the Nox header once a day and the admin plays it. The per-device auto-play preference (noxSettings.autoPlayBrief) and its settings card were removed in the v3 launch. If the card deck fails to load, the brief is read aloud anyway (ms-ai 56028bcf2).

Counting rules:

  • Nox chats count via sticky has_visitor_message / has_bot_message flags on the chat (set once, never unset — a later transcript rewrite can't flip a counted chat back). Historic rows: migration POST /migrations/backfill-chat-brief-flags (+ super-admin MigrationPanel wrapper).
  • Identified visitors use one identity definition — backend/app/lib/IdentityNormalize.js (shared name/email/phone normalization) — so the brief, dashboard, and Nox agree on who counts as identified.
  • Lead rows carry full contact details (email/phone/company) in the email, not just names.

The same logic is exposed to the chat assistant as the knox_daily_brief tool, so an admin can ask "what's today's brief?" / "recap" / "how are we doing today?" and get the current calendar day's brief in their timezone (see Tools). The brief is one consumer of the broader insight engine (knox-insight-engine.service.ts) — see Nox / Knox Admin Assistant.

One insight engine. "What Matters Today" / the insight engine is the single source for all Nox surfaces (brief, alerts, watch). Surfaces never re-derive insights independently.

Configuration & options​

companies.knox.daily_brief:

FieldMeaning
enabledTurn the brief email on/off for the tenant (default on)
send_hourLocal hour of delivery (default 9; funnel tenants backfilled to 5). The settings UI offers 5–10 am; the endpoint still accepts 0–20
sections.*Content blocks: stats, captured_leads, hot_leads, identified_visitors, ask_nox + funnel keys (funnel_snapshot, funnel_pace, funnel_priorities, very_warm, new_noteworthy, needs_attention, whats_working, booked_journeys, after_meeting, learning) — funnel keys render only when the funnel is enabled. The settings UI no longer offers funnel_priorities, very_warm, needs_attention; saving the form leaves their stored values untouched
last_sent_local_dayOnce-per-day send guard (YYYY-MM-DD, account tz)

Baseline + anomaly inputs:

  • companies.knox.baseline_metrics — nightly rollup of normal ranges (refreshed by KnoxBaselineMetricsJob, ~02:00).
  • companies.knox.alert_thresholds.* — rage_click_spike_count, intent_score_floor, visit_count_alert, anomaly_std_dev, form_abandonment_rate_alert, dead_click_threshold.

Behaviors & edge cases​

  • Anomaly detection is threshold-based today. When yesterday's metrics breach an alert_thresholds.* value, the brief flags it. A full statistical anomaly-detection job is not yet built (the anomaly_std_dev knob exists but the richer job is roadmapped).
  • Thresholds are crude. Large tenants with many baseline metrics can get noisy flags — tune alert_thresholds.*.
  • Numbers match the dashboard by design (shared stats source) — if a brief number and a dashboard number disagree, that's a bug worth reporting.
  • Empty-data days produce a brief that says so rather than fabricating activity.

Plan & limits​

  • Brief generation consumes AI credits each time it runs.
  • Gated behind the Nox entitlement (Pro tier — verify).
  • Not a replacement for the Dashboard; it's a once-a-day summary.

Technical implementation​

  • Delivery: backend/app/jobs/DailyBriefEmailJob.js (_planFor adds the plan block via lib/noxPlanEmail.js) (10-min tick, once/local-day at send_hour, EJS render, OFFER_VALIDITY_MS = 48h, OFFER_HOOKS block→tool mapping). Offers persisted to brief_offers (BriefOfferModel.js); read-time expiry on valid_until, resolved via KnoxBriefOfferController.
  • Composition: ms-ai/src/knox-agent/services/knox-brief-snapshot.service.ts + knox-daily-brief-composer.service.ts + knox-insight-engine.service.ts (proactive insights) + knox-funnel-insights.ts (deterministic funnel blocks).
  • Tool wrappers: tools/knox-daily-brief.tool.ts (knox_daily_brief) and tools/knox-brief-offers.tool.ts (knox_brief_offers).
  • Baseline cron: KnoxBaselineMetricsJob (02:00) refreshes cohort/baseline metrics in backend.
  • Reads canonical backend stats endpoints (/internal/knox/brief/{snapshot-data,sections,offers}); config from companies.knox (see Company Configuration).