Overview
Theanomalies sub-client provides automated anomaly detection for agent activity. It identifies unusual patterns such as rate spikes, high failure rates, new principals, and off-hours activity.
Detection runs when detect() is called; listing a built-in rule is not proof of continuous monitoring. With the server’s default-off IRREGULARITY_RESPONSE_POLICY_ENABLED=true rollout, repository-source SDK clients can select an account-wide response:
revoke_agent_grants mode revokes active grants for an implicated agent on a high/critical finding. alert_only persists findings without this detector’s automatic revocation; it does not disable other controls. getResponsePolicy() and setResponsePolicy() are published in @grantex/sdk@0.7.1 and require the default-off server rollout flag.
anomalies.detect()
Run anomaly detection across all agents and return any newly detected anomalies.Response: DetectAnomaliesResponse
Anomaly types
Anomaly severity levels
anomalies.list()
List stored anomalies. Optionally filter to only unacknowledged anomalies.Parameters
Response: ListAnomaliesResponse
anomalies.acknowledge()
Acknowledge an anomaly by ID. This marks it as reviewed so it no longer appears in the unacknowledged list.Parameters
Response: Anomaly
Returns the updated anomaly object with the acknowledgedAt timestamp set.
Anomaly object
The anomaly type:
'rate_spike', 'high_failure_rate', 'new_principal', or 'off_hours_activity'.