"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.
Rule-based preprocessing reduces token cost and improves diagnostic accuracy — the LLM sees signals, not noise.
Eight capabilities covering the full ops cycle — from root cause to remediation to client reporting.
git clone https://github.com/swapnanil/campaign-health cd campaign-health cp .env.example .env # add your ANTHROPIC_API_KEY docker-compose up api
docker-compose run cli diagnose \ --file examples/sample_campaign_cpa_spike.csv \ --format markdown
docker-compose run cli batch \ --file examples/campaign_fleet.csv \ --format json --output reports/
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
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."
Each tool is a standalone CLI + REST API solving a real enterprise problem with Claude.