Inspiration

We've all been there. A customer cancels and everyone asks "why didn't we see this coming?" The signals were there: usage dropping week over week, support tickets piling up, complaints on Reddit. But they were scattered across five different tools and nobody had time to connect the dots. By the time the CS team found out, the relationship was already cold.

Ghost Churn was born from that frustration. What if an agent watched all of those signals simultaneously, the open web AND your product data, and acted before any human even knew there was a problem?

What it does

Ghost Churn is an autonomous customer retention agent. It continuously monitors live product usage and open web signals (support tickets, Reddit, G2 reviews) for every account. The moment churn risk crosses a threshold, it automatically:

  1. Computes a compound churn risk score (0 to 100%) from usage drop + support spike + ARR at stake
  2. Cross-references the account profile and discount limits from Senso
  3. Drafts a fully personalized save offer referencing the customer's specific use case and pain
  4. Presents a human in the loop approval card via OpenUI
  5. On approval, fires a multi-step Render Workflow: sends the email, creates a CRM task, and publishes a cited evidence report to cited.md

Total time from first signal to save offer sent: under 60 minutes. Without Ghost Churn: never.

How we built it

Airbyte — live context ingestion

We used Airbyte as our entire data ingestion layer. We connected a real Zendesk instance with 20 support tickets syncing hourly into ClickHouse. A second Airbyte connection pulls open web market signals (Reddit, G2, Twitter) from a structured source into ClickHouse. We used Airbyte's scheduled sync, webhook triggers, and destination mapping features. Airbyte is the reason the agent sees the real world, not a static snapshot.

ClickHouse — OLAP churn scoring engine

ClickHouse is not just our database. It is the decision engine. We built a materialized view that continuously joins account_activity, support_signals from real Zendesk via Airbyte, and tickets tables to compute a normalized 0 to 100 churn risk score per account. The formula weights usage drop at 60% and support ticket spike at 40%. We leverage ClickHouse's columnar storage, materialized views, and time series aggregation. Our poller queries ClickHouse every 10 seconds and fires the workflow the moment any account crosses the threshold.

Senso.ai — ground truth compliance layer

Before the agent drafts a single word of the save offer, it queries Senso. Senso holds verified account profiles: ARR, renewal date, key contact, use case, maximum authorized discount, and feature unlock permissions. The agent cannot make an offer without Senso confirming it is within policy. This is what makes the output trustworthy, not just generated, but grounded.

OpenUI — reactive dynamic UI

OpenUI generates a completely different interface depending on what the agent has found. We built 4 distinct UI states that morph live during the demo:

State 1: Calm account health monitor, all accounts green

State 3: Full churn risk dashboard, "$48,000 ARR AT RISK" in large red text, dual column evidence layout showing Zendesk tickets on the left and open web signals on the right

State 4: Personalized offer approval card, full email preview, Senso verification banner, one click Approve button

State 5: Save report, complete evidence chain timeline from first signal to email sent, with cited.md link

OpenUI is not a dashboard. It is the interface the agent creates for the exact situation it finds itself in.

Render — autonomous workflow runner

Render runs our entire autonomous infrastructure. We deployed two services via a Blueprint using render.yaml:

ghost-churn-poller as a Background Worker runs 24/7, queries ClickHouse every 10 seconds, and fires webhooks on anomaly detection.

ghost-churn-api as a Web Service is a Flask API exposing /inject, /reset, and /health endpoints called by OpenUI buttons during the demo.

The save-customer Render Workflow is a multi-step workflow that executes visibly on stage:

Step 1: Fetch account context from Senso Step 2: Generate personalized offer via agent Step 3: Human approval gate Step 4: Send save email via SendGrid Step 5: Publish cited.md evidence report to public URL

Render is not just hosting. It is the autonomous action layer, the thing that makes Ghost Churn act on the web, not just think about it.

Langfuse — observability

Every agent decision is traced in Langfuse: Senso queries, offer generation, confidence scores, and hallucination flags. The trace ID is embedded in every cited.md report so the full reasoning chain is auditable.

Challenges we ran into

ClickHouse materialized views do not support correlated subqueries or LIKE in JOIN ON. We had to restructure the churn scoring query using pre-aggregated CTEs.

ClickHouse Cloud SSL certificate verification failed on macOS Python 3.11. Solved with verify=False for the hackathon.

Airbyte's Zendesk connector maps tickets to a raw tickets table with a different schema than our support_signals table. This required rebuilding the materialized view to join against the real Zendesk schema.

Render Blueprint path resolution required explicit backend/ prefixes on all build and start commands when services are defined in a subdirectory.

Accomplishments that we're proud of

A real Zendesk account with 20 tickets syncing through Airbyte into ClickHouse powering a live churn score, not simulated.

A compound churn score formula that produces a human readable 0 to 100% risk percentage, not a raw number.

OpenUI morphing through 4 distinct states live on stage. Judges watch the UI transform in real time.

A fully automated demo with no terminal commands and no manual steps. One button in OpenUI triggers the entire pipeline.

What we learned

Context engineering is not about giving an AI more data. It is about giving it the right data at the right moment from the right sources, and making sure every action it takes is grounded in verified truth before it touches the real world.

What's next for Ghost Churn

Connect real Reddit and Twitter APIs via Airbyte for live open web signal ingestion.

Add email reply tracking so if Sarah responds to the save offer, the agent closes the loop automatically.

Multi-account support with Ghost Churn watching hundreds of accounts simultaneously, ranked by churn score in ClickHouse.

Monetize via agentic.market by selling cited churn reports as agent generated artifacts.

Built With

Share this project:

Updates