Cross-domain references: API Product (from api-products), Data Provider (from api-products)
Proactive monitoring of live API requests. The agent watches ClickHouse logs for error spikes and failure patterns, investigates root causes, and either auto-resolves known patterns or proposes fixes for approval.
Alerts come from two sources:
- External notifications — Vercel error emails, Cloudflare alerts
- Internal monitoring — agent queries ClickHouse response logs in the apis project, detects elevated fail rates
Error Pattern(.Pattern Id) is an entity type.
Alert(.Alert Id) is an entity type.
Fix(.Fix Id) is an entity type.
Description is a value type.
Pattern Id is a value type.
Alert Id is a value type.
Fix Id is a value type.
Error Rate is a value type.
Severity is a value type. The possible values of Severity are 'info', 'warning', 'critical'.
Resolution is a value type.
Body is a value type.
Detected At is a value type.
Code Change is a value type.
Error Pattern has Description. Error Pattern has Error Rate. Error Pattern has Severity. Error Pattern affects API Product. Error Pattern involves Data Provider. Error Pattern has Resolution.
Alert has Body. Alert has Detected At. Error Pattern has Alert.
Fix has Description. Fix has Code Change. Error Pattern has Fix.
Each Error Pattern has at most one Description. Each Error Pattern has at most one Error Rate. Each Error Pattern has at most one Severity. Each Error Pattern has at most one Resolution. Each Alert has at most one Body. Each Alert has at most one Detected At. Each Alert belongs to at most one Error Pattern. Each Fix has at most one Description. Each Fix has at most one Code Change. Each Fix belongs to at most one Error Pattern. For each pair of Error Pattern and API Product, that Error Pattern affects that API Product at most once. For each pair of Error Pattern and Data Provider, that Error Pattern involves that Data Provider at most once.