Identify behavioral churn-risk signals

Compare pre-renewal behavior for retained and canceled customers, quantify associations, and prepare a reviewed risk hypothesis without claiming prediction.

Updated · published

markdown for agents →

difficulty advanced · time to value 15 minutes · execution human review required

Start from this

Compare behavior before cancellation and renewal in exact historical cohorts. Quantify which verified product-value signals differ, disclose sample and confounding limits, and prepare a churn-risk hypothesis for human review without contacting customers.

Why this matters

Customers often reduce meaningful product activity before cancellation, but a behavioral difference is not automatically a prediction. Plan changes, seasonality, account size, contract timing, product changes, and support issues can all explain the same pattern.

Use this workflow to discover and quantify historical associations. Treat the result as a hypothesis to validate on a later holdout period, not as a label to act on immediately.

What you get

  • Exact retained and canceled historical cohorts
  • Pre-outcome behavior comparisons for predefined product-value events
  • Sample sizes, effect sizes, segment differences, and missing evidence
  • A reviewed validation plan before any customer-level use

Walk through it

You

Which product behaviors were different before cancellation versus renewal?

Agent

I will bind complete historical outcome windows and compare only verified pre-outcome signals. The result will be association evidence, not a prediction.

GET /v1/projects/:project_id/signal-map
GET /v1/projects/:project_id/onboarding
# Require status: "verified"; use live event/property reads for the selected signals.
GET /v1/projects/:project_id/event-property-keys?events=subscription_canceled,subscription_renewed,product_value_completed

Then run a bounded owner-side aggregate query using the current OpenAPI schema:

Endpoint: POST /v1/projects/:project_id/analytics/query
Query plan:
  - select one exact historical cancellation/renewal outcome window
  - bind one equal pre-outcome behavior window per identity
  - exclude behavior after the outcome
  - aggregate predefined value-event counts by outcome and plan segment
  - return cohort sizes, distributions, and effect sizes; no raw identities
{
  "rows": [
    {
      "signal": "product_value_completed",
      "plan": "pro",
      "canceled_accounts": 84,
      "renewed_accounts": 391,
      "canceled_median": 2,
      "renewed_median": 11
    }
  ]
}

This supports a statement that the measured value event was less frequent in the canceled historical cohort. It does not prove that low activity causes churn or that every currently quiet account will cancel.

The output

Historical churn-signal review — <exact bounds>

Observed associations
- <signal>: <canceled distribution> vs <renewed distribution>
- sample: <cohort sizes and plan segments>

Limitations
- <confounding, sparse outcomes, missing identity, seasonality, instrumentation change>

Hypothesis
- <explicitly labelled risk hypothesis>

Validation before operational use
- freeze the rule
- test it on a later untouched cohort
- measure false positives and segment stability
- obtain CS/privacy review before inspecting customer-level matches

Do not produce a “31 users will churn” claim from this analysis. If a later validated rule is used to prepare a private review queue, a human must decide whether and how to contact any customer.

Setting it up

Record billing outcomes from the trusted server or billing webhook using AGENTRY_SERVER_API_KEY, with a stable account or user identifier and only the necessary plan context. Define one or more value events from the product’s real business logic and verify them with live traffic.

Avoid copying cancellation notes, message bodies, or sensitive payment details into analytics properties. Re-run validation after material product, instrumentation, pricing, or customer-mix changes.

Variations

  • “Compare the association by plan without pooling enterprise and self-serve customers.”
  • “Use a later historical period as a holdout for the frozen hypothesis.”
  • “Identify which required signal is too sparse to support this analysis.”
  • “Compare expansion outcomes instead of cancellation, with the same caveats.”

Adapt this workflow in your own agent.

Ask your agent to map the starter prompt to your saved signal map, live events, and the current HTTP API before answering.

Agentry gives coding agents production context from errors, product analytics, and deploys through one HTTP API. Fetch and read https://agentry.sh/install.md completely, then install Agentry's full first-time telemetry baseline in this repository. I authorize device-code login, saving the owner key only to ~/.agentry/credentials.json, creating one Agentry project for this repository, and read-only inspection of shipped source plus hidden CI/provider configuration. Deeply analyze the product's business logic and complete value flow before choosing telemetry. Save the complete source-backed plan and show me its exact contents and hash. Until I explicitly approve that plan or request a replacement, do not edit app/CI source, place runtime/CI credentials, commit, exercise product traffic, start proof, push, or deploy. After approval, I authorize only the reviewed targets: place the required scoped browser/server/CI credentials through the established environment or secret mechanism, preserve existing telemetry, implement and test the baseline, commit it, push that reviewed commit when the shipped CI/provider path requires it, exercise safe proof paths with test/non-customer data, and perform one deployment through the reviewed shipped CI/provider path. Ask first if proof would charge money, contact a third party, change real customer data, or require new external access. After the plan is saved, immediately before every onboarding state-changing POST, GET current onboarding state, perform only its single returned next_action, then read state again; do not batch or infer later stages. Continue until status is verified, installation_complete is true, and next_action is null. Keep all secrets, source snapshots, proof markers, and scratch files outside the repository.

+ Full access
5.5 Extra High
  1. 1. Open your repo in Codex, Claude Code, Cursor etc.
  2. 2. Paste the install prompt.
  3. 3. Your agent reads the install doc and shows you an implementation plan for approval.