Every time I contact support, I have to explain my problem again. So I built SupportMind, a support agent that remembers each customer.
Priya's router used to disconnect because of old firmware, and an update fixed it. When she says "my internet keeps dropping" again, the agent skips the basic steps and goes straight to what worked before.
A new customer sends the same message and gets a generic checklist. Same model, same prompt. Only the memory is different.
I Am JayaLakshmi , And This Was Build In Code.in
Have you ever contacted customer support twice about the same thing? The second time, you explain everything again, because the agent has no idea what happened before.
Story Angle**
That isn't an AI problem. It's a memory problem. So I built SupportMind, a support agent that remembers every customer.
Meet Priya
Priya's router used to disconnect every evening. The cause was outdated firmware, and updating it fixed the problem. Later she had slow WiFi, and a WiFi extender fixed that.
Now Priya writes:** "my internet keeps dropping."
A normal bot replies with the usual checklist: restart the router, check the cables. Priya has heard this before.
SupportMind already knows her history. It skips the basics and goes straight to what worked for her.
Meet a new customer
A new customer sends the exact same message. There's no history, so the agent gives the generic checklist, which is the right answer for a first-time customer.
Same model. Same prompt. The only difference is memory.
Nothing gets mixed up
Every customer has their own separate memory bank. Priya's router problems never show up in Ananya's billing chat.
How it's built
- Flask for the app
- Groq (gpt-oss-120b) for the replies
- Hindsight for the memory
Before each reply, the agent recalls the customer's past issues. After each reply, it saves the new conversation for next time.
One memory bank per customer
The first rule:every customer gets their own memory bank, using their customer ID. This keeps histories separate, so one customer's problems never leak into another customer's chat.
Call 1: Recall (before replying)**
recall_result = hindsight.recall(bank_id=customer_id, query=message)
past_memories = [r.text for r in recall_result.results]
I use the customer's message as the search query, so I only get back memories that matter for this question. If nothing comes back, I tell the model "This is a new customer with no past history."
Call 2: Generate the reply
response = groq_client.chat.completions.create(
model="openai/gpt-oss-120b",
messages=[
{"role": "system", "content": f"You are a helpful support agent.\n{memory_context}"},
{"role": "user", "content": message}
]
)
The memories go into the system prompt. That's the whole trick.
Call 3: Retain (after replying)
hindsight.retain(
bank_id=customer_id,
content=f"Customer said: {message}. Agent replied: {reply}"
)
Now the next conversation starts with more knowledge than this one.
Bonus: Reflect
hindsight.reflect(
bank_id=customer_id,
query="Write a briefing for a support agent about this customer. Use 3 short bullet points."
)
Recall gives you raw memories. Reflect gives you a short summary. I use it for the "Generate customer briefing" button.
Tips:
- Test the empty-memory case first.
- Show the recalled memories in the UI.
- It makes the agent's behavior easy to understand and debug.
What I learned
- Show the recalled memories in the UI. It makes the agent's behavior easy to understand.
- Test the empty-memory case first.
- Per-customer memory beats stuffing the full chat history into every prompt.
Built with Code.in and Hindsight





Top comments (0)