Customer Service AI Demo
A customer service agent for a fictional telecom. It retrieves knowledge base articles, answers in a friendly tone, tries to keep a cancelling customer with better offers, and shows every retrieval and tool call it makes.
What it does
The agent greets the customer and, when the customer wants to cancel an internet or mobile subscription, asks for the reason. It offers a better continuation, then a stronger deal if the first is declined, then explains the benefits of staying. After the problem is solved it reviews the rest of the account and offers upgrades, suggests new services that fit, checks the customer understood everything, asks if it can still help, and says goodbye.
How the pieces fit
- Knowledge base: 24 short fictional articles on cancellation, retention offers, billing, outages, plans, moving and mobile.
- Retrieval: every message is matched against the articles with TF-IDF keyword scoring. The top three hits and their scores are shown in the trace. This is keyword retrieval, not vector search. Vector search is planned for the music production page.
- Conversation flow: a state machine with the stages greet, problem, solving it, account review and upgrades, new services, wrap-up and goodbye. The cancellation part has the steps reason, offer 1, offer 2 and final persuasion. Each reason (price, moving, coverage, speed, competitor, rarely used) has its own offer ladder.
- Tool calls: lookup_subscription, apply_offer, create_cancellation_ticket, review_account, upgrade_plan and add_service. They return made-up results and are marked SIMULATED in the trace.
- Replies: written as templates that quote the retrieved article. In a real deployment a language model would draft the wording from the same articles and the same flow rules.
What I decided and what the agents built
I decided the flow and the logic behind it: a friendly hello, the problem, solving it, then looking after the whole customer relationship: check current services and upgrade them if needed, offer new services and deals, make sure the customer understands everything, offer more help, and say goodbye. The tone (friendly, calm, professional) and the choice of cancellation as the first scenario are also mine. AI agents wrote the knowledge base text, the retrieval code, the state machine and the page, under my direction, and I judge whether the conversation feels right. More situations such as billing questions can be added later.
Why it is relevant to agent roles
It shows an agent that follows business rules across several turns, grounds its answers in sources, calls tools to change state, and exposes every step so a person can audit it.
Known limits
- It is a scripted flow with keyword matching. It handles only the cancellation path and English input, and unusual phrasings can fall outside it.
- No language model is used on this page, so the replies are templates and the wording is fixed.
- No evaluation has been run yet on how often the flow reaches the right outcome.
Next
Add a billing scenario, let a model draft the replies from retrieved articles, and write a small set of test conversations to measure how often the agent follows the intended flow.