Ultron

Customer Health Monitor

Score customer accounts on churn risk using product usage, support tickets, and engagement signals, then alert CSMs before renewals slip.

Next.jsTypeScriptSlackZod

Capabilities

Ingest product usage, support tickets, NPS, and renewal dates per account
Compute a composite 0-100 health score combining at least 3 signal types
Detect week-over-week declines beyond a configurable threshold
Alert CSMs with the top contributing signals and a specific recommended play
System Prompt
You are a customer success analyst. You watch account health and alert humans before deals churn.

WORKFLOW:
1. Call ingest_signals across product usage, support tickets, NPS, and renewal dates.
2. Call score_account to compute a 0-100 health score per account.
3. Call detect_drop to flag week-over-week declines beyond a threshold.
4. Call notify_csm with the account, score, top contributing signals, and a recommended play.

RULES:
- Health score must combine at least 3 signal types; never score on usage alone.
- Always include the top 3 signals contributing to a low score.
- Recommended plays must be specific (which feature, which contact) not generic.
- Never alert if the account is within 5 days of an already-scheduled QBR.
Agent Source
import { agent, tool } from "@agent-sdk"
import { z } from "zod"

const ingestInput = z.object({
  accountIds: z.array(z.string()).min(1).max(500),
})

export default agent({
  model: "claude-sonnet-4-6",
  permissionMode: "bypassPermissions",
  maxTurns: 25,
  systemPrompt: `...`, // see System Prompt section above
  tools: {
    ingest_signals: tool({
      description: "Pull usage, tickets, NPS, renewal date per account",
      inputSchema: ingestInput,
      execute: async ({ accountIds }) => { /* warehouse query */ },
    }),
    score_account: tool({
      description: "Compute composite 0-100 health score",
      inputSchema: z.object({ signals: z.any() }),
      execute: async ({ signals }) => { /* { score, contributors[] } */ },
    }),
    detect_drop: tool({
      description: "Flag week-over-week declines beyond threshold",
      inputSchema: z.object({ accountId: z.string(), threshold: z.number() }),
      execute: async ({ accountId, threshold }) => { /* delta */ },
    }),
    notify_csm: tool({
      description: "Send Slack alert with recommended play",
      inputSchema: z.object({ text: z.string() }),
      execute: async ({ text }) => { /* Slack webhook */ },
    }),
  },
})

File Structure

agents/
customer-health-monitor.ts
lib/health/
scoring.ts
signals.ts
plays.ts
app/api/health/
route.ts
Setup
$ npm install
$ cp .env.example .env.local
# Add data warehouse connection + SLACK_WEBHOOK_URL
$ npm run dev

Environment Variables

WAREHOUSE_URLData warehouse connection string
SLACK_WEBHOOK_URLSlack incoming-webhook for CSM alerts

Sell This Agent

Most CS teams find out about churn the day the customer cancels. This catches it 30 days earlier with the why already attached.

Setup fee
$3,000
Monthly retainer
$500/mo
Target marketCustomer success, RevOps, B2B SaaS

Included

Full agent source code
Composite scoring logic
QBR-aware suppression
Connect to Ultron pipelineUnlock
Auto-update Salesforce health fieldUnlock
Turn views into income.Drop your video link, get paid as the view count climbs.
Submit a video