Case study: Voice AI, fitness technology
A voice AI agent that calls gym members at risk of leaving
A voice AI agent for a gym platform's support team: it calls members at risk of churn, talks with each one, and turns every call into a structured next step.
- Client
- An AI fitness platform based in Riyadh, name withheld
- My role
- Software engineer and technical lead, part-time
- Engagement
- Independent contract
- Period
- May 2025 to present
I work with the client directly as a part-time contractor and was its first engineering hire. The product belongs to the client.
Project overview
The client runs an AI-powered fitness and gym management platform based in Riyadh. Its support team needs to reach members who are drifting away before they cancel, and calling each of them is slow, repetitive work.
I joined as the first engineering hire and own the backend architecture, delivery and the voice AI integrations. The voice agent is the part of the product that makes those calls.
The business problem
A gym loses members quietly: visits drop off before a membership is cancelled. Reaching each at-risk member personally is the right response, and it does not scale with a support team's time.
Risk shows up in visit patterns
The platform analyzes member visits and predicts who is at risk of churning, then marks those members for outreach.
Outreach has to be personal
A scripted call that is the same for everyone does not change behavior. The conversation has to reflect the member it is with.
A call is only useful if something follows
The team needs to know how each call went and what should happen next, in a form the product can act on.
My role and responsibilities
Technical ownership as the first engineer, working directly with the founders.
- Own the backend architecture and its delivery
- Designed and built the AI calling service as a standalone FastAPI microservice
- Built the real-time voice conversation and its fallback
- Built the post-call analysis that turns a transcript into a structured outcome
- Keep delivery moving as a part-time technical lead
Technical challenges
Speech that feels like a conversation
The agent talks and listens in real time. A pause that is acceptable in a chat window feels broken on a call.
No single point of failure for voice
A calling product that depends on one voice provider stops when that provider does, so the service needs a second one to fall back on.
Turning a conversation into a decision
A transcript is free text. The product needs a call outcome and a next step that software can act on.
Two systems, one member
Member data and the rest of the product live in Django, while calls run in a separate service. The two have to stay consistent about each member.
Solution and implementation
An outbound voice agent that contacts at-risk members, talks with each one personally, and reports back a structured outcome the support team and the product can act on.
From visit data to a call list
The platform analyzes member visits, predicts which members are at risk of churning and marks them. Those are the members the agent contacts.
Personalized voice conversation
The agent holds a speech-to-speech conversation using the OpenAI Realtime API, grounded in the member's profile. ElevenLabs is the fallback service.
A standalone calling service
Everything to do with AI calls runs in a FastAPI microservice. Django holds the member data and the rest of the product.
Post-call analysis with structured output
After each call a transcript is generated. The FastAPI service sends it to OpenAI for analysis and receives structured output, which determines the call outcome and the next steps.
Next steps on the member's pathway
Based on that outcome, the member is placed into a stage of a habit-building pathway designed by the client's team.
Technology stack
- Voice AI
- OpenAI Realtime API (speech to speech), ElevenLabs as fallback
- Calling service
- Python, FastAPI
- Product backend
- Django
- Analysis
- OpenAI with structured output
Outcomes
Only results that are documented are listed here.
- A voice agent that calls members at risk of churn and holds a personalized conversation with each
- Every call is analyzed into a structured outcome and a next step on the member's pathway
- Backend architecture and delivery owned end to end as the first engineer
- An ongoing engagement since May 2025
Lessons learned
- Personalization is what separates a retention call from a robocall. The member's context matters as much as the model.
- In voice, latency is part of the product. Context has to be chosen carefully, because every extra token is heard as a pause.
- Ask the model for structured output whenever software has to act on the answer. Free text is for people.
- A fallback provider is cheap insurance for anything that talks to customers in real time.
Related services
- AI Agents & Workflow Automation: Voice agents, conversational AI, RAG systems and AI-driven workflows that connect to the systems a business already runs on, with human approval where it matters.
- Fractional Technical Leadership: Part-time technical ownership for founders and early-stage companies: architecture, roadmap, delivery oversight and hands-on implementation.
More case studies
Working on something similar?
If your product has the same kind of constraints, I am glad to talk through how I would approach it.
Or email hello@sarmadkhalique.com