Cost Alerts

Get notified before agents hit their budget limits.

Alert Thresholds

Configure when alerts fire in nexus.config.yaml:

cost:
  budget: "$100/day"
  alertAt: 80    # fires at 80% of budget

Alert Output

When an agent reaches the alert threshold:

[cost] WARNING: researcher at 82% of daily budget ($8.20/$10.00)
[cost] WARNING: 1h 45m until budget reset

Multiple Thresholds

Set multiple alert levels:

cost:
  alerts:
    - at: 50
      action: log
    - at: 80
      action: warn
    - at: 95
      action: throttle
    - at: 100
      action: pause

Dashboard Alerts

The web dashboard shows cost alerts in real-time on the Cost page. Agents approaching their budget are highlighted in amber; agents at or over budget are highlighted in red.

Audit Trail

All cost events are recorded in the audit log:

naos audit --filter cost
TIME                  AGENT       ACTION          DETAIL
2024-01-15 14:30:00  researcher  cost.alert      82% of $10.00/day
2024-01-15 15:45:00  researcher  cost.throttle   95% of $10.00/day
2024-01-15 16:00:00  researcher  cost.pause      100% of $10.00/day