Skip to content

Feature: Rules-Based Alerting Engine for Hook/Event Conditions #3

@hoangsonww

Description

@hoangsonww

Problem

The dashboard is reactive but passive. Users must manually watch for abnormal patterns (stuck agents, repeated errors, no activity, token spikes).

Proposal

Add a Rules Engine that allows users to define alert conditions and notification actions.

Scope

  • Alert rules CRUD UI
  • Rule types: threshold, inactivity window, event pattern match, status-duration
  • Actions: in-app toast, persistent alert feed, optional webhook callback
  • Alert history with dedup/cooldown metadata

Example Rules

  • Agent in working > 10 minutes
  • Session has > 5 errors in 2 minutes
  • No events for active session for 3 minutes
  • Input tokens exceed configured threshold

Technical Notes

  • Evaluate rules server-side on event ingest for consistency
  • Add normalized tables for alert_rules, alert_events, alert_delivery
  • Include cooldown and suppression windows to avoid alert storms

Acceptance Criteria

  • Users can create/edit/disable rules from UI
  • Alerts trigger deterministically based on persisted event stream
  • Cooldown prevents duplicate noisy alerts
  • Alert feed is queryable and linked to related session/agent
  • Optional webhook payload includes rule id, event context, and timestamp

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingdocumentationImprovements or additions to documentationenhancementNew feature or requestgood first issueGood for newcomershelp wantedExtra attention is neededquestionFurther information is requested

Projects

Status

Backlog

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions