Inspiration

In the pre-hackathon meeting, Keywords CEO Andy Li shared that Keywords achieves world-class 169% net revenue retention (NRR)—incredible! He contrasted it with Pete Koonen's first product at 80% NRR and used a powerful metaphor: NRR is like pouring water into a bucket. Many teams just build a bigger hose to pour more in, but the real win is patching the holes at the bottom so less leaks out.

That stuck with us. ChurnGuard was born to help SaaS companies do exactly that: detect and patch churn leaks intelligently before ARR drains away.

What it does

ChurnGuard is an AI-powered retention agent that merges real customer data from Salesforce (sales/ARR), Amplitude (product usage/telemetry), and Zendesk (support tickets) to:

  • Compute root-cause ARR risk attribution (e.g., Product gaps 30%, Process issues 25%, Development/Support 45%).
  • Visualize risks in a clean, dark-themed dashboard with interactive cards, region filters, and benchmark comparisons.
  • Use advanced AI (Claude) to analyze aggregated data and deliver prioritized, evidence-based recommendations to boost retention—like speeding up onboarding or fixing adoption gaps—with estimated impact.

It turns siloed data overload into actionable playbooks that help teams retain customers like Keywords does.

How we built it

We built a full end-to-end Streamlit prototype in a weekend:

  • Data ingestion: Dual mode—CSV uploads for quick testing + API connections (simple-salesforce, Zenpy for Zendesk, requests/Amplitude SDK) for production feel.
  • Processing & risk logic: Pandas for merging on account_id, rule-based weighted scoring for category attribution (product adoption gaps, TTFV delays, ticket escalations, etc.).
  • Dashboard: Custom CSS dark theme mimicking modern SaaS UIs—grid cards, expanders, indicators (circles/checks), Plotly for small visuals.
  • AI layer: Anthropic Claude API prompted to act as a top retention expert, summarizing stats and generating tailored pain points + recommendations.
  • Deployment prep: Ready for Streamlit Cloud / Render.com with secrets for API keys.

Challenges we ran into

  • Merging inconsistent schemas from three sources (different account IDs formats, missing fields) required careful cleaning and fallback logic.
  • API auth/rate limits: Handling secure credential input and graceful errors without exposing secrets.
  • Time crunch: Balancing a polished dashboard UI with robust AI prompting and data logic in ~48 hours.
  • Making the AI output consistently specific/actionable instead of generic (took several prompt iterations).

Accomplishments that we're proud of

  • End-to-end working prototype with real data integration (not just mocks) and live AI insights.
  • Dashboard that visually attributes risk like enterprise CS tools, plus Claude-powered recommendations that feel like expert advice.
  • Direct tie-in to Andy's bucket metaphor—positioning ChurnGuard as the "patch the holes" complement to high-growth pouring.
  • Built collaboratively by Ryan Varghese and Tarang Pande in a sprint, with clean modular code (functions for loading, computing, rendering, AI calls).

What we learned

  • Prompt engineering is key for agentic AI—structured, evidence-based prompts yield far better retention-specific outputs.
  • Real-world data pipelines are messy; robust merging/error handling is non-negotiable for production-grade agents.
  • Observability matters: Clear risk attribution + traceable AI reasoning helps debug and trust the system.
  • Hackathons reward shipping fast while thinking about scalability (APIs over mocks, session state for multi-user).

What's next for ChurnGuard

  • Add real-time data refresh (cron/webhooks) and multi-tenant support (PostgreSQL backend).
  • Enhance with more observability (trace agent decisions, log Claude calls).
  • Integrate OAuth for seamless Salesforce/Amplitude/Zendesk login.
  • Expand AI capabilities: predictive churn modeling (scikit-learn), personalized playbooks per account.
  • Turn it into a full SaaS tool—help more teams achieve Keywords-level retention!

Thanks to Keywords AI for the inspiring challenge and awesome metaphor—we're excited to keep building!

Built With

  • amplitude-api
  • anthropic-claude
  • custom-css
  • keywords-ai-(api-gateway-+-prompt-management)
  • numpy
  • pandas
  • plotly
  • python
  • salesforce
  • streamlit
  • streamlit-community-cloud
  • trae-(the-real-ai-engineer)
  • zendesk-api
  • zenpy
Share this project:

Updates