An AI consultant with memory and client cards
The bot holds a real conversation by voice or text, creates the client card itself, sets reminders and never mixes up data belonging to different owners.
Outcome
- Answers from your knowledge base rather than in generalities
- Creates the client card and the reminder straight out of the conversation
- Voice messages are transcribed on the server, with no third-party service
- Role
- Full cycle: spec, build, deploy
- Time it took
- 2 weeks
The problem
An ordinary button-based bot breaks on the first question phrased differently from what the developer anticipated. And a consultation that did happen in the chat ends up nowhere: agreed and forgotten, because writing the agreement down is a separate manual step.
What I built
The bot holds a free-form conversation and leans on a loaded knowledge base. But the point is not that it answers, it is that it acts while answering: during the conversation it creates the client card, records what was agreed and sets a reminder. The person simply describes how the meeting went, and the record appears by itself.
It understands voice messages too. Transcription runs on the server itself, so it costs nothing per message and the client's voice never travels to a third party.
What the bot is allowed to do, and what it is not
The bot does not improvise with data. It works through a fixed set of permitted actions: create a client, update a status, set a reminder. It has no actions outside that set, and that is not a limitation but the point of the design: a tool that can carry out anything the user's words suggest will eventually carry out the wrong thing.
Everyone writing to the bot sees only their own data. The isolation is built into the storage layer rather than resting on a handler remembering to check the owner.
The prompt is split into parts
The rules of conversation do not go to the model as one large block. The core is compact, and topical blocks are mixed in according to what is being discussed. The reason is practical: the longer the instructions, the worse the model holds all of them at once, and the more every message costs.
Stack
- Python
- aiogram 3
- LLM
- SQLite
- Whisper
Got a similar task?
Describe it in two sentences. I'll tell you if it can be automated and roughly what it costs.