Skip to main content

Module pattern_detection

Module pattern_detection 

Source
Expand description

Pattern detection with sequence analysis and ML feature engineering.

Analyzes tool call sequences to detect patterns, anomalies, and trends. Events are capped at MAX_EVENTS to prevent unbounded memory growth. Analysis is amortized: patterns are recomputed every ANALYZE_INTERVAL events.

Structsยง

DetectedPattern
A detected pattern in tool call sequences.
PatternDetector
Pattern detector using sequence analysis.
ToolEvent
A single tool call event.