<?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: Darshan S </title>
    <description>The latest articles on DEV Community by Darshan S  (@darshansdev).</description>
    <link>https://dev.to/darshansdev</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%2F3837219%2F8b262722-d85c-450c-a1f2-43131e3dbef1.jpeg</url>
      <title>DEV Community: Darshan S </title>
      <link>https://dev.to/darshansdev</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/darshansdev"/>
    <language>en</language>
    <item>
      <title>What if your AI coding tutor actually knew you?</title>
      <dc:creator>Darshan S </dc:creator>
      <pubDate>Sat, 21 Mar 2026 15:42:58 +0000</pubDate>
      <link>https://dev.to/darshansdev/what-if-your-ai-coding-tutor-actually-knew-you-3ff3</link>
      <guid>https://dev.to/darshansdev/what-if-your-ai-coding-tutor-actually-knew-you-3ff3</guid>
      <description>&lt;h2&gt;
  
  
  I Built an AI That Remembers How You Code — Here's What Happened
&lt;/h2&gt;

&lt;p&gt;The screen split open and I just stared at it.&lt;/p&gt;

&lt;p&gt;Left side — Kōdo mid-conversation, knowing exactly what the user had struggled with last week. &lt;br&gt;
Right side — a Monaco editor sliding in, pre-loaded with a problem Kōdo had picked specifically &lt;br&gt;
for this user's weak areas. No refresh. No navigation. Just — split. Smooth. Alive.&lt;/p&gt;

&lt;p&gt;That was the moment I knew we had built something real.&lt;/p&gt;
&lt;h2&gt;
  
  
  What We Built
&lt;/h2&gt;

&lt;p&gt;Kōdo is an AI coding mentor with persistent memory. Not "memory" in the sense of &lt;br&gt;
"we stored your chat history in a database." Memory in the sense of — Kōdo watches how you &lt;br&gt;
think across sessions, builds a behavioral profile of you, and becomes a fundamentally &lt;br&gt;
different tutor the longer you use it.&lt;/p&gt;

&lt;p&gt;Every other AI tutor resets when you close the tab. Kōdo doesn't.&lt;/p&gt;

&lt;p&gt;The core features:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Comeback Brief&lt;/strong&gt; — Every session opens with a personalized summary of where you left off. 
Kōdo tells you what you were working on, what was left unfinished, and what needs attention 
today. You didn't set a reminder. Kōdo just knows.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Pattern Interrupts&lt;/strong&gt; — When you ask for help, Kōdo checks your history first. If you've 
hit the same wall four times, it calls that out before explaining anything. "This is the third 
time you've struggled at the implementation phase on a problem you understood conceptually. 
Want to talk about that first?"&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Adaptive Explanations&lt;/strong&gt; — Kōdo remembers which analogies worked for you. If the stack 
analogy clicked for recursion last Tuesday, it uses that framing again when you hit DP.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Built-in Editor&lt;/strong&gt; — Monaco Editor (same engine as VS Code) embedded directly in the app. 
Syntax highlighting, autocomplete, error squiggles — and code execution via Piston API. No 
context switching.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Problem Recommendation&lt;/strong&gt; — Kōdo suggests problems based on your weak areas and tracks 
what you've already solved so you never get the same problem twice.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Weekly Insight Card&lt;/strong&gt; — Not a list of problems solved. A behavioral analysis. What 
patterns Kōdo noticed. What you keep avoiding. What's about to be forgotten.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;
  
  
  The Stack
&lt;/h2&gt;

&lt;p&gt;FastAPI backend, Next.js frontend, Monaco Editor for the code environment, Piston API for &lt;br&gt;
execution, Groq for the LLM, and &lt;a href="https://github.com/vectorize-io/hindsight" rel="noopener noreferrer"&gt;Hindsight&lt;/a&gt; for &lt;br&gt;
the memory layer that makes all of it possible.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://hindsight.vectorize.io/" rel="noopener noreferrer"&gt;Hindsight&lt;/a&gt; is a memory system built specifically for AI &lt;br&gt;
agents. It doesn't store raw conversation text — it extracts structured facts, builds a &lt;br&gt;
knowledge graph, and synthesizes observations over time. When Kōdo says "you've been avoiding &lt;br&gt;
graph problems for three weeks" — that insight came from Hindsight's observation consolidation, &lt;br&gt;
not from us writing any pattern detection logic.&lt;/p&gt;
&lt;h2&gt;
  
  
  How We Used Hindsight
&lt;/h2&gt;

&lt;p&gt;Three API calls. Each one doing something distinct.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;code&gt;retain()&lt;/code&gt;&lt;/strong&gt; — Called after every chat message and problem attempt. We don't store the raw &lt;br&gt;
conversation. We store behavioral inferences — what the interaction reveals about how this &lt;br&gt;
person thinks:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="n"&gt;memory&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;retain&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
    &lt;span class="n"&gt;userid&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="n"&gt;user_id&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;content&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sa"&gt;f&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;User asked: &lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="n"&gt;message&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="se"&gt;\n&lt;/span&gt;&lt;span class="s"&gt;Kōdo responded: &lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="n"&gt;response&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;
&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The richer the content string, the better the memory. Hindsight's LLM extracts facts from &lt;br&gt;
whatever you feed it. We learned early that "user failed p003" is useless. "User attempted &lt;br&gt;
Climbing Stairs (DP, easy), failed after 2 attempts, code shows they understood the recurrence &lt;br&gt;
but implemented the wrong base case" — that's a memory worth having.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;code&gt;recall()&lt;/code&gt;&lt;/strong&gt; — Called before every response to fetch relevant context. When a user is &lt;br&gt;
solving a graph problem, we don't recall everything — we recall specifically their history &lt;br&gt;
with graph problems:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="n"&gt;recall_query&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="sa"&gt;f&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;user&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;s history with &lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="n"&gt;problem&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;tags&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="s"&gt; problems and their common struggles&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;
&lt;span class="n"&gt;existing_memory&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;memory&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;recall&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;user_id&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;recall_query&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;&lt;code&gt;reflect()&lt;/code&gt;&lt;/strong&gt; — This is the powerful one. Unlike recall which fetches raw facts, reflect &lt;br&gt;
runs an agentic reasoning loop over the full memory bank and synthesizes an answer. We use it &lt;br&gt;
for the Comeback Brief, pattern interrupt detection, problem recommendations, and the Weekly &lt;br&gt;
Insight Card:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="n"&gt;weekly_summary&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;memory&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;reflect&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
    &lt;span class="n"&gt;user_id&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Analyze this user&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;s learning patterns from the past week...&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;budget&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;high&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;
&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The &lt;code&gt;budget&lt;/code&gt; parameter controls how deep Hindsight searches — &lt;code&gt;low&lt;/code&gt; for speed, &lt;code&gt;high&lt;/code&gt; for &lt;br&gt;
complex synthesis. Weekly insights use &lt;code&gt;high&lt;/code&gt;. Quick session openers use &lt;code&gt;mid&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;You can learn more about how Hindsight handles &lt;br&gt;
&lt;a href="https://vectorize.io/features/agent-memory" rel="noopener noreferrer"&gt;agent memory here&lt;/a&gt;.&lt;/p&gt;
&lt;h2&gt;
  
  
  The Hard Parts
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Naming a file &lt;code&gt;hindsight.py&lt;/code&gt;&lt;/strong&gt; — Our first import error was a circular import because we &lt;br&gt;
named our memory module the same as the package. Python imported our file instead of the &lt;br&gt;
library. Renamed it &lt;code&gt;memory.py&lt;/code&gt;. Five minutes wasted, lesson learned forever.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;New users with no memory bank&lt;/strong&gt; — Hindsight throws a 404 when you try to recall from a &lt;br&gt;
user that doesn't exist yet. Every &lt;code&gt;memory.recall()&lt;/code&gt; and &lt;code&gt;memory.reflect()&lt;/code&gt; call needed a &lt;br&gt;
try/except or new users crashed the entire endpoint on first message.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;LLMs don't always return clean JSON&lt;/strong&gt; — We use Groq for intent detection — figuring out &lt;br&gt;
if the user wants a coding problem and what topic. Sometimes Groq wraps the JSON in markdown &lt;br&gt;
fences. We strip them before parsing:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="n"&gt;intent_data&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;json&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;loads&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
    &lt;span class="n"&gt;intent&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;strip&lt;/span&gt;&lt;span class="p"&gt;().&lt;/span&gt;&lt;span class="nf"&gt;strip&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;```

json&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="nf"&gt;strip&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;

```&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="nf"&gt;strip&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Not elegant. But it works.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Topic matching&lt;/strong&gt; — Hindsight's reflect might return "dynamic programming" when your tag is &lt;br&gt;
"dp". We fixed this by explicitly listing valid tags in the reflect prompt so the output &lt;br&gt;
always matches something in our problem bank.&lt;/p&gt;

&lt;h2&gt;
  
  
  What I'd Do Differently
&lt;/h2&gt;

&lt;p&gt;Build the memory schema first. Before writing a single endpoint, decide exactly what you're &lt;br&gt;
going to retain and why. We retrofitted this and it showed — early sessions stored vague &lt;br&gt;
strings that Hindsight couldn't extract much from. The quality of your memory is only as good &lt;br&gt;
as what you put in.&lt;/p&gt;

&lt;p&gt;Don't underestimate &lt;code&gt;reflect()&lt;/code&gt;. Most teams at this hackathon probably used retain and recall &lt;br&gt;
and called it done. Reflect is where the magic actually lives — it's not just retrieval, it's &lt;br&gt;
reasoning. The Comeback Brief, the pattern interrupts, the weekly insights — none of that &lt;br&gt;
exists without reflect doing real work.&lt;/p&gt;

&lt;p&gt;Separate your frontend and backend folders from day one. We didn't. Deployment was messier &lt;br&gt;
than it needed to be.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Moment
&lt;/h2&gt;

&lt;p&gt;The screen split open and I just stared at it.&lt;/p&gt;

&lt;p&gt;Kōdo had remembered. It had picked the right problem. It knew this user's history without &lt;br&gt;
being told. And the editor just — appeared. Right there. Ready.&lt;/p&gt;

&lt;p&gt;We built this in 36 hours. With a memory system we'd never used before, a hackathon deadline &lt;br&gt;
breathing down our necks, and a lot of trust that the pieces would come together.&lt;/p&gt;

&lt;p&gt;They did.&lt;/p&gt;

&lt;p&gt;Kōdo is open source — &lt;a href="https://github.com/DarshanS-Dev/Kodo" rel="noopener noreferrer"&gt;check out the repo&lt;/a&gt;.&lt;br&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.amazonaws.com%2Fuploads%2Farticles%2Fccnlrgy76qr3x4c1datv.jpg" 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.amazonaws.com%2Fuploads%2Farticles%2Fccnlrgy76qr3x4c1datv.jpg" alt="Architecture of Kōdo" width="800" height="682"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
      <category>ai</category>
      <category>opensource</category>
    </item>
  </channel>
</rss>
