Ad Tech · Diagnosis · Alerting · Ops

Campaign
Health

"Paste your campaign metrics. Get root causes, custom alerts, budget pacing, and a weekly digest — not symptoms, operations."

$ curl -X POST /alerts/evaluate \
  -d '{"metrics": {"campaign_id": "CAMP_001",
     "cpa": 620, "roas": 0.85, "win_rate": 8}}'

# 3 alerts triggered

Alert Report — CAMP_001
highest_severity: critical
triggers:
  CPA Critical  cpa=620 > 500
  ROAS Critical  roas=0.85 < 1.0
  Win Rate Critical  win_rate=8 < 10

Pacing Projection
status: burnout_risk
hours_to_exhaustion: 3.2h
recommendation: Apply spend cap now

When CPA spikes, most teams raise or lower bids and hope. The real cause — audience exhaustion, floor price violations, creative fatigue — is buried in metrics no one has time to cross-reference. Bad diagnosis is worse than no diagnosis: it burns budget on the wrong fix.

Campaign Health pre-processes your metrics before the LLM call — computing week-on-week trends, detecting anomalies, and flagging benchmark deltas. Claude then receives calibrated signals, not raw numbers, and returns a diagnosis with root causes ordered by severity and a prioritised action list — not symptoms, causes.


Pre-process first.
Then diagnose.

Rule-based preprocessing reduces token cost and improves diagnostic accuracy — the LLM sees signals, not noise.

01
Input
CSV or JSON campaign metrics — impressions, clicks, spend, CTR, CPA, win rate, frequency, ROAS
02
Preprocess
WoW trends derived, anomalies flagged, benchmark deltas computed — before any LLM call is made
03
Diagnose
Claude applies RTB domain expertise to pre-flagged signals and returns root causes with evidence
04
Output
Health score 1–100, issues ordered by severity (critical / warning / info), top-3 actions

Diagnose.
Alert.
Act.

Eight capabilities covering the full ops cycle — from root cause to remediation to client reporting.

Expert Diagnosis
Pre-processes 15+ metrics into calibrated signals before the LLM call. Claude diagnoses root causes — not symptoms — ordered by business impact with specific recommended actions.
Alert Rules Engine
Define custom threshold rules per campaign or use the built-in defaults. CPA above target, ROAS below 1.0, win rate critical, frequency fatigue — all fire structured AlertReports with severity levels and messages.
Budget Pacing Projection
Given current spend, total budget, and elapsed time, projects spend to end of period. Detects on_pace, under_pacing, over_pacing, and burnout_risk — with estimated hours to exhaustion and a recommended action.
Vertical Benchmarks
A gaming CTR of 0.2% is excellent. A fintech CTR of 0.2% is a problem. Industry-specific benchmark sets for ecomm, fintech, gaming, travel, and healthcare replace one-size-fits-all thresholds.
Recommendation Prioritiser
Sorts every diagnosis issue by effort vs. impact. Critical issues with low-effort fixes (bid adjustments, frequency caps) surface as quick wins. High-effort creative rebuilds are ranked below them — ops teams work the right queue.
Weekly Digest & Comparison
Aggregate an entire fleet of diagnoses into a client-facing weekly report with most-common-issues, health distribution, and an LLM-written summary. Compare any two campaigns head-to-head with per-metric deltas and a narrative.

Running in
three minutes.

Setup
git clone https://github.com/swapnanil/campaign-health
cd campaign-health
cp .env.example .env   # add your ANTHROPIC_API_KEY
docker-compose up api
CLI — diagnose a campaign CSV
docker-compose run cli diagnose \
  --file examples/sample_campaign_cpa_spike.csv \
  --format markdown
CLI — batch diagnose a fleet
docker-compose run cli batch \
  --file examples/campaign_fleet.csv \
  --format json --output reports/

Metrics in.
Root causes out.

Input — campaign CSV row
campaign_id,impressions,clicks,
spend,ctr,cpa,win_rate,frequency

CAMP_001,1200000,1440,
14280,0.12,420,35,9

# CPA was ₹250 in weeks 1–2
# Win rate was 12% last week
Output — diagnosis excerpt
health_score:    31
overall_health:  critical

Issue (Critical)
metric:  CPA ₹420 (↑68% WoW)
cause:   "Frequency 9 = audience
          exhaustion, not a bid
          problem"

Top Action
"Add frequency cap 4, expand
 lookalike before more spend.
 Pause creative first."

Five more tools.
Same standard.

Each tool is a standalone CLI + REST API solving a real enterprise problem with Claude.