invariance_monitor_create
Set up a monitor that checks nodes or runs against a keyword or threshold predicate and generates signals, findings, or reviews when conditions match.
Instructions
Create a monitor that evaluates an event-shaped predicate against nodes/runs and optionally emits signals, findings, or reviews when matched.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| body | Yes | CreateMonitorRequest as a JSON object string. Required: name, evaluator. Evaluator is one of two shapes — keyword: {"type":"keyword","field":"output.text","keywords":["refund","chargeback"],"case_sensitive":false} or threshold: {"type":"threshold","field":"metrics.cost_usd","operator":">","value":5}. Optional: severity ("info"|"low"|"medium"|"high"|"critical"), scope ("node"|"session"|"run"|"agent"|"batch"), target ({"kind":"current_run"} | {"kind":"specific_run","run_id":"run_..."} | {"kind":"agent_history","filters":[{"field":"agent_id","operator":"eq","value":"agt_..."}]}), signal_type (string), creates_review (bool), enabled (bool), description (string), schedule ({"kind":"manual"} or {"kind":"interval","every_seconds":300}). Example: {"name":"high-cost-runs","evaluator":{"type":"threshold","field":"metrics.cost_usd","operator":">","value":5},"severity":"high","scope":"run","target":{"kind":"current_run"},"creates_review":true} |