<?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: itzsam10</title>
    <description>The latest articles on DEV Community by itzsam10 (@itzsam10).</description>
    <link>https://dev.to/itzsam10</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.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3838687%2F4994cbf9-752e-45fe-8e00-d57b2b85ec8d.png</url>
      <title>DEV Community: itzsam10</title>
      <link>https://dev.to/itzsam10</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/itzsam10"/>
    <language>en</language>
    <item>
      <title>How I Used Hindsight to Build an Unforgiving Accountability Agent</title>
      <dc:creator>itzsam10</dc:creator>
      <pubDate>Sun, 22 Mar 2026 17:31:15 +0000</pubDate>
      <link>https://dev.to/itzsam10/how-i-used-hindsight-to-build-an-unforgiving-accountability-agent-3hbk</link>
      <guid>https://dev.to/itzsam10/how-i-used-hindsight-to-build-an-unforgiving-accountability-agent-3hbk</guid>
      <description>&lt;p&gt;"Did it seriously just remember that?" My teammate stared at the screen as AXIOM cited an excuse from three days ago — without us feeding it any chat history. That's when we knew Hindsight was doing something different from RAG.&lt;/p&gt;

&lt;h2&gt;
  
  
  What We Built
&lt;/h2&gt;

&lt;p&gt;AXIOM is a personal discipline agent for engineering students. It's not a to-do list or a reminder app. It's an AI that holds you accountable across days and sessions — because it actually remembers what you said yesterday, last week, and the week before that.&lt;/p&gt;

&lt;p&gt;Every session starts with a structured check-in: did you work on your capstone project? Did you go to the gym? Did you complete your coursework? You answer honestly. AXIOM scores you out of 1000, updates a 30-day activity heatmap, and stores everything into &lt;a href="https://github.com/vectorize-io/hindsight" rel="noopener noreferrer"&gt;Hindsight&lt;/a&gt; — a persistent memory layer built specifically for AI agents. Tomorrow, when you open it again, it knows exactly what you did and what you avoided.&lt;/p&gt;

&lt;p&gt;The stack is deliberately simple: &lt;strong&gt;Streamlit&lt;/strong&gt; for the UI, &lt;strong&gt;Groq (Llama 3.1)&lt;/strong&gt; for fast streaming inference, and &lt;strong&gt;Hindsight Cloud&lt;/strong&gt; for per-user persistent memory. The entire application lives in a single &lt;code&gt;app.py&lt;/code&gt; file. No database setup, no complex infrastructure. Just three APIs connected together.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Memory Problem I Didn't Know I Had
&lt;/h2&gt;

&lt;p&gt;My first version used &lt;code&gt;st.session_state&lt;/code&gt; — a Python dictionary that lives only while the browser tab is open. It worked fine within a single session. Close the tab, come back tomorrow — the agent had no idea who you were. It gave the same generic advice every single day. That's not accountability. That's autocomplete with a friendly tone.&lt;/p&gt;

&lt;p&gt;My second attempt was saving raw conversation text to a simple list and doing keyword search over it. This felt like progress until I actually tested it. If someone typed "I skipped the gym because I was exhausted and had a headache after the lab session," a keyword search for "gym" the next day would return it — but as a raw blob of text with zero structure. The agent would hallucinate context, misattribute timing, and occasionally reference things that had nothing to do with the current conversation.&lt;/p&gt;

&lt;p&gt;The core problem wasn't storage. It was retrieval quality. I needed something that could answer "what excuses has this user made about gym this week?" and return structured, contextual, temporally-aware results — not raw text matches.&lt;/p&gt;

&lt;p&gt;That's what &lt;a href="https://vectorize.io/features/agent-memory" rel="noopener noreferrer"&gt;Hindsight's agent memory system&lt;/a&gt; actually does. When you call &lt;code&gt;retain()&lt;/code&gt;, it doesn't store your raw text. An LLM extracts structured facts — who said what, when, in what context, with what relationships between entities. When you call &lt;code&gt;recall()&lt;/code&gt;, four search strategies run in parallel: semantic similarity, BM25 keyword matching, knowledge graph traversal, and temporal reasoning.&lt;/p&gt;

&lt;h2&gt;
  
  
  How the Memory Integration Works
&lt;/h2&gt;

&lt;p&gt;Here's the retain call from &lt;code&gt;app.py&lt;/code&gt;:&lt;/p&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;
python
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

</description>
      <category>ai</category>
      <category>machinelearning</category>
      <category>python</category>
    </item>
  </channel>
</rss>
