example · workflows/confirm/
When a metric crosses its threshold, confirm the shipped goal actually moved it — or reopen it.
1 step in workflows/confirm/
---
on: MetricThreshold
agent: Reviewer
---
Confirm whether goal {{ event.goal_id }} actually moved the metric, or reopen it.A poll emits a MetricThreshold event when a goal needs checking. The sensor lives in sensors/sensors.py:
from loopy import sensor
from loopy.events import Incident, MetricThreshold
@sensor(poll="5m", emits="MetricThreshold")
def metric_watch(req) -> MetricThreshold:
return MetricThreshold(goal_id="g-123")The agents and events this workflow refers to by name, from registry.yml.
defaults:
agent:
sandbox: default
harness: { runtime: claude-code, model: claude-sonnet-4-6 }
sandboxes:
default:
provider: daytona
image: { debian_slim: "3.12", apt: [git], workdir: /home/daytona, user: daytona }
network: [github.com]
agents:
Reviewer: { tools: [run_evals], skills: [code-review] }
events:
MetricThreshold:
fields: { goal_id: id }