How do I get Slack alerts when AI spend spikes?
Connect Slack to Cognocient and get a message the moment an anomaly is detected or a budget threshold is crossed — before it shows up on your bill.
Goal: Slack notification the moment something goes wrong with your AI spend — anomaly detected, budget threshold crossed, or agent looping.
Time: 10 minutes.
Step 1 — Connect your Slack workspace
Go to Settings → Notifications → Slack. Click Connect Slack and authorise the Cognocient app to post to a channel.
Pick a dedicated channel like #ai-spend-alerts — you don't want these mixed with general engineering alerts. The connection is workspace-wide; you choose which channel per alert type.
Step 2 — Enable anomaly alerts
Go to Settings → Notifications → Anomaly Alerts and turn on Slack as a delivery channel.
Cognocient runs anomaly detection nightly (and in near-real-time for velocity spikes). An alert fires when:
- A feature's spend is significantly above its rolling average
- A session ID generates an unusual volume of calls in a short window
- A new feature starts spending without any attribution headers (invisible spend)
Each Slack message includes the feature name, anomaly type, estimated extra cost if unaddressed, and a deep link to the Live Calls view for that feature.
You can also turn on email alerts for anomalies. Use email for the daily digest and Slack for real-time spikes — they serve different purposes.
Step 3 — Add Slack alerts to your budgets
For each budget that matters, add a Slack notification at key thresholds.
Go to Dashboard → Budgets, click a budget, and edit its alert settings:
| Threshold | What to do |
|---|---|
| 70% | Slack alert only — awareness |
| 85% | Slack alert — start investigating |
| 100% | Slack alert — limit hit, enforcement active |
The Slack message at 85% and 100% includes the current spend, the limit, and the top features contributing to it.
Step 4 — Test it
Temporarily set a budget to a very low limit (e.g. $0.01) and make a call. You should see the Slack message within 30 seconds. Restore the real limit after testing.
What a Cognocient Slack alert looks like
Related: Set a Monthly Spending Limit · Debug Runaway Agent Loops
Related articles
Tag Your First AI Call
Add 2 headers to your existing code and see per-feature spend in under 5 minutes.
Set a Monthly Spending Limit
Create a hard budget enforced at the proxy before charges reach your provider bill.
Cut Your AI Bill with One Click
Use AI Advisor recommendations to apply model downgrades and caching without code changes.