What you’ll build
Two channels, two thresholds:- Slack subscribed to
on_cost_threshold— fires at 80% of the daily cap. - Email subscribed to
on_pause— fires when the cap actually engages.
Steps
1
Set the threshold in rules
2
Add the Slack channel
Channels → Add → Slack. Paste webhook URL. Subscribe to
on_cost_threshold only.3
Add the email channel
Channels → Add → Email. Target your ops alias. Subscribe to
on_pause.4
Test both
POST /api/v1/agents/{id}/channels/{cid}/test on each — a synthetic event of every subscribed kind lands in the destination.What you’ll see
At 80%:
:warning: Agent Booking.com hygiene has used 80% of its daily spend cap (5.00).
At 100%:
Subject: Agent paused — daily spend cap reached
Body: Booking.com hygiene reached its daily spend cap of $5.00 and was auto-paused at 14:23 UTC. It will auto-resume at 00:00 in your workspace timezone. No action required unless you want to raise the cap.
Bumping the cap
If you’re consistently hitting cap, raise it in Settings → Cost & limits (orPATCH /api/v1/agents/{id}):
Related
- Agents overview — broader context.
- Cost and limits — full semantics.
- Notifications — channel setup details.