Inspiration
Startups rarely lose customers without warning. The signals already exist across usage, billing, support, onboarding, and outcome data, but customer-success teams often discover them too late. ChurnControl turns those fragmented signals into coordinated, timely retention work.
What it does
ChurnControl continuously evaluates customer accounts through specialized agents for usage, attainment, cause classification, prevention, retention, win-back, learning, and orchestration. The command center displays risk, alerts, diagnosis evidence, agent status, and intervention history.
When the Prevention agent runs, it uses OpenAI to produce a structured diagnosis, evidence, confidence score, recommended action, and customer message. Consequential actions are never executed blindly: the recommendation is persisted in InsForge and a human must approve or reject it.
How we built it
The frontend uses SvelteKit 2, Svelte 5, and TypeScript. InsForge provides authentication, PostgreSQL, row-level security, multi-tenant workspaces, alerts, agent runs, diagnoses, and interventions. OpenAI's Responses API with Structured Outputs produces predictable recommendations. The application is deployed through Vercel.
Every verified user receives an isolated eight-account sample workspace. ChurnControl records each agent run, calls OpenAI, validates the schema-constrained response, saves the diagnosis and proposed intervention, and presents approval controls.
How Codex and GPT-5.6 were used
ChurnControl was designed and implemented with Codex using GPT-5.6. Codex accelerated the complete workflow: translating functional notes and a visual handoff into Svelte components, designing the multi-tenant PostgreSQL schema, reviewing RLS and identity-column safety, integrating InsForge, implementing the OpenAI agent endpoint, and validating the product through browser automation.
Key decisions made during the Codex session included separating diagnosis from execution, requiring human approval, storing evidence and confidence as auditable records, and using Structured Outputs for predictable persistence.
Challenges
The hardest part was balancing useful agent autonomy with operational safety. ChurnControl separates diagnosis from execution and stores interventions as proposals requiring explicit approval. Multi-tenant RLS ensures authenticated users only access their own workspace.
Accomplishments
- Built a working agentic retention workflow instead of a static dashboard.
- Implemented tenant isolation with PostgreSQL RLS.
- Used Structured Outputs for persistable AI recommendations.
- Added human approval and rejection for consequential actions.
- Created an idempotent demo-workspace bootstrap.
- Verified the app with type checking, linting, production builds, browser automation, and backend diagnostics.
What we learned
Agentic systems become more trustworthy when their reasoning artifacts are visible. Showing evidence, confidence, proposed action, and approval state makes an AI recommendation easier to evaluate than an opaque churn score.
What's next
Connect product analytics, CRM, billing, and support sources; track intervention outcomes; calibrate treatment-versus-control models; and expand channel-specific execution.
Built With
- codex
- fastapi
- gpt-5.6
- insforge
- lightgbm
- openai-responses-api
- postgresql
- svelte-5
- sveltekit-2
- typescript
- vercel
Log in or sign up for Devpost to join the conversation.