MESkit public website

Quality Monitor — Proactive Quality Alerts

An AI agent that watches production quality in real time. Detects yield drops and defect clusters, investigates the cause, and surfaces actionable alerts.

Last updated: March 7, 2026

Summary

What the Quality Monitor does.

Summary

The Quality Monitor is an event-driven AI agent that watches for quality problems as they happen. When a quality event is recorded — an inspection, defect, or scrap — the monitor checks if a yield drop or defect cluster is forming. If a threshold is crossed, the Quality Analyst agent investigates the situation and produces an alert with recommendations. Alerts appear in the chat panel and live ticker immediately.

How it works

Event-driven detection and AI investigation.

  1. Quality event recorded — A unit is inspected, a defect is logged, or a unit is scrapped. This creates an INSERT in the quality_events table.
  2. Realtime subscription fires — The Quality Monitor Provider (mounted in the app shell) receives the event via Supabase Realtime.
  3. Pre-checks run — Two fast database queries determine if thresholds are crossed:
    • Yield check: pass rate over last 50 events at the workstation
    • Cluster check: same defect code appearing 3+ times in 30 minutes
  4. If neither threshold is crossed — No action taken. This keeps costs low by avoiding unnecessary AI calls.
  5. If a threshold is crossed — The Quality Analyst agent is invoked. It reads recent quality data, analyzes the pattern, and generates an alert with findings and recommendations.
  6. Alert delivered — The alert appears as a proactive message in the chat panel and in the live ticker. It is also logged in the audit trail.

Detection thresholds

What triggers an alert.

ConditionThresholdWindowWhat it detects
Yield dropBelow 90% pass rateLast 50 events at workstationSustained quality degradation at a specific station
Defect clustering3+ occurrences of same defect code30-minute windowRecurring failure mode — likely systematic root cause

Both conditions are evaluated independently on every quality event INSERT. If both are true simultaneously, the alert includes information about both.

Quality Analyst agent

AI-powered investigation.

When a threshold is crossed, the Quality Analyst agent is invoked. This agent has access to quality tools (yield reports, defect code lists, unit history) and uses them to investigate the situation. Its output is a concise alert describing:

  • What was detected (yield drop, defect cluster, or both)
  • The affected workstation and time window
  • Relevant defect codes and their frequency
  • Recommended actions (investigate root cause, hold production, inspect equipment)

Alert display

Where alerts appear.

Chat panel

Quality alerts appear as proactive messages from the Quality Analyst in the chat panel. They look like assistant messages but are triggered by production events, not user input. You can ask follow-up questions about the alert.

Live ticker

The live ticker at the bottom of the screen shows the alert with an agent badge. The audit trail records the alert with metadata including workstation ID, detected conditions, and a summary.

Key facts and FAQ

Quick reference.

Key facts

  • The Quality Monitor is event-driven — it reacts to quality_events inserts via Supabase Realtime.
  • Pre-checks avoid unnecessary AI invocations: only yield drops and defect clusters trigger the agent.
  • Yield threshold: alerts when pass rate drops below 90% over the last 50 events at a workstation.
  • Defect clustering: alerts when the same defect code appears 3+ times within 30 minutes.
  • Alerts appear in both the chat panel (as proactive assistant messages) and the live ticker.
  • The Quality Analyst agent investigates conditions and provides actionable recommendations.
  • All alerts are logged in the audit trail for traceability.

Mini FAQ

What triggers a quality alert?

Two conditions trigger alerts: (1) yield drops below 90% at a workstation over the last 50 quality events, or (2) the same defect code appears 3 or more times within a 30-minute window. Both are checked on every quality event insert.

Does the monitor run on every quality event?

The Realtime subscription fires on every quality_events INSERT, but pre-checks filter out events that do not cross a threshold. The AI agent is only invoked when a yield drop or defect cluster is detected — not on every event.

Where do quality alerts appear?

Alerts appear in two places: (1) the chat panel as a proactive message from the Quality Analyst, and (2) the live ticker at the bottom of the screen. The alert is also logged in the audit trail.

Can I customize the thresholds?

The default thresholds are 90% yield and 3 defect occurrences in 30 minutes. Configurable thresholds via a settings UI are planned for a future release.

Does the Quality Monitor work with the Simulator?

Yes. The Simulator generates quality events that trigger the same Realtime subscriptions. When the Simulator introduces a quality crisis scenario, the Quality Monitor detects it and fires alerts.