<?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: Ophelia</title>
    <description>The latest articles on DEV Community by Ophelia (@debragail).</description>
    <link>https://dev.to/debragail</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%2F4020270%2Fdb5af2dc-7a00-4811-804b-17e48d25c75f.png</url>
      <title>DEV Community: Ophelia</title>
      <link>https://dev.to/debragail</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/debragail"/>
    <language>en</language>
    <item>
      <title>How I Gave My AI Coding Agent Persistent Memory in 2 Minutes</title>
      <dc:creator>Ophelia</dc:creator>
      <pubDate>Tue, 07 Jul 2026 22:38:10 +0000</pubDate>
      <link>https://dev.to/debragail/how-i-gave-my-ai-coding-agent-persistent-memory-in-2-minutes-581l</link>
      <guid>https://dev.to/debragail/how-i-gave-my-ai-coding-agent-persistent-memory-in-2-minutes-581l</guid>
      <description>&lt;h1&gt;
  
  
  How I Gave My AI Coding Agent Persistent Memory in 2 Minutes
&lt;/h1&gt;

&lt;p&gt;Every AI coding session starts the same way: you explain your project, your conventions, your preferences, and the context from last week's debugging session. Then you do it all again tomorrow.&lt;/p&gt;

&lt;p&gt;I built &lt;a href="https://getengram.app" rel="noopener noreferrer"&gt;Engram&lt;/a&gt; to fix this. It gives ChatGPT, Claude Code, Cursor, and Windsurf a persistent memory that survives across sessions — so your AI actually remembers what you discussed yesterday.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Problem
&lt;/h2&gt;

&lt;p&gt;AI assistants are stateless. Each session starts from zero. There are workarounds:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;CLAUDE.md / .cursorrules&lt;/strong&gt; — manual, limited, you maintain it by hand&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;ChatGPT's built-in memory&lt;/strong&gt; — stores brief facts like "user likes Python," not the full reasoning behind decisions&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Copy-pasting context&lt;/strong&gt; — tedious, doesn't scale&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;None of these capture the &lt;em&gt;full arc&lt;/em&gt; of a conversation — the trade-offs you evaluated, the bugs you investigated, the reasoning behind decisions.&lt;/p&gt;

&lt;h2&gt;
  
  
  What Engram Does
&lt;/h2&gt;

&lt;p&gt;Engram stores your conversations verbatim and makes them searchable by meaning. When your AI starts a new session, it can search your history and pull in relevant context from days or weeks ago.&lt;/p&gt;

&lt;p&gt;It works through &lt;a href="https://modelcontextprotocol.io" rel="noopener noreferrer"&gt;MCP&lt;/a&gt; (Model Context Protocol), so any compatible client can use it. Your AI gets three core tools:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;search&lt;/code&gt; — "what did we decide about the auth flow?" finds the relevant conversation even if you never used those exact words&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;create_conversation&lt;/code&gt; / &lt;code&gt;append_messages&lt;/code&gt; — stores new conversations automatically&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;vault_set&lt;/code&gt; / &lt;code&gt;vault_get&lt;/code&gt; — key-value store for structured facts&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Under the hood, conversations are chunked and embedded using vector embeddings. Search is semantic — it matches by meaning, not keywords.&lt;/p&gt;

&lt;h2&gt;
  
  
  Setup: ChatGPT (30 seconds, no install)
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;Go to &lt;strong&gt;Settings &amp;gt; Apps &amp;gt; Developer mode&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;Add a custom MCP connector: &lt;code&gt;https://mcp.getengram.app/mcp&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Sign in with OAuth when prompted&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;That's it. No CLI, no API keys, no install. ChatGPT can now search your history and store new conversations.&lt;/p&gt;

&lt;p&gt;Try asking: &lt;em&gt;"What did we discuss about [topic] last week?"&lt;/em&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Setup: Claude Code (one config line + auto-capture)
&lt;/h2&gt;

&lt;p&gt;Add to your MCP config (&lt;code&gt;~/.claude/settings.json&lt;/code&gt;):&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"mcpServers"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"engram"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="nl"&gt;"type"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"http"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="nl"&gt;"url"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"https://mcp.getengram.app/mcp"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="nl"&gt;"headers"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
        &lt;/span&gt;&lt;span class="nl"&gt;"Authorization"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"Bearer YOUR_API_KEY"&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Then add a few lines to your &lt;code&gt;CLAUDE.md&lt;/code&gt; telling Claude to search on session start:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight markdown"&gt;&lt;code&gt;&lt;span class="gu"&gt;## Memory&lt;/span&gt;

On session start, search Engram for context relevant to the current task:
&lt;span class="p"&gt;-&lt;/span&gt; search query: "&lt;span class="nt"&gt;&amp;lt;summary&lt;/span&gt; &lt;span class="na"&gt;of&lt;/span&gt; &lt;span class="na"&gt;what&lt;/span&gt; &lt;span class="na"&gt;the&lt;/span&gt; &lt;span class="na"&gt;user&lt;/span&gt; &lt;span class="na"&gt;is&lt;/span&gt; &lt;span class="na"&gt;asking&lt;/span&gt; &lt;span class="na"&gt;about&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;"

When important decisions or context are established, store them in Engram.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Auto-capture with the CLI daemon
&lt;/h3&gt;

&lt;p&gt;For zero-friction capture, install the CLI:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;npm i &lt;span class="nt"&gt;-g&lt;/span&gt; @getengram/cli
engram daemon start
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The daemon runs in the background and auto-captures every Claude Code session. You don't have to prompt Claude to remember things — it just happens.&lt;/p&gt;

&lt;h2&gt;
  
  
  Setup: Cursor / Windsurf
&lt;/h2&gt;

&lt;p&gt;Same as Claude — add the MCP server URL + API key to your MCP config. Both support MCP natively.&lt;/p&gt;

&lt;h2&gt;
  
  
  What It Actually Remembers
&lt;/h2&gt;

&lt;p&gt;After a few weeks of use, here's the kind of context Engram surfaces for me:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;em&gt;"We set up OAuth 2.1 with Dynamic Client Registration for the ChatGPT integration"&lt;/em&gt;&lt;/li&gt;
&lt;li&gt;&lt;em&gt;"The rate limiter is 100 req/min per org, configured in the Worker binding"&lt;/em&gt;&lt;/li&gt;
&lt;li&gt;&lt;em&gt;"User prefers explicit error handling, no swallowed exceptions"&lt;/em&gt;&lt;/li&gt;
&lt;li&gt;Past bug investigations so I don't chase the same issue twice&lt;/li&gt;
&lt;li&gt;Architecture decisions and the full reasoning behind trade-offs&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The key difference from CLAUDE.md: I don't maintain any of this manually. Conversations are stored as they happen, and the right context surfaces when it's relevant.&lt;/p&gt;

&lt;h2&gt;
  
  
  How It Works (for the curious)
&lt;/h2&gt;

&lt;p&gt;The backend runs entirely on Cloudflare:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Workers&lt;/strong&gt; — API + MCP server (Hono.js)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;D1&lt;/strong&gt; — SQLite storage for conversations&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Vectorize&lt;/strong&gt; — vector index for semantic search&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Workers AI&lt;/strong&gt; — embedding generation (bge-base-en-v1.5)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;When you store a conversation, Engram:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Splits it into chunks (~500 tokens each)&lt;/li&gt;
&lt;li&gt;Generates vector embeddings for each chunk&lt;/li&gt;
&lt;li&gt;Indexes them in Vectorize&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;When you search, it:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Embeds your query&lt;/li&gt;
&lt;li&gt;Finds the most similar chunks via cosine similarity&lt;/li&gt;
&lt;li&gt;Returns the relevant conversation snippets with full context&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;The whole thing is globally distributed with sub-100ms cold starts.&lt;/p&gt;

&lt;h2&gt;
  
  
  Pricing
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Free&lt;/strong&gt; — 1,000 messages/month (enough to try it out)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Pro&lt;/strong&gt; — $39/month for heavier use&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Team&lt;/strong&gt; — $49/seat/month with shared memory across your team&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Source Code
&lt;/h2&gt;

&lt;p&gt;The source is on GitHub under BSL-1.1 (converts to Apache 2.0 after the change date). You can self-host the whole thing on Cloudflare's free tier with &lt;code&gt;wrangler deploy&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;GitHub:&lt;/strong&gt; &lt;a href="https://github.com/get-engram/engram" rel="noopener noreferrer"&gt;github.com/get-engram/engram&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  What's Next
&lt;/h2&gt;

&lt;p&gt;I'm working on:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Smarter retrieval (re-ranking, context window optimization)&lt;/li&gt;
&lt;li&gt;Team memory sharing (your whole team's knowledge, searchable)&lt;/li&gt;
&lt;li&gt;More client integrations&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Try It
&lt;/h2&gt;

&lt;p&gt;If you're tired of re-explaining yourself to your AI every session:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;ChatGPT users:&lt;/strong&gt; Settings &amp;gt; Apps &amp;gt; add &lt;code&gt;https://mcp.getengram.app/mcp&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Claude/Cursor users:&lt;/strong&gt; &lt;a href="https://getengram.app" rel="noopener noreferrer"&gt;getengram.app&lt;/a&gt; for an API key, then add the MCP config&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Claude Code users:&lt;/strong&gt; install &lt;code&gt;@getengram/cli&lt;/code&gt; for auto-capture&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;The free tier is enough to see if it's useful for your workflow. I'd love to hear what context you find yourself repeating the most.&lt;/p&gt;




&lt;p&gt;&lt;em&gt;&lt;a href="https://getengram.app" rel="noopener noreferrer"&gt;Engram&lt;/a&gt; is built by &lt;a href="https://github.com/get-engram" rel="noopener noreferrer"&gt;Get Engram Inc&lt;/a&gt;. Questions? &lt;a href="mailto:hello@getengram.app"&gt;hello@getengram.app&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;

</description>
      <category>ai</category>
      <category>mcp</category>
      <category>productivity</category>
      <category>devtools</category>
    </item>
  </channel>
</rss>
