<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Alptekin topal on Medium]]></title>
        <description><![CDATA[Stories by Alptekin topal on Medium]]></description>
        <link>https://medium.com/@topal.alptekin?source=rss-e68ab5136c83------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*EFQDdr-JNtj-IX8cXP8ZAw@2x.jpeg</url>
            <title>Stories by Alptekin topal on Medium</title>
            <link>https://medium.com/@topal.alptekin?source=rss-e68ab5136c83------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Thu, 03 Dec 2026 12:35:40 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@topal.alptekin/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Why I Built an AI Hub That Plugs Claude Gemini and ChatGPT Into a Single Memory]]></title>
            <link>https://medium.com/@topal.alptekin/why-i-built-an-ai-hub-that-plugs-claude-gemini-and-chatgpt-into-a-single-memory-d8ad13d84b80?source=rss-e68ab5136c83------2</link>
            <guid isPermaLink="false">https://medium.com/p/d8ad13d84b80</guid>
            <category><![CDATA[database]]></category>
            <category><![CDATA[software-architecture]]></category>
            <category><![CDATA[software-development]]></category>
            <category><![CDATA[ai-agent]]></category>
            <category><![CDATA[python]]></category>
            <dc:creator><![CDATA[Alptekin topal]]></dc:creator>
            <pubDate>Tue, 19 May 2026 19:48:36 GMT</pubDate>
            <atom:updated>2026-05-19T21:05:57.220Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*MKtPwFRCpZJmQmwdPTwkEA.png" /><figcaption>evolutiondb</figcaption></figure><p>you can check my all articles : <a href="https://medium.com/me/stories?tab=posts-published">my all articles</a></p><p>There is one truth about AI assistants. None of them know the same person. Claude forgets in one chat what it learned in another. ChatGPT’s memory stays inside ChatGPT. Gemini’s history sits in Google. Three separate providers. Three separate memories. One user.</p><p>This article is the story of an infrastructure effort that took years to solve that split. I started with EvolutionDB. I ended with the hub.</p><p><strong>Why EvolutionDB Exists</strong></p><p>EvolutionDB was born as a SQL engine nearly 18 years ago. It is written in C. It speaks the PostgreSQL wire protocol. It has its own page based storage layer. Buffer pool. B+ tree index. MVCC. Write ahead log. Transparent data encryption. Everything a classic database library needs sits inside.</p><p>If it had stayed a classic DB it would have had no place in the world. PostgreSQL exists. MySQL exists. SQLite exists. Another SQL engine would not serve anyone’s need.</p><p>My reason for writing it was different. The biggest reason is to learn the mechanics of the sql engines and then I added memory features to the SQL engine was to build a general AI agent memory structure, so I designed the database not only a database Its a database plus ai agent assistant’s memory.</p><p>Memory here carries the meaning from AI literature. An agent persisting what it learned in the past so it can use it in the future. For this I added engine level commands. MEMORY PUT. MEMORY SEARCH. MEMORY DELETE. Vector embeddings live locally. The identity resolution layer merges different names given to the same person into a single profile. Automatic tagging stamps topic tags onto rows.</p><p>The result became a hybrid. From the top it isa classic database. And also it is an AI memory layer. It can speaks PostgreSQL wire protocol and evo protocol. Inside it everything an assistant’s memory needs sits ready.</p><p><strong>A Memory Layer Alone Is Not Enough</strong></p><p>The memory layer was required, but on its own it is a cold database. Two more things had to happen for it to come alive.</p><p>The first was data. To give an assistant something to remember you first need the raw material that gets remembered. Emails. Calendar. Chat apps. Code platforms. I wrote synchronization processes that pour these into memory. Teams sync. Gmail sync. Calendar sync. Slack sync. GitHub sync. Each one connects to its platform with OAuth. Each one pulls messages. Each one writes them into the EvolutionDB.</p><p>These sync processes run in the background. When they finish the memory contains a user’s digital past. Who said what when. Which meeting on which day. Who commented on which PR. All in one well.</p><p>The second was a contract layer. Having data in memory was not enough. The AI assistant needed to reach that data through a standard protocol. This is where Anthropic’s Model Context Protocol stepped in. MCP is an open protocol. It standardizes how AI agents connect to external tools and external memory.</p><p>Before this protocol every provider wanted its own integration shape. ChatGPT plugins were one thing. Claude tools were another. Gemini extensions were a third. A single integration had to be written three times. After MCP arrived the same server could serve all three.</p><p>I wrote an MCP server on top of EvolutionDB. Its name is mcp-server-evolutiondb. This server translates the memory layer into MCP. save_memory. search_memory. recent_memories. forget. list_tags. Five tools. Conforming to the spec.</p><p><strong>Three Providers Three Faces One Memory</strong></p><p>The MCP server was built. Now the question. How does Claude Desktop know about this server. How does ChatGPT Desktop know. How does Gemini CLI know.</p><p>Because each provider has its own configuration file. Claude Desktop reads its own config JSON. ChatGPT Desktop is in a different location in a different format. Gemini CLI is somewhere else again. To register the same MCP server with all three you have to edit three different files by hand.</p><p>That manual work is beyond human patience. It is not reasonable to ask a user to edit JSON for each provider separately. Worse it makes the user unable to evolve. When a new provider arrives you have to find where its config file lives. You have to insert the right block. You have to interpret the error if something fails. That loop does not work.</p><p>This is where the hub was needed. Whether the agent is a CLI a desktop app or a web app does not matter. The last step to connect every AI agent into a single system and become a single memory was a hub. That is why I built the hub.</p><p><strong>What the Hub Does</strong></p><p>The hub is a browser page. It brings together three jobs.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*BA0N4Na6kTyVjigmQg7P6g.png" /><figcaption>hub overview page</figcaption></figure><p><em>The Hub page is the landing view. Live counts for the tunnel, the memory clients, the sync connectors, and the inspector sit in a single bento grid. Every tile opens its dedicated page.</em></p><p>The first job is installation. The hub has a one click install button for six clients. Claude Desktop. Claude Code. ChatGPT Desktop. OpenAI Codex. Gemini CLI. Gemini Code Assist. It installs the relevant client through brew or npm. Then the second click wires the</p><p>evolutiondb-memory MCP server into that client. If auth is needed the third click handles that too.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*cAAfufc23QvEjylQWK9mnQ.png" /><figcaption>hub clients page</figcaption></figure><p><em>Memory Clients. Each card carries the wiring badge, the config path on disk, and the install, enable, and disable buttons. The Add Memory Client button opens a modal form for hosts the hub does not yet know about.</em></p><p>The second job is orchestration. The hub starts and stops sync processes. The interval each connector runs at is managed from here. If there is an error the logs are reached from the hub. Each connector’s auth status shows green or red at a glance.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*In4GdzK7Gl4XQcDq-7TAyQ.png" /><figcaption>hub connectors page</figcaption></figure><p><em>Sync Connectors. Each card shows live process pid, boot mode, binary state, the agent owner field, and the action row. The Add Connector button opens a modal that registers a custom sync process and stores it on disk so it survives hub restarts.</em></p><p>The third job is observation. There is a memory inspector embedded in the hub. Every memory row stored in EvolutionDB can be browsed from the browser. There is a sender filter. There is a tag filter. There is a source filter. If a row is wrong it gets deleted with one click.</p><p><em>Memory Inspector. The embedded view lists every memory row in the store, with filters for source, sender, and tag. One click deletes a row.</em></p><p>On top of these there is a public access layer. The memory is exposed to the web side of ChatGPT or Claude through a Cloudflared tunnel. For ChatGPT’s OAuth requirement I wrote a separate OAuth 2.1 proxy. This proxy authorizes incoming requests to memory in line with</p><p>the RFC 9728 and RFC 7591 specs and forwards them.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*y_jtuC7WxjNfXo0c4Duf2A.png" /><figcaption>hub mcp tunnel</figcaption></figure><p><em>MCP Tunnel. The streamable HTTP transport runs on the loopback. Cloudflared exposes it on a quick public URL. The OAuth 2.1 proxy guards that URL so ChatGPT-class clients can complete the handshake. Copy buttons drop the bearer token and the public URL into the clipboard.</em></p><p><strong>Why All Three Layers Are Needed</strong></p><p>The system consists of three layers. Memory layer. MCP server. Hub. Three pieces of the same project doing different jobs.</p><p>The memory layer is the heart that holds the data. Because it is a SQL engine it is queryable. Because it has memory commands it acts as the assistant’s memory. Because it has indexes it is fast. Because it is encrypted it stays local and safe.</p><p>The MCP server is the contract layer. It translates what is inside memory into a single uniform API that AI assistants understand. Because of this when I switch assistants I do not have to switch the server.</p><p>The hub is the conductor. It brings the three sides together. It starts the connectors. It handles the client installations. It opens the tunnel for remote access. It offers the observation tool for memory.</p><p>Remove one and the system stops working. Without memory there is nothing to remember. Without MCP the assistants cannot connect. Without the hub the user has to wrestle with each provider by hand.</p><p><strong>The Vision In One Sentence</strong></p><p>When I look back the whole system can be summed up in one sentence. AI assistants should see the same memory regardless of which surface they live on. The owner of that memory should be the user. Providers can change but the memory must persist.</p><p>Saying this is easy. Building it required three layers. A database with its own memory engine. A server speaking the MCP protocol. A hub that manages many assistants from a single panel.</p><p>All three are open source. All three run locally. None of them depend on a provider. Models can change. Assistant brands can change. The web browser can give way to another surface. At that moment the hub will connect the new surface to the same memory. The real power of this system is in its future flexibility.</p><p><strong>Why It Matters</strong></p><p>AI companies of course want to hold your memory. This does not conflict with commercial logic. A customer who knows they will start over if they leave does not leave easily. But this situation is risky for the user. Because we will be working with assistants for years. We do not want to be that tied to any brand.</p><p>The local first approach makes sense here.<strong> The data is on your machine. The memory is encrypted. Nothing is lost when you change providers.</strong> When a new assistant comes to market adding its MCP integration to the hub takes minutes. <strong>The memory stays the same</strong>. Only the face changes.</p><p>This approach brings back a concept we lost in social media. <strong>Data portability</strong>. The reason we could not move from Twitter to Mastodon from Facebook to Diaspora in the 2010s was that our data was imprisoned in the platform. I do not want to fall into the same trap in the AI era.</p><p><strong>Which Problem and For Whom</strong></p><p>Products that look like this hub exist on the enterprise side. Mem0 exists. Letta exists. Zep exists. Many memory layers backed by Pinecone exist. They are all good products. But they are all cloud based or tied to a single assistant.</p><p>This hub stands at a different point. It connects to all three major providers at once. It lives on the user’s own machine. It is open source and local. That position is currently empty.</p><p>The target audience matches. Someone who builds software. Someone who uses more than one AI tool. Someone who wants control over their own data. Someone who dislikes provider lock in. For a profile like this the hub is a direct tool. For others it is an architectural proposal.</p><p><strong>Closing</strong></p><p><strong>The hub is not a product that appeared on its own. It is the visible face of an infrastructure effort that took years</strong>. At the bottom sits a SQL engine. Above that sits a memory layer. Beside it sit sync connectors. In front of it sits the MCP server. The hub makes all of these manageable in a single browser tab.</p><h4>I built it for one reason. I wanted Claude Gemini and ChatGPT to know the same person. None of the three is the assistant. All three are tools. The assistant is my memory.</h4><p>The repo is open. Whoever wants to install it can install it. Let the memory belong to you not the companies.</p><p>if you want to check the repository: <a href="https://github.com/alptekin/evolutiondb">evolutiondb</a></p><p>X: @evosql</p><p>I am open to the ideas. Please write them to me or you can send PR from github.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d8ad13d84b80" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[I built EvolutionDB for all my agents]]></title>
            <link>https://medium.com/@topal.alptekin/i-built-evolutiondb-for-all-my-agents-fcc02bad668a?source=rss-e68ab5136c83------2</link>
            <guid isPermaLink="false">https://medium.com/p/fcc02bad668a</guid>
            <category><![CDATA[data-science]]></category>
            <category><![CDATA[ai-agent]]></category>
            <category><![CDATA[evolutiondb]]></category>
            <category><![CDATA[software-development]]></category>
            <category><![CDATA[database]]></category>
            <dc:creator><![CDATA[Alptekin topal]]></dc:creator>
            <pubDate>Wed, 13 May 2026 22:33:55 GMT</pubDate>
            <atom:updated>2026-05-13T22:33:55.164Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Mh8mOTtho4wP453JZE2VTg.png" /></figure><p>For a long time my work was spread across too many tools. I had questions in Teams, decisions in Gmail, jokes and side notes in Slack, and code reviews in GitHub. When I tried to remember a small thing from last week, I had to open four apps and search in each one. It felt slow and tiring.</p><p>So I built something. I made a small place where all of these things go. It is a database, but I do not think about it as a database. I think about it as my memory. When I ask my AI assistant a question, the assistant can look into this memory and bring back the right line, no matter which tool the line started from.</p><p>The way it works is simple. For every tool I use, I wrote a small sync agent. The agent does only one thing. It pulls new items from that tool and writes them into the memory store. The Teams agent watches my chats. The Gmail agent watches the subject, the sender, and a short preview of every new email. The Slack agent walks the channels and direct messages I am part of. The GitHub agent follows every issue and pull request that I touch.</p><p>Each agent saves the same kind of record. It saves who said it, when, where it came from, and what it said. After that, the source does not matter anymore. A line from Gmail and a line from Slack live next to each other and can be searched at the same time.</p><p>The really fun part is what happens after. I open Claude, ChatGPT, or Gemini, and I ask things like, “What did Ahmet say last week about the database move?” The assistant talks to my memory through a small bridge called MCP. It searches across every record from every tool and gives me one clear answer. I do not have to remember if Ahmet said it on Slack or in an email. The memory remembers for me.</p><p>I picked one rule from the start. Every agent must be careful. They never write the same record twice, because each record has a stable key. They never go back too far, because each agent keeps a small mark for the last item it saw. If I stop an agent and start it again the next day, it knows where to continue.</p><p>Setup is also light. I run one small command, and it finds all my AI apps on the computer and tells each of them how to reach the memory. After that I forget the setup exists.</p><p>What I like most is the feeling of one mind. Before this, my work history was broken into pieces, and the pieces lived in walls I could not break. Now those walls are still there, but my own memory walks through all of them. A chat from Teams, a thread on Slack, a</p><p>long email, a review comment on a pull request, they can all reach me again at the right moment.</p><p>I am still adding small things. I want my assistant to read calendar events too, and maybe meeting notes. Each new source is just one more small agent that follows the same pattern. The hard part was making the first one. After that, every extra tool feels easy to add.</p><p>If you also work across many tools and you forget things between them, I think a setup like this can help. You do not need a big system. You need a place where everything lands, and a way for your AI to look inside it.</p><p><strong><em>How I use my memory app, with commands</em></strong></p><p>This is the part where I show what I actually type. I go step by step from a fresh machine to a working memory that all four sources feed into.</p><p><strong>First, install EvolutionDB</strong></p><p>I download the installer for my system from the releases page on GitHub.</p><p>On macOS I open the file called EvolutionDB-3.0.0.dmg, drag it, and double click the .pkg inside. The installer asks for my password once and sets up the engine as a background service.</p><p>On Linux I install the .deb file with one line.</p><pre>sudo dpkg -i evolutiondb_3.0.0_amd64.deb<br>sudo systemctl enable - now evolutiondb</pre><p>For Fedora I use the .rpm file.</p><pre>sudo rpm -i evolutiondb-3.0.0.x86_64.rpm<br>sudo systemctl enable - now evolutiondb</pre><p>On Windows I run the .exe wizard, click next a few times, and the engine becomes a Windows Service that starts on every boot.</p><p>After the install, the database is running on port 5433. The default user is admin and the default password is also admin.</p><p>I can check that it is up.</p><pre>ps aux | grep evosql-server</pre><p>Or on Linux I look at the service.</p><pre>systemctl status evolutiondb</pre><p><strong>Install</strong> <strong>the</strong> <strong>MCP</strong> <strong>server</strong></p><p>The bridge that lets Claude, ChatGPT, and Gemini talk to the memory is a small Python package.</p><pre>pip install mcp-server-evolutiondb</pre><p>After this command finishes, one extra command lives on my PATH, called evolutiondb-mcp-setup. I run it once.</p><pre>evolutiondb-mcp-setup</pre><p>It looks at my computer and finds the AI apps I have installed. For each one it writes the right config file. The first time, I see something like this in the output.</p><p>[setup] Claude Desktop, wrote /Users/me/Library/Application Support/Claude/claude_desktop_config.json</p><p>[setup] ChatGPT Desktop, not detected, skipping</p><p>[setup] Gemini CLI, wrote /Users/me/.gemini/settings.json</p><p>If I run the same command again, nothing happens. It only writes when something has actually changed.</p><p>If I want to try without writing anything, I add one flag.</p><pre>evolutiondb-mcp-setup - dry-run</pre><p>After this, I quit and reopen each AI app. From now on, the apps can see and search my memory.</p><p><strong>Connect Teams</strong></p><p>I install the Teams agent.</p><pre>pip install evolutiondb-teams-sync</pre><p>The first time, I log in to my Microsoft account once.</p><pre>evosql-teams-sync - auth</pre><p>It opens a browser page and gives me a short code. I sign in, and the token is saved.</p><p>I pull the last seven days right away.</p><pre>evosql-teams-sync - once - since 7d</pre><p>Then I let it run in the background, polling every ten minutes.</p><pre>evosql-teams-sync - interval 600</pre><p>I stop it with Ctrl+C whenever I want.</p><p><strong>Connect Gmail</strong></p><pre>pip install evolutiondb-gmail-sync</pre><p>I run the auth step.</p><pre>evolutiondb-gmail-sync - auth</pre><p>A browser tab opens for Google. I accept, and the refresh token lands in a hidden file at ~/.evosql/gmail_token.json.</p><p>The same pattern as Teams.</p><pre>evolutiondb-gmail-sync - once - since 7d<br>evolutiondb-gmail-sync - interval 900</pre><p>If I want to skip promo mails and only keep the real ones, I add a filter.</p><pre>evolutiondb-gmail-sync - once - since 30d - query &quot;-category:promotions&quot;</pre><p><strong>Connect Slack</strong></p><pre>pip install evolutiondb-slack-sync</pre><p>For Slack I do not run a login command. Instead I create a small Slack app on api.slack.com, give it read scopes, and copy the user token. The token starts with xoxp. I paste it into my .env file.</p><p>After that, the runtime feels the same.</p><pre>evolutiondb-slack-sync - once - since 3d<br>evolutiondb-slack-sync - interval 600</pre><p><strong>Connect GitHub</strong></p><pre>pip install evolutiondb-github-sync</pre><p>GitHub is the lightest one. I create a Personal Access Token on github.com/settings/tokens and put it in .env, together with my handle.</p><pre>evolutiondb-github-sync - once - since 7d<br>evolutiondb-github-sync - interval 900</pre><p><strong>Try it out</strong></p><p>I open Claude Desktop. I write something like, “Search my memory for last week’s deploy notes.”</p><p>The assistant returns lines from Teams, Slack, and email, mixed in one answer. Nothing else changes.</p><p>I can also try ChatGPT Desktop. It works the same because the setup command wrote the same kind of config.</p><p>I can also try Gemini CLI.</p><p>gemini</p><p>&gt; search my memory for what we said about the database move yesterday</p><p>It reads from the same store.</p><p><strong>Adding</strong> <strong>things</strong> <strong>by</strong> <strong>hand</strong></p><p>Sometimes I want to write a fact directly, without waiting for an agent. I open my AI assistant and say, “Remember that I prefer the morning slot for the team meeting.” The assistant saves it for me. Later, when I ask, “When do I like meetings?”, it finds the line.</p><p><strong>Stopping everything</strong></p><p>If I want to take a break, I stop the sync agents and the engine.</p><p>On Linux I stop the service.</p><pre>sudo systemctl stop evolutiondb</pre><p>On macOS I unload the daemon.</p><pre>sudo launchctl unload /Library/LaunchDaemons/com.evolutiondb.server.plist</pre><p>On Windows I stop the service from the Services panel, or with one line.</p><pre>sc stop EvolutionDB</pre><p>I press Ctrl+C in each running sync terminal. The tokens stay cached for next time, so I do not have to log in again.</p><p>To start everything again later I just reverse the commands above, or simply restart the machine. The service comes back on its own.</p><p><strong>Looking at the raw data</strong></p><p>Every now and then I want to peek at what is stored. I connect with any Postgres client like DBeaver or psql on port 5433, user admin, password admin, and run a small query.</p><pre>SELECT mem_namespace, mem_key, mem_value<br>FROM __mem_mcp_mem<br>ORDER BY mem_key DESC<br>LIMIT 10;</pre><p>That gives me the latest ten records, no matter which agent wrote them.,</p><p>github: <a href="https://github.com/alptekin/evolutiondb">https://github.com/alptekin/evolutiondb</a></p><p>X: @evosql</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=fcc02bad668a" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Part 4. Temporal Memory with FOR SYSTEM_TIME AS OF on Top of MVCC]]></title>
            <link>https://medium.com/@topal.alptekin/part-4-temporal-memory-with-for-system-time-as-of-on-top-of-mvcc-43ad5b99e774?source=rss-e68ab5136c83------2</link>
            <guid isPermaLink="false">https://medium.com/p/43ad5b99e774</guid>
            <category><![CDATA[software-engineering]]></category>
            <category><![CDATA[artificial-intelligence]]></category>
            <category><![CDATA[evolutiondb]]></category>
            <category><![CDATA[ai-agent]]></category>
            <category><![CDATA[database]]></category>
            <dc:creator><![CDATA[Alptekin topal]]></dc:creator>
            <pubDate>Wed, 13 May 2026 18:28:28 GMT</pubDate>
            <atom:updated>2026-05-13T18:29:42.160Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*BtHZXXDNhRlRrByj" /><figcaption>Photo by <a href="https://unsplash.com/@steve_j?utm_source=medium&amp;utm_medium=referral">Steve A Johnson</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p>This is part of the <a href="https://medium.com/@topal.alptekin/how-i-gave-claude-a-real-long-term-memory-and-why-it-lives-in-a-sql-database-b20b4debf998">Long Term Memory in EvolutionDB</a> series. The previous post was <a href="https://medium.com/@topal.alptekin/part-3-vector-n-and-hnsw-semantic-recall-in-a-live-transactional-workload-3a5666939685">Part 3, Vectors and HNSW</a>.</p><p>The hardest question an agent memory system has to answer is, what did I believe at this point in time? Agents act on the memory they have when they decide to act. If that memory has changed by the time you sit down to debug, the audit trail is broken. You can already guess the usual fix. Append only audit logs next to the live tables. And then you discover that joining the audit log back to the live table at a given moment is, somehow, its own software project.</p><p>I took a different path with EvolutionDB, and it cost me almost nothing because the parts were already there. Every row in every table is already versioned by the storage engine for transactional reasons. All I had to do was open that versioning up at the SQL layer.</p><h3>What FOR SYSTEM_TIME looks like</h3><p>The grammar comes from the SQL 2011 temporal extension.</p><pre>SELECT *<br>FROM   user_memory<br>FOR    SYSTEM_TIME AS OF TRANSACTION 4217<br>WHERE  mem_namespace = &#39;alptekin&#39;;</pre><p>There is also a timestamp version, AS OF TIMESTAMP ‘2026–03–15 12:00’, which the engine resolves to the highest committed XID at or before that wall clock time. The XID form is the real primitive. The timestamp form is just sugar.</p><p>Either way, you get the rows as they were the moment transaction 4217 committed. New rows that landed afterwards? Invisible. Rows that existed at the time but were deleted later? Still there. Rows that have been updated since? You see the old values.</p><h3>How it works, and what is actually new</h3><p>Honestly, nothing on the storage side. The engine has tracked xmin and xmax on every row since Task 37, back when I first rolled MVCC out. It was originally there for snapshot isolation. When a transaction runs at READ COMMITTED or REPEATABLE READ, the visibility check looks at xmin and xmax against the active snapshot and decides whether to show the row. Standard stuff.</p><p>AS OF is the same machinery with a fake snapshot. The function in mvcc.c that does the real work is six lines long.</p><pre>void mvcc_snapshot_at_xid(uint32_t at_xid, Snapshot *out)<br>{<br>    memset(out, 0, sizeof(Snapshot));<br>    if (at_xid == 0) {<br>        mvcc_snapshot_take(out);<br>        return;<br>    }<br>    out-&gt;xmin = at_xid + 1;     /* nothing in-progress in the past view */<br>    out-&gt;xmax = at_xid + 1;     /* anything &gt;= xmax is &quot;future&quot; → invisible */<br>    out-&gt;nactive = 0;<br>    out-&gt;my_xid = 0;<br>    out-&gt;snapshot_csn = clog_get_csn(at_xid);<br>}</pre><p>What it does is build a fake snapshot placed right after at_xid committed. The whole trick is in xmin equals xmax equals at_xid plus 1. There are no active transactions in the past view since nactive is zero, so the visibility check collapses into one comparison. A row is visible if its xmin is at or below at_xid, and its xmax is either zero or above at_xid. Which is, by definition, exactly what was visible just after at_xid committed.</p><p>The engine pipes this through the parser with a small side channel.</p><pre>void SetAsOfXid(uint32_t at_xid)<br>{<br>    if (g_qctx) g_qctx-&gt;asof_xid = at_xid;<br>}</pre><p>The grammar action calls SetAsOfXid when it parses the FOR SYSTEM_TIME clause. The query executor reads g_qctx-&gt;asof_xid while building the snapshot for the SELECT, swaps mvcc_snapshot_at_xid in for mvcc_snapshot_take, runs the query as normal, and clears the field afterwards so the next statement starts clean.</p><p>No extra disk read. No history table. No shadow join. The rows the visibility check filters out for the live query are the same ones it lets through for the temporal query. The cost is one branch.</p><h3>Why CSN matters</h3><p>The earlier versions of my MVCC visibility check walked an active transaction list every time. At a few thousand TPS, that list got long. The visibility check turned into a hotspot, and the sequential scan it ran on top of it would creep up to dozens of microseconds per row. Not great.</p><p>I decided to add a CSN layer, the Commit Sequence Number, and that fixed it. Every commit gets a CSN that only goes up. The snapshot records the highest CSN at the moment it was taken. After that, visibility for any committed transaction is one CLOG lookup and one comparison. If the row’s xmin CSN is at or below snapshot.csn, the row is visible. No scanning the active list.</p><p>I only fall back to the active list for transactions that the CSN cache does not know about yet, which in practice means the few hundred that committed in the last second. Old history is O(1).</p><p>That is what keeps AS OF cheap. The fake snapshot at XID at_xid carries the CSN of at_xid’s commit, set by the line out-&gt;snapshot_csn = clog_get_csn(at_xid);. From there, every row visibility check is O(1). A FOR SYSTEM_TIME AS OF TRANSACTION N over a 100k row memory store runs at the same speed as the live query. I have the numbers in bench/temporal/, and they hold within a few percent.</p><h3>Retention is the real cost</h3><p>The temporal feature is free at query time. It is not free at storage time. Every UPDATE leaves an old version on disk. Every DELETE turns a row into a tombstone without giving the bytes back. Leave that running long enough with no cleanup, and the database fills the disk. Eventually.</p><p>Two mechanisms work against this.</p><p>The first is Auto-RECLAIM. It walks tables in the background and removes versions that no live snapshot could possibly need. “Could possibly need” is defined by xmin_horizon, the lowest XID held open by any active transaction. Anything older, already retired, and not pinned by SET SYSTEM_TIME_RETENTION is fair game.</p><p>The second is SET SYSTEM_TIME_RETENTION, from Task 209. Something like SET SYSTEM_TIME_RETENTION = ’30 days’ tells the engine to hold versions back from RECLAIM for that window. The default is seven days. Operators control it with the env var EVOSQL_SYSTEM_TIME_RETENTION_DAYS or the SQL setter. Past the window, RECLAIM treats old versions as collectible, and AS OF queries pointing at a timestamp older than that window return error 02000 with the message no_data, retention window expired. I chose that over silently giving back a partial answer, because partial answers in this layer are how you get bad agent behaviour you cannot debug.</p><p>The retention knob is the operator’s main lever. Tighten it when disk is tight, loosen it when compliance asks, set it per memory store when some classes of memory matter more than others.</p><h3>What this actually gets you</h3><p>Three things, in roughly increasing order of how much I personally care.</p><p>Audit is the boring one. The question “what did the agent know about user X yesterday afternoon when it triggered the refund” becomes a single query, and there is no separate audit pipeline to maintain.</p><pre>SELECT mem_key, mem_value<br>FROM   user_memory<br>FOR    SYSTEM_TIME AS OF TIMESTAMP &#39;2026-05-04 15:42:00&#39;<br>WHERE  mem_namespace = &#39;user-x&#39;;</pre><p>Diff is the interesting one. Comparing memory between two points in time is just a self join across two AS OF snapshots.</p><pre>SELECT n.mem_key,<br>       n.mem_value AS new_value,<br>       o.mem_value AS old_value<br>FROM       user_memory FOR SYSTEM_TIME AS OF TRANSACTION 4217  o<br>FULL JOIN  user_memory FOR SYSTEM_TIME AS OF TRANSACTION 4612  n<br>       ON n.mem_key = o.mem_key<br>WHERE  n.mem_value IS DISTINCT FROM o.mem_value;</pre><p>What that returns is every fact that changed, was added, or was removed between those two transactions. A memory diff. I lean on it heavily during testing. When something goes wrong four steps into a multi step run, watching how the agent’s beliefs actually moved between step one and step four is the kind of thing that saves you an afternoon.</p><p>Replay is the one I care about most. A failed run can be re run against the memory state the agent actually saw at the time, not the current state. You take the failure timestamp, run the agent in dry run mode with SET TRANSACTION SNAPSHOT pointing at that timestamp, and the model sees exactly what it saw. Including the absence of facts that only arrived later. It is the closest thing to a real debugger an agent gets.</p><p>The internal demo for this lives at examples/agent_replay/. It re runs a recorded ReAct loop against a MEMORY STORE at three different timestamps, and you can watch the plan diverge based on what the model knew at each point. It is also, I have to admit, an effective way of making “just log everything to a file” look kind of sad.</p><h3>Limits I know about</h3><p>The temporal layer sits on top of MVCC, so the limits are MVCC’s limits.</p><p>There is no AS OF FUTURE. XIDs in the future have not happened yet, and the parser rejects them at compile time. Easy one.</p><p>The retention window is the floor. A query against a timestamp older than the configured retention returns 02000 instead of a partial answer. I picked the loud error over silent truncation on purpose, because an agent acting on truncated memory is worse than an agent that fails and forces a human to look.</p><p>Replication is best effort for AS OF. Replicas catch up asynchronously by default. An AS OF query against a lagging replica may not yet have the version you are asking for, and the engine returns 08006 with the message connection_failure_in_doubt until replay catches up. Synchronous commit setups do not see this, but you pay for the guarantee with latency.</p><p>TDE does not really change anything here. Encrypted at rest pages get decrypted into the buffer pool transparently, the visibility check operates on the decrypted in memory view, and AS OF works on a TDE enabled database without any changes to the SQL or the operator experience.</p><p>Next up is Part 5, Push, not poll. Planned.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=43ad5b99e774" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Part 3. VECTOR(N) and HNSW. Semantic recall in a live transactional workload]]></title>
            <link>https://medium.com/@topal.alptekin/part-3-vector-n-and-hnsw-semantic-recall-in-a-live-transactional-workload-3a5666939685?source=rss-e68ab5136c83------2</link>
            <guid isPermaLink="false">https://medium.com/p/3a5666939685</guid>
            <category><![CDATA[algorithms]]></category>
            <category><![CDATA[ai-agent]]></category>
            <category><![CDATA[database]]></category>
            <dc:creator><![CDATA[Alptekin topal]]></dc:creator>
            <pubDate>Tue, 12 May 2026 21:12:18 GMT</pubDate>
            <atom:updated>2026-05-12T21:12:18.789Z</atom:updated>
            <content:encoded><![CDATA[<ul><li><em>This article is part of the [</em><a href="https://medium.com/@topal.alptekin/how-i-gave-claude-a-real-long-term-memory-and-why-it-lives-in-a-sql-database-b20b4debf998"><em>Long Term Memory in EvolutionDB</em></a><em>] series. The previous article is [</em><a href="https://medium.com/@topal.alptekin/part-2-memory-store-on-disk-ddl-dml-and-the-catalog-tree-7f9dd9f7143b"><em>Part 2, `MEMORY STORE` on disk</em></a><em>]</em></li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*ipySgla59TVMiC-v" /><figcaption>Photo by <a href="https://unsplash.com/@virussinside?utm_source=medium&amp;utm_medium=referral">Artiom Vallat</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><blockquote>A long term memory system that can only do exact match lookup is just a fancy key value store. What turns it into real <em>memory</em> is semantic search. Semantic search lets us ask questions like “what did the user say that is <em>kind of like</em> this”. In EvolutionDB, that means the VECTOR(N) type and the HNSW index that sits on top of it.</blockquote><p>This article walks through both of them. We will cover how a vector is encoded in the binary tuple, how `&lt;=&gt;` and similar operators are dispatched in the expression engine, what the HNSW module looks like today, why v1 is actually a brute force store hiding behind the HNSW interface, and what we did to keep recall honest in a live transactional workload.</p><h3>The type code</h3><p>EvolutionDB’s tuple format stores column types as a 32 bit integer. The value typeVal / 10000 is the family, and typeVal % 10000 is the size. So a VECTOR(1536) column has the type code 260000 + 1536 = 261536. Family 26 is reserved only for vectors.</p><p>The column declaration in Memory.c writes this directly as shown below.</p><pre>if (embedding_dim &gt; 0) {<br>    snprintf(cols[i].col_name, sizeof(cols[i].col_name), &quot;embedding&quot;);<br>    cols[i].type_code = 260000 + embedding_dim;          /* VECTOR(N) */<br>    cols[i].col_ordinal = i; i++;<br>}</pre><p>The dimension is part of the type, not part of the value. This is intentional. It means a VECTOR(1536) column rejects a 1024 dimensional row at insert time, because the type check runs before the encoder. There is no silent truncation, no padding, and no dimension drift between rows in the same column.</p><h3>The on disk encoding</h3><p>A vector value is N × 4 bytes of little endian float32, with no length prefix. The file tuple_format.c has this comment.</p><pre>/* VECTOR(N) → N × 4 bytes float4 LE, no length prefix</pre><p>The length prefix is not needed, because N is already fixed by the type code in the column descriptor. The reader knows how many bytes to consume without any metadata in the value itself. For a 1536 dimensional embedding, that is 6,144 bytes per row. This fits comfortably under the 4 KB tuple soft limit only when the vector is the only large column in the row. Memory store values stay well under this limit, because the JSON payload is usually only a few hundred bytes. For stores that pack a longer JSON plus a 1536 vector, the engine will overflow into TOAST style out of line storage, and that is a v3.1 line item.</p><p>The decoding back to text format works like this.</p><pre>/* VECTOR(N) → read N × 4 bytes float4, format as &quot;[f1,f2,...]&quot;.</pre><p>That is what SELECT embedding FROM ... returns to a wire client. It is a human readable bracketed list, not the raw float bytes. Round tripping through text is lossy for sub LSB precision. However, every embedding model produces float32 compatible outputs, so in practice the round trip is exact.</p><h3>Distance functions and the operators</h3><p>There are four built in distance functions. They are exposed both as expression operators and as named functions.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*BySua0Y4IibWmYvgOyfn2Q.png" /></figure><p>Inner product is <em>negated</em> on purpose. Every other distance is a “smaller is closer” measure, and we wanted ORDER BY ... LIMIT k to work the same way across all four operators. Negating the dot product turns &quot;larger is closer&quot; into &quot;smaller is closer&quot; without showing this flip to the user.</p><p>The dispatch lives in expression.c as shown below.</p><pre>if (e-&gt;type == EXPR_VEC_COSINE ||<br>    e-&gt;type == EXPR_VEC_L2 ||<br>    e-&gt;type == EXPR_VEC_INNER ||<br>    e-&gt;type == EXPR_VEC_L1) {<br>    ...<br>    case EXPR_VEC_COSINE: kind = 0; break;<br>    case EXPR_VEC_L2:     kind = 1; break;<br>    case EXPR_VEC_INNER:  kind = 2; break;<br>    default:              kind = 3; break;  /* EXPR_VEC_L1 */<br>    int rc = vec_distance(kind, lbuf, rbuf, out_buf, buf_size);<br>}</pre><p>There is one quirk worth mentioning. The &lt;=&gt; operator is <em>also</em> SQL&#39;s null safe equality operator on non vector types. The expression engine keeps both behaviours alive. If either operand is a vector, it routes to vec_distance. Otherwise, it falls back to null safe equality. That means SELECT 1 &lt;=&gt; 1 still returns t, and SELECT v1 &lt;=&gt; v2 runs cosine distance, and the parser does not have to disambiguate at parse time. The relevant check sits at the top of the cosine branch as shown below.</p><pre>case CMP_SUBTOK_NULL_EQ:<br>    type = EXPR_VEC_COSINE;<br>    break;  /* Task 201: &lt;=&gt; cosine distance<br>              (falls back to null-safe eq for non-vectors) */</pre><p>This is the kind of decision you make once and then live with. The other option was a dedicated &lt;~&gt; token, but it would have collided with something else in the lexer. So we chose dual meaning over a new token.</p><h3>The HNSW interface</h3><p>The user facing DDL is shown below.</p><pre>CREATE INDEX user_memory_emb_idx<br>ON __mem_user_memory  (embedding vector_cosine_ops)<br>USING HNSW<br>WITH (m = 16, ef_construction = 64);</pre><p>The vector_cosine_ops operator class chooses the distance function that the index is built for. The parameters m and ef_construction are the standard HNSW build parameters. They control the graph degree and the search width during build. We copied the names directly from the standard pgvector convention, so existing tooling works without any changes.</p><p>Inside the engine, the index life cycle is four functions in hnsw.h, shown below.</p><pre>int  hnsw_build(uint32_t table_id, const char *index_name,<br>                const char *col_name,<br>                int distance_kind, int m, int ef_construction);<br><br>int  hnsw_search_knn(uint32_t table_id, const char *index_name,<br>                     const char *query_text, int k,<br>                     HnswHit *out_hits);<br><br>int  hnsw_get_stats(uint32_t table_id, const char *index_name,<br>                    HnswStats *out);<br><br>void hnsw_drop(uint32_t table_id, const char *index_name);</pre><p>The function hnsw_build runs at CREATE INDEX time. It scans the table, decodes the VECTOR(N) column from each live row, and stores (pk_text, vector) pairs. Here, a live row means a row that is visible under the current snapshot. The function hnsw_search_knn takes a query string in the same [f1,f2,...] format that tup_extract_fields produces, and it writes up to k hits into an array that the caller owns.</p><h3>A confession about the v1 implementation</h3><p>The header is honest about what is underneath.</p><pre>/* v1 uses an in-memory vector store backed by brute-force distance<br> * evaluation — the on-disk HNSW graph and graph traversal are<br> * scheduled for v1.1, protected behind the same hnsw_search_knn<br> * interface so callers don&#39;t need to change. */</pre><p>In other words, the API is HNSW, but the implementation today is a sequential scan with a distance computation for each row, plus a partial_sort to pick the top k. This is faster than it sounds. For the ten thousand row personal memory namespace that the MCP bridge produces, a brute force pass takes well under 10 ms, even on a laptop.</p><p>The reason we shipped it this way is simple. The callers are the SQL planner, the C SDK, and the MCP bridge. They care about the <em>interface</em>, which is top k semantic search, not about the implementation. Putting the brute force scan behind hnsw_search_knn lets every test we want to write already run, and the eventual graph implementation in v1.1 only has to preserve the function signature. The day we swap in the real HNSW graph, every call site keeps working.</p><p>The interface choice is not free, though. Brute force has perfect recall by definition. Every test that asserts recall@10 ≥ 0.9 against the v1 index passes easily. When the graph implementation arrives, those tests will start failing in interesting ways. This is expected, because graph search is approximate by design. The recall hard gate in tests/test_hnsw_index.py will then start doing real work. We have kept this gate in the test file so it is ready.</p><h3>Hybrid search with vector and filter</h3><p>A pure top k vector search is rarely what an agent actually wants. The real query is “find the three memories most similar to this query <em>that belong to namespace X</em>” or “<em>that have tag Y</em>”. That filter matters. It reduces the candidate set by orders of magnitude, and it changes the best search strategy.</p><p>The engine picks one of two strategies per query, and the choice is controlled by hnsw_search_knn_filter. The first strategy is <strong>pre filter</strong> (HNSW_HYBRID_PRE). It does a full scan of the filter column and ranks only the matches. This is the best choice when the filter is <em>tight</em>. For example, a namespace that maps to 50 of 10,000 rows. The second strategy is <strong>post filter</strong> (HNSW_HYBRID_POST). It uses HNSW to probe a wider candidate set and oversamples k / s, where s is the estimated selectivity. It then keeps only the rows that match the filter. This is the best choice when the filter is loose. For example, &quot;all memories with at least one tag&quot;, which might match 90% of rows.</p><p>The auto mode is called HNSW_HYBRID_AUTO. It picks the strategy based on the filter&#39;s selectivity from the planner stats. The planner gets these stats from the sampled ANALYZE histograms in Task 99 through 102. The trace structure HnswHybridTrace reports the chosen strategy and the actual selectivity observed at runtime. The EXPLAIN command surfaces this information, and the hybrid search tests check against it.</p><h3>Tying it back to MEMORY SEARCH</h3><p>The MEMORY SEARCH DML statement compiles down to a regular SELECT with an ORDER BY ... &lt;=&gt; ... LIMIT k. The planner sees the vector operator, looks for a matching HNSW index on the column, and routes through hnsw_search_knn instead of doing a heap scan. When the namespace predicate is present, the hybrid path fires automatically as shown below.</p><pre>MEMORY SEARCH user_memory NAMESPACE &#39;alptekin&#39;<br>    NEAR  &#39;[0.12, 0.34, ...]&#39;<br>    LIMIT 5;</pre><p>This is rewritten internally to roughly the form below.</p><pre>SELECT mem_key, mem_value,<br>       embedding &lt;=&gt; &#39;[0.12, 0.34, ...]&#39; AS distance<br>FROM   __mem_user_memory<br>WHERE  mem_namespace = &#39;alptekin&#39;<br>ORDER  BY distance ASC<br>LIMIT  5;</pre><p>The MCP bridge in Part 1 does not use this path yet. The function search_memory falls back to lexical scoring in Python. The reason is that the bridge is embedding provider agnostic. As soon as the user wires up an embedding model on the application side, MEMORY SEARCH becomes the obvious upgrade, and the bridge logic gets simpler, not more complex.</p><h3>What’s next</h3><p>Part 4 covers the temporal layer. It shows how `FOR SYSTEM_TIME AS OF TRANSACTION N` rewrites a query into a synthetic snapshot. It also explains why the storage engine does not need any new on disk structures to support time travel, and what `mvcc_snapshot_at_xid` actually does.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=3a5666939685" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Part 2 MEMORY STORE on disk: DDL, DML, and the catalog tree]]></title>
            <link>https://medium.com/@topal.alptekin/part-2-memory-store-on-disk-ddl-dml-and-the-catalog-tree-7f9dd9f7143b?source=rss-e68ab5136c83------2</link>
            <guid isPermaLink="false">https://medium.com/p/7f9dd9f7143b</guid>
            <category><![CDATA[database]]></category>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[ai-agent]]></category>
            <category><![CDATA[sql]]></category>
            <category><![CDATA[evolutiondb]]></category>
            <dc:creator><![CDATA[Alptekin topal]]></dc:creator>
            <pubDate>Tue, 12 May 2026 11:11:32 GMT</pubDate>
            <atom:updated>2026-05-12T11:11:32.743Z</atom:updated>
            <content:encoded><![CDATA[<p><a href="https://medium.com/@topal.alptekin/part-1-the-mcp-bridge-json-rpc-over-stdio-in-388-lines-39a81eea8ba8">Part 1 — The MCP bridge: JSON-RPC over stdio in 388 lines</a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*mc-lBYrCtzlXQOPu" /><figcaption>Photo by <a href="https://unsplash.com/@abject?utm_source=medium&amp;utm_medium=referral">benjamin lehman</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p>In Part 1 we followed a fact from Claude’s tools/call down through the MCP bridge to a single line of Python:</p><pre>self.conn.memory_put(self.memory, user_id, key, value)</pre><p>This article picks up where that line ends. We’re going to follow it the rest of the way across the EVO text protocol, into the database engine, through the system catalog, and onto the disk page where the row ultimately lives. By the end you’ll know exactly which catalog tree holds the metadata, which slotted page holds the row, what the primary key looks like as bytes, and why the backing table is called__mem_&lt;name&gt; instead of just &lt;name&gt;.</p><h3>What CREATE MEMORY STORE actually does</h3><p>The DDL surface looks like a single statement.</p><pre>CREATE MEMORY STORE user_memory WITH (embedding_dim = 1536);</pre><p>Underneath that, the engine does three things. The implementation lives in evolution/db/Memory.c, function CreateMemoryStoreProcess.</p><ol><li>It creates a normal heap table with the same columns every time. backing_table_name() only puts mem_ in front of the name.</li></ol><pre>static void backing_table_name(const char *store_name, char *out, int out_size)<br>{<br>    snprintf(out, out_size, &quot;mem_%s&quot;, store_name);<br>}</pre><p>In the system catalog this becomes a real row in the tables list. On disk it appears under the user&#39;s current schema as mem_user_memory. (Through the EVO protocol the MCP bridge sees it as __mem_&lt;prefix&gt;.</p><p>The columns are:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*WkTerje2jldLSR5mJPldVg.png" /></figure><p>The composite PK is the part that holds everything together. We don’t add a separate unique index on (mem_namespace, mem_key). Instead, we join the two values with a 0x1E Record Separator byte and store them as a single B+ tree key.</p><pre>static void make_pk(const char *ns, const char *key, char *out, int out_size)<br>{<br>    snprintf(out, out_size, &quot;%s\x1E%s&quot;, ns ? ns : &quot;&quot;, key ? key : &quot;&quot;);<br>}</pre><p>There is a small reason why we use 0x1E and not the more obvious 0x1F. The engine&#39;s GetInsertions path already uses 0x1F Unit Separator and 0x02 STX as delimiters in memory between fields and between rows. If we used either of them inside a user-visible key, a bad namespace could break the tuple buffer. 0x1E is the next character up in the ASCII control table. Nothing in our wire format uses it.</p><p>The type codes in the column definitions come from EvoSQL’s binary tuple encoding. typeVal / 10000 gives the family. typeVal % 10000 gives the size. So 130255 is VARCHAR(255), 130512 is VARCHAR(512), 230000 is JSON, 100003 is TIMESTAMP, and 260000 + N is VECTOR(N). We only add the embedding column when the user asks for vectors. This way, a memory store with no semantic search becomes a pure JSON KV table. There are no wasted bytes per row when the user does not need vectors.</p><p>2. It writes a row into CAT_SYS_MEMORY_STORES. This is its own B+ tree in the system catalog. It sits next to CAT_SYS_TABLES, CAT_SYS_INDEXES, and the other catalog trees. The key is the store name in lower case. The value is a MemoryStoreDesc that holds embedding_dim, the distance function, and the backing table id. The catalog API for this lives in catalog_internal.h.</p><pre>int cat_create_memory_store(const MemoryStoreDesc *desc);<br>int cat_find_memory_store(const char *name, MemoryStoreDesc *out);<br>int cat_drop_memory_store(const char *name);<br>int cat_list_memory_stores(MemoryStoreDesc *out, int max);</pre><p>3. It does not create a vector index automatically. You add the index with a separate CREATE INDEX ... USING HNSW step. Part 3 of this series covers that step. The engine still accepts MEMORY SEARCH on an unindexed embedding column. In that case the planner falls back to a sequential scan and computes distances on the fly. This is slow on a million rows. It is fine on the ten-thousand-row personal namespace. The Claude bridge produces this namespace.</p><h3>What MEMORY PUT does</h3><p>The DML surface looks like:</p><pre>MEMORY PUT user_memory NAMESPACE &#39;alptekin&#39;<br>    KEY &#39;mem_1714824123456_a1b2c3&#39;<br>    VALUE &#39;{&quot;fact&quot;:&quot;loves jazz&quot;,&quot;tags&quot;:[&quot;preference&quot;]}&#39;<br>    EMBEDDING &#39;[0.1, 0.2, ... ]&#39;<br>    TTL &#39;2026-12-31&#39;;</pre><p>The C SDK has a function called memory_put. It builds the statement from its arguments. Then it sends the statement as one line over the EVO text protocol on TCP port 9967. The engine routes it through MemoryPutProcess in Memory.c.</p><p>The interesting part of MEMORY PUT is the upsert behavior. A normal SQL INSERT would fail on a duplicate primary key. But users want save_memory(&quot;loves jazz&quot;) to overwrite an older value like &quot;loves classical&quot;. They do not want to write a separate UPDATE statement. So the engine does a delete first and then an insert. This happens under the hood.</p><p>Both operations run inside the same auto-commit transaction. With MVCC, this creates an old row that is tombstoned and a fresh new row. All later snapshots can see this new row. This is exactly the kind of trace we want for the FOR SYSTEM_TIME AS OF queries that we will cover in Part 4. The actual write goes through the standard DML path. tapi_heap_insert writes the tuple to a slotted page, and bt2_insert adds an entry to the primary key B+ tree. There is no special codepath for MEMORY PUT. It is a regular DML statement compiled from a regular INSERT, and this is by design. Every storage feature the engine has works with memory stores automatically. These features include replication, WAL, MVCC, TDE, RLS, and durable subscriptions. They all work because memory stores are really just tables underneath.</p><h3>What MEMORY GET, MEMORY SEARCH, and MEMORY LIST NAMESPACES do</h3><p>All three are compiled to SELECT statements against the backing table. The Memory.c code uses seed_select. This is an internal helper that builds an AST programmatically instead of going back through the parser. Each command has its own shape. The command MEMORY GET store NAMESPACE ns KEY k becomes SELECT * FROM mem_store WHERE pk = &#39;ns\x1Ek&#39;. This is one PK lookup, and it hits the B+ tree directly. The command MEMORY SEARCH store NAMESPACE ns NEAR &lt;vec&gt; LIMIT k becomes SELECT *, distance(...) FROM mem_store WHERE mem_namespace = &#39;ns&#39; ORDER BY embedding &lt;=&gt; &#39;[...]&#39; LIMIT k. The planner picks HNSW if an index exists. If there is no index, it uses a sequential scan with sort. The command MEMORY LIST NAMESPACES store [PREFIX p] becomes SELECT DISTINCT mem_namespace FROM mem_store [WHERE mem_namespace LIKE &#39;p%&#39;]. With a selective enough prefix, the planner can use the PK B+ tree as a range scan. Because everything compiles down to standard SQL, you can also write the equivalent by hand and look at the data directly. You can run it from the CLI against your own bridge as shown below.</p><pre>SELECT mem_namespace, mem_key, mem_value<br>FROM   __mem_mcp_mem<br>WHERE  mem_namespace = &#39;alptekin&#39;<br>ORDER  BY created_at DESC<br>LIMIT  10;</pre><p>That’s the same query the MCP bridge’s recent_memories tool sends, and you can run it against a live database while Claude is using it. There is no opaque blob storage; what the model writes is what your operator sees.</p><h3>How namespace isolation actually holds up</h3><p>The mem_namespace column holds the multi-tenant boundary. The MCP bridge pins this value on the server side from the MCP_USER_ID environment variable. In a server-to-server deployment, the application code does the same thing. So what stops a buggy application from reading another tenant&#39;s rows? There are two layers of protection, and the one you choose depends on how careful you want to be. The first layer is the application layer, and this is the one the MCP bridge relies on. Every MEMORY GET / PUT / SEARCH call takes the namespace as an argument, and the engine filters by it in the generated SQL. A bug in the application could leak data across namespaces. However, a bug in the model cannot do this, because the bridge ignores any namespace that the model sends. The second layer is the database layer. It is available but it is not turned on by default. The engine also offers row-level security.</p><pre>CREATE POLICY user_isolation<br>ON __mem_user_memory<br>FOR ALL<br>USING (mem_namespace = current_user);</pre><p>When this policy is active, even a SQL injection that gets past the application’s filter cannot return rows from another namespace. The visibility check happens inside the row scan itself. The product page mentions this casually as “namespace-scoped long-term memory”. The real enforcement is just standard RLS in the PostgreSQL style, and it runs on a regular table.</p><h3>What’s stored where, summarised</h3><p>A complete tour of where one saved fact lives on disk, after a single save_memory call:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/950/1*8NIID0OIOASug4n3iZKKwg.png" /></figure><p>Every one of those structures is the same one a regular CREATE TABLE</p><h3>What’s next</h3><p>Part 3 drops down to the embedding column itself: how VECTOR(N) is encoded in the binary tuple, what an HNSW graph looks like on slotted pages, how the &lt;=&gt; operator picks the index, and what recall@10 ≥ 0.9 cost us to hit.</p><p>→ Part 3 — VECTOR(N) and HNSW (planned)</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=7f9dd9f7143b" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Make Claude search your Teams chats]]></title>
            <link>https://medium.com/@topal.alptekin/make-claude-search-your-teams-chats-a721b44c959d?source=rss-e68ab5136c83------2</link>
            <guid isPermaLink="false">https://medium.com/p/a721b44c959d</guid>
            <category><![CDATA[python]]></category>
            <category><![CDATA[ai-agent]]></category>
            <category><![CDATA[claude]]></category>
            <category><![CDATA[evolutiondb]]></category>
            <category><![CDATA[productivity]]></category>
            <dc:creator><![CDATA[Alptekin topal]]></dc:creator>
            <pubDate>Fri, 08 May 2026 15:40:16 GMT</pubDate>
            <atom:updated>2026-05-08T15:40:16.250Z</atom:updated>
            <content:encoded><![CDATA[<p>A small tool that reads my Teams messages and lets Claude answer questions about them. It saves me hours every week.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*j8WbazJoML9m_y13" /><figcaption>Photo by <a href="https://unsplash.com/@hannahbusing?utm_source=medium&amp;utm_medium=referral">Hannah Busing</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><h3>Make Claude search your Teams chats</h3><p>You know the feeling. Three weeks ago you sent a Teams message about a release plan. Today you cannot find it. You scroll, you search by name, you search by a word you think you used. Nothing. So you ask the person again. They reply that yes, they said it, and you should know already.</p><p>This happens to me almost every week. I got tired of it. So I built a small tool that fixes it.</p><p>The tool reads my Teams chats and puts every message into a database. Claude can also read from that same database. When I want to find what someone said three weeks ago, I do not open Teams. I just ask Claude in plain language. It finds the message and answers.</p><p>It works very well, and the setup takes about ten minutes.</p><h3>Why this matters more than it sounds</h3><p>Teams keeps your messages forever. The real problem is finding them again. The built in search is okay if you remember the exact words. It is not good if you only remember the topic, or who said it, or roughly when.</p><p>When you cannot find a past message, you waste time in small ways that add up. You ask the same question twice. You miss a small detail that becomes important later. Every Monday morning you spend the first hour reading old chats just to remember where you were.</p><p>Here are some questions I now ask Claude without scrolling at all.</p><p>1. What did Furkan say about the new release plan last week</p><p>2. Find every chat where someone talked about the login bug</p><p>3. What did I write in the standup yesterday about the migration</p><p>4. Did anyone follow up on the budget meeting from two weeks ago</p><p>5. Show me the design review notes I typed in chat after the meeting</p><p>6. Pull out every action item from the platform team chat this month</p><p>Each of these used to take five to ten minutes of scrolling. Now it is one question and one short answer.</p><h3>Where this helps the most</h3><p>A few real places where this tool already saves me time.</p><p><strong>Release management.</strong> Before we ship, I ask Claude to list every chat from the last two weeks where someone reported a bug or asked for a fix. It pulls the messages, groups them by chat, and tells me which items were closed and which were still open. I no longer keep a side document for this.</p><p><strong>Meeting notes.</strong> Most of my team writes notes in chat after a meeting, not in Notion or Confluence. The notes are there, but you have to remember which chat. Now I ask Claude “find the notes from the architecture review last Thursday” and it finds them.</p><p><strong>Catching up.</strong> After a holiday or a sick day, instead of reading two days of chat, I ask Claude what I missed. It summarises the important threads and skips the small talk.</p><p><strong>Code reviews and decisions.</strong> Half of our technical decisions live in chat, not in PRs or design docs. I can now ask “why did we decide not to use Redis for sessions” and get the actual conversation where we made the call, with the reasons.</p><p><strong>Onboarding.</strong> When a new person joins, instead of pointing at four years of chat history, I tell Claude to summarise our team’s discussions on the topic they are starting on.</p><h3>What you end up with</h3><p>A small program runs in the background. Every ten minutes it asks Microsoft for any new Teams chat messages and writes each one into a database row. The database is EvolutionDB, an open source SQL engine that runs in a single Docker container.</p><p>Claude already knows how to talk to that database through the MCP standard. MCP is a small open protocol that any AI assistant can use to call tools. One of those tools reads from the same database the sync writes to. So the write path is Teams to database, the read path is Claude to database, and the database in the middle is the single source of truth.</p><p>No vector store. No second product. No sync queue. One file on disk.</p><h3>How a question flows from start to finish</h3><p>The diagram below shows what happens when you save a fact and later ask for it back. The same shape applies to a Teams message. The sync job writes one row, Claude reads it later.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/420/1*yOpIlq2zUpWMu4TYaOCChA.png" /></figure><p>The interesting part is that the same physical row serves both the write and the read. There is no eventual consistency window. There is no embedding job that has to finish first. The moment a Teams message is saved, Claude can find it.</p><h3>Step one. Run the database</h3><p>You only need Docker.</p><pre>git clone https://github.com/alptekin/evolutiondb.git<br>cd evolutiondb<br>docker compose up -d</pre><p>That gives you EvolutionDB listening on two ports.</p><p>· 5433 is the PostgreSQL wire port. The MCP server and any normal SQL client use this one.</p><p>· 9967 is the native EVO port. The bundled CLI and the C SDK use this one.</p><p>Check that it is alive.</p><pre>docker compose ps<br>docker compose logs evosql - tail 10</pre><p>You should see lines like [PG] Listening on port 5433 and [EVO] Listening on port 9967. That is the whole database. It already has the memory and entity tables created and ready.</p><h3>Step two. Install the Teams sync</h3><p>The sync is a small Python package on PyPI.</p><p>pip install evolutiondb-teams-sync</p><p>Then create a Microsoft Entra ID app for it. This is the part that takes the longest, but you only do it once.</p><p>1. Go to <a href="https://portal.azure.com/">https://portal.azure.com</a> and open Microsoft Entra ID.</p><p>2. App registrations, then New registration. Name it whatever you like, for example “EvolutionDB Memory Sync”.</p><p>3. Pick “Accounts in this organizational directory only”.</p><p>4. Leave the redirect URI empty. Save.</p><p>5. Open Authentication and turn on “Allow public client flows”. Save.</p><p>6. Open API permissions and add three Microsoft Graph delegated permissions. Chat.Read lets the tool read your one to one and group chats. User.Read lets it see who you are. offline_access lets it refresh the token without asking you to log in every time.</p><p>7. Copy the Application (client) ID and the Directory (tenant) ID from the Overview page.</p><p>Put those two values into a .env file next to where you will run the sync.</p><pre>AZURE_TENANT_ID=your_tenant_id_here -&gt; speak with azure admin<br>AZURE_CLIENT_ID=your_client_id_here -&gt; speak with azure admin<br>EVOSQL_HOST=127.0.0.1<br>EVOSQL_PORT=5433<br>EVOSQL_USER=admin<br>EVOSQL_PASSWORD=admin<br>EVOSQL_DATABASE=evosql<br>MCP_USER_ID=your_unique_id<br>TEAMS_MEMORY_STORE=mcp_mem</pre><p>The MCP_USER_ID is the namespace your messages are filed under. Pick something stable like your work email or a short handle and do not change it later.</p><h3>Step three. Sign in once</h3><p>evosql-teams-sync -auth</p><p>The terminal prints a Microsoft login URL and a short code. Open the URL in any browser, paste the code, sign in with your work account, and click Accept on the permissions screen. The refresh token is saved on your machine and used for every later run.</p><p>You will not need to do this again unless you revoke the app or change accounts.</p><h3>Step four. Pull your chats</h3><p>Run a single sync to test that it works.</p><p>evosql-teams-sync -once -since 24h</p><p>You should see something like</p><p>wrote 118 messages across 42 chats (skipped 11 system / empty)</p><p>That is your last day of Teams chats now sitting in EvolutionDB.</p><p>For real use, run it as a daemon so new messages are picked up every ten minutes.</p><p>evosql-teams-sync -interval 600</p><p>Or, if you prefer, run it in Docker as part of the same compose stack with the teams profile.</p><h3>Step five. Point Claude at the database</h3><p>Open Claude Desktop’s config file.</p><p>On macOS</p><p>~/Library/Application Support/Claude/claude_desktop_config.json</p><p>On Windows</p><p>%APPDATA%\Claude\claude_desktop_config.json</p><p>Add the MCP server.</p><pre>{<br>  &quot;mcpServers&quot;: {<br>    &quot;evolutiondb-memory&quot;: {<br>      &quot;command&quot;: &quot;uvx&quot;,<br>       &quot;args&quot;: [&quot;mcp-server-evolutiondb&quot;],<br>       &quot;env&quot;: {<br>         &quot;EVOSQL_HOST&quot;: &quot;127.0.0.1&quot;,<br>         &quot;EVOSQL_PORT&quot;: &quot;5433&quot;,<br>         &quot;EVOSQL_USER&quot;: &quot;admin&quot;,<br>         &quot;EVOSQL_PASSWORD&quot;: &quot;admin&quot;,<br>         &quot;EVOSQL_DATABASE&quot;: &quot;evosql&quot;,<br>         &quot;MCP_USER_ID&quot;: &quot;your_unique_id&quot;,<br>         &quot;MCP_STORE_PREFIX&quot;: &quot;mcp&quot;<br>       }<br>     }<br>   }<br> }</pre><p>Two values matter here. The MCP_USER_ID must be the same one the Teams sync writes under, otherwise Claude looks in the wrong place. The port must be 5433, the PostgreSQL wire port. The MCP server uses the psycopg library, which speaks PostgreSQL. Pointing it at 9967 is the most common mistake when something does not work.</p><p>Restart Claude Desktop fully. On macOS that is Cmd Q. Closing the window is not enough. Open it again, start a new conversation, and look at the bottom left of the window. You should see evolutiondb-memory listed with a small green dot.</p><h3>Step six. Ask things</h3><p>Try a few real questions.</p><p>What did Furkan say about the release plan last week?</p><p>Find every chat where someone mentioned a login bug.</p><p>Summarise what I wrote in the Backend standup yesterday.</p><p>Did anyone follow up on the budget meeting from two weeks ago?</p><p>Claude calls the search_memory tool. The MCP server runs a SQL query over your messages, scores them by how well they match your question, and returns the top few. Claude reads them and answers.</p><h3>Inspecting the data with normal SQL</h3><p>This is the part I like the most. Because the data lives in a real database, you can query it directly.</p><p>docker compose exec evosql /app/evosql-cli -W admin</p><p>Inside the CLI, count how many messages you have synced.</p><pre>SELECT COUNT(*)<br>FROM __mem_mcp_mem<br>WHERE mem_namespace = &#39;your_unique_id&#39;;</pre><p>Find every message that mentions a topic.</p><pre>SELECT mem_value<br>FROM __mem_mcp_mem<br>WHERE mem_namespace = &#39;your_unique_id&#39;<br>AND mem_value LIKE &#39;%login bug%&#39;;</pre><p>Drop a row you do not want stored.</p><pre>MEMORY DELETE FROM mcp_mem<br>WHERE NS = &#39;your_unique_id&#39;<br>AND KEY = &#39;teams_chat_19_xxxxx_yyyy&#39;;</pre><p>You can also connect with any PostgreSQL client. DBeaver, pgAdmin, the SQL pane in your editor, anything that speaks the PostgreSQL wire protocol works.</p><p>Backup is one line.</p><p>docker cp evolutiondb-evosql-1:/data/evosql.db ./teams-memory-backup.db</p><p>That single file is your entire searchable Teams history.</p><h3>Common things that go wrong</h3><p><strong>Wrong port.</strong> If Claude says the MCP server is not responding, it is almost always because the port is 9967 instead of 5433. The MCP server uses PostgreSQL wire.</p><p><strong>Restart, not relaunch.</strong> Claude Desktop reads the MCP config only when the app starts. After editing the config, fully quit the app with Cmd Q and open it again.</p><p><strong>MCP_USER_ID mismatch.</strong> If the Teams sync writes under one namespace and Claude reads from another, your messages will not show up. Use the same value in both places.</p><p><strong>Tenant admin lock.</strong> If your company blocks the Chat.Read permission, you cannot sync chats with this tool. Try running the auth step first. If it fails with a tenant admin error, talk to your IT team.</p><h3>Where this goes next</h3><p>Once your data lives in a real database that Claude can query, the assistant is no longer guessing. It is reading.</p><p>The same pattern works for any other source you can pull into rows.</p><p>· A Gmail connector that writes every email you receive.</p><p>· A Slack archiver that writes every public channel message.</p><p>· A GitHub watcher that writes every PR comment you are tagged in.</p><p>· A meeting transcript pipeline that writes every Zoom or Meet call.</p><p>All of them write into the same database. Claude reads from the same database. You do not run a vector store, a document database, a queue, and a SQL database to make this work. You run one engine.</p><p>That has been the biggest change for me. The assistant stopped being something I had to re explain my context to every morning. It became something that already knows what I said yesterday, what we discussed last week, and what we decided last month.</p><p>If you try this, I would love to know what use case you find for it that I have not thought of yet.</p><p><em>The full source code for the database, the MCP server, and the Teams sync lives at github.com/alptekin/evolutiondb.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a721b44c959d" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Part 1 — The MCP bridge: JSON-RPC over stdio in 388 lines]]></title>
            <link>https://medium.com/@topal.alptekin/part-1-the-mcp-bridge-json-rpc-over-stdio-in-388-lines-39a81eea8ba8?source=rss-e68ab5136c83------2</link>
            <guid isPermaLink="false">https://medium.com/p/39a81eea8ba8</guid>
            <category><![CDATA[ai-agent]]></category>
            <category><![CDATA[evolutiondb]]></category>
            <category><![CDATA[database]]></category>
            <category><![CDATA[mcp-server]]></category>
            <category><![CDATA[python]]></category>
            <dc:creator><![CDATA[Alptekin topal]]></dc:creator>
            <pubDate>Fri, 08 May 2026 09:09:07 GMT</pubDate>
            <atom:updated>2026-05-08T09:09:07.294Z</atom:updated>
            <content:encoded><![CDATA[<p><a href="https://medium.com/@topal.alptekin/how-i-gave-claude-a-real-long-term-memory-and-why-it-lives-in-a-sql-database-b20b4debf998">How I gave Claude a real long-term memory — and why it lives in a SQL database</a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*pKxlec49Wj4a7K2r" /><figcaption>Photo by <a href="https://unsplash.com/@umityildirim?utm_source=medium&amp;utm_medium=referral">Ümit Yıldırım</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p>The bridge between Claude Desktop / Claude Code and EvolutionDB is the smallest interesting piece of this whole stack and probably the easiest place to start. By the end of this article you’ll know exactly what bytes flow between Claude and the database, where the line is drawn between “the model decides” and “the server enforces”, and why the entire thing fits in a single Python file.</p><h3>What the bridge actually is</h3><p>The Model Context Protocol (MCP) is Anthropic’s open spec for letting Claude talk to external tools. From Claude’s side it looks like a function-calling surface: the model receives a list of tools at conversation start, and during the conversation it can decide to call any of them. From <em>our</em> side it’s a JSON-RPC 2.0 server that speaks newline-delimited JSON over stdin / stdout.</p><p>The transport is stdio, not HTTP. Claude Desktop launches our server as a child process. Every request the model makes is a single line of JSON written to our stdin. Every response is a single line I write to stdout. There is no network, no port, no TLS, no auth header. The trust boundary is the process boundary.</p><p>This makes the wire format simple:</p><pre>{&quot;jsonrpc&quot;:&quot;2.0&quot;,&quot;id&quot;:1,&quot;method&quot;:&quot;initialize&quot;,&quot;params&quot;:{&quot;protocolVersion&quot;:&quot;2024-11-05&quot;,&quot;capabilities&quot;:{}}}<br>{&quot;jsonrpc&quot;:&quot;2.0&quot;,&quot;id&quot;:1,&quot;result&quot;:{&quot;protocolVersion&quot;:&quot;2024-11-05&quot;,&quot;capabilities&quot;:{&quot;tools&quot;:{&quot;listChanged&quot;:false}},&quot;serverInfo&quot;:{&quot;name&quot;:&quot;evolutiondb-memory&quot;,&quot;version&quot;:&quot;1.0.0&quot;}}}<br>{&quot;jsonrpc&quot;:&quot;2.0&quot;,&quot;id&quot;:2,&quot;method&quot;:&quot;tools/list&quot;}<br>{&quot;jsonrpc&quot;:&quot;2.0&quot;,&quot;id&quot;:2,&quot;result&quot;:{&quot;tools&quot;:[ ... ]}}<br>{&quot;jsonrpc&quot;:&quot;2.0&quot;,&quot;id&quot;:3,&quot;method&quot;:&quot;tools/call&quot;,&quot;params&quot;:{&quot;name&quot;:&quot;save_memory&quot;,&quot;arguments&quot;:{&quot;fact&quot;:&quot;loves jazz&quot;,&quot;tags&quot;:[&quot;preference&quot;]}}}<br>{&quot;jsonrpc&quot;:&quot;2.0&quot;,&quot;id&quot;:3,&quot;result&quot;:{&quot;content&quot;:[{&quot;type&quot;:&quot;text&quot;,&quot;text&quot;:&quot;{\&quot;ok\&quot;:true,\&quot;key\&quot;:\&quot;mem_1714824123456_a1b2c3\&quot;,\&quot;user_id\&quot;:\&quot;alptekin\&quot;}&quot;}],&quot;isError&quot;:false}}That’s the whole thing. Eight lines of JSON for one full initialize-list-call round trip. No Content-Length headers (those are the LSP variant of the same wire format; MCP dropped them).</pre><p>Eight lines of JSON for one full initialize-list-call round trip. No Content-Length headers (those are the LSP variant of the same wire format; MCP dropped them).</p><h3>The five tools I expose</h3><p>The full surface, as advertised on tools/list:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/814/1*NDusmjtCQxyZxw1BuMyk1A.png" /></figure><p>These names matter — they show up verbatim in the model’s tool palette, and the model picks between them based on the descriptions in the schema. You can read the actual descriptions in client/mcp-server-evosql/mcp_server_evosql/server.py around the TOOLS constant; they&#39;re written deliberately to nudge the model toward <em>calling search before answering questions about the user</em>, which is the most common failure mode if the descriptions are vague.</p><h3>The server-side override that matters</h3><p>Every tool takes an implicit user_id — the namespace the memory belongs to. The interesting question is who chooses it.</p><p>If the LLM chose, you’d lose data. Across a hundred sessions Claude would fragment the namespace as &quot;user&quot;, &quot;default_user&quot;, &quot;alptekin&quot;, &quot;the user&quot;, and any other variation it invented mid-conversation. Each of those would scope to a different bucket and search_memory would return empty.</p><p>So the bridge ignores anything the model passes for user_id and pins it server-side from the MCP_USER_ID environment variable:</p><pre>class MCPServer:<br>    def __init__(self) -&gt; None:<br>        self.user_id = os.environ.get(&quot;MCP_USER_ID&quot;, &quot;default_user&quot;)<br>        ...</pre><p>Every dispatch uses self.user_id, never args.get(&quot;user_id&quot;). This is the single most important defensive decision in the whole bridge — every other thing in this file can be wrong without losing memories; this one can&#39;t.</p><h3>How the memory backend hangs off the bridge</h3><p>The bridge itself is dumb. The actual storage lives one layer down in the EvolutionDB Python SDK (client/python-evosql-memory/), which in turn wraps the C SDK (client/libevosql-memory/), which in turn speaks the EVO native text protocol on TCP port 9967.</p><p>The bridge instantiates one connection at first use:</p><pre>def _connect(self) -&gt; MemoryBackend:<br>    if self.backend is None:<br>        self.backend = MemoryBackend(self.host, self.port,<br>                                       self.user, self.pw,<br>                                       self.prefix)<br>    return self.backend</pre><p>Two catalog objects get created idempotently the first time:</p><pre>for kind, name in [<br>    (&quot;MEMORY STORE&quot;, self.memory),<br>    (&quot;ENTITY STORE&quot;, self.entities),<br>]:<br>    try:<br>        self.conn.exec_(f&quot;CREATE {kind} {name}&quot;)<br>    except Exception:<br>        pass</pre><p>The try/except Exception: pass is intentional. CREATE MEMORY STORE returns a duplicate-name error on every restart after the first; the bridge has no business propagating that to the model.</p><p>The actual save_memory body shows what each row looks like on disk:</p><pre>def save(self, user_id, fact, tags=None):<br>    created = time.time()<br>    key = f&quot;mem_{int(created*1000)}_{uuid.uuid4().hex[:6]}&quot;<br>    value = json.dumps({<br>        &quot;fact&quot;:    fact,<br>        &quot;tags&quot;:    tags or [],<br>        &quot;created&quot;: created,<br>    })<br>    self.conn.memory_put(self.memory, user_id, key, value)<br>    return key</pre><p>A millisecond timestamp + 6 hex chars of UUID gives a primary key that’s both monotonically sortable (so recent orders correctly) and globally unique (so a save-storm on the same millisecond doesn&#39;t collide). The value is JSON because the storage layer accepts JSON natively as a MEMORY STORE value column — see Part 2 of this series for what that looks like inside the catalog.</p><h3>Why search isn’t a SQL LIKE</h3><p>If you read MemoryBackend.search carefully, you&#39;ll notice it doesn&#39;t push the substring match into SQL. It pulls up to 512 rows for the namespace and does the term-scoring in Python:</p><pre>sql = (f&quot;SELECT mem_namespace, mem_key, mem_value FROM &quot;<br>       f&quot;__mem_{self.memory} WHERE mem_namespace = &quot;<br>       f&quot;&#39;{_e(user_id)}&#39; LIMIT 512&quot;)<br>rows = self.conn.query(sql, max_rows=512, max_cols=8, col_buf_size=8192)<br>q_terms = [w for w in query.lower().split() if len(w) &gt; 1]<br>out = []<br>for r in rows:<br>    rec = json.loads(r[2]) if r[2] else None<br>    haystack = (rec.get(&quot;fact&quot;,&quot;&quot;).lower() + &quot; &quot;<br>                + &quot; &quot;.join(rec.get(&quot;tags&quot;) or []).lower())<br>    score = sum(1 for w in q_terms if w in haystack)<br>    ...</pre><p>This is a deliberate choice for v1. The right answer in v2 is the MEMORY SEARCH DML statement that hits the HNSW index over the embedding column — covered in Part 3. Lexical-fallback search keeps the bridge functional even when the user hasn&#39;t configured an embedding provider, and 512 rows is small enough that the Python pass is sub-millisecond. I rejected pushing the LIKE into SQL because the real future of this code path is the vector index, and I didn&#39;t want the bridge to develop a SQL dialect I would have to throw away.</p><h3>The dispatch loop</h3><p>The whole stdio loop is twenty lines:</p><pre>def main() -&gt; int:<br>    server = MCPServer()<br>    for raw_line in sys.stdin:<br>        raw_line = raw_line.strip()<br>        if not raw_line:<br>            continue<br>        try:<br>            msg = json.loads(raw_line)<br>        except json.JSONDecodeError as e:<br>            print(f&quot;[mcp-evosql] bad JSON line: {e}&quot;,<br>                   file=sys.stderr, flush=True)<br>            continue<br>        try:<br>            resp = server.handle(msg)<br>        except Exception as e:<br>            traceback.print_exc(file=sys.stderr)<br>            resp = server._err(msg.get(&quot;id&quot;), -32603, str(e))<br>        if resp is not None:<br>            sys.stdout.write(json.dumps(resp, ensure_ascii=False) + &quot;\n&quot;)<br>            sys.stdout.flush()<br>    return 0</pre><p>A few things worth noting:</p><ul><li>Every error logs to stderr, never stdout. Stdout is a JSON-RPC channel; the moment a stray print() slips in, the next line Claude reads is half ours and half garbage, and the entire session goes red. I log to stderr instead, which Claude Desktop captures into a logs pane.</li><li>JSON decode errors don’t kill the loop. A malformed line is reported and skipped. This matters during development — Claude Desktop occasionally sends an empty line or a partial frame on disconnect, and I would rather skip it than respawn.</li><li>The notifications/initialized message has no id and so gets no response (if msg_id is None: return None). Returning a response to a notification is a protocol violation that some clients tolerate and others don&#39;t.</li></ul><h3>What I tested</h3><p>The eight cases in tests/test_mcp.py cover:</p><ol><li>initialize handshake returns the protocol version and serverInfo.</li><li>tools/list returns all five tools with non-empty descriptions.</li><li>save_memory followed by search_memory round-trips the same fact.</li><li>search_memory with a tag filter returns only matching tags.</li><li>recent_memories orders by created descending across N saves.</li><li>forget deletes by key and a follow-up search_memory returns nothing.</li><li>list_tags aggregates counts correctly across multiple saves.</li><li>The user_id isolation case: the test sets MCP_USER_ID=alice, makes a tool call passing arguments.user_id=&quot;bob&quot;, then with MCP_USER_ID=bob does a search — and verifies <em>the second user can&#39;t see Alice&#39;s data</em>, proving the server-side override actually fires.</li></ol><p>Each test spawns the server as a real subprocess and communicates over real stdin/stdout, so any bug in the framing layer (missing newline, bad JSON, unflushed stdout) gets caught — none of these would show up in an in-process unit test.</p><h3>What’s next</h3><p>Part 2 follows the memory_put call from this article down into the database itself: how MEMORY STORE is laid out in the system catalog, what tables it expands into, how the namespace tuple is encoded into the B+ tree key, and what the __mem_&lt;name&gt; prefix actually buys us.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=39a81eea8ba8" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How I gave Claude a real long-term memory — and why it lives in a SQL database]]></title>
            <link>https://medium.com/@topal.alptekin/how-i-gave-claude-a-real-long-term-memory-and-why-it-lives-in-a-sql-database-b20b4debf998?source=rss-e68ab5136c83------2</link>
            <guid isPermaLink="false">https://medium.com/p/b20b4debf998</guid>
            <category><![CDATA[ai-agent]]></category>
            <category><![CDATA[database]]></category>
            <category><![CDATA[sql]]></category>
            <category><![CDATA[ai]]></category>
            <dc:creator><![CDATA[Alptekin topal]]></dc:creator>
            <pubDate>Tue, 05 May 2026 21:19:30 GMT</pubDate>
            <atom:updated>2026-05-05T21:19:30.830Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*qY3k8lLFDMaM1Q-DVSVhsA.png" /><figcaption>EvolutionDb — AKA EvoSQL</figcaption></figure><p>If you’ve spent any real time working with a large language model in the last two years, you’ve felt the same papercut over and over again:</p><blockquote><em>“Wait, I told you this last week.”</em></blockquote><p>You haven’t, of course — not really. There is no <em>last week</em> for the model. Each new conversation lands on a clean desk. You re-introduce yourself, you re-explain the project, you re-paste the constraints, you re-list the preferences, and twenty minutes later the model knows you again — until you close the tab.</p><p>That round-trip is the hidden tax of working with AI today. We pay it in tokens, in latency, in our own patience, and (if you’ve looked at your bill) in dollars.</p><p>This post is about what happened when we stopped paying it.</p><h3>The shape of the problem</h3><p>The problem is genuinely simple, which makes the way the industry has solved it kind of telling.</p><p>What you actually want is for the assistant to remember the things you’ve already said — your role, your taste in coffee, the codebase you’re working on, the deadline that just slipped, the customer whose feature you shipped last sprint. You don’t want it to remember <em>everything</em>; you want it to remember the small set of things that turn out to matter.</p><p>The way most stacks have solved this so far is by gluing together four or five different products:</p><ol><li>A relational database, because that’s where the boring transactional stuff lives.</li><li>A document store — usually MongoDB or DynamoDB — because chat history doesn’t fit cleanly into rows and columns.</li><li>A vector database — Pinecone, Weaviate, Qdrant — because you need to ask “what did we say that was <em>kind of like</em> this?” and rows-and-columns can’t answer that.</li><li>A queue or a polling loop, so the assistant wakes up when something new is written.</li><li>A custom checkpoint table, because the agent framework has its own opinions about how state should be saved.</li></ol><p>That’s four pricing pages, four authentication models, four backup stories, and at least three places where the data can quietly disagree with itself. And it’s all in service of one simple promise: <em>remember me next time</em>.</p><p>I thought there was a better way to do this. The better way turned out to be a single binary.</p><h3>What I shipped</h3><p>EvolutionDB is an open-source SQL database written in C. It speaks the PostgreSQL wire protocol on port 5433 (and evo text protocol on 9967) so any tool you already use — psql, DBeaver, pgAdmin, Grafana, your existing ORM — can connect to it without changes. Underneath, it has the parts you’d expect from a serious database: ACID transactions, snapshot isolation, write-ahead logging, replication, encryption at rest, point-in-time recovery.</p><p>What’s different is what I put on top of those parts.</p><p>In version 3, I added a small set of native primitives that are designed specifically for AI agents — not as an afterthought layer on top of a generic key-value store, but as first-class objects in the SQL grammar:</p><pre>CREATE MEMORY STORE   user_memory   WITH (embedding_dim = 1536);<br>CREATE CHECKPOINT STORE agent_state;<br>CREATE MESSAGE LOG    chat_history;<br>CREATE DOCUMENT STORE knowledge_base;<br>CREATE GRAPH STORE    relationships;     -- bitemporal edges<br>CREATE ENTITY STORE   people_and_things;</pre><p>Each of those is a real catalog object. You can transact across them. You can query them with SELECT. You can back them up with the same tools you back up your other tables. They show up in DBeaver. They are not a layer. They are the database.</p><p>Then I built one more thing — the piece that closed the loop for us personally — a small bridge that lets Claude Desktop and Claude Code talk to that memory directly, through Anthropic’s open Model Context Protocol.</p><h3>What it actually feels like</h3><p>Here is what you do, end to end.</p><p>You start the database (one Docker container). You drop a small JSON configuration into Claude Desktop’s settings file. You restart the app.</p><p>A small icon appears in the chat composer telling you the memory bridge is connected. From there, you just talk normally.</p><blockquote>“Remember that I’m a senior backend engineer at a payments company. I prefer Go over Python, C and .Net, I usually work in 90-minute focus blocks, and my dog’s name is Pickle.”</blockquote><p>Claude reads that, decides it’s worth remembering, and writes a single row into the memory store. The conversation continues. You close the window.</p><p>A week later — different machine, different chat, different topic entirely — you open Claude and ask for help debugging a stack trace. Before it answers, the model silently asks the memory bridge: <em>what do I know about this user that’s relevant?</em> The bridge returns the three or four facts that match. The model adjusts its response: it phrases the explanation in Go idioms instead of Python ones, it suggests a debugging approach that fits a 90-minute session, and somewhere in the middle of the reply it asks how Pickle is doing.</p><p>You did not paste any context. You did not write a system prompt. You did not “prime” the model. You just talked, last week, and the model remembered.</p><h3>Where the savings come from</h3><p>This sounds almost cosmetic — <em>the model knows my dog’s name</em> — until you look at the numbers underneath.</p><p>A typical “professional” Claude conversation today is preceded by about 3,000 tokens of preloaded context: who you are, what you’re working on, your formatting preferences, the rules you want followed. Across a hundred real conversations a month, that’s 300,000 tokens of repeated input.</p><p>With a real memory store, the model doesn’t preload context. It pulls exactly the few facts it needs, exactly when it needs them. The same hundred conversations end up costing about 25,000 tokens of context — an order of magnitude less.</p><p>In dollar terms on the current pricing of a frontier model, you go from about ninety cents in repeated context per month to about twenty-six cents. Three and a half times cheaper inputs without losing a single piece of relevant information.</p><p>That’s the boring win. The interesting win is what happens to the conversations themselves: they get shorter, they get less repetitive, and they get noticeably more personal. The model stops having to ask, and you stop having to explain.</p><h3>Why a SQL database, of all things</h3><p>This is the question I got the most while building it: <em>why on earth would memory live in a relational database?</em></p><p>Three reasons, in order of importance.</p><p>Because memory is data, and data has rules. Every team that’s run a serious agent in production has eventually had to answer awkward questions: who can read this user’s memories? Can we delete them on request? Can we audit what was added in the last seven days? Can we ship a backup to another region? These are not novel problems. The database industry has been answering them for forty years. Reinventing them on top of a vector index is, charitably, a waste of effort.</p><p>Because the data wants to talk to itself. A real memory store is not just “facts about the user.” It’s facts, plus the conversations those facts were extracted from, plus the entities those facts mention, plus the documents the user referenced, plus the relationships between all of it. Stitching that together across a relational store, a vector store, and a document store means writing reconciliation code forever. Stitching it together inside one database is just JOIN.</p><p>Because operators have learned things, and we should let them keep using what they know. EvolutionDB speaks the PostgreSQL wire protocol. Every DBA tool, every monitoring dashboard, every existing ETL pipeline, every ORM, every type-safe query builder in every language — they all work unchanged. The agent-memory layer is new. The way you run it in production is not.</p><h3>The temporal trick</h3><p>There is one place where AI memory is genuinely different from regular data, though, and I ended up leaning into it.</p><p>Traditional databases are good at telling you <em>what is true now</em>. Agent memory needs to tell you <em>what was true at a given point in time</em>. If a user told the assistant in March that they worked at Company A, and in May they tell it they’ve moved to Company B, the system has to retain both facts and know which one was true when.</p><p>This sounds exotic, but it turns out I already had it. EvolutionDB’s storage engine has used multi-version concurrency control since version 2 — every row carries the transaction ID that created it and (eventually) the one that retired it, and the engine can produce a consistent view of the database as it existed at any prior moment.</p><p>I exposed that capability at the SQL surface:</p><pre>SELECT * FROM user_memory<br>FOR SYSTEM_TIME AS OF &#39;2026-03-15 12:00:00&#39;<br>WHERE user_id = &#39;alptekin&#39;;</pre><p>That’s a real query against the same memory store, returning the version of Alice’s memory that existed two months ago. It costs nothing extra to store — the data is already there, because the engine never throws away old versions until it’s safe to. It costs nothing extra to query — the visibility check is the same one the engine runs on every read anyway.</p><p>This matters in practice. Agents that act on stale information are dangerous. Agents that can <em>audit themselves</em> — show me exactly what I believed at the moment I made this decision — are trustworthy. The temporal layer is what makes the second kind of agent possible.</p><h3>Push, not poll</h3><p>The other thing I cared about, which I never seen handled well in any other agent stack, was reactivity.</p><p>If the agent is supposed to wake up when something new happens — a new email, a new ticket, a new memory written by another tool — the usual solution is polling. The agent asks “anything new?” once a second, forever, hoping to catch interesting events before they go stale.</p><p>This is wasteful, slow, and surprisingly expensive in cloud bills. I replaced it with a real publish/subscribe primitive backed by the database’s commit log. The moment a row is written and committed, every subscriber is notified — through the same connection they’re already using for queries. No polling loop. No second service. No Kafka.</p><p>The measured difference, on my reference workload, is about 2,900× — a notification delivered in under a millisecond instead of waited-for over roughly a second. For an agent ticking through a long task, that’s the difference between feeling like a co-worker and feeling like a script.</p><h3>What’s next</h3><p>The memory layer is the foundation. The next thing built on top of it is the part that changes how <em>you</em> use the model — the bridge that lets Claude Desktop and Claude Code reach into your personal memory store without any of the framework plumbing. That bridge is open source, two hundred lines of Python, ships with the database, and works today.</p><p>There is more coming: native gRPC streaming for memory events, a Rust binding over the C client, a managed-service option for teams who want the layer without operating it themselves, and benchmark comparisons against the rest of the agent-memory space.</p><p>But the part that mattered to me, the part that made this whole project worth doing, is already in your hands: a Claude that remembers, a database that holds it, and one less papercut between you and the work.</p><p>If you’ve read this far and you build with agents — give it a weekend. Open the repository, run one Docker command, configure Claude, and tell it three things about yourself.</p><p>Then come back next week and ask it something it has no business knowing.</p><p>It will know.</p><p><em>EvolutionDB is open source, MIT-licensed, and lives at </em><a href="https://github.com/alptekin/evolutiondb"><em>github.com/alptekin/evolutiondb</em></a><em>.</em></p><p><em>If you want the engineering details — how the memory store is laid out on disk, how the MCP bridge speaks JSON-RPC over stdio, how the vector index manages recall against a live transactional workload — there’s a companion technical series starting.</em></p><p>X: @evosql</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b20b4debf998" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[The Age of Coding Is Over. Welcome to the Age of Code Review.]]></title>
            <link>https://medium.com/@topal.alptekin/the-age-of-coding-is-over-welcome-to-the-age-of-code-review-d43c18a00a5f?source=rss-e68ab5136c83------2</link>
            <guid isPermaLink="false">https://medium.com/p/d43c18a00a5f</guid>
            <dc:creator><![CDATA[Alptekin topal]]></dc:creator>
            <pubDate>Sat, 14 Mar 2026 18:57:57 GMT</pubDate>
            <atom:updated>2026-03-14T18:57:57.383Z</atom:updated>
            <content:encoded><![CDATA[<h4><em>The evolution of the software developer — what roles are disappearing, what skills are rising, and how to stay relevant in the age of AI.</em></h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*8UqdipocuE4gLHVW" /><figcaption>Photo by <a href="https://unsplash.com/@vladimir_d?utm_source=medium&amp;utm_medium=referral">Volodymyr Dobrovolskyy</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p>Just a few years ago, a developer’s most important job was to write code quickly and correctly. Most of the working day was spent typing. But today, tools like ChatGPT and Claude are changing that reality in a deep way. <em>The question going around the industry is simple: Will AI replace software developers?</em></p><p><strong>The short answer is no.</strong> But the long answer is far more interesting.</p><p>What is actually ending is not software development itself. What is ending is the “coder” mindset — the idea that your value as a developer comes mainly from writing lines of code. Understanding this difference clearly will shape many of the career decisions you make in the next decade.</p><h4>The Quiet Revolution Inside Software Teams</h4><p>Think about how a traditional software team used to work. A senior developer would define the problem, design the solution, and set the direction. A junior developer would then turn that plan into actual code, handle the repetitive tasks, and slowly gain experience over time. The senior would review the output, make corrections if needed, and approve the final result. It was a simple system, but it worked.</p><p>The middle layer of that process — the part where someone actually sits down and writes the code — is now something AI tools can handle. And even if AI stopped improving today, it can already produce roughly 50 to 80 percent of the code most projects need. This includes everything from basic data operations to repetitive API connections to standard template-based features.</p><blockquote>AI made writing code cheaper. But it made understanding software more valuable than ever.”</blockquote><p>It is no surprise that junior developers are the group feeling this change most directly. Their early career experience was mostly built on producing code. When production becomes automated, the entry point into the industry gets narrower and steeper. If you are just starting out or planning to this structural shift deserves your full attention.</p><h4>From “Coder” to “Reviewer”</h4><p>In this new environment, developers can no longer afford to build their careers entirely around writing code. The profile that will stand out is not the one who writes the most code, but the one who understands what has been produced, spots the problems, directs the AI effectively, and takes responsibility for the whole system.</p><p>Let us call this the “reviewer” role. But do not underestimate it. This is not a passive activity. It requires deep technical knowledge. To review something properly, you first need to understand it deeply. To evaluate AI-generated code, you need to know at least one programming language very well, read code fluently, and sense which line might cause trouble and why.</p><p>So the conclusion “<strong>you don’t need to know how to code anymore</strong>”<em> is completely wrong</em>. The opposite is true: <em>reading and understanding code has become just as important as writing it </em>maybe more so. The volume of code being produced is now much larger, and the time of the person reviewing it is more precious than ever before.</p><blockquote><strong>Question:</strong></blockquote><blockquote><strong>Does reviewing AI-generated code require less expertise than writing code from scratch? No - probably more. Because now you are expected to understand and challenge someone else’s output, not just produce your own.</strong></blockquote><h4>The Skills That Matter Now</h4><p>To stay productive and relevant in the age of AI-assisted development, here are the areas every developer should focus on:</p><ol><li><em>Code Analysis and Review:</em></li></ol><p>Examining AI-generated code, identifying problems, and suggesting fixes is no longer a skill only expected from senior developers. Every developer at every level needs to develop this ability. Think of code review not as a mechanical checkbox, but as the main quality control point of the entire system.</p><p><em>2. Deep Domain Knowledge:</em></p><p>AI often skips over or misreads business rules. Regulatory limits in financial applications, return and inventory logic in e-commerce, approval workflows in ERP systems. These complex processes give you a critical reference point to verify whether the generated code is actually correct. The better you know your industry, the faster you will spot AI’s mistakes.</p><p><em>3. System Design and Architecture:</em></p><p>AI-generated code does not always fit the architecture of your existing project or follow your team’s coding standards. Knowing how the application is designed end-to-end, how services communicate with each other, and why certain layers exist ensures that generated code is integrated correctly not just dropped in and hoped for the best.</p><p><em>4. Edge Case Expertise:</em></p><p>Security vulnerabilities, performance bottlenecks, scalability limits, and high availability requirements were once topics only expected at senior level. Now they need to be part of every developer’s daily thinking because AI regularly misses them. Ask yourself: when will this system fail? What input could create a security hole? How does this code behave under heavy load?</p><p><em>5. Writing Effective Prompts:</em></p><p>Getting the best results from AI means writing clear, detailed instructions. A vague prompt with no context or constraints wastes time and burns through your token limits on paid tools quickly. A good prompt clearly states the goal, the constraints, the expected output format, and what to avoid. This skill sits between technical writing and software engineering — and it matters more every day.</p><p><em>6. Risk and Bug Anticipation:</em></p><p>Sensing potential bugs in AI-generated code before the application goes live requires experience and pattern recognition. “The AI wrote it” is not a valid explanation when something breaks in production. Asking the question “where could this fail?” in a systematic way before releasing anything remains one of the most essential responsibility of a developer.</p><h4>How the Game Has Changed for Juniors</h4><p>For people starting their software careers the picture should be presented honestly: getting into the industry is harder than it used to be. Teams are getting smaller, fewer juniors are being hired, and employer expectations are shifting toward people who can do more with less experience.</p><p>But this does not mean the industry is closing. What has changed is the nature of the beginning. The old model write code, gain experience, learn over time no longer works the way it used to. From the start, you are now expected to have a broader technical understanding, make sense of business rules, and evaluate generated code with a critical eye.</p><p>This is also an opportunity. Developers who learn AI tools early and deeply, who understand and correct what these tools produce, can build their skills much faster than before. A junior today can generate and analyze in minutes the kind of practice code that used to take weeks of work to encounter naturally.</p><h4>How the Role Has Changed for Seniors</h4><p>For experienced developers, the picture might seem less uncertain, but that feeling can be misleading. Yes, a senior’s ability to read and evaluate existing code remains immediately relevant. But here is what has changed: they are now expected to create value not only through technical knowledge, but also through their ability to work effectively with AI tools.</p><p>The biggest risk is getting too comfortable with existing skills and delaying adaptation. Seeing AI tools as a threat that is “stealing your job” is far less useful than treating them as a lever that multiplies your productivity by ten.</p><p>The senior’s role inside an organization is also shifting. Technical leadership, architectural decision-making, and knowledge transfer within the team are becoming more important. A good senior is no longer just someone who writes great code. They are the person who guides how the team uses AI tools, defines quality standards, and makes technical debt visible.</p><h4>Is Traditional Learning Still Necessary?</h4><p>More and more people are asking this question, and the answer is clear: yes, absolutely. Perhaps more than ever before.</p><p>To understand AI-generated code, you need a solid foundation. Without a basic understanding of algorithms, data structures, memory management, concurrency issues, and network protocols, you cannot see why an AI’s solution might be wrong or insufficient. You would simply not have the tools to judge it.</p><p>Being a developer who uses AI as a tool, asks it for help when stuck, but genuinely understands what it produces — that combination accelerates your learning and builds your career on a stable foundation for the long term.</p><h4>What Will the Next Decade Look Like?</h4><p>Scenarios where the software industry disappears in ten or twenty years are simply not realistic. Demand is not shrinking. There is barely a sector left that does not depend on software. What is changing is the nature of that demand.</p><p>On one side, there is growing demand for a smaller number of highly skilled developers who can understand, design, and manage extremely complex and critical systems. On the other side, projects that used to require large teams can now be delivered by smaller teams with a higher level of expertise.</p><p>This does not mean the industry is contracting. But it does mean the quality bar is rising. The winners of the future will not be those who hand everything over to AI, but those who keep developing themselves with solid fundamentals, use AI for support when needed, and combine both strengths into a single, effective approach.</p><h3><strong>It is time to shift your focus from </strong><strong>writing code to </strong><strong>solving problems and </strong><strong>owning the system. AI can write the code. But who actually understands the system?</strong></h3><p>Being able to answer that question will be the most fundamental difference between developers in the years ahead. Those who understand the technology will lead those who only use it. And honestly, that is not a new idea at all — it is just happening in a new form, and much faster than before.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d43c18a00a5f" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How to Think Like a Senior Engineer: The Core Skill You Must Master]]></title>
            <link>https://medium.com/@topal.alptekin/how-to-think-like-a-senior-engineer-the-core-skill-you-must-master-8e0bcfbbac91?source=rss-e68ab5136c83------2</link>
            <guid isPermaLink="false">https://medium.com/p/8e0bcfbbac91</guid>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[developerskills]]></category>
            <category><![CDATA[productivity]]></category>
            <category><![CDATA[senior-developer]]></category>
            <category><![CDATA[software-engineering]]></category>
            <dc:creator><![CDATA[Alptekin topal]]></dc:creator>
            <pubDate>Fri, 28 Nov 2025 11:04:44 GMT</pubDate>
            <atom:updated>2025-11-28T11:04:44.197Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*5wPgRGZkjxJkryMBY8maFg.jpeg" /></figure><p>Every engineering team has a title ladder, and somewhere near the top sits the word “Senior.” It sounds definitive — a badge earned after enough years, enough projects, enough hard lessons. But if you’ve worked across different companies, you’ve probably noticed something strange: the title “Senior Engineer” describes wildly different people.</p><p>Some senior engineers are reliable project drivers. Others are brilliant coders but struggle with direction. Some can architect entire systems; others mainly operate within existing ones. So what actually separates a senior engineer from everyone else?</p><p>After years of observing teams, mentoring developers, and making my own mistakes, I’ve come to believe the answer is surprisingly simple:</p><p><strong>A senior engineer is someone who can remove ambiguity.</strong></p><p>Not “write perfect code.”<br>Not “lead meetings.”<br>Not “design scalable systems.”<br>Those are useful, but secondary.</p><p>The defining skill — the one everything else depends on — is the ability to transform unclear problems into clear, solvable ones.</p><h3>The Hidden Skill Behind Senior-Level Impact</h3><p>Most engineers grow by tackling increasingly complex technical problems. But complexity and ambiguity are not the same thing.</p><ul><li>A <strong>complex</strong> problem is hard but clearly defined.</li><li>An <strong>ambiguous</strong> problem has unclear boundaries, vague requirements, and multiple possible interpretations.</li></ul><p>Early-career engineers thrive when the problem is already shaped. Give them a well-written ticket or a precise feature request and they deliver. Their success depends on how well the problem is presented to them.</p><p>Senior engineers succeed because they can operate <strong>before</strong> the problem is well-written.</p><p>They ask questions like:</p><ul><li>“What outcome are we actually trying to achieve?”</li><li>“Whose pain are we solving?”</li><li>“What constraints matter most, and which are assumptions?”</li><li>“If we go down this path, what risks do we introduce?”</li></ul><p>These aren’t technical questions — they’re clarity questions.<br>This is the work that turns a loose idea into an actionable plan.</p><p>And here’s the twist: teams often don’t notice when this work is done well. A project that looked “surprisingly smooth” was almost always preceded by someone quietly removing uncertainty.</p><h3>Reducing Ambiguity Is Not Glamorous — But It’s What Prevents Fires</h3><p>Ambiguity is expensive. It causes:</p><ul><li>Misaligned expectations</li><li>Late surprises</li><li>Rewrites and refactors</li><li>Cross-team friction</li><li>Slow delivery</li><li>Endless meetings</li></ul><p>Many companies unknowingly rely on a few people — often senior engineers — who prevent these issues from exploding.</p><p>They clarify feature goals with product managers.<br>They challenge assumptions early.<br>They break vague ideas into testable steps.<br>They identify missing data, unknowns, or risks.</p><p>This is not the kind of work that shows up in Git logs. It doesn’t have a metric in Jira. It rarely gets acknowledged. But it makes the difference between a project that proceeds calmly and one that spirals.</p><p>This is why senior engineers get trusted with important initiatives. Not because they write more code — <strong>but because they remove uncertainty from the path.</strong></p><h3>Why Typical Hiring Processes Miss This Completely</h3><p>The industry says it wants “senior engineers,” but hiring pipelines often filter for something else entirely.</p><p>Coding puzzles.<br>LeetCode questions.<br>Framework trivia.<br>System design patterns recited from memory.</p><p>None of these evaluate the core ability that actually drives senior-level impact:</p><p><strong>Can this person take an undefined problem and make it definable?</strong></p><p>A candidate can ace every algorithm test and still freeze when presented with a fuzzy business request like “improve the onboarding flow” or “we need to scale this service next quarter.”</p><p>On paper they qualify as “senior.” In practice they still need someone else to tell them what to build.</p><p>This mismatch leaves teams confused about titles — because the hiring process rewards technical knowledge, not ambiguity resolution.</p><h3>Architecture, Ownership, and Leadership Matter — But Only After Clarity Exists</h3><p>Common expectations for senior engineers include:</p><ul><li>Strong system design skills</li><li>Clear communication</li><li>Ability to lead projects</li><li>Ownership and accountability</li></ul><p>These are absolutely important. But their effectiveness relies on one precursor:</p><p><strong>understanding the real problem.</strong></p><p>Architecture skills are useless if you architect the wrong solution. Ownership is meaningless if you own something undefined. Communication fails when nobody is aligned on goals. Leadership falters without a clear direction to lead toward. Clarity is the foundation. Everything else sits on top of it.</p><h3>How to Evaluate Yourself: A Seniority Self-Check</h3><p>Here’s a simple way to gauge your level. The next time you receive a request that sounds vague or abstract — something like:</p><ul><li>“Performance seems slow, can we improve it?”</li><li>“Users say onboarding is confusing.”</li><li>“We should consider reworking this service.”</li></ul><p>Observe your instinctive reaction:</p><ol><li><strong>Do you wait for more instruction?</strong></li><li><strong>Do you jump into technical solutions immediately?</strong></li><li><strong>Or do you start uncovering what the request actually means?</strong></li></ol><p>A senior engineer takes path #3.</p><p>They define the objective before defining the implementation. They ask for data before proposing solutions. They clarify boundaries before writing code. This isn’t about being loud or assertive — it’s about being thoughtful.</p><h3>This Skill Is Trainable</h3><p>People sometimes assume that ambiguous problem-solving only comes with age or experience. But that’s not true.</p><p>Ambiguity reduction is a skill you can practice.</p><p>The next time you’re given a fuzzy task:</p><ul><li>Slow down</li><li>Ask clarifying questions</li><li>Document what you know and don’t know</li><li>Identify assumptions</li><li>Identify stakeholders</li><li>Break the unknown into smaller, testable questions</li></ul><p>Doing this consistently sharpens your thinking and makes you increasingly reliable — not because you know everything, but because you know how to <em>discover</em> what matters.</p><h3>The Modern Engineering World Makes This Skill Essential</h3><p>Today’s engineering environments are fast-changing:</p><ul><li>Priorities shift weekly</li><li>Teams depend on each other more</li><li>Product expectations evolve continuously</li><li>Systems grow in complexity</li><li>Requirements rarely arrive perfectly formed</li></ul><p>In this environment, the engineers who thrive are those who can take messy, evolving situations and make them understandable.</p><p>They reduce noise.<br>They simplify direction.<br>They provide stability.<br>They guide teams toward clarity.</p><p>That’s what makes them senior — not how long they’ve been coding.</p><h3>Final Thoughts: Seniority Is More About Mindset Than Mastery</h3><p>Being a senior engineer isn’t a reward for surviving in the industry for X years. It’s not about memorizing architectural patterns or mastering every framework.</p><p>Seniority is the ability to take something uncertain and turn it into something actionable.</p><p>A senior engineer creates clarity where there was none.</p><p>If you want to grow into that level, practice the muscle of reducing ambiguity. Engage with the parts of the problem that others overlook. Become the person who brings structure to chaos — and you will become indispensable.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=8e0bcfbbac91" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>