<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: AFREEN FASIHA</title>
    <description>The latest articles on DEV Community by AFREEN FASIHA (@afreen_fasiha_18).</description>
    <link>https://dev.to/afreen_fasiha_18</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4151093%2F7b8b02e4-7237-4a68-8943-1db2d4ed8c05.png</url>
      <title>DEV Community: AFREEN FASIHA</title>
      <link>https://dev.to/afreen_fasiha_18</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/afreen_fasiha_18"/>
    <language>en</language>
    <item>
      <title>I Built a Support Agent That Remembers What Failed</title>
      <dc:creator>AFREEN FASIHA</dc:creator>
      <pubDate>Wed, 30 Sep 2026 02:23:37 +0000</pubDate>
      <link>https://dev.to/afreen_fasiha_18/i-built-a-support-agent-that-remembers-what-failed-4oo</link>
      <guid>https://dev.to/afreen_fasiha_18/i-built-a-support-agent-that-remembers-what-failed-4oo</guid>
      <description>&lt;p&gt;&lt;strong&gt;We Built a Support Agent That Remembers What Failed&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;A support agent can answer a question perfectly and still be frustrating to use.&lt;/p&gt;

&lt;p&gt;The problem starts when the customer comes back.&lt;/p&gt;

&lt;p&gt;They have already explained the device, described the issue, restarted something, tried another fix, and reported what happened. A stateless assistant sees a new message. The customer sees the same unresolved problem.&lt;/p&gt;

&lt;p&gt;We built &lt;strong&gt;MemoryDesk&lt;/strong&gt; to explore a different approach: make the agent remember the useful parts of previous support interactions and use those memories to decide what to do next.&lt;/p&gt;

&lt;p&gt;The key idea is simple:&lt;/p&gt;

&lt;p&gt;A returning customer should not have to start over.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The problem with ordinary support conversations&lt;/strong&gt;&lt;br&gt;
Consider a customer with a recurring Wi-Fi problem.&lt;/p&gt;

&lt;p&gt;On the first interaction, they might say:&lt;/p&gt;

&lt;p&gt;“My Dell laptop keeps disconnecting from Wi-Fi. I already restarted the router, but the problem is still there.”&lt;/p&gt;

&lt;p&gt;A conventional chatbot can answer that message. It can suggest restarting the router, checking the connection, or running a network diagnostic.&lt;/p&gt;

&lt;p&gt;But the router has already been restarted.&lt;/p&gt;

&lt;p&gt;That matters.&lt;/p&gt;

&lt;p&gt;If the customer returns later and says:&lt;/p&gt;

&lt;p&gt;“Hey, it’s happening again.&lt;br&gt;
A useful support agent needs more than the latest message. It needs the history that changes what the next action should be.&lt;/p&gt;

&lt;p&gt;That became the design constraint for MemoryDesk: remember useful context, not just chat transcripts.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;How We Built the Memory Layer&lt;/strong&gt;&lt;br&gt;
We used Hindsight as the persistent memory layer.&lt;/p&gt;

&lt;p&gt;The application sends the customer interaction to Hindsight with retain:&lt;/p&gt;

&lt;p&gt;TypeScript&lt;/p&gt;

&lt;p&gt;await hindsight.retain(&lt;br&gt;
  BANK_ID,&lt;br&gt;
  &lt;code&gt;Customer ${customerId} said: ${message}&lt;/code&gt;,&lt;br&gt;
  {&lt;br&gt;
    context: "MemoryDesk customer support conversation",&lt;br&gt;
    metadata: {&lt;br&gt;
      customerId&lt;br&gt;
    }&lt;br&gt;
  }&lt;br&gt;
);&lt;br&gt;
For a later message, MemoryDesk asks Hindsight to recall context that is relevant to the current issue:&lt;/p&gt;

&lt;p&gt;TypeScript&lt;/p&gt;

&lt;p&gt;const recall = await hindsight.recall(&lt;br&gt;
  BANK_ID,&lt;br&gt;
  &lt;code&gt;What useful previous support context do we know about customer ${customerId} that is relevant to this issue: ${message}&lt;/code&gt;,&lt;br&gt;
  {&lt;br&gt;
    maxTokens: 3000,&lt;br&gt;
    budget: "mid"&lt;br&gt;
  }&lt;br&gt;
);&lt;br&gt;
Then the agent uses that accumulated context when generating its response.&lt;/p&gt;

&lt;p&gt;That separation matters to the product design. The chat interface does not need to expose raw memory records every time someone sends a message. Memory can work in the background, while a dedicated History view lets the user inspect it when they actually need it.&lt;/p&gt;

&lt;p&gt;The implementation uses the Hindsight GitHub repository and the Hindsight API/client to connect the support workflow to persistent memory. We also kept the main application lightweight: React and Vite on the frontend, Node.js and Express on the backend.&lt;/p&gt;

&lt;p&gt;For more background, we found Vectorize's explanation of agent memory useful when thinking about what information should persist across interactions.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The important part: memory has to change the answer&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The easiest way to fake a memory feature is to show a list called “Memories”.&lt;/p&gt;

&lt;p&gt;That is not what we wanted.&lt;/p&gt;

&lt;p&gt;The useful test is whether the answer changes because of what the agent remembers.&lt;/p&gt;

&lt;p&gt;Without useful memory&lt;/p&gt;

&lt;p&gt;Customer:&lt;/p&gt;

&lt;p&gt;“Hey, it’s happening again.”&lt;/p&gt;

&lt;p&gt;Agent:&lt;/p&gt;

&lt;p&gt;“Could you describe the issue and tell me what troubleshooting steps you have already tried?”&lt;/p&gt;

&lt;p&gt;Technically reasonable. Operationally repetitive.&lt;/p&gt;

&lt;p&gt;With relevant memory&lt;/p&gt;

&lt;p&gt;Customer:&lt;/p&gt;

&lt;p&gt;“Hey, it’s happening again.”&lt;/p&gt;

&lt;p&gt;MemoryDesk can respond more like:&lt;/p&gt;

&lt;p&gt;“Hey, welcome back! I remember we were troubleshooting the Wi-Fi issue on your Dell laptop, and restarting the router didn’t solve it. Let’s pick up from there.”&lt;/p&gt;

&lt;p&gt;The important difference is not that the second answer contains more words.&lt;/p&gt;

&lt;p&gt;It is that the agent knows what not to repeat.&lt;/p&gt;

&lt;p&gt;That gives it a better starting point for the next diagnostic step.&lt;/p&gt;

&lt;p&gt;**&lt;br&gt;
Making the interaction feel human**&lt;/p&gt;

&lt;p&gt;Persistent memory is a technical feature. The customer should not have to think about the implementation.&lt;/p&gt;

&lt;p&gt;That is why MemoryDesk separates three layers of the experience.&lt;/p&gt;

&lt;p&gt;The chat is conversational. It uses short responses, focused questions, and natural language.&lt;/p&gt;

&lt;p&gt;The profile shows current support context such as the selected device and issue.&lt;/p&gt;

&lt;p&gt;The History tab exposes the persistent memory only when the user asks to see it.&lt;/p&gt;

&lt;p&gt;This keeps the primary support experience clean while making the memory layer visible and understandable.&lt;/p&gt;

&lt;p&gt;We also added device and issue selection at the start of a session. That gives the agent initial context without forcing the customer to type everything in a rigid form.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What surprised us while building it&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The most useful memory is not necessarily the longest memory.&lt;/p&gt;

&lt;p&gt;A long conversation transcript is not automatically good support context.&lt;/p&gt;

&lt;p&gt;What matters is whether the agent can recover the facts that affect its next decision:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;What device is involved? &lt;/li&gt;
&lt;li&gt;What problem keeps happening? &lt;/li&gt;
&lt;li&gt;What has already been tried? &lt;/li&gt;
&lt;li&gt;Did that attempt work? &lt;/li&gt;
&lt;li&gt;What new clue appeared later? &lt;/li&gt;
&lt;li&gt;That changed how we thought about the memory layer.
We stopped treating memory as “chat history” and started treating it as support history.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;*&lt;em&gt;One limitation we had to account for&lt;br&gt;
*&lt;/em&gt;&lt;br&gt;
There is a trade-off between showing memory everywhere and keeping the interface readable.&lt;/p&gt;

&lt;p&gt;During early testing, displaying every recalled memory beside every response made the conversation feel cluttered. The information was technically useful, but the experience was worse.&lt;/p&gt;

&lt;p&gt;We changed the design so memory stays in the background during normal conversation and appears in a dedicated History tab.&lt;/p&gt;

&lt;p&gt;That turned out to be a better product decision: the agent can use memory constantly without forcing the customer to look at it constantly.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What we learned..&lt;/strong&gt;&lt;br&gt;
&lt;strong&gt;1. Memory should influence decisions&lt;/strong&gt;&lt;br&gt;
If an agent remembers something but still gives the same generic answer, the memory layer is not doing enough.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2. Failed actions are valuable context&lt;/strong&gt;&lt;br&gt;
Knowing that a troubleshooting step already failed can be more useful than knowing what the customer said word-for-word.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;3. Good AI UX hides unnecessary complexity&lt;/strong&gt;&lt;br&gt;
The customer should experience continuity, not API calls, retrieval steps, or internal processing.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;4. A small workflow is enough to prove the idea&lt;/strong&gt;&lt;br&gt;
MemoryDesk focuses on one workflow: recurring technical support. That makes the memory behavior easier to see and test.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Where we would take it next&lt;/strong&gt;&lt;br&gt;
A production version could connect MemoryDesk to a real support-ticket system and carry context across email, chat, and human-agent handoffs.&lt;/p&gt;

&lt;p&gt;It could also separate short-term conversation context from longer-term customer memory, add stronger access controls, and provide better tools for reviewing or correcting stored information.&lt;/p&gt;

&lt;p&gt;Those would be important steps before using a system like this with real customer data.&lt;/p&gt;

&lt;p&gt;For now, the core lesson is enough:&lt;/p&gt;

&lt;p&gt;The best part of agent memory is not that the agent remembers your past. It is that your past changes what it does next.&lt;/p&gt;

&lt;p&gt;That’s the idea behind &lt;strong&gt;&lt;em&gt;MemoryDesk&lt;/em&gt;&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fro8gacufaqfiu4l7o935.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fro8gacufaqfiu4l7o935.png" alt=" " width="800" height="417"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F2rkfo0qhio55adtcjije.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F2rkfo0qhio55adtcjije.png" alt=" " width="800" height="318"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fslaun7lxpf4wnrlwdwtx.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fslaun7lxpf4wnrlwdwtx.png" alt=" " width="799" height="475"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F1rlmf3n63d4sp26uocrd.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F1rlmf3n63d4sp26uocrd.png" alt=" " width="800" height="398"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fjuqj1axwwidtge47fipw.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fjuqj1axwwidtge47fipw.png" alt=" " width="799" height="465"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
      <category>agents</category>
      <category>ai</category>
      <category>llm</category>
      <category>support</category>
    </item>
  </channel>
</rss>
