How-to Guides

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:

ThresholdWhat 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

⚠️  AI Spend Anomaly — ticket-resolver
Feature spend: $340 (last 2h)
Normal baseline: $12/day
Projected extra cost: $1,020 if unresolved

→ View in Live Calls
→ Block session
🔴  Budget threshold hit — Engineering Department
$1,680 / $2,000 (84%)
Top contributors: ticket-resolver ($1,100), search ($420)

→ View Budget
→ Adjust limit

Related: Set a Monthly Spending Limit · Debug Runaway Agent Loops

On this page