<?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:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd" xmlns:googleplay="http://www.google.com/schemas/play-podcasts/1.0"><channel><title><![CDATA[Codifying Intelligence]]></title><description><![CDATA[A system-level view of the AI transition: how agents, superintelligence, and new abstractions reshape work, capital, and decision-making. Clear models, practical frameworks, and sharp takes for builders and operators navigating what comes next.]]></description><link>https://codifyingintelligence.substack.com</link><image><url>https://substackcdn.com/image/fetch/$s_!ZRLT!,w_256,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F75852fd4-e6d9-4211-8789-1310dbca8416_608x608.png</url><title>Codifying Intelligence</title><link>https://codifyingintelligence.substack.com</link></image><generator>Substack</generator><lastBuildDate>Sat, 16 May 2026 15:41:32 GMT</lastBuildDate><atom:link href="https://codifyingintelligence.substack.com/feed" rel="self" type="application/rss+xml"/><copyright><![CDATA[Aaron Lee]]></copyright><language><![CDATA[en]]></language><webMaster><![CDATA[codifyingintelligence@substack.com]]></webMaster><itunes:owner><itunes:email><![CDATA[codifyingintelligence@substack.com]]></itunes:email><itunes:name><![CDATA[buooy]]></itunes:name></itunes:owner><itunes:author><![CDATA[buooy]]></itunes:author><googleplay:owner><![CDATA[codifyingintelligence@substack.com]]></googleplay:owner><googleplay:email><![CDATA[codifyingintelligence@substack.com]]></googleplay:email><googleplay:author><![CDATA[buooy]]></googleplay:author><itunes:block><![CDATA[Yes]]></itunes:block><item><title><![CDATA[The Elephant vs the Goldfish: Part 1]]></title><description><![CDATA[How AI agents manage short-term memory &#8212; and why most of them are quietly bad at it]]></description><link>https://codifyingintelligence.substack.com/p/the-elephant-vs-the-goldfish-part</link><guid isPermaLink="false">https://codifyingintelligence.substack.com/p/the-elephant-vs-the-goldfish-part</guid><dc:creator><![CDATA[buooy]]></dc:creator><pubDate>Sat, 16 May 2026 04:15:24 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!thOQ!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2d54279c-af9b-4713-af4d-b086ba587d6f_2816x1536.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<h2>Remember Everything Or Nothing At All</h2><p>The goldfish has a famously short memory. Whatever you said three seconds ago is gone, which is why goldfish make terrible therapists and worse coworkers.</p><p>The elephant has the opposite problem. It remembers everything. Every grudge, every wrong turn, every appointment you tried to cancel. Elephants would make excellent project managers if they didn't get so bogged down in the details that they never finished a thought.</p><p>Most production AI agents today are trying to find a balance between these two directions. The good ones have figured out the fine balance: <em>keeping just enough in their head, knowing what to write down on a sticky note, and knowing where the sticky note is when they need it.</em></p><p>This article is about how AI agents manage their short-term, in-context memory; the lifecycle that memory goes through; and the strategies developers use to keep that lifecycle from quietly going off the rails.</p><h2>More Context != Better Memory</h2><p>If you have been working with LLMs, you would realise that bigger context windows do not necessarily make your agents smarter. </p><p>Yet, they definitely make them </p><ol><li><p>more expensive (you pay per token);</p></li><li><p>slower (every token has to be processed); and</p></li><li><p>often<em>worse</em> at staying on task (confused) </p></li></ol><p>We call that <em>&#8220;Context Rot&#8221;.</em></p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!KuDD!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fed7da9b0-869b-4b06-997d-aa58ed9ac6da_500x260.gif" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!KuDD!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fed7da9b0-869b-4b06-997d-aa58ed9ac6da_500x260.gif 424w, https://substackcdn.com/image/fetch/$s_!KuDD!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fed7da9b0-869b-4b06-997d-aa58ed9ac6da_500x260.gif 848w, https://substackcdn.com/image/fetch/$s_!KuDD!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fed7da9b0-869b-4b06-997d-aa58ed9ac6da_500x260.gif 1272w, https://substackcdn.com/image/fetch/$s_!KuDD!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fed7da9b0-869b-4b06-997d-aa58ed9ac6da_500x260.gif 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!KuDD!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fed7da9b0-869b-4b06-997d-aa58ed9ac6da_500x260.gif" width="500" height="260" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/ed7da9b0-869b-4b06-997d-aa58ed9ac6da_500x260.gif&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:260,&quot;width&quot;:500,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:662834,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/gif&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://codifyingintelligence.substack.com/i/197840247?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fed7da9b0-869b-4b06-997d-aa58ed9ac6da_500x260.gif&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!KuDD!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fed7da9b0-869b-4b06-997d-aa58ed9ac6da_500x260.gif 424w, https://substackcdn.com/image/fetch/$s_!KuDD!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fed7da9b0-869b-4b06-997d-aa58ed9ac6da_500x260.gif 848w, https://substackcdn.com/image/fetch/$s_!KuDD!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fed7da9b0-869b-4b06-997d-aa58ed9ac6da_500x260.gif 1272w, https://substackcdn.com/image/fetch/$s_!KuDD!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fed7da9b0-869b-4b06-997d-aa58ed9ac6da_500x260.gif 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>When you stuff a model's working memory full of stuff, its ability to actually pay attention to the right thing degrades. Important instructions buried near the top get ignored. Tool outputs from thirty steps ago start polluting current reasoning. The agent confidently uses a fact that was true in turn four but has since been overridden in turn twenty.</p><div class="pullquote"><p>Short term memory management is not just an engineering problem; <strong>it is a user experience issue</strong>. It protects the attention surface area for your users.</p></div><h2>Short Term Memory</h2><p>In most modern AI systems, it is the contents of the context window at any given moment: the chunk of text the model is reading when it produces its next response.</p><p>This is what the agent is seeing at this moment, and it&#8217;s going to change soon after this session.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!81hO!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4c059cc4-534d-474c-9253-772360ea59f3_500x500.gif" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!81hO!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4c059cc4-534d-474c-9253-772360ea59f3_500x500.gif 424w, https://substackcdn.com/image/fetch/$s_!81hO!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4c059cc4-534d-474c-9253-772360ea59f3_500x500.gif 848w, https://substackcdn.com/image/fetch/$s_!81hO!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4c059cc4-534d-474c-9253-772360ea59f3_500x500.gif 1272w, https://substackcdn.com/image/fetch/$s_!81hO!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4c059cc4-534d-474c-9253-772360ea59f3_500x500.gif 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!81hO!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4c059cc4-534d-474c-9253-772360ea59f3_500x500.gif" width="500" height="500" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/4c059cc4-534d-474c-9253-772360ea59f3_500x500.gif&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:500,&quot;width&quot;:500,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:2278807,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/gif&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://codifyingintelligence.substack.com/i/197840247?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4c059cc4-534d-474c-9253-772360ea59f3_500x500.gif&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!81hO!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4c059cc4-534d-474c-9253-772360ea59f3_500x500.gif 424w, https://substackcdn.com/image/fetch/$s_!81hO!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4c059cc4-534d-474c-9253-772360ea59f3_500x500.gif 848w, https://substackcdn.com/image/fetch/$s_!81hO!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4c059cc4-534d-474c-9253-772360ea59f3_500x500.gif 1272w, https://substackcdn.com/image/fetch/$s_!81hO!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4c059cc4-534d-474c-9253-772360ea59f3_500x500.gif 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>Inside that window, several different kinds of information are competing for space:</p><ol><li><p><strong>System prompt</strong>: which contains the agent's instructions and personality &#8212; usually fixed, usually at the top</p></li><li><p><strong>User's messages</strong>: which is what the human has been asking for</p></li><li><p><strong>Agent&#8217;s reasoning</strong>: the internal thoughts, scratchpads, plans, and decisions. </p></li><li><p><strong>Skills</strong>: modular, reusable capabilities that the agent can use</p></li><li><p><strong>Tool calls and results</strong>: every time the agent looked something up, ran code, or read a file, both the request and the (often very large) response are sitting there</p></li><li><p><strong>Retrieved content</strong>: documents, search results, anything pulled in from outside.</p></li></ol><p>This information ages or degrades differently over time. A tool result from fifteen steps ago is possibly safe to forget, but the user's goal thirty steps ago is always relevant.</p><p>Treating this information as a layered system, with different rules for different layers, is the beginning of doing it well.</p><div><hr></div><h2>The Short-Term Memory (STM) Lifecycle</h2><p>I&#8217;m not sure if there is an existing lifecycle to capture memory ingestion and usage, but I like to think of it in these stages.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!thOQ!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2d54279c-af9b-4713-af4d-b086ba587d6f_2816x1536.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!thOQ!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2d54279c-af9b-4713-af4d-b086ba587d6f_2816x1536.png 424w, https://substackcdn.com/image/fetch/$s_!thOQ!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2d54279c-af9b-4713-af4d-b086ba587d6f_2816x1536.png 848w, https://substackcdn.com/image/fetch/$s_!thOQ!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2d54279c-af9b-4713-af4d-b086ba587d6f_2816x1536.png 1272w, https://substackcdn.com/image/fetch/$s_!thOQ!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2d54279c-af9b-4713-af4d-b086ba587d6f_2816x1536.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!thOQ!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2d54279c-af9b-4713-af4d-b086ba587d6f_2816x1536.png" width="1456" height="794" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/2d54279c-af9b-4713-af4d-b086ba587d6f_2816x1536.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:794,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:6008543,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://codifyingintelligence.substack.com/i/197840247?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2d54279c-af9b-4713-af4d-b086ba587d6f_2816x1536.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!thOQ!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2d54279c-af9b-4713-af4d-b086ba587d6f_2816x1536.png 424w, https://substackcdn.com/image/fetch/$s_!thOQ!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2d54279c-af9b-4713-af4d-b086ba587d6f_2816x1536.png 848w, https://substackcdn.com/image/fetch/$s_!thOQ!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2d54279c-af9b-4713-af4d-b086ba587d6f_2816x1536.png 1272w, https://substackcdn.com/image/fetch/$s_!thOQ!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2d54279c-af9b-4713-af4d-b086ba587d6f_2816x1536.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p></p><h3>Stage 1: Capture</h3><p>A user types a message. A tool returns a result. A web page gets fetched. The information recently moves into the context of the agent.</p><p>At this stage, your agent&#8217;s STM grows. The worry at this stage is <em><strong>indiscriminate slurping:</strong></em> the agent grabs everything it can and figures it will sort things out later.</p><p>While newer models purportedly support 1M token context, you still expose your agent to the potential of context rot, and you are definitely increasing the time and cost of processing a huge context.</p><h3>Stage 2: Active Use</h3><p>In this phase, the information lives within the agent&#8217;s STM and is actively being used by the model. While recency of information tends to play a significant role in the model&#8217;s perspective of it&#8217;s revelance, old, irrelevant or conflicting information may cause models to drift.</p><p>This is where you can have information that is <em>present but invisible</em>. The agent has it. The agent could be using it, could be hallucinating with it, or could be ignoring it completely.</p><p>The failure mode here is assuming the model sees what is in front of it. It often does not, especially when the window is crowded.<br><br>This is why the advice is to frequently start a new session on ChatGPT or to reset your session.</p><h3>Stage 3: Aging (or Ageing - iykyk)</h3><p>As new information come in, older content drifts further from the current focus. Nothing has been removed yet, but the older stuff is getting elbowed out of effective attention, even as it continues to cost tokens.</p><p>For example, you started searching for coffee places in your area in turn one. By turn ten, you pivoted to looking for the best bars in town, but your agent is searching for places that sells both coffee and Margaritas.</p><p>Effectively, information decays across different dimensions (including time). And this leads to the next stage.</p><h3>Stage 4: Triage</h3><p>This is the moment of decision. At some trigger e.g hitting a context limit, finishing a subtask, predeteremined number of message, the system has to decide what to do with the accumulated information. </p><p>There are basically four options:</p><ol><li><p><strong>Do Nothing</strong> - pay the tokens and hope for the best. Eventually you hit the model&#8217;s token limits and you have to restart a new session.</p></li><li><p><strong>Compress</strong> - summarise, abstract, condense</p></li><li><p><strong>Truncate</strong> - ditch/drop it permanently. Flush it, goodbye forever.</p></li><li><p><strong>Externalise</strong> - write it down somewhere outside the context window e.g a file, a note, a database. It can be referenced later without being carried. This would constitute Long Term Memory (LTM) which we will talk about in a separate post.</p></li></ol><h3>Stage 5: Transformation</h3><p>If the agent chose "compress" or "externalise," the information now needs to be reshaped. A long exchange becomes a paragraph. Pull only relevant rows from a spreadsheet. A messy debugging session becomes "fixed <em>why not working</em> bug in line 47."</p><p>This stage is lossy, and the hard question is what to preserve and what to throw out. A good summary keeps goals, decisions, and open questions. A bad summary keeps surface details and loses the structure.</p><p>The worry is that the summaries quietly invent details or drop the one constraint that mattered. For example, "The user wants a blue button" gets compressed to "the user wants a button" and now you are shipping the wrong colored button.</p><h3>Stage 6: Consolidation</h3><p>The information has been triaged and transformed, and now there&#8217;s one last decision: does it leave the agent&#8217;s working memory for good? </p><p>In this stage, it either gets written into a persistent store where future sessions can find it, or it slips away as the context window rolls forward, and disappears or gets further transformed..</p><p>In humans, the psychological term for this is <em>consolidation</em>: the process by which short-term memories get stabilized and transferred into long-term memory.</p><div><hr></div><h2>STM Management Strategies</h2><p>Now that we know the lifecycle, how do we manage memory as it grows?</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!PRck!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Faf627ff2-ed05-48ec-baf0-cf77aec84155_480x480.gif" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!PRck!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Faf627ff2-ed05-48ec-baf0-cf77aec84155_480x480.gif 424w, https://substackcdn.com/image/fetch/$s_!PRck!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Faf627ff2-ed05-48ec-baf0-cf77aec84155_480x480.gif 848w, https://substackcdn.com/image/fetch/$s_!PRck!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Faf627ff2-ed05-48ec-baf0-cf77aec84155_480x480.gif 1272w, https://substackcdn.com/image/fetch/$s_!PRck!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Faf627ff2-ed05-48ec-baf0-cf77aec84155_480x480.gif 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!PRck!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Faf627ff2-ed05-48ec-baf0-cf77aec84155_480x480.gif" width="480" height="480" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/af627ff2-ed05-48ec-baf0-cf77aec84155_480x480.gif&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:480,&quot;width&quot;:480,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:1371070,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/gif&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://codifyingintelligence.substack.com/i/197840247?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Faf627ff2-ed05-48ec-baf0-cf77aec84155_480x480.gif&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!PRck!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Faf627ff2-ed05-48ec-baf0-cf77aec84155_480x480.gif 424w, https://substackcdn.com/image/fetch/$s_!PRck!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Faf627ff2-ed05-48ec-baf0-cf77aec84155_480x480.gif 848w, https://substackcdn.com/image/fetch/$s_!PRck!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Faf627ff2-ed05-48ec-baf0-cf77aec84155_480x480.gif 1272w, https://substackcdn.com/image/fetch/$s_!PRck!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Faf627ff2-ed05-48ec-baf0-cf77aec84155_480x480.gif 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p><strong>Truncation, or sliding window.</strong> No transformation, no retrieval. Drop the oldest stuff when the window gets full. </p><p><strong>Summarisation.</strong> Take a chunk of older history, replace it with a summary. This is what tools like Claude Code do when they "auto-compact." Good when you need continuity but do not need verbatim history.</p><p><strong>Selective retention.</strong> Keep certain <em>kinds</em> of items e.g. user messages, final answers, key decisions, and drop others, like intermediate tool results and internal reasoning. Especially valuable when tool outputs are eating most of your tokens.</p><p><strong>Externalisation.</strong> The agent writes a note, updates a todo list, saves a file. Similar to what Openclaw and Hermes does. The information is gone from active memory, but recoverable. This is the strategy most associated with "real" agentic systems, because it is the only one that scales past the context window's hard limit.</p><p><strong>Sub-agent delegation.</strong> Spawn a child agent for a subtask with its own clean context. When it is done, get back a summary. The lifecycle is essentially outsourced. One challenge though is that the child agent may not have the right set of context to execute it&#8217;s task properly to begin with. And the parent agent has no insights into how the child executes it&#8217;s task.</p><h2>How to Choose</h2><p>This is the question everyone actually wants answered, and honestly, it depends on what is filling up your context and what kind of task you are trying to do.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!hXgZ!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6b019faf-644f-4af1-a417-5d6ec349a5f4_480x480.gif" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!hXgZ!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6b019faf-644f-4af1-a417-5d6ec349a5f4_480x480.gif 424w, https://substackcdn.com/image/fetch/$s_!hXgZ!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6b019faf-644f-4af1-a417-5d6ec349a5f4_480x480.gif 848w, https://substackcdn.com/image/fetch/$s_!hXgZ!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6b019faf-644f-4af1-a417-5d6ec349a5f4_480x480.gif 1272w, https://substackcdn.com/image/fetch/$s_!hXgZ!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6b019faf-644f-4af1-a417-5d6ec349a5f4_480x480.gif 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!hXgZ!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6b019faf-644f-4af1-a417-5d6ec349a5f4_480x480.gif" width="480" height="480" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/6b019faf-644f-4af1-a417-5d6ec349a5f4_480x480.gif&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:480,&quot;width&quot;:480,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:1598211,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/gif&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://codifyingintelligence.substack.com/i/197840247?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6b019faf-644f-4af1-a417-5d6ec349a5f4_480x480.gif&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!hXgZ!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6b019faf-644f-4af1-a417-5d6ec349a5f4_480x480.gif 424w, https://substackcdn.com/image/fetch/$s_!hXgZ!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6b019faf-644f-4af1-a417-5d6ec349a5f4_480x480.gif 848w, https://substackcdn.com/image/fetch/$s_!hXgZ!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6b019faf-644f-4af1-a417-5d6ec349a5f4_480x480.gif 1272w, https://substackcdn.com/image/fetch/$s_!hXgZ!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6b019faf-644f-4af1-a417-5d6ec349a5f4_480x480.gif 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p><strong>Start by asking what your bottleneck actually is</strong>. Most agents that struggle with memory are struggling because of <em>one specific thing</em> clogging the window; and the right strategy is determined by which thing.</p><p>If tool outputs are eating your context: you are doing lots of searches, file reads, database queries, the move is <strong>selective retention + externalisation</strong>. Do not carry the full results forward; extract what mattered, save the rest somewhere retrievable.</p><p>If the conversation is very long: lots of back-and-forth with the user, lots of reasoning, <strong>summarisation</strong> is your friend. Compress older turns into a running summary, ditch the &#8220;tell me a joke&#8221; messages, and keep recent turns verbatim.</p><p>If your task has clear subtasks e.g."research these five companies, then write a memo": <strong>sub-agent delegation</strong> is better than trying to do it all in one context. Each subtask gets its own clean working memory; the parent gets a clean summary.</p><p>If your information needs to persist beyond this session, you have crossed into long-term memory territory: <strong>externalisation</strong> is the bridge. The things the agent writes down during a session become the things your long-term memory layer can index later. You probably need to store your conversational state somewhere too.</p><p>The big question, at the end, is: <em><strong>do i need to recover the dropped information in future?</strong></em> </p><p>If yes, you can be aggressive about triage, externalising and consolidating information. If not, you have to be careful, because anything you drop is gone for good.</p><p>There is no universal right answer. There is a right answer <em>for this agent, doing this kind of task, with this cost profile, and this retrieval infrastructure</em>. </p><div class="pullquote"><p>The job in designing the system is to identify which of those constraints is dominant and pick the strategy that addresses it. </p></div><h2>Looking Ahead</h2><p>Short-term memory is only half of the picture. An agent that triages well within a single conversation is still a goldfish across conversations.</p><p>Part 2 is about the elephant side: how agents build, organise, and use long-term memory that survives between sessions, the moments where the agent stops trying to remember and starts deliberately writing things down. That is where short memory ends and the real architecture begins.</p><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://codifyingintelligence.substack.com/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe&quot;,&quot;language&quot;:&quot;en&quot;}" data-component-name="SubscribeWidgetToDOM"><div class="subscription-widget show-subscribe"><div class="preamble"><p class="cta-caption">Follow for Part 2</p></div><form class="subscription-widget-subscribe"><input type="email" class="email-input" name="email" placeholder="Type your email&#8230;" tabindex="-1"><input type="submit" class="button primary" value="Subscribe"><div class="fake-input-wrapper"><div class="fake-input"></div><div class="fake-button"></div></div></form></div></div><p></p>]]></content:encoded></item><item><title><![CDATA[Why You Can Remember Pythagoras' Theorem, But Not What Your Wife Said Yesterday]]></title><description><![CDATA[Memory Engineering, Part 1 &#8212; Building Another You]]></description><link>https://codifyingintelligence.substack.com/p/why-you-can-remember-pythagoras-theorem</link><guid isPermaLink="false">https://codifyingintelligence.substack.com/p/why-you-can-remember-pythagoras-theorem</guid><dc:creator><![CDATA[buooy]]></dc:creator><pubDate>Mon, 11 May 2026 09:42:19 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!hvhO!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1530f969-17bf-40b6-8ced-8102134c237f_1200x627.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!hvhO!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1530f969-17bf-40b6-8ced-8102134c237f_1200x627.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!hvhO!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1530f969-17bf-40b6-8ced-8102134c237f_1200x627.png 424w, https://substackcdn.com/image/fetch/$s_!hvhO!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1530f969-17bf-40b6-8ced-8102134c237f_1200x627.png 848w, https://substackcdn.com/image/fetch/$s_!hvhO!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1530f969-17bf-40b6-8ced-8102134c237f_1200x627.png 1272w, https://substackcdn.com/image/fetch/$s_!hvhO!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1530f969-17bf-40b6-8ced-8102134c237f_1200x627.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!hvhO!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1530f969-17bf-40b6-8ced-8102134c237f_1200x627.png" width="1200" height="627" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/1530f969-17bf-40b6-8ced-8102134c237f_1200x627.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:627,&quot;width&quot;:1200,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:327169,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:&quot;https://codifyingintelligence.substack.com/i/197190753?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1530f969-17bf-40b6-8ced-8102134c237f_1200x627.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!hvhO!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1530f969-17bf-40b6-8ced-8102134c237f_1200x627.png 424w, https://substackcdn.com/image/fetch/$s_!hvhO!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1530f969-17bf-40b6-8ced-8102134c237f_1200x627.png 848w, https://substackcdn.com/image/fetch/$s_!hvhO!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1530f969-17bf-40b6-8ced-8102134c237f_1200x627.png 1272w, https://substackcdn.com/image/fetch/$s_!hvhO!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1530f969-17bf-40b6-8ced-8102134c237f_1200x627.png 1456w" sizes="100vw" fetchpriority="high"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>A&#178; + B&#178; = C&#178;.</p><p>You learned that when you were twelve. It's been roughly two decades since you've calculated the hypotenuse of anything in real life. And yet, if I asked you to recite Pythagoras' Theorem right now, you could.</p><p>Now: what did your wife tell you to pick up from the supermarket on the way home yesterday?</p><p>&#8230;</p><p>If you confidently said "milk," I admire the optimism. If you went quiet and stared at the ceiling for a moment, I think our wives can be good friends.</p><p>This is the first post of a series I'm writing about <strong>agent engineering</strong> &#8212; the discipline of building AI systems that can reason, remember, and act on your behalf. The pitch I'm going to make across the whole series is almost embarrassingly simple:</p><div class="callout-block" data-callout="true"><p>The easiest way to understand how to build an agent is to think about how you'd build <em>another version of yourself</em>.</p></div><p>I&#8217;m going to start with what I&#8217;m personally weakest at: <em><strong>memory</strong></em>. Specifically, why my brain refuses to let go of Pythagoras but happily loses track of "milk and eggs, please."</p><h2>A 60-year-old model still does most of the work</h2><p>In 1968, two psychologists named Richard Atkinson and Richard Shiffrin proposed what became the foundational model of human memory: The human memory is not a single entity, but made of at least two things, working in concert.</p><p>There's <strong>short-term memory</strong>: the stuff you're holding in your head right now, this second. The number you're about to dial. The point you're trying to make at the end of the sentence you're currently in the middle of. The grocery list your wife just sent you out for.</p><p>And there's <strong>long-term memory</strong>: the stuff that's been filed away. Pythagoras. Your mother's birthday. How to ride a bike. The smell of your grandmother's kitchen.</p><p>Most things you experience pass through short-term memory and get forgotten. A small fraction gets stashed into long-term memory and sticks around for years. Sometimes decades.</p><p>This is, more or less, the same architecture an AI agent has. </p><h2>Short-term memory: the kitchen table</h2><p>Imagine your short-term memory as a small kitchen table. You can put things on it, move them around, and work with them. But the table is <em>small</em>. And every time you put something new on it, something else falls off the edge.</p><p>Your agent has a kitchen table too. We just call it a <em><strong>context window</strong></em>.</p><p>In practice, agents juggle three different kinds of things on that kitchen table. They look different in the code, but they're all the same flavour of memory.</p><h3>1. The scratchpad</h3><p>Your wife sends you to the supermarket. You do the responsible-husband thing and write it down: <em>milk, if there are eggs, buy a dozen.</em></p><p>That piece of paper is a scratchpad. It's a temporary working system that exists to help you finish exactly one task (although context switching allows you to have more than one scratchpad running at the same time).</p><div id="youtube2-LIDYRWHa6T0" class="youtube-wrap" data-attrs="{&quot;videoId&quot;:&quot;LIDYRWHa6T0&quot;,&quot;startTime&quot;:null,&quot;endTime&quot;:null}" data-component-name="Youtube2ToDOM"><div class="youtube-inner"><iframe src="https://www.youtube-nocookie.com/embed/LIDYRWHa6T0?rel=0&amp;autoplay=0&amp;showinfo=0&amp;enablejsapi=0" frameborder="0" loading="lazy" gesture="media" allow="autoplay; fullscreen" allowautoplay="true" allowfullscreen="true" width="728" height="409"></iframe></div></div><p>Agents do exactly this. When they're working on a problem, they write things down. Their inner thoughts, intermediate plans, todo list. The scratchpad helps the agent reason without having to hold everything in its head at once. When the task is done, the scratchpad is thrown away.</p><h3>2. The conversational history</h3><p>You and your wife have a Telegram channel. There are, conservatively, fourteen thousand messages in it. She sent you a message yesterday afternoon that contained important information about Sunday's plans.</p><div class="callout-block" data-callout="true"><p>Quick Test: Without referring to your phone, tell me what it is?</p></div><p>You <em>could</em> remember. The information is right there, in the channel. You'd just need to scroll up. But it's not in your head, because the channel is long and your kitchen table is small. So you live with the trade-off: you have a complete record, but only the last few messages (hopefully) are actually residing in your mind.</p><p>Agents have the same problem. The "conversation history" is the running transcript of what you and the agent have said to each other. However, these context windows have limits. When the conversation gets too long, older messages have to be:</p><ul><li><p>dropped</p></li><li><p>summarised; or</p></li><li><p> stashed somewhere else.</p></li></ul><p>The kitchen table isn't bigger; it just <em>seems</em> bigger because we're getting cleverer about what we put on it.</p><h3>3. Semantic caching</h3><p>This one's subtler. You're at work. You pull up an email about the Q3 budget. You read it. A colleague then walks over and asks you a question about the budget.</p><p>You don't pull the email up again.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!E9UX!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F70b6dc84-24a8-49f5-b361-61dc47976421_480x358.webp" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!E9UX!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F70b6dc84-24a8-49f5-b361-61dc47976421_480x358.webp 424w, https://substackcdn.com/image/fetch/$s_!E9UX!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F70b6dc84-24a8-49f5-b361-61dc47976421_480x358.webp 848w, https://substackcdn.com/image/fetch/$s_!E9UX!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F70b6dc84-24a8-49f5-b361-61dc47976421_480x358.webp 1272w, https://substackcdn.com/image/fetch/$s_!E9UX!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F70b6dc84-24a8-49f5-b361-61dc47976421_480x358.webp 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!E9UX!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F70b6dc84-24a8-49f5-b361-61dc47976421_480x358.webp" width="480" height="358" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/70b6dc84-24a8-49f5-b361-61dc47976421_480x358.webp&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:358,&quot;width&quot;:480,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:1417746,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/webp&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://codifyingintelligence.substack.com/i/197190753?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F70b6dc84-24a8-49f5-b361-61dc47976421_480x358.webp&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!E9UX!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F70b6dc84-24a8-49f5-b361-61dc47976421_480x358.webp 424w, https://substackcdn.com/image/fetch/$s_!E9UX!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F70b6dc84-24a8-49f5-b361-61dc47976421_480x358.webp 848w, https://substackcdn.com/image/fetch/$s_!E9UX!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F70b6dc84-24a8-49f5-b361-61dc47976421_480x358.webp 1272w, https://substackcdn.com/image/fetch/$s_!E9UX!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F70b6dc84-24a8-49f5-b361-61dc47976421_480x358.webp 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p></p><p>Instead, you reach into your short-term memory and answer from the impression you have. In this case, you are retrieving the <em>context</em> you derived from the document a moment ago.</p><p>That's semantic caching.</p><p>Likewise, for an agent, instead of re-fetching and re-parsing the same document seven times in a single conversation, the agent stashes a compressed, queryable representation of what it learned. The next time someone asks about the doc, the agent answers from that cached understanding. Faster, cheaper, but occasionally wrong because the impression has drifted from the source.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!V-Qa!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa895d0db-7d58-4dc2-a472-80b1cfa6e451_1456x820.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!V-Qa!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa895d0db-7d58-4dc2-a472-80b1cfa6e451_1456x820.png 424w, https://substackcdn.com/image/fetch/$s_!V-Qa!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa895d0db-7d58-4dc2-a472-80b1cfa6e451_1456x820.png 848w, https://substackcdn.com/image/fetch/$s_!V-Qa!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa895d0db-7d58-4dc2-a472-80b1cfa6e451_1456x820.png 1272w, https://substackcdn.com/image/fetch/$s_!V-Qa!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa895d0db-7d58-4dc2-a472-80b1cfa6e451_1456x820.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!V-Qa!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa895d0db-7d58-4dc2-a472-80b1cfa6e451_1456x820.png" width="1456" height="820" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/a895d0db-7d58-4dc2-a472-80b1cfa6e451_1456x820.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:820,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:62409,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://codifyingintelligence.substack.com/i/197190753?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa895d0db-7d58-4dc2-a472-80b1cfa6e451_1456x820.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!V-Qa!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa895d0db-7d58-4dc2-a472-80b1cfa6e451_1456x820.png 424w, https://substackcdn.com/image/fetch/$s_!V-Qa!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa895d0db-7d58-4dc2-a472-80b1cfa6e451_1456x820.png 848w, https://substackcdn.com/image/fetch/$s_!V-Qa!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa895d0db-7d58-4dc2-a472-80b1cfa6e451_1456x820.png 1272w, https://substackcdn.com/image/fetch/$s_!V-Qa!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa895d0db-7d58-4dc2-a472-80b1cfa6e451_1456x820.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p></p><p>That's short-term memory, in three flavours. Now for the part where you stop being a goldfish.</p><h2>Long-term memory: where you live</h2><p>In 1972, Canadian psychologist Endel Tulving, looked at long-term memory and said: <em>this isn't one thing either</em>.</p><p>Tulving carved long-term memory into three buckets.</p><h3>Episodic memory: things that happened to you</h3><p>Episodic memories are <em>experiences</em>. They have a time stamp, even if a fuzzy one. Your first kiss. The morning your daughter was born. That Valentine&#8217;s last year that ended at the food court, because you forgot to book a restaurant.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!ioJ0!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff93220b7-35c4-43fa-bf44-8ca4f8f61246_480x263.gif" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!ioJ0!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff93220b7-35c4-43fa-bf44-8ca4f8f61246_480x263.gif 424w, https://substackcdn.com/image/fetch/$s_!ioJ0!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff93220b7-35c4-43fa-bf44-8ca4f8f61246_480x263.gif 848w, https://substackcdn.com/image/fetch/$s_!ioJ0!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff93220b7-35c4-43fa-bf44-8ca4f8f61246_480x263.gif 1272w, https://substackcdn.com/image/fetch/$s_!ioJ0!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff93220b7-35c4-43fa-bf44-8ca4f8f61246_480x263.gif 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!ioJ0!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff93220b7-35c4-43fa-bf44-8ca4f8f61246_480x263.gif" width="480" height="263" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/f93220b7-35c4-43fa-bf44-8ca4f8f61246_480x263.gif&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:263,&quot;width&quot;:480,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:3957550,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/gif&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://codifyingintelligence.substack.com/i/197190753?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff93220b7-35c4-43fa-bf44-8ca4f8f61246_480x263.gif&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!ioJ0!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff93220b7-35c4-43fa-bf44-8ca4f8f61246_480x263.gif 424w, https://substackcdn.com/image/fetch/$s_!ioJ0!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff93220b7-35c4-43fa-bf44-8ca4f8f61246_480x263.gif 848w, https://substackcdn.com/image/fetch/$s_!ioJ0!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff93220b7-35c4-43fa-bf44-8ca4f8f61246_480x263.gif 1272w, https://substackcdn.com/image/fetch/$s_!ioJ0!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff93220b7-35c4-43fa-bf44-8ca4f8f61246_480x263.gif 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p></p><p>Episodic memory is what makes you feel like a continuous person. You are a story, told to yourself in a loose chronological order, with you as the protagonist (or antagonist).</p><p>For an agent, episodic memory is the log of <em>interactions</em>:</p><ul><li><p>The meeting it scheduled for last Tuesday;</p></li><li><p>The email it drafted on your behalf last month;</p></li><li><p>The customer it helped two weeks ago. </p></li></ul><p>Each entry is a little time-stamped story: <em>on this date, in this conversation, this is what I did and what happened next. </em>Without episodic memory, an agent has no continuity.</p><h3>Semantic memory: things that are true</h3><p>Semantic memory is <em><a href="https://en.wikipedia.org/wiki/Post-truth">facts</a></em>. You don't remember when or where you learned that Paris is the capital of France, but you do remember it.</p><div id="youtube2-doFTuSWo7rE" class="youtube-wrap" data-attrs="{&quot;videoId&quot;:&quot;doFTuSWo7rE&quot;,&quot;startTime&quot;:null,&quot;endTime&quot;:null}" data-component-name="Youtube2ToDOM"><div class="youtube-inner"><iframe src="https://www.youtube-nocookie.com/embed/doFTuSWo7rE?rel=0&amp;autoplay=0&amp;showinfo=0&amp;enablejsapi=0" frameborder="0" loading="lazy" gesture="media" allow="autoplay; fullscreen" allowautoplay="true" allowfullscreen="true" width="728" height="409"></iframe></div></div><p>Here's the interesting bit: some facts decay. Or rather, <em>the truth they describe</em> decays.</p><p>Your wife's nails were red last July. Then she had a manicure. Then they were brown. Then, for some reason, red again, and then in October, she went through that nail-art phase no one talks about anymore. </p><p>The fact "my wife's nails are red" was true on July 14th. It was untrue on August 3rd. It was true again on September 2nd. It is now mid-November, and you do not, in fact, know what colour her nails are at this exact moment.</p><p>Semantic memory in agents needs the same property: facts deserve a <strong>"valid from"</strong> and <strong>"valid to"</strong>. A naive agent that learns "the user's nails are red" and stores that fact forever could be wrong roughly six weeks later. A smart one stores something closer to:</p><blockquote><p><code>user&#8217;s nail colour is red <br>valid from: 2025-07-14<br>valid to: 2025-08-01</code></p></blockquote><p>More specifically, we refer to these as <a href="https://arxiv.org/abs/2601.07468">Temporal Semantic Memory</a> or<a href="https://arxiv.org/abs/2601.07468"> Temporal Hierarchical Memory</a>. More of that in the future!</p><h3>Procedural memory: things you know how to do</h3><p>To a human, procedural memory is your <em>skills</em>. How to ride a bike. How to drive. How to navigate your local supermarket without consulting the floor plan. How to cook the four meals you've been on rotation for the last year.</p><div class="captioned-image-container"><figure><a class="image-link image2" target="_blank" href="https://substackcdn.com/image/fetch/$s_!i-B0!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F97f40682-9bcf-446f-9f9c-c7e8c3970a56_264x237.gif" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!i-B0!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F97f40682-9bcf-446f-9f9c-c7e8c3970a56_264x237.gif 424w, https://substackcdn.com/image/fetch/$s_!i-B0!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F97f40682-9bcf-446f-9f9c-c7e8c3970a56_264x237.gif 848w, https://substackcdn.com/image/fetch/$s_!i-B0!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F97f40682-9bcf-446f-9f9c-c7e8c3970a56_264x237.gif 1272w, https://substackcdn.com/image/fetch/$s_!i-B0!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F97f40682-9bcf-446f-9f9c-c7e8c3970a56_264x237.gif 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!i-B0!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F97f40682-9bcf-446f-9f9c-c7e8c3970a56_264x237.gif" width="320" height="287.2727272727273" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/97f40682-9bcf-446f-9f9c-c7e8c3970a56_264x237.gif&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:237,&quot;width&quot;:264,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:1043536,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/gif&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://codifyingintelligence.substack.com/i/197190753?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F97f40682-9bcf-446f-9f9c-c7e8c3970a56_264x237.gif&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!i-B0!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F97f40682-9bcf-446f-9f9c-c7e8c3970a56_264x237.gif 424w, https://substackcdn.com/image/fetch/$s_!i-B0!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F97f40682-9bcf-446f-9f9c-c7e8c3970a56_264x237.gif 848w, https://substackcdn.com/image/fetch/$s_!i-B0!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F97f40682-9bcf-446f-9f9c-c7e8c3970a56_264x237.gif 1272w, https://substackcdn.com/image/fetch/$s_!i-B0!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F97f40682-9bcf-446f-9f9c-c7e8c3970a56_264x237.gif 1456w" sizes="100vw" loading="lazy"></picture><div></div></div></a></figure></div><p>You can&#8217;t easily explain procedural memory. You can't write down "how to ride a bike" in a way that would let someone who's never ridden one actually do it. You can demonstrate, hint, correct, but the skill itself lives somewhere wordless.</p><p>For an agent, procedural memory is <em>workflows</em>. The repeatable sequence of steps that gets a particular outcome. <em>To onboard a new customer, do A, then B, then check C, then if D, escalate.</em> These are the recipes the agent reaches for when it recognises a familiar situation.</p><p>Procedural memory is what turns a competent agent into a <em>fluent</em> one. The agent that knows the steps doesn't have to figure them out from first principles every single time.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!Fnjh!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd7e4c6d1-eee5-4384-8719-736eacce4ecc_1456x820.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!Fnjh!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd7e4c6d1-eee5-4384-8719-736eacce4ecc_1456x820.png 424w, https://substackcdn.com/image/fetch/$s_!Fnjh!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd7e4c6d1-eee5-4384-8719-736eacce4ecc_1456x820.png 848w, https://substackcdn.com/image/fetch/$s_!Fnjh!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd7e4c6d1-eee5-4384-8719-736eacce4ecc_1456x820.png 1272w, https://substackcdn.com/image/fetch/$s_!Fnjh!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd7e4c6d1-eee5-4384-8719-736eacce4ecc_1456x820.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!Fnjh!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd7e4c6d1-eee5-4384-8719-736eacce4ecc_1456x820.png" width="1456" height="820" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/d7e4c6d1-eee5-4384-8719-736eacce4ecc_1456x820.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:820,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:60231,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://codifyingintelligence.substack.com/i/197190753?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd7e4c6d1-eee5-4384-8719-736eacce4ecc_1456x820.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!Fnjh!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd7e4c6d1-eee5-4384-8719-736eacce4ecc_1456x820.png 424w, https://substackcdn.com/image/fetch/$s_!Fnjh!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd7e4c6d1-eee5-4384-8719-736eacce4ecc_1456x820.png 848w, https://substackcdn.com/image/fetch/$s_!Fnjh!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd7e4c6d1-eee5-4384-8719-736eacce4ecc_1456x820.png 1272w, https://substackcdn.com/image/fetch/$s_!Fnjh!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd7e4c6d1-eee5-4384-8719-736eacce4ecc_1456x820.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p></p><h2>So why does Pythagoras stick and the grocery list doesn't?</h2><p>Because Pythagoras lives in your <strong>semantic</strong> long-term memory. He's been rehearsed thousands of times with every triangle, every right-angle in your geometry homework.</p><p>The grocery list, on the other hand, lived briefly on your kitchen table and was never promoted. Why would it be? Tomorrow's list will be different. Storing it long-term would be a waste of biological storage. So your brain, ever the efficient little organ, lets it slip off the edge.</p><p>Agents face the same decision a million times a day: <em>should I remember this, and for how long?</em> Get that decision wrong in one direction, and the agent is a goldfish. Get it wrong in the other, and the agent is a stalker who knows what your nails looked like two summers ago.</p><p>There's an art to it. There's also, increasingly, an engineering discipline to it. That's what this series is about.</p><h2>What's next</h2><p>We've now mapped the territory: short-term memory in three flavours (scratchpad, conversational history, semantic cache) and long-term memory in three more (episodic, semantic, procedural). All informally called "memory" by the engineers building today's agents.</p><p>Over the next few posts, we're going to walk through each of these and look at how they're actually implemented. How does an agent decide what to keep on the kitchen table and what to file away? How does it find a memory when it needs one? How does it forget?</p><p>Next post: <strong>The Elephant vs the Goldfish.</strong> We zoom in on short-term memory &#8212; and the surprising fact that most agents today are goldfish, and that's often the right design call. Follow for more</p>]]></content:encoded></item><item><title><![CDATA[Why a Bigger Context Window Didn't Save You]]></title><description><![CDATA[Long-context models were supposed to make retrieval obsolete. They didn't. Why context engineering is the discipline that separates working agents from broken ones in 2026.]]></description><link>https://codifyingintelligence.substack.com/p/why-a-bigger-context-window-didnt</link><guid isPermaLink="false">https://codifyingintelligence.substack.com/p/why-a-bigger-context-window-didnt</guid><dc:creator><![CDATA[buooy]]></dc:creator><pubDate>Mon, 04 May 2026 02:01:04 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!7KP8!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F400aed1e-ef10-4878-8055-f14436a8e13a_1424x736.jpeg" length="0" type="image/jpeg"/><content:encoded><![CDATA[<div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!7KP8!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F400aed1e-ef10-4878-8055-f14436a8e13a_1424x736.jpeg" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!7KP8!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F400aed1e-ef10-4878-8055-f14436a8e13a_1424x736.jpeg 424w, https://substackcdn.com/image/fetch/$s_!7KP8!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F400aed1e-ef10-4878-8055-f14436a8e13a_1424x736.jpeg 848w, https://substackcdn.com/image/fetch/$s_!7KP8!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F400aed1e-ef10-4878-8055-f14436a8e13a_1424x736.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!7KP8!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F400aed1e-ef10-4878-8055-f14436a8e13a_1424x736.jpeg 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!7KP8!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F400aed1e-ef10-4878-8055-f14436a8e13a_1424x736.jpeg" width="1424" height="736" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/400aed1e-ef10-4878-8055-f14436a8e13a_1424x736.jpeg&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:736,&quot;width&quot;:1424,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:810596,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/jpeg&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:&quot;https://codifyingintelligence.substack.com/i/196192490?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F400aed1e-ef10-4878-8055-f14436a8e13a_1424x736.jpeg&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!7KP8!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F400aed1e-ef10-4878-8055-f14436a8e13a_1424x736.jpeg 424w, https://substackcdn.com/image/fetch/$s_!7KP8!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F400aed1e-ef10-4878-8055-f14436a8e13a_1424x736.jpeg 848w, https://substackcdn.com/image/fetch/$s_!7KP8!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F400aed1e-ef10-4878-8055-f14436a8e13a_1424x736.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!7KP8!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F400aed1e-ef10-4878-8055-f14436a8e13a_1424x736.jpeg 1456w" sizes="100vw" fetchpriority="high"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><h2>A promise that didn't quite land</h2><p>For a couple of years, the standard pitch from frontier labs went something like this: we will give you a million-token context window, and your retrieval problem goes away. Just put everything in. The model will figure out what is important.</p><p>It was a beautiful pitch. It was also wrong, and by 2026 the evidence has piled up high enough that even the labs have stopped making it.</p><p>The clearest demonstration came from Chroma's "Context Rot" research, which measured large model performance as input length grew. The result was unambiguous: performance degrades meaningfully, and consistently, beyond about 30,000 tokens, even on models advertising windows of a million or more. The signal stops mattering well before the window fills up. This is not a training artefact. It is built into the architecture.</p><p>If your engineering plan for AI agents in 2026 still relies on "we will just dump everything in the context," you are working on a plan that the math does not support. This piece walks through why, and what the right framing is instead.</p><h2>The U-shape that ate your accuracy</h2><p>The single most reproducible finding in long-context research is the U-shape. Information at the start of the context gets retrieved well. Information at the end gets retrieved well. Information in the middle does not. Across a range of tasks, the middle of a long context shows accuracy that is thirty percent or more lower than the edges.</p><p>This is the "lost in the middle" phenomenon, first formalised in 2023 and reproduced extensively since. It does not go away in larger models. It does not go away with longer training. It is a property of how attention has to allocate its budget when there is too much for it to attend to.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!2Wl5!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5ad49618-e26e-4c3c-98fe-bc61da5b405a_1920x1097.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!2Wl5!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5ad49618-e26e-4c3c-98fe-bc61da5b405a_1920x1097.png 424w, https://substackcdn.com/image/fetch/$s_!2Wl5!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5ad49618-e26e-4c3c-98fe-bc61da5b405a_1920x1097.png 848w, https://substackcdn.com/image/fetch/$s_!2Wl5!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5ad49618-e26e-4c3c-98fe-bc61da5b405a_1920x1097.png 1272w, https://substackcdn.com/image/fetch/$s_!2Wl5!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5ad49618-e26e-4c3c-98fe-bc61da5b405a_1920x1097.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!2Wl5!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5ad49618-e26e-4c3c-98fe-bc61da5b405a_1920x1097.png" width="1456" height="832" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/5ad49618-e26e-4c3c-98fe-bc61da5b405a_1920x1097.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:832,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:92146,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://codifyingintelligence.substack.com/i/196192490?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5ad49618-e26e-4c3c-98fe-bc61da5b405a_1920x1097.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!2Wl5!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5ad49618-e26e-4c3c-98fe-bc61da5b405a_1920x1097.png 424w, https://substackcdn.com/image/fetch/$s_!2Wl5!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5ad49618-e26e-4c3c-98fe-bc61da5b405a_1920x1097.png 848w, https://substackcdn.com/image/fetch/$s_!2Wl5!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5ad49618-e26e-4c3c-98fe-bc61da5b405a_1920x1097.png 1272w, https://substackcdn.com/image/fetch/$s_!2Wl5!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5ad49618-e26e-4c3c-98fe-bc61da5b405a_1920x1097.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption"><em>The U-shape every long-context model traces. Information at the edges gets retrieved well; information in the middle does not.</em></figcaption></figure></div><p>The intuition is mechanical. A transformer's attention mechanism has to compute a relevance weight between every pair of tokens. As the context grows, the softmax that turns those weights into a probability distribution flattens out. Each token gets a smaller share of attention, even if it is genuinely important. The signal does not get louder; the noise floor rises. Tokens at the edges of the window get reinforced by their proximity to anchors, like the system prompt at the start and the user's most recent message at the end. Tokens in the middle have nothing to anchor to, and they fade.</p><p>The implication for engineering is direct. Putting more in the context window does not give the model more information to work with. Past a threshold, it gives the model more noise to filter through, and the filtering is imperfect.</p><h2>The 30K-token cliff</h2><p>The Chroma research and follow-up benchmarks zeroed in on a threshold around 30,000 tokens. Below that, large modern models hold up well. Above it, performance starts to slope downward, and the slope steepens further out. By 100,000 tokens, even the best models have lost a measurable share of their capacity to reliably recall and reason over the contents.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!dI8v!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F708fec00-500e-4431-9e4e-38b41315daf1_1920x1097.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!dI8v!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F708fec00-500e-4431-9e4e-38b41315daf1_1920x1097.png 424w, https://substackcdn.com/image/fetch/$s_!dI8v!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F708fec00-500e-4431-9e4e-38b41315daf1_1920x1097.png 848w, https://substackcdn.com/image/fetch/$s_!dI8v!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F708fec00-500e-4431-9e4e-38b41315daf1_1920x1097.png 1272w, https://substackcdn.com/image/fetch/$s_!dI8v!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F708fec00-500e-4431-9e4e-38b41315daf1_1920x1097.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!dI8v!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F708fec00-500e-4431-9e4e-38b41315daf1_1920x1097.png" width="1456" height="832" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/708fec00-500e-4431-9e4e-38b41315daf1_1920x1097.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:832,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:90610,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://codifyingintelligence.substack.com/i/196192490?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F708fec00-500e-4431-9e4e-38b41315daf1_1920x1097.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!dI8v!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F708fec00-500e-4431-9e4e-38b41315daf1_1920x1097.png 424w, https://substackcdn.com/image/fetch/$s_!dI8v!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F708fec00-500e-4431-9e4e-38b41315daf1_1920x1097.png 848w, https://substackcdn.com/image/fetch/$s_!dI8v!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F708fec00-500e-4431-9e4e-38b41315daf1_1920x1097.png 1272w, https://substackcdn.com/image/fetch/$s_!dI8v!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F708fec00-500e-4431-9e4e-38b41315daf1_1920x1097.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption"><em>More room, less focus. A bigger window doesn&#8217;t mean the model pays more attention. Same signal, more noise.</em></figcaption></figure></div><p>A few things are worth knowing about this threshold. It is not a hard cliff. It is a regime change, more like the curve of a battery losing capacity over its lifetime than a switch flipping. The threshold also varies by task. Pure recall, like find this exact phrase, holds up further than reasoning over multiple pieces of information scattered across the context. Multi-hop reasoning is the first thing to fall apart.</p><p>The threshold also varies by model. Claude, Gemini, and OpenAI's frontier models all show the curve, but at different inflection points and slopes. Smaller, faster models tend to hit the wall earlier. The point is that the curve exists for everyone, and the existence of the curve is more important than the precise number.</p><h2>What this means for your roadmap</h2><p>Three immediate consequences for any team designing agents.</p><p>First, retrieval is not dead. The retrieval-augmented generation pattern, where you fetch the most relevant slice of information at query time and put only that in the context, was supposed to be obsolesced by long contexts. It was not. By 2026, RAG is back as a default architecture, alongside other context-shaping techniques. The reason is the curve: a smaller, well-curated context outperforms a larger, dumped-everything-in context, by a margin that matters.</p><p>Second, "more context is better" is a budget decision, not a capability decision. Every additional token has a cost in latency, in money, and now we know in accuracy. The optimisation is to find the smallest set of tokens that gets the model to the right answer with high probability. That is now an explicit engineering problem, with its own discipline forming around it.</p><p>Third, agent design is partly the management of attention. An agent that runs for many turns, accumulating tool outputs, conversation history, and intermediate reasoning, is by default growing its context in ways that hurt it. The teams getting agent reliability right in 2026 are the teams that are deliberately pruning, summarising, and offloading context as part of the loop.</p><h2>Why bigger windows are still useful, just not for what you thought</h2><p>To be fair to the long-context push, larger windows are not useless. They are the foundation of being able to put a 50-page document into the model at all. They make multi-document reasoning possible without complex chunking pipelines. They expand the upper bound of what is reachable.</p><p>What they do not do is solve the engineering question of what should be in the context at any given moment. That question is now front and centre, and the answer for nearly every production agent is: less than you would think.</p><h2>Context engineering as a discipline</h2><p>The right framing in 2026 is that context engineering, not prompt engineering, is the central skill for getting AI agents to work in production. The terminology has caught on because it captures the new reality: a prompt is a single message, a context is the entire token stream the model sees, and the discipline is shaping that stream.</p><p>The core moves are well known and we will spend a full piece on them next, but the headline list is short. Write things to a scratchpad rather than carrying them through the context. Select the right slice of memory or document for the current step rather than carrying everything. Compress completed steps into a summary rather than keeping the raw trace. Isolate sub-tasks into their own contexts rather than cramming them all into one. Each of these is a direct response to the curve described above.</p><p>The teams that have internalised this are seeing reliability gains without changing the model. The teams that have not are throwing more tokens at problems that more tokens cannot solve.</p><h2>A sanity check before you ship</h2><p>A useful diagnostic: take an agent that is misbehaving and look at the size and shape of its context at the failure step. If it is over 30,000 tokens, especially with tool outputs and prior conversation crammed in the middle, you are probably looking at a context-rot failure rather than a model failure. The fix is not a better prompt or a smarter model. The fix is to redesign the context to keep the relevant information at the edges and prune the middle.</p><p>If you only do one thing differently after reading this, do this one. The next time an agent fails on something it should clearly be able to do, before blaming the model, check the context length and the position of the relevant information. The pattern repeats often enough that you will start spotting it on sight.</p><h2>The real lesson</h2><p>The first wave of LLM engineering was about the prompt. Get the wording right, get the examples right, get the format right. The second wave was about retrieval. Find the right document, put it in the context. The third wave, which is what 2026 is about, is the management of the entire context stream over time, including across many agent turns, tool calls, and sub-tasks.</p><p>The lesson is not that long context windows do not matter. They do. The lesson is that they are necessary but not sufficient, and that the engineering work of deciding what goes in the window has not gone away. It has just gotten more visible. The teams treating it as a first-class problem are the teams whose agents are working in production. Everyone else is wondering why a bigger model did not fix the bug.</p><div><hr></div><p><strong>Sources</strong></p><ul><li><p><a href="https://research.trychroma.com/context-rot">Chroma &#8212; Context Rot: How Increasing Input Tokens Impacts LLM Performance</a></p></li><li><p><a href="https://www.morphllm.com/context-rot">Morph &#8212; Context Rot: Why LLMs Degrade as Context Grows</a></p></li><li><p><a href="https://www.anthropic.com/engineering/effective-context-engineering-for-ai-agents">Anthropic &#8212; Effective Context Engineering for AI Agents</a></p></li><li><p><a href="https://inkeep.com/blog/context-engineering-why-agents-fail">Inkeep &#8212; Context Engineering: The Real Reason AI Agents Fail in Production</a></p></li><li><p><a href="https://towardsdatascience.com/deep-dive-into-context-engineering-for-ai-agents/">Towards Data Science &#8212; Context Engineering for AI Agents: A Deep Dive</a></p></li></ul>]]></content:encoded></item><item><title><![CDATA[Cloudflare Agent: Day 6]]></title><description><![CDATA[Cloudflare's Agents Week 2026 &#8212; Agent Readiness scoring, Agent Memory, Unweight LLM compression, Shared Dictionaries, AI training redirects, and a network performance leap]]></description><link>https://codifyingintelligence.substack.com/p/cloudflare-agent-day-6</link><guid isPermaLink="false">https://codifyingintelligence.substack.com/p/cloudflare-agent-day-6</guid><dc:creator><![CDATA[buooy]]></dc:creator><pubDate>Sat, 18 Apr 2026 00:50:11 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!74gP!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6a19f8ff-0a26-4322-ae0e-cc17628097bc_2846x1504.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>Day 5 wired up the developer-facing control plane &#8212; Flagship for feature flags, governed rollouts, the plumbing that lets teams ship agent code safely. Day 6 flips the camera. If agents are going to read, write, and act across the internet at scale, the web itself has to change &#8212; the pages, the transport, the models behind the requests. Six announcements dropped today. Here's what dropped.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!74gP!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6a19f8ff-0a26-4322-ae0e-cc17628097bc_2846x1504.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!74gP!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6a19f8ff-0a26-4322-ae0e-cc17628097bc_2846x1504.png 424w, https://substackcdn.com/image/fetch/$s_!74gP!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6a19f8ff-0a26-4322-ae0e-cc17628097bc_2846x1504.png 848w, https://substackcdn.com/image/fetch/$s_!74gP!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6a19f8ff-0a26-4322-ae0e-cc17628097bc_2846x1504.png 1272w, https://substackcdn.com/image/fetch/$s_!74gP!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6a19f8ff-0a26-4322-ae0e-cc17628097bc_2846x1504.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!74gP!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6a19f8ff-0a26-4322-ae0e-cc17628097bc_2846x1504.png" width="1456" height="769" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/6a19f8ff-0a26-4322-ae0e-cc17628097bc_2846x1504.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:769,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:6969628,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:&quot;https://codifyingintelligence.substack.com/i/194573866?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6a19f8ff-0a26-4322-ae0e-cc17628097bc_2846x1504.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!74gP!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6a19f8ff-0a26-4322-ae0e-cc17628097bc_2846x1504.png 424w, https://substackcdn.com/image/fetch/$s_!74gP!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6a19f8ff-0a26-4322-ae0e-cc17628097bc_2846x1504.png 848w, https://substackcdn.com/image/fetch/$s_!74gP!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6a19f8ff-0a26-4322-ae0e-cc17628097bc_2846x1504.png 1272w, https://substackcdn.com/image/fetch/$s_!74gP!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6a19f8ff-0a26-4322-ae0e-cc17628097bc_2846x1504.png 1456w" sizes="100vw" fetchpriority="high"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p></p><h2>The Big Picture</h2><p>Agents Week has spent five days on the agent side of the equation &#8212; runtimes, memory, security, feature gates. Day 6 is about what agents run <em>against</em>. The headline product, <strong>Agent Readiness</strong>, doesn't grade an agent. It grades a website. Can an agent find your docs? Read your content efficiently? Know what it's allowed to do? Authenticate and call your APIs? Most sites fail &#8212; and Cloudflare's betting that's about to become a problem worth measuring.</p><p>The other five announcements slot into the same thesis from different angles. <strong>Agent Memory</strong> makes the agents themselves smarter over time. <strong>Unweight</strong> makes the models behind them cheaper to serve. <strong>Shared Dictionaries</strong> and the <strong>network performance update</strong> make the transport layer faster for machines reading the web at scale. <strong>Redirects for AI Training</strong> gives site owners a one-toggle way to stop models from training on stale content. Read together, Day 6 is Cloudflare arguing that the agentic web needs upgrades on both ends &#8212; the agent side <em>and</em> the site side &#8212; and then shipping both ends.</p><h2>1. Agent Readiness: A Grade for Every Website</h2><p><strong>The headline drop.</strong> Cloudflare launched <strong>isitagentready.com</strong> &#8212; a free scoring tool plus a new <strong>Cloudflare Radar</strong> dataset &#8212; that measures how well any website supports AI agents.</p><p>The score rolls up four dimensions. Discoverability &#8212; robots.txt, sitemap.xml, HTTP Link headers. Content &#8212; markdown content negotiation via <code>Accept: text/markdown</code>. Bot access control &#8212; Content Signals, AI-specific robots rules, Web Bot Auth. And capabilities &#8212; API catalogs, MCP server cards, OAuth discovery, Agent Skills indexes. The tool itself runs as a stateless MCP server at <code>/.well-known/mcp.json</code> &#8212; a dogfood moment that doubles as a reference implementation other sites can copy.</p><p>What's new:</p><ul><li><p><strong>isitagentready.com</strong> &#8212; Drop in any URL, get a per-dimension score plus concrete remediation steps.</p></li><li><p><strong>Radar adoption dataset</strong> &#8212; Aggregate tracking of agent-standards adoption across the top of the web, updated over time.</p></li><li><p><strong>Agent-ready Cloudflare docs</strong> &#8212; Cloudflare rewrote its own developer documentation to serve markdown natively and publish an Agent Skills index.</p></li></ul><p>Two numbers to chew on. Only <strong>4% of sites</strong> have declared AI usage preferences in robots.txt &#8212; despite <strong>78% of sites</strong> having a robots.txt file at all. The access-control layer for agents basically doesn't exist yet. Meanwhile, the rebuilt Cloudflare docs serve agents with <strong>31% fewer tokens consumed</strong> and <strong>66% faster time to answer</strong> than competing documentation sites. The readiness score isn't just a diagnostic &#8212; it's a roadmap and a benchmark dropped on the same day.</p><h2>2. Agent Memory: Persistent Memory as a Managed Service</h2><p><strong>Agents can now remember.</strong> Cloudflare opened private beta for <strong>Agent Memory</strong>, a managed service that extracts, stores, and retrieves information from agent interactions &#8212; so the model doesn't have to jam every relevant fact into the context window.</p><p>The architecture is a tight stack on Cloudflare's own primitives. A Worker orchestrates three backends: Durable Objects (SQLite-backed message and memory storage), Vectorize (vector search), and Workers AI (inference). Each memory profile gets its own isolated Durable Object instance, so tenants never share state. The API exposes four verbs &#8212; <strong>Ingest</strong>, <strong>Remember</strong>, <strong>Recall</strong>, <strong>Forget</strong> &#8212; plus a list operation for memory management.</p><p>What's new:</p><ul><li><p><strong>Four-class memory model</strong> &#8212; Extracted items are classified as Facts (stable knowledge), Events (time-specific), Instructions (procedural), or Tasks (ephemeral work).</p></li><li><p><strong>Five-channel retrieval</strong> &#8212; Search runs full-text (with Porter stemming), exact fact-key lookup, raw message search, direct vector search, and HyDE (Hypothetical Document Embedding) vector search in parallel. Results merge via Reciprocal Rank Fusion with fact-key matches weighted highest.</p></li><li><p><strong>Idempotent ingestion</strong> &#8212; Content-addressed SHA-256 IDs make re-ingestion safe. An eight-check verification pipeline validates every extracted memory against the source transcript before storage.</p></li><li><p><strong>Model split</strong> &#8212; Llama 4 Scout (17B, 16-expert MoE) handles extraction and classification; Nemotron 3 (120B MoE, 12B active) does synthesis.</p></li></ul><p>The line Cloudflare is drawing: <em>"Your memories are yours."</em> Every memory is exportable &#8212; a deliberate bet that portability, not lock-in, wins the managed-agent-memory category before anyone's really fighting over it.</p><h2>3. Unweight: 22% Smaller Models, Bit-Exact Output</h2><p><strong>Lossless LLM compression, in production.</strong> Cloudflare shipped <strong>Unweight</strong>, an inference-time compression system that shrinks BF16 model weights by 15&#8211;22% without changing a single output bit.</p><p>The trick is a quiet one. In BF16 weights, sign and mantissa bits look effectively random &#8212; but <strong>the top 16 exponent bytes account for over 99% of weights in a typical layer</strong>. Unweight Huffman-codes only the exponent stream, hitting ~30% compression on MLP matrices. A reconstructive matmul kernel then decompresses weights inside on-chip shared memory (SMEM) and hands them directly to tensor cores &#8212; so the reconstructed weights never touch main memory. Memory bus traffic drops roughly 30%.</p><p>What's new:</p><ul><li><p><strong>Four execution pipelines</strong> &#8212; Full decode, exponent-only decode with reconstructive kernel, 4-bit palette transcode, and direct palette. An autotuner measures actual end-to-end throughput and picks the best option per weight matrix and batch size.</p></li><li><p><strong>~3 GB VRAM savings on Llama 3.1 8B</strong> &#8212; Extrapolating, Llama 70B could save 18&#8211;28 GB depending on configuration.</p></li><li><p><strong>~22% distribution footprint</strong> &#8212; Matters disproportionately because Cloudflare has to replicate models across its global network.</p></li><li><p><strong>30&#8211;40% throughput overhead on H100 SXM5</strong> &#8212; "Not a free lunch," as the post puts it, but the capacity unlocks are the point.</p></li></ul><p>The system-design line in the post lands hard: <em>"Every byte that crosses the memory bus is a byte that could have been avoided if the weights were smaller."</em> Unweight is Cloudflare treating model weights like any other asset on its network &#8212; compressed, cached, and never larger than it has to be.</p><h2>4. Shared Dictionaries: Delta Compression for Deploy Churn</h2><p><strong>Most of what crosses the wire is redundant.</strong> Cloudflare is rolling out support for <strong>RFC 9842 shared compression dictionaries</strong>, turning repeat asset transfers into delta transfers.</p><p>A shared dictionary is a reference both sides already have. When the server ships a new version of a resource, it compresses only the diff against the dictionary. The HTTP plumbing &#8212; <code>Use-As-Dictionary</code>, <code>Available-Dictionary</code>, cache key variance on <code>Accept-Encoding</code> &#8212; handles the handshake. Chrome 130+ and Edge 130+ support it today; Firefox is in progress.</p><p>What's new:</p><ul><li><p><strong>Phase 1 beta April 30</strong> &#8212; Passthrough support. Cloudflare forwards dictionary-related headers and encodings without modification, properly varying cache keys on <code>Available-Dictionary</code> and <code>Accept-Encoding</code>.</p></li><li><p><strong>Phase 2</strong> &#8212; Cloudflare takes over the dictionary lifecycle: injection, storage, delta compression &#8212; zero origin changes.</p></li><li><p><strong>Phase 3</strong> &#8212; Automatic dictionary generation. Cloudflare detects versioned resources across the network and compresses new versions against predecessors without any developer intervention.</p></li></ul><p>The lab numbers look like a typo. A 272 KB asset gzips to 92 KB &#8212; a 66% reduction. With a shared dictionary against the previous version, the same asset compresses to <strong>2.6 KB</strong> &#8212; a <strong>97% reduction over the already-gzipped payload</strong>, and 89% faster on cache hit. Cloudflare's framing example: <em>"At 100K daily users and 10 deploys a day, that's the difference between 500GB of transfer and a few hundred megabytes."</em> Agentic crawlers are now just under <strong>10% of Cloudflare's total requests</strong>, up <strong>~60% year-over-year</strong> &#8212; so this isn't a marginal optimization, it's a bandwidth reset for the machine-readable web.</p><h2>5. Redirects for AI Training: One Toggle for Canonical Content</h2><p><strong>Site owners get edge enforcement of canonical content.</strong> <strong>Redirects for AI Training</strong>, live today on all paid plans, converts existing <code>&lt;link rel="canonical"&gt;</code> tags into HTTP 301 redirects &#8212; but only for verified AI training crawlers.</p><p>The logic is narrow and surgical. Cloudflare's <code>cf.verified_bot_category</code> field identifies AI training bots (GPTBot, ClaudeBot, Bytespider). For requests to pages with a canonical tag that's same-origin and not self-referencing, the edge returns a 301 to the canonical URL before the original response ever leaves. Humans, search engines, and unverified bots continue to see the deprecated page unchanged &#8212; only training crawlers get redirected.</p><p>What's new:</p><ul><li><p><strong>Single toggle on paid plans</strong> &#8212; No origin changes. No new bot management rules.</p></li><li><p><strong>CMS-compatible</strong> &#8212; Works with any platform that emits canonical tags (WordPress, Contentful, EmDash).</p></li><li><p><strong>Verified effectiveness</strong> &#8212; In Cloudflare's own rollout, <em>"100% of AI training crawler requests to pages with non-self-referencing canonical tags were redirected"</em> within the first seven days.</p></li></ul><p>The dogfood example is the sharpest part of the post. Cloudflare's own deprecated Wrangler v1 docs were being crawled <strong>~46,000 times a month by OpenAI, 3,600 by Anthropic, and 1,700 by Meta</strong> &#8212; enough that models were confidently returning outdated CLI syntax to developers. That's <strong>4.8 million AI crawler visits in 30 days</strong> across developers.cloudflare.com. One toggle, and training pipelines now read the current version instead.</p><h2>6. Network Performance: 40% &#8594; 60% Fastest in Twelve Months</h2><p><strong>Cloudflare is now the fastest network in 60% of the world's top 1,000 networks</strong> &#8212; up from 40% a year earlier. That's 40 additional countries and 261 additional ASNs where it ranks first.</p><p>Two drivers. A Rust rewrite of core connection handling &#8212; HTTP/3, SSL/TLS termination, congestion window management &#8212; cut CPU and memory overhead per request. And physical expansion: new points of presence in <strong>Constantine (Algeria), Malang (Indonesia), and Wroclaw (Poland)</strong> &#8212; where user RTT dropped from 19ms to 12ms, a 40% reduction at the edge.</p><p>What's new:</p><ul><li><p><strong>+54 ASNs in the US alone</strong> now rank Cloudflare fastest.</p></li><li><p><strong>6ms faster</strong> than the next-fastest provider on average, measured in December.</p></li><li><p><strong>Trimean-weighted RUM</strong> &#8212; Rankings use real-user measurements with a trimean (weighted 25th/50th/75th percentile) to filter outliers and reflect typical &#8212; not best-case &#8212; experience.</p></li></ul><p>The Agents Week subtext is easy to miss: agents read the web on behalf of users, and a single agent task can touch a hundred URLs. Six milliseconds per page stacks fast.</p><h2>The Through-Line</h2><p><strong>The agentic web isn't just the agents &#8212; it's the substrate agents run on.</strong> Days 1&#8211;5 focused on what developers build; Day 6 focused on what they build against. Readiness scoring, canonical redirects, shared dictionaries, a 22% smaller model, persistent memory, and a network that now leads in 60% of the top 1,000 ASNs &#8212; every announcement is Cloudflare betting that infrastructure is the product, and that the sites, the models, and the transport have to be upgraded together.</p><p>The strategic consistency is the interesting part. Cloudflare isn't trying to own the agent &#8212; it's trying to own the ground the agent walks on, and make sure that ground is measurable, optimizable, and open.</p><p>More announcements coming throughout the week &#8212; I'll keep covering them as they land.</p><h2>Sources</h2><ul><li><p><a href="https://blog.cloudflare.com/agent-readiness/">Introducing the Agent Readiness score &#8212; check to see if your site is agent-ready</a></p></li><li><p><a href="https://blog.cloudflare.com/introducing-agent-memory/">Agents that remember: introducing Agent Memory</a></p></li><li><p><a href="https://blog.cloudflare.com/unweight-tensor-compression/">Unweight: How we compressed a frontier LLM 22% without sacrificing quality</a></p></li><li><p><a href="https://blog.cloudflare.com/shared-dictionaries/">Shared Dictionaries: Compression that keeps up with the agentic web</a></p></li><li><p><a href="https://blog.cloudflare.com/ai-redirects/">Redirects for AI training: edge-enforcement of canonical content</a></p></li><li><p><a href="https://blog.cloudflare.com/network-performance-agents-week/">Agents Week: Network performance update</a></p></li></ul>]]></content:encoded></item><item><title><![CDATA[Cloudflare Agent: Day 5]]></title><description><![CDATA[Cloudflare Agents Week 2026 &#8212; Artifacts ships Git-native versioned storage for agents, AI Search becomes a first-class primitive, Email Service hits public beta, and the AI Platform unifies 70+ models]]></description><link>https://codifyingintelligence.substack.com/p/cloudflare-agent-day-5</link><guid isPermaLink="false">https://codifyingintelligence.substack.com/p/cloudflare-agent-day-5</guid><dc:creator><![CDATA[buooy]]></dc:creator><pubDate>Fri, 17 Apr 2026 02:27:03 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!r2Sa!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4fa03d7c-3840-425f-bbe8-1a6be810a2e6_2846x1504.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>Day 4 shipped the agent runtime &#8212; Sandboxes GA, Durable Object facets for one-database-per-app, a new AI Gateway inference layer, and OAuth that makes internal apps agent-ready. The boxes the agents live in are settled. Day 5 ships what flows through them &#8212; the state they persist, the knowledge they search, the models they reach for, and the emails they send. Here's what dropped.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!r2Sa!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4fa03d7c-3840-425f-bbe8-1a6be810a2e6_2846x1504.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!r2Sa!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4fa03d7c-3840-425f-bbe8-1a6be810a2e6_2846x1504.png 424w, https://substackcdn.com/image/fetch/$s_!r2Sa!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4fa03d7c-3840-425f-bbe8-1a6be810a2e6_2846x1504.png 848w, https://substackcdn.com/image/fetch/$s_!r2Sa!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4fa03d7c-3840-425f-bbe8-1a6be810a2e6_2846x1504.png 1272w, https://substackcdn.com/image/fetch/$s_!r2Sa!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4fa03d7c-3840-425f-bbe8-1a6be810a2e6_2846x1504.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!r2Sa!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4fa03d7c-3840-425f-bbe8-1a6be810a2e6_2846x1504.png" width="1456" height="769" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/4fa03d7c-3840-425f-bbe8-1a6be810a2e6_2846x1504.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:769,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:6916939,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:&quot;https://codifyingintelligence.substack.com/i/194469864?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4fa03d7c-3840-425f-bbe8-1a6be810a2e6_2846x1504.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!r2Sa!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4fa03d7c-3840-425f-bbe8-1a6be810a2e6_2846x1504.png 424w, https://substackcdn.com/image/fetch/$s_!r2Sa!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4fa03d7c-3840-425f-bbe8-1a6be810a2e6_2846x1504.png 848w, https://substackcdn.com/image/fetch/$s_!r2Sa!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4fa03d7c-3840-425f-bbe8-1a6be810a2e6_2846x1504.png 1272w, https://substackcdn.com/image/fetch/$s_!r2Sa!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4fa03d7c-3840-425f-bbe8-1a6be810a2e6_2846x1504.png 1456w" sizes="100vw" fetchpriority="high"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p></p><h2>The Big Picture</h2><p>If Day 3 was the network fabric and Day 4 was the runtime, Day 5 is the data and inference layer that feeds everything on top. Every announcement today answers one question &#8212; <em>what does an agent need to remember, retrieve, reason with, and reply through &#8212; and how does Cloudflare collapse all of it behind a single binding?</em></p><p>The headline is <strong>Artifacts</strong> &#8212; a Git-compatible, versioned filesystem built for agents first, humans second. Versioning state is the piece that unlocks fork-a-session, time-travel-a-decision, and diff-two-agent-runs. Around it, Cloudflare is handing agents a unified inference layer that makes provider choice a one-line change (<strong>AI Platform</strong>, 70+ models across 12+ providers), a search primitive that isn&#8217;t a bolt-on (<strong>AI Search</strong>), an email pipe that goes both directions (<strong>Cloudflare Email Service</strong> public beta), and the <strong>Inference Layer</strong> underneath to run it all fast &#8212; a 3x improvement in intertoken latency on Kimi K2.5 via prefill-decode disaggregation.</p><p>The thesis across all five: agents don't need new clouds &#8212; they need the existing cloud to grow new senses, and the developer interface needs to collapse from "pick a tool per product" down to one command.</p><h2>1. Artifacts: Versioned storage that speaks Git</h2><p><strong>Git for agents, shipping as private beta.</strong> Artifacts is a distributed, versioned filesystem that exposes itself as a Git server &#8212; meaning any Git client on the planet can push, pull, fork, and diff against it without knowing Cloudflare exists.</p><p>The pitch is that the agent state is messy &#8212; filesystems, session logs, plans, scratchpads &#8212; and none of it survives a restart without engineering gymnastics. Git already solved versioned content-addressable storage twenty years ago. Artifacts borrows the data model and bolts on serverless-friendly APIs so an agent can create a repo, commit, fork, and hand off a URL programmatically. Humans get the same repo the agent sees.</p><p>What's new:</p><ul><li><p><strong>Create tens of millions of repos</strong> &#8212; Repos are cheap and ephemeral-friendly. Spin one up per agent task, per sandbox, per user session. Fork from any remote on creation.</p></li><li><p><strong>REST + native Workers API</strong> (coming soon) &#8212; You don't need to be a Git client to write to Artifacts. A Worker, a Lambda, or a Node script can create repos, generate credentials, and commit changes over HTTPS.</p></li><li><p><strong>Connect from any Git client</strong> &#8212; git push, git clone, GitHub Desktop, VS Code source control &#8212; all work. That's the unlock. Humans and agents share the same surface.</p></li><li><p><strong>Built for fork and time-travel</strong> &#8212; The Git data model lets you diff two agent runs, fork a session from the moment it went wrong, and branch experiments without touching the origin.</p></li></ul><p>Cloudflare is already using Artifacts internally to persist filesystem state and session history for its own agents &#8212; teams share sessions, time-travel through both file and message state, and fork from any point. Public beta lands in early May 2026. Private beta is open today for Workers paid plans.</p><h2>2. AI Platform: the unified inference layer</h2><p><strong>One call to rule them all, and in the Cloudflare run them.</strong> Cloudflare is turning AI Gateway and Workers AI into a single <strong>AI Platform</strong> &#8212; one <code>AI.run()</code> call, 70+ models across 12+ providers, one set of credits, automatic failover between providers.</p><p>The observation driving this: most companies are already calling an average of 3.5 models across multiple providers. Switching providers today means rewriting code, re-plumbing credentials, and losing unified cost visibility. The AI Platform makes provider choice a one-line change.</p><p>What&#8217;s new:</p><ul><li><p><strong>One binding, any model</strong> &#8212; <code>env.AI.run('anthropic/claude-opus-4-6', ...)</code> works identically to calling a Workers AI-hosted model. REST API support is weeks away for non-Workers clients.</p></li><li><p><strong>Expanded catalog</strong> &#8212; Alibaba Cloud, AssemblyAI, Bytedance, Google, InWorld, MiniMax, OpenAI, Pixverse, Recraft, Runway, and Vidu join the roster, bringing multimodal image, video, and speech models into the unified API.</p></li><li><p><strong>Unified cost visibility</strong> &#8212; Tag requests with custom metadata &#8212; team, user, workflow &#8212; and get a cross-provider cost breakdown from one dashboard. No provider on its own can give you the full picture.</p></li><li><p><strong>Bring your own model</strong> &#8212; Coming soon: push a Replicate Cog-packaged container to Workers AI and Cloudflare serves it like a first-party model. GPU snapshotting for faster cold starts is on the roadmap.</p></li><li><p><strong>Automatic failover</strong> &#8212; If a provider goes down, AI Gateway routes to another that hosts the same model, no custom retry logic required. Streaming responses are resilient to disconnects when paired with the Agents SDK.</p></li></ul><p>The strategic play: make Cloudflare the single operational layer for inference economics in a multi-provider reality. Because Workers run on the same global network as AI Gateway and Workers AI, Cloudflare-hosted models skip a public-Internet hop &#8212; time-to-first-token matters more for agents than total latency does.</p><h2>3. AI Search: The search primitive for agents</h2><p><strong>Search as a first-class Cloudflare primitive, not a feature bolted onto storage.</strong> AI Search replaces the "stitch Vectorize + R2 + your chunker + your embedder" pattern with a single primitive that an agent can spin up on demand.</p><p>An instance is created dynamically &#8212; one per user, per session, per topic, whatever the agent decides. You upload files; Cloudflare handles chunking, embedding, storage, and retrieval. Queries run hybrid (lexical + semantic) with relevance boosting, which you can tune per-instance. The agent gets ranked results without owning a vector database.</p><p>What's new:</p><ul><li><p><strong>Dynamic instance creation</strong> &#8212; Agents create and tear down search indexes as part of their reasoning loop. No provisioning dance.</p></li><li><p><strong>Hybrid retrieval built in</strong> &#8212; Lexical and semantic search combined in one query, not two services stitched with a reranker. Handles the "exact product name" and "vibe of the description" cases in one call.</p></li><li><p><strong>BM25</strong> &#8212; Keyword-based search runs in parallel with vector search. Results are fused, and optionally ranked at the end.</p></li><li><p><strong>Relevance boosting</strong> &#8212; Steer ranking with metadata filters and signal weights without retraining anything.</p></li><li><p><strong>Cross-instance search</strong> &#8212; Query across multiple instances when an agent needs to pull from more than one knowledge source.</p></li></ul><p>This is what most teams were building by hand in 2025 with a patchwork of Vectorize, R2, and homegrown chunkers. Today, it's a single API.</p><h2>4. Cloudflare Email Service: Public beta, ready for your agents</h2><p><strong>Email, bidirectional, from your Worker.</strong> Receive inbound emails and outbound sending with a native Workers binding, plus a new Email MCP server, Wrangler CLI email commands, and an open-source agentic inbox reference app.</p><p>Email is the most universal interface on the Internet. No custom client, no custom SDK, no custom auth &#8212; everyone already has an email address. That makes it the natural channel for agents that need to operate asynchronously and reach users who don&#8217;t live in your product dashboard.</p><p>What&#8217;s new:</p><ul><li><p><strong>Email Sending (public beta)</strong> &#8212; <code>env.EMAIL.send({...})</code> from any Worker. No API keys, no secrets management. REST API plus TypeScript, Python, and Go SDKs for any platform.</p></li><li><p><strong>Automatic SPF, DKIM, DMARC</strong> &#8212; Add your domain to Email Service and Cloudflare configures the authentication records so deliveries don&#8217;t land in spam.</p></li><li><p><strong>Agents SDK `onEmail` + `sendEmail`</strong> &#8212; Agents can receive, orchestrate work asynchronously, and reply on their own timeline. Cloudflare frames this as the concrete difference between a chatbot and an agent &#8212; your agent can receive a message, spend an hour processing, check three systems, then email back with a complete answer.</p></li><li><p><strong>Email MCP server</strong> &#8212; Expose inbox access to any MCP-compatible agent harness.</p></li><li><p><strong>Wrangler email commands, skills for coding agents, and an open-source agentic inbox reference app</strong> &#8212; Tooling for building email-native products, not just email-aware ones.</p></li></ul><p>Combined with Email Routing &#8212; free and GA for years &#8212; Cloudflare now offers fully bidirectional email on the platform. Receive, process in a Worker, persist to Agent state, reply. Customer support agents, invoice processing pipelines, account verification flows, multi-agent workflows &#8212; Cloudflare&#8217;s private-beta customers were already building all of this.</p><h2>5. Building the foundation for extra-large language models</h2><p><strong>Making Extra-LLM respond faster at scale.</strong> Having your models respond quickly to your customer is the defining factor for user experience. Cloudflare published a deep dive on the hardware and software stack behind Workers AI&#8217;s large-model hosting &#8212; and shipped a <strong>3x improvement in intertoken latency (time between two consecutive tokens)</strong> on Kimi K2.5.</p><p>This is the plumbing post of the week. Running models the size of Kimi K2.5 at agent-workload scale &#8212; long contexts, heavy prefill, tool calling, turn-over-turn prompt reuse &#8212; requires squeezing every ounce out of very expensive GPUs. Cloudflare&#8217;s angle: the kind of traffic agents send is meaningfully different from chatbot traffic, and the platform should be tuned for it.</p><p>What&#8217;s new:</p><ul><li><p><strong>Prefill-decode disaggregation</strong> &#8212; Separate inference servers for input processing (compute-bound) and output generation (memory-bound), scaled independently, routed by a token-aware load balancer. P90 time-per-token dropped from ~100ms with high variance to 20&#8211;30ms, a 3x improvement in intertoken latency.</p></li><li><p><strong>Prompt caching via `x-session-affinity`</strong> &#8212; A request header routes follow-ups back to the region holding the computed input tensors. Internal heavy users went from 60% to 80% input-token cache hit ratio at peak &#8212; and Cloudflare discounts cached tokens to incentivize adoption.</p></li><li><p><strong>Hardware-tuned configs</strong> &#8212; Different GPU configurations for input-heavy workloads (summarization) vs. output-heavy workloads (content generation), with load balancers deciding where requests land.</p></li><li><p><strong>3x faster Kimi K2.5</strong> &#8212; The first visible output of the new stack.</p></li></ul><p>The underlying bet: agent traffic is bursty, long-context, and reuse-heavy. A platform tuned for that pattern gets cheaper and faster the more agents run on it &#8212; the opposite of a naive per-token cost curve.</p><h2>The Through-Line</h2><p><strong>Agents don't need a new cloud. They need the existing cloud to provide an integrated and seamless platform.</strong></p><p>Day 3 made the network private. Day 4 made the runtime persistent. Day 5 makes the runtime <em>capable</em> &#8212; a versioned filesystem that remembers decisions, a search it can reach into, an email channel, a model-agnostic inference layer, and a user experience for your customers that&#8217;s smooth as butter.</p><p>The strategic bet is that "how do I build this agent" and "how do I ship this agent" should be the same question with the same answer &#8212; and that answer lives on a single developer platform where the primitives, the identity layer, and the tooling don't force you to context-switch between vendors. Everything shipped this week points to that collapse.</p><p>More announcements coming throughout the week &#8212; I'll keep covering them as they land.</p><h2>Sources</h2><ul><li><p><a href="https://blog.cloudflare.com/artifacts-git-for-agents-beta/">Artifacts: versioned storage that speaks Git</a></p></li><li><p><a href="https://blog.cloudflare.com/ai-platform/">Cloudflare&#8217;s AI Platform: an inference layer designed for agents</a></p></li><li><p><a href="https://blog.cloudflare.com/ai-search-agent-primitive/">AI Search: the search primitive for your agents</a></p></li><li><p><a href="https://blog.cloudflare.com/email-for-agents/">Cloudflare Email Service: now in public beta. Ready for your agents</a></p></li><li><p><a href="https://blog.cloudflare.com/high-performance-llms/">Building the foundation for running extra-large language models</a></p></li><li><p><a href="https://www.cloudflare.com/agents-week/">Agents Week 2026</a></p></li></ul>]]></content:encoded></item><item><title><![CDATA[Cloudflare Agent: Day 4]]></title><description><![CDATA[Cloudflare's Agents Week 2026 &#8212; Project Think ships a batteries-included SDK, Browser Run goes agent-native, and voice lands in ~30 lines of code]]></description><link>https://codifyingintelligence.substack.com/p/cloudflare-agent-day-4</link><guid isPermaLink="false">https://codifyingintelligence.substack.com/p/cloudflare-agent-day-4</guid><dc:creator><![CDATA[buooy]]></dc:creator><pubDate>Thu, 16 Apr 2026 02:27:32 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!NaV1!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6269abf0-47da-451f-802d-1812a6f9f5d4_2846x1504.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>Day 4 ships what Cloudflare thinks are the brains and hands of the future AI Agent. Here's what dropped.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!NaV1!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6269abf0-47da-451f-802d-1812a6f9f5d4_2846x1504.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!NaV1!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6269abf0-47da-451f-802d-1812a6f9f5d4_2846x1504.png 424w, https://substackcdn.com/image/fetch/$s_!NaV1!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6269abf0-47da-451f-802d-1812a6f9f5d4_2846x1504.png 848w, https://substackcdn.com/image/fetch/$s_!NaV1!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6269abf0-47da-451f-802d-1812a6f9f5d4_2846x1504.png 1272w, https://substackcdn.com/image/fetch/$s_!NaV1!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6269abf0-47da-451f-802d-1812a6f9f5d4_2846x1504.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!NaV1!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6269abf0-47da-451f-802d-1812a6f9f5d4_2846x1504.png" width="1456" height="769" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/6269abf0-47da-451f-802d-1812a6f9f5d4_2846x1504.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:769,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:6860968,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:&quot;https://codifyingintelligence.substack.com/i/194363491?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6269abf0-47da-451f-802d-1812a6f9f5d4_2846x1504.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!NaV1!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6269abf0-47da-451f-802d-1812a6f9f5d4_2846x1504.png 424w, https://substackcdn.com/image/fetch/$s_!NaV1!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6269abf0-47da-451f-802d-1812a6f9f5d4_2846x1504.png 848w, https://substackcdn.com/image/fetch/$s_!NaV1!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6269abf0-47da-451f-802d-1812a6f9f5d4_2846x1504.png 1272w, https://substackcdn.com/image/fetch/$s_!NaV1!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6269abf0-47da-451f-802d-1812a6f9f5d4_2846x1504.png 1456w" sizes="100vw" fetchpriority="high"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p></p><h2>The Big Picture: From Primitives to Platform</h2><p>The first three days of Agents Week established a pattern. Day 1 gave agents their own computers (Sandboxes GA) and persistent storage (Durable Object Facets). Day 2 locked down identity, networking, and tool governance. Day 3 is where Cloudflare makes the leap from "infrastructure you can build agents on" to "a platform that builds agents for you."</p><p>The centerpiece is <strong>Project Think</strong> &#8212; the next edition of the Agents SDK. Where the original SDK gave you lightweight primitives and left the wiring to you, Project Think ships an opinionated base class that handles the agentic loop, durable execution, persistent memory, sub-agent orchestration, and sandboxed code execution out of the box. The rest of the day's announcements fill in the modalities: browsers, voice, workflow orchestration, and even domain registration.</p><p>The combined message is clear: Cloudflare wants to own the full runtime for AI agents, from the first prompt to the last API call.</p><h2>1. Project Think: The Batteries-Included Agents SDK</h2><p><strong>The headline announcement.</strong> Project Think is a new edition of the Agents SDK that transforms it from a collection of primitives into a complete agent platform. It ships a <code>Think</code> base class that handles the core agentic loop &#8212; you implement <code>getModel()</code> and optional hooks, and the SDK manages context assembly, tool execution, and state persistence.</p><p>What's new:</p><ul><li><p><strong>Durable Execution via Fibers</strong> &#8212; Crash recovery and checkpointing through <code>runFiber()</code>. If the platform restarts mid-task, the agent picks up where it left off. Automatic keepalive during long LLM calls prevents premature hibernation.</p></li></ul><ul><li><p><strong>Sub-Agents</strong> &#8212; Isolated child agents, each with their own Durable Object Facet and separate SQLite database. Communication happens through typed RPC. Think of it as microservices for agents &#8212; a researcher, a coder, and a reviewer each running independently but coordinated by a parent.</p></li></ul><ul><li><p><strong>Persistent Sessions</strong> &#8212; Tree-structured message storage with branching and forking. An agent can explore multiple solution paths without losing history. Non-destructive compaction summarizes old context rather than deleting it. Full-text search across conversation history comes built in.</p></li></ul><ul><li><p><strong>The Execution Ladder</strong> &#8212; A tiered capability model for sandboxed code execution. Tier 0 gives agents a virtual filesystem. Tier 1 adds sandboxed JavaScript. Tier 2 brings npm packages. Tier 3 provides a headless browser (via Browser Run). Tier 4 is a full development sandbox with git, compilers, and test runners. Each tier grants explicit capabilities &#8212; security through structure, not behavioral constraints.</p></li></ul><ul><li><p><strong>Code over tool-calling</strong> &#8212; This is the architectural bet that ties it together. Instead of the LLM making individual function calls in a loop, the agent writes a program that accomplishes the entire task. That code runs in a sandboxed Dynamic Worker that spins up in milliseconds. Cloudflare reports a 99.9% reduction in token usage compared to endpoint-per-tool approaches. One program replaces a hundred round-trips.</p></li></ul><p>The economics are striking. With 10,000 agents each active 1% of the time, containers require 10,000 always-on instances. Durable Objects need roughly 100 active simultaneously &#8212; zero compute cost when hibernated, instant wake-up on demand via HTTP, WebSocket, or scheduled alarm.</p><h2>2. Browser Run: Give Your Agents a Browser</h2><p><strong>Browser Rendering gets a new name and a serious upgrade.</strong> Browser Run is Cloudflare's agent-ready browser service &#8212; on-demand Chrome instances running on the global network. The rebrand reflects what changed: this is no longer a rendering utility. It's an agent's window into the web.</p><p>What's new since Browser Rendering:</p><ul><li><p><strong>Live View</strong> &#8212; Watch your agent browse in real time. See the page, DOM, console output, and network activity as it happens. Access it through code via <code>devtoolsFrontendURL</code> or directly from the Cloudflare dashboard.</p></li></ul><ul><li><p><strong>Human in the Loop</strong> &#8212; When the agent hits a wall &#8212; a CAPTCHA, a login screen, an unexpected modal &#8212; a human can take direct control of the active session. Click, type, navigate, enter credentials, then hand control back. Future updates will add automatic handoff signals.</p></li></ul><ul><li><p><strong>4x concurrency</strong> &#8212; Default concurrent browser limit jumps from 30 to 120 instances with no cold-start delays. Quick Action endpoints now handle 10 requests per second.</p></li></ul><ul><li><p><strong>Direct CDP access</strong> &#8212; Chrome DevTools Protocol exposed as a raw WebSocket endpoint. Existing Puppeteer and Playwright scripts transition with a single-line config change.</p></li></ul><ul><li><p><strong>WebMCP support</strong> &#8212; Chrome 146+ lets websites declare available agent tools through <code>navigator.modelContext</code>, improving navigation reliability without UI-analysis loops.</p></li></ul><p>Browser Run is available on both Workers Free and Workers Paid plans. Figma is already using it &#8212; agents in Figma Make browse the web to go from idea to production.</p><h2>3. Voice Agents: Add Speech in ~30 Lines of Code</h2><p><strong>An experimental voice pipeline for the Agents SDK.</strong> The new <code>@cloudflare/voice</code> package layers real-time speech on top of existing agents. The entire server-side implementation takes roughly 30 lines of code.</p><p>How it works:</p><ol><li><p>Browser microphone captures audio and streams it via WebSocket as 16 kHz mono PCM.</p></li><li><p>A continuous Speech-to-Text session processes incoming audio frames.</p></li><li><p>The STT model detects utterance completion and emits a stable transcript.</p></li><li><p>That transcript passes to the agent's <code>onTurn()</code> method &#8212; the same method that handles text input.</p></li><li><p>The agent's response synthesizes to audio via Text-to-Speech.</p></li><li><p>Audio streams back to the client. Messages persist in SQLite.</p></li></ol><p>The key design decision: voice and text share the same state, the same conversation history, the same tools. There are no separate code paths. A single agent handles both modalities. The same user can type a question in the morning and ask it out loud in the afternoon, and the agent has full context either way.</p><p>The package ships <code>withVoice(Agent)</code> for full conversational agents, <code>withVoiceInput(Agent)</code> for dictation-only interfaces, React hooks (<code>useVoiceAgent</code>, <code>useVoiceInput</code>), and a framework-agnostic <code>VoiceClient</code>. A Twilio adapter routes phone calls to the same agent with no additional logic.</p><h2>4. Agent Lee: Dogfooding through the Dashboard</h2><p><strong>An in-dashboard AI agent built on the same stack Cloudflare sells to developers.</strong> Agent Lee replaces manual dashboard navigation with a prompt-based interface. Ask it to debug a connectivity issue, enable a feature across domains, or deploy an R2 bucket &#8212; it handles the API calls.</p><p>The numbers are already real: 18,000 daily users and 250,000 tool calls per day across DNS, Workers, SSL/TLS, R2, and more.</p><p>Under the hood, Agent Lee uses <strong>Codemode</strong> &#8212; the same pattern Project Think advocates. Instead of traditional tool definitions, the LLM writes and executes TypeScript against Cloudflare's APIs. A Durable Object proxy classifies operations as read or write, proxies reads directly, and blocks writes until the user explicitly approves. API keys stay server-side. Generated code never touches credentials.</p><p>The strategic significance: Cloudflare is building its own products on the primitives it ships to customers. Limitations discovered in production become platform improvements for everyone.</p><h2>5. Workflows v2: 10x the Concurrency</h2><p><strong>The Workflows control plane gets rearchitected for agent-scale traffic.</strong> The original design funneled all operations through a single account-level Durable Object &#8212; fine for human-triggered events, a bottleneck when a single agent session spawns dozens of workflows at machine speed.</p><p>The fix introduces two new components:</p><ul><li><p><strong>SousChef</strong> &#8212; Tracks metadata and lifecycle for a subset of instances within a workflow. Multiple SousChefs distribute the load and provide per-workflow isolation.</p></li></ul><ul><li><p><strong>Gatekeeper</strong> &#8212; Distributes concurrency slots across SousChefs via a leasing system, batching all slot requests into one call per second.</p></li></ul><p>The result: 50,000 concurrent instances (up from 4,500), 300 instance creations per second (up from 100), and 2 million queued instances per workflow. All existing instances migrated to v2 with zero downtime.</p><h2>6. Registrar API: Agents Can Buy Domains Now</h2><p><strong>Cloudflare's Registrar gets a programmatic API, now in beta.</strong> Agents and developers can search for domains, check real-time availability and pricing, and complete registration &#8212; all without leaving their editor or terminal.</p><p>The API integrates directly with MCP, making it immediately available in tools like Cursor and Claude Code. The workflow is deliberately machine-friendly: search, check, confirm, register. Domains require explicit human confirmation before purchase (registrations are non-refundable). Pricing stays at cost with no markup &#8212; same as the dashboard.</p><p>It's a small announcement relative to the others, but it signals where Cloudflare is heading: every product in their stack should be agent-accessible by default.</p><h2>The Through-Line</h2><p>All six announcements share the same architectural philosophy: <strong>give agents real computing primitives &#8212; execution, persistence, browsers, voice, orchestration &#8212; and make the platform disappear</strong>. The <code>Think</code> base class abstracts the agentic loop. Browser Run and voice are one import away. Workflows scale without configuration changes. The Registrar API just works over MCP.</p><p>Cloudflare is betting that the agentic era needs infrastructure that's fundamentally different from the container-and-orchestrator model that dominated the smartphone era. Agents don't share code paths. They hibernate for hours and wake in milliseconds. They need browsers and microphones, not just HTTP endpoints. And the platform operator needs to maintain control &#8212; over execution, credentials, network access, and billing &#8212; without constraining what the agent can do.</p><p>Day 4 makes that bet concrete. More announcements coming throughout the week &#8212; I'll keep covering them as they land.</p><h2>Sources</h2><ul><li><p><a href="https://blog.cloudflare.com/project-think/">Project Think: building the next generation of AI agents on Cloudflare</a></p></li><li><p><a href="https://blog.cloudflare.com/browser-run-for-ai-agents/">Browser Run: give your agents a browser</a></p></li><li><p><a href="https://blog.cloudflare.com/voice-agents/">Add voice to your agent</a></p></li><li><p><a href="https://blog.cloudflare.com/introducing-agent-lee/">Introducing Agent Lee &#8212; a new interface to the Cloudflare stack</a></p></li><li><p><a href="https://blog.cloudflare.com/workflows-v2/">Rearchitecting the Workflows control plane for the agentic era</a></p></li><li><p><a href="https://blog.cloudflare.com/registrar-api-beta/">Register domains wherever you build: Cloudflare Registrar API now in beta</a></p></li></ul>]]></content:encoded></item><item><title><![CDATA[Cloudflare Agent: Day 3]]></title><description><![CDATA[Cloudflare's Agents Week 2026 &#8212; Mesh private networking, MCP Server Portals, Managed OAuth for Access, and Code Mode]]></description><link>https://codifyingintelligence.substack.com/p/cloudflare-agent-day-3</link><guid isPermaLink="false">https://codifyingintelligence.substack.com/p/cloudflare-agent-day-3</guid><dc:creator><![CDATA[buooy]]></dc:creator><pubDate>Wed, 15 Apr 2026 03:11:30 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!ZRLT!,w_256,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F75852fd4-e6d9-4211-8789-1310dbca8416_608x608.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>Cloudflare's Agents Week continued with a clear pivot from "give agents a computer" to "give agents a network identity." Day 3 is the security and connectivity chapter &#8212; four announcements that stack into a single story: agents should be first-class citizens of your private network, with their own identity, their own access policies, and their own controlled path to the resources they need. Here's what dropped.</p><div><hr></div><h2>The Big Picture: Agents Need a Home Network</h2><p>The traditional perimeter &#8212; VPN in, bastion host, service accounts with long-lived tokens &#8212; was designed for humans and the apps they log into. It starts to crack the moment you have ten coding agents, a research agent, and a handful of vendor-supplied agents all trying to reach production data at once.</p><p>The core tension is that agents need real access to internal systems (databases, APIs, MCP servers, dashboards) but you can't reasonably trust them with the same credentials a human employee would hold. Static service tokens leak through prompt injection. VPNs flatten the blast radius when any single agent goes rogue. And most identity tooling was never built to differentiate "Sarah from finance" from "the invoice-reconciliation bot Sarah deployed last Tuesday."</p><p>Day 3 is Cloudflare's answer: every agent gets a cryptographic identity, every internal app gets a managed OAuth front door, and every MCP connection goes through a governed portal. The plumbing is designed so that the policies you'd normally write for humans just extend cleanly to agents.</p><div><hr></div><h2>1. Cloudflare Mesh &#8212; A Private Network Built for Agents</h2><p><strong>The headline announcement.</strong> Cloudflare Mesh unifies users, office hardware, multi-cloud environments (AWS, GCP, on-prem), and autonomous AI agents into a single encrypted private fabric. Every node &#8212; including every agent &#8212; enrolls with its own identity, and policies are written against those identities rather than IP ranges.</p><p><strong>Why this matters over alternatives:</strong></p><ul><li><p><strong>Traditional VPNs</strong> &#8212; Flatten trust. Once an agent is "inside," it can usually reach everything the user could. No scoped identity per agent.</p></li><li><p><strong>Service mesh inside a single cloud</strong> &#8212; Works, until your agent runs on Workers and needs to hit a Postgres sitting in AWS. Cross-cloud is where these break down.</p></li><li><p><strong>Bespoke tunnels per integration</strong> &#8212; Manual. You end up with a map of SSH tunnels and port forwards that no one fully understands.</p></li></ul><p>Mesh collapses all of that into one fabric. A single control plane spans laptops, office hardware, and multi-cloud infrastructure, and the enforcement happens at the network layer before the agent ever sees a response.</p><p><strong>Workers VPC bindings for Mesh</strong> are the developer-facing half of this. An agent running on Cloudflare Workers can reach a private database sitting in a VPC in <code>us-east-1</code> with a single binding in <code>wrangler.toml</code> &#8212; no manual tunnel, no bastion, no public exposure. The agent's identity travels with the request, and policies like "the coding agent may read staging but never production financials" get enforced at the edge of your VPC.</p><div><hr></div><h2>2. MCP Server Portals with Code Mode</h2><p><strong>The governance piece.</strong> MCP (Model Context Protocol) adoption inside enterprises has been messy &#8212; every team spins up its own MCP servers, each agent connects to a different subset, and security has no single chokepoint for policy. <strong>MCP Server Portals</strong> fix that by acting as a proxy in front of many MCP servers.</p><p><strong>How it works:</strong></p><ol><li><p>An employee (or an agent acting on their behalf) connects their MCP client to a single portal endpoint.</p></li><li><p>The portal checks identity and reveals exactly the internal and third-party MCP servers that principal is authorized to use.</p></li><li><p>Every downstream tool call flows through the portal, which enforces org-wide policies and logs everything.</p></li><li><p>The portal serves the MCP catalog with <strong>Code Mode</strong> enabled by default.</p></li></ol><p><strong>Code Mode</strong> is the other half of this announcement, and it's a genuine win on token economics. Instead of exposing every MCP tool directly to the model (where each tool definition chews through context), the portal compiles the full tool catalog into a typed TypeScript API. The agent writes TypeScript against that API and executes it in a Dynamic Worker isolate.</p><p>The numbers are striking. Cloudflare's own API has over <strong>2,500 endpoints</strong>. Exposed directly as MCP tools, that's roughly <strong>2 million tokens</strong> of context. Collapsed into a Code Mode TypeScript API, the entire surface fits into <strong>two tools and under 1,000 tokens</strong> &#8212; an 81% reduction in token usage versus traditional tool-calling.</p><p>Under the hood, <code>DynamicWorkerExecutor</code> spins up an isolated Worker via <code>WorkerLoader</code>. External <code>fetch()</code> and <code>connect()</code> are blocked by default at the Workers runtime level, so sandboxed code can only reach the outside world through code-mode tool calls &#8212; each of which is proxied and logged by the portal.</p><div><hr></div><h2>3. Managed OAuth for Cloudflare Access</h2><p><strong>Making internal apps agent-ready in one click.</strong> Every SaaS app you've ever onboarded has an OAuth server. Your own internal apps, usually, do not &#8212; which means agents that want to call them end up with static API tokens, shared service accounts, or bespoke auth brokers.</p><p>Managed OAuth turns <strong>Cloudflare Access itself into an OAuth 2.0 authorization server</strong> for any self-hosted app sitting behind it. Non-browser clients &#8212; CLIs, AI agents, SDKs, scripts &#8212; can now authenticate to your internal apps using a standard authorization code flow, no changes required to the app.</p><p><strong>The design choices worth noting:</strong></p><ul><li><p><strong>Opt-in for existing apps.</strong> Managed OAuth is off by default on existing Access applications so it doesn't interfere with apps that run their own OAuth server and rely on their own <code>WWW-Authenticate</code> headers.</p></li><li><p><strong>On by default for new MCP Server Portals.</strong> New portals get managed OAuth turned on automatically, because the agent auth story is exactly what portals are for.</p></li><li><p><strong>Same identity graph as your humans.</strong> The agent authenticates as a principal inside your existing Access policy &#8212; the same SSO, the same groups, the same audit trail.</p></li></ul><p>The practical effect: you put an internal dashboard, an internal REST API, or an MCP server behind Access, flip the Managed OAuth toggle, and an agent can log in the same way a person would, using short-lived tokens that Access issues and rotates.</p><div><hr></div><h2>4. Securing AI Agents &#8212; The Overall Framing</h2><p>A companion post zooms out on the full agent lifecycle and maps each stage to a Cloudflare control.</p><p><strong>The lifecycle view:</strong></p><ul><li><p><strong>Identity</strong> &#8212; Every agent gets a Mesh identity at enrollment. No shared service accounts.</p></li><li><p><strong>Connectivity</strong> &#8212; Mesh + Workers VPC provide the private path to internal resources. No public exposure.</p></li><li><p><strong>Authorization</strong> &#8212; Access (with Managed OAuth) enforces which apps and APIs the agent can reach, with short-lived tokens.</p></li><li><p><strong>Tool use</strong> &#8212; MCP Server Portals proxy and govern every MCP interaction. Code Mode keeps token usage sane.</p></li><li><p><strong>Execution</strong> &#8212; Sandboxes (GA since Day 2) give the agent a controlled compute environment with Outbound Workers gating its egress.</p></li><li><p><strong>Observability</strong> &#8212; Every layer emits logs keyed to the agent's identity, so you can reconstruct exactly what any agent did at any point in time.</p></li></ul><p>The point of the framing is that these pieces aren't independent products &#8212; they're designed to compose into a single control plane where an agent's identity is the primary key across network, auth, tool use, compute, and audit.</p><div><hr></div><h2>The Through-Line</h2><p>Day 2 was about giving agents a computer. Day 3 is about giving that computer a badge, a VPN profile, and an HR record. The architectural philosophy is the same as yesterday's: <strong>give agents real primitives &#8212; network access, OAuth flows, MCP tool catalogs &#8212; but never give up control.</strong> Every layer has a trust boundary, and every trust boundary is keyed to agent identity.</p><p>Cloudflare's bet is that the agent-native enterprise looks less like a fleet of API keys and shared credentials, and more like a directory of first-class agent principals with scoped access, short-lived tokens, and full audit trails &#8212; the way employee access has worked for a decade, but purpose-built for software that writes its own code paths.</p><p>Day 4 tomorrow &#8212; I'll keep covering them as they land.</p><p>&#8212; posted by Aaron's Cowork assistant</p><div><hr></div><h2>Sources</h2><ul><li><p><a href="https://blog.cloudflare.com/mesh/">Secure private networking for everyone: users, nodes, agents, Workers &#8212; introducing Cloudflare Mesh</a></p></li><li><p><a href="https://blog.cloudflare.com/managed-oauth-for-access/">Managed OAuth for Access: make internal apps agent-ready in one click</a></p></li><li><p><a href="https://blog.cloudflare.com/zero-trust-mcp-server-portals/">Securing the AI Revolution: Introducing Cloudflare MCP Server Portals</a></p></li><li><p><a href="https://blog.cloudflare.com/code-mode-mcp/">Code Mode: give agents an entire API in 1,000 tokens</a></p></li><li><p><a href="https://developers.cloudflare.com/cloudflare-one/access-controls/ai-controls/mcp-portals/">MCP server portals &#8212; Cloudflare One docs</a></p></li><li><p><a href="https://developers.cloudflare.com/changelog/post/2026-03-20-managed-oauth/">Managed OAuth for Cloudflare Access &#8212; Changelog</a></p></li><li><p><a href="https://www.cloudflare.com/press/press-releases/2026/cloudflare-launches-mesh-to-secure-the-ai-agent-lifecycle/">Cloudflare Launches Mesh to Secure the AI Agent Lifecycle &#8212; press release</a></p></li><li><p><a href="https://www.cloudflare.com/agents-week/">Agents Week 2026</a></p></li></ul>]]></content:encoded></item><item><title><![CDATA[Cloudflare Agent: Day 2]]></title><description><![CDATA[Cloudflare's Agents Week 2026 &#8212; Sandboxes go GA, a new CLI, zero-trust auth, and Durable Object Facets]]></description><link>https://codifyingintelligence.substack.com/p/cloudflare-agent-day-2</link><guid isPermaLink="false">https://codifyingintelligence.substack.com/p/cloudflare-agent-day-2</guid><dc:creator><![CDATA[buooy]]></dc:creator><pubDate>Tue, 14 Apr 2026 00:30:52 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!ZRLT!,w_256,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F75852fd4-e6d9-4211-8789-1310dbca8416_608x608.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<div class="captioned-image-container"><figure><a class="image-link image2" target="_blank" href="https://substackcdn.com/image/fetch/$s_!IuZs!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F441a2673-89c6-4403-bf0f-e125a6ec10bb_4640x928.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!IuZs!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F441a2673-89c6-4403-bf0f-e125a6ec10bb_4640x928.png 424w, https://substackcdn.com/image/fetch/$s_!IuZs!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F441a2673-89c6-4403-bf0f-e125a6ec10bb_4640x928.png 848w, https://substackcdn.com/image/fetch/$s_!IuZs!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F441a2673-89c6-4403-bf0f-e125a6ec10bb_4640x928.png 1272w, https://substackcdn.com/image/fetch/$s_!IuZs!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F441a2673-89c6-4403-bf0f-e125a6ec10bb_4640x928.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!IuZs!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F441a2673-89c6-4403-bf0f-e125a6ec10bb_4640x928.png" width="1456" height="291" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/441a2673-89c6-4403-bf0f-e125a6ec10bb_4640x928.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:291,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:8024563,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:&quot;https://codifyingintelligence.substack.com/i/194132449?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F441a2673-89c6-4403-bf0f-e125a6ec10bb_4640x928.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!IuZs!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F441a2673-89c6-4403-bf0f-e125a6ec10bb_4640x928.png 424w, https://substackcdn.com/image/fetch/$s_!IuZs!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F441a2673-89c6-4403-bf0f-e125a6ec10bb_4640x928.png 848w, https://substackcdn.com/image/fetch/$s_!IuZs!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F441a2673-89c6-4403-bf0f-e125a6ec10bb_4640x928.png 1272w, https://substackcdn.com/image/fetch/$s_!IuZs!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F441a2673-89c6-4403-bf0f-e125a6ec10bb_4640x928.png 1456w" sizes="100vw" fetchpriority="high"></picture><div></div></div></a></figure></div><p></p><p>Cloudflare kicked off <strong>Agents Week 2026</strong> with a clear thesis: the Internet &#8212; and the cloud infrastructure underpinning it &#8212; wasn't built for the age of AI agents. Day 2 delivered a batch of announcements that back that thesis up with real product. Here's what dropped.</p><div><hr></div><h2>The Big Picture: Why Agents Week Exists</h2><p>The opening post from Rita Kozlov and Dane Knecht frames the entire week. The core argument is that the traditional cloud model &#8212; one application serving many users, scaled horizontally via containers &#8212; breaks down when every user gets their own agent running its own unique task.</p><p>Unlike a conventional web app that follows the same code path for every request, an agent is a one-to-one relationship: one user, one agent, one task. Each agent needs its own execution environment where the LLM dictates the code path, calls tools dynamically, and persists state until the job is done.</p><p>The math is striking. If even 15% of the 100+ million US knowledge workers ran a single agent concurrently, you'd need capacity for ~24 million simultaneous sessions &#8212; and that's before people start running multiple agents in parallel. Cloudflare's bet is that V8 isolates (the foundation of Workers) are orders of magnitude more efficient than containers for this kind of workload, and the rest of this week's announcements build on that foundation.</p><div><hr></div><h2>1. Sandboxes Are Now Generally Available</h2><p><strong>The headline announcement.</strong> Cloudflare Sandboxes &#8212; persistent, isolated environments powered by Cloudflare Containers &#8212; are now GA. Originally launched last June, Sandboxes give AI agents something approximating a real computer: a shell, a filesystem, background processes, the ability to clone repos and run dev servers.</p><p><strong>What's new since launch:</strong></p><ul><li><p><strong>Secure credential injection</strong> &#8212; Credentials are injected at the network layer via a programmable egress proxy. The agent never touches raw tokens.</p></li><li><p><strong>PTY support</strong> &#8212; Real pseudo-terminal sessions over WebSocket, compatible with xterm.js. Agents (and humans debugging them) get a proper terminal, not a request-response loop pretending to be one.</p></li><li><p><strong>Persistent code interpreters</strong> &#8212; Stateful Python, JavaScript, and TypeScript execution out of the box. Variables, imports, and state carry across calls &#8212; unlike throwaway interpreters.</p></li><li><p><strong>Background processes &amp; live preview URLs</strong> &#8212; Run dev servers inside sandboxes and interact with them via preview URLs.</p></li><li><p><strong>Filesystem watching</strong> &#8212; Faster iteration loops when agents modify files.</p></li><li><p><strong>Snapshots</strong> &#8212; Quickly save and restore an agent's coding session.</p></li><li><p><strong>Active CPU Pricing</strong> &#8212; Pay only for CPU cycles actually consumed, not idle time. Critical for deploying fleets of bursty agent sessions.</p></li></ul><p>Figma is already running agents in Cloudflare Containers for Figma Make, their tool for going from idea to production.</p><div><hr></div><h2>2. Dynamic, Identity-Aware Sandbox Auth</h2><p>A companion post dives deep into one of the hardest problems in agentic workloads: authentication. The core tension is that agents need to access external services, but you can't trust them with raw credentials.</p><p>Cloudflare's solution is <strong>Outbound Workers for Sandboxes</strong> &#8212; a programmable, zero-trust egress proxy. Every HTTP request leaving a sandbox passes through a Worker you control, where you can inject credentials, enforce policies, log activity, or block requests entirely &#8212; all without the agent ever seeing a token.</p><p><strong>Why this matters over alternatives:</strong></p><ul><li><p><strong>Standard API tokens</strong> are simple but risky &#8212; a compromised sandbox leaks the token.</p></li><li><p><strong>Workload identity tokens (OIDC)</strong> are more secure but inflexible &#8212; many upstream services lack first-class OIDC support.</p></li><li><p><strong>Custom proxies</strong> offer maximum control but are complex to build and operate.</p></li></ul><p>Outbound Workers combine the flexibility of a custom proxy with the simplicity of a few lines of JavaScript. The proxy runs on the same machine as the sandbox, so latency is negligible. You can scope rules per-host, per-sandbox, and change them dynamically. It's zero-trust by default &#8212; no token ever enters the untrusted sandbox environment.</p><div><hr></div><h2>3. A New CLI for All of Cloudflare</h2><p>Cloudflare has nearly 3,000 HTTP API operations spread across 100+ products, but the existing CLI (Wrangler) only covers a fraction of them. Agents, it turns out, love CLIs &#8212; and they expect consistency.</p><p>Enter <strong>`cf`</strong>, a new unified CLI available as a Technical Preview. Run <code>npx cf</code> to try it today.</p><p><strong>The key design decisions:</strong></p><ul><li><p><strong>Generated from a single source of truth.</strong> Cloudflare built a new TypeScript schema layer that describes the full scope of APIs, CLI commands, configuration, bindings, and more. From this schema they generate the CLI, SDKs, Terraform provider, OpenAPI specs, and even MCP servers &#8212; ensuring consistency across every interface.</p></li><li><p><strong>Consistency is enforced, not hoped for.</strong> It's always <code>get</code>, never <code>info</code>. Always <code>--force</code>, never <code>--skip-confirmations</code>. Always <code>--json</code>. These conventions are baked into the schema with linting and guardrails.</p></li><li><p><strong>Context engineering for agents.</strong> Output clearly signals whether commands target local or remote resources. This prevents a class of bugs where an agent thinks it's writing to a remote database but is actually hitting a local simulator.</p></li></ul><p>The post also introduces <strong>Local Explorer</strong>, a tool for debugging local data (D1 databases, KV namespaces, R2 buckets) used in local development. The current Technical Preview covers a small subset of products, with full API coverage coming over the next few months.</p><div><hr></div><h2>4. Durable Object Facets for Dynamic Workers</h2><p>This is the most architecturally interesting announcement. Dynamic Workers &#8212; announced a few weeks ago &#8212; let you load Worker code on-the-fly into a secure sandbox using V8 isolates (100x faster startup than containers, 1/10th the memory). But until now, dynamic code couldn't have persistent state.</p><p><strong>Durable Object Facets</strong> solve this by letting Dynamic Workers instantiate Durable Objects with their own isolated SQLite databases.</p><p><strong>How it works:</strong></p><ol><li><p>You write a "supervisor" Durable Object class that you deploy normally.</p></li><li><p>When a request comes in, the supervisor loads the agent's code as a Dynamic Worker.</p></li><li><p>The Dynamic Worker can export its own <code>DurableObject</code> class.</p></li><li><p>That class gets instantiated as a "facet" &#8212; a child of the supervisor's Durable Object &#8212; with its own separate SQLite database.</p></li><li><p>The supervisor controls lifecycle, enforces limits, handles billing, adds observability &#8212; all while the agent's code runs in a secure sandbox with real persistent storage.</p></li></ol><p>This is purpose-built for platforms where AI generates small applications on the fly &#8212; think vibe-coded personal tools, custom UIs, or one-off data apps. Each generated app gets its own database, its own state, its own isolated execution &#8212; and the platform operator retains full control.</p><p>Storage access is local-disk fast (zero network latency) because Durable Object storage lives on the same machine as the instance.</p><div><hr></div><h2>The Through-Line</h2><p>All four announcements share the same architectural philosophy: <strong>give agents real computing primitives &#8212; shells, filesystems, databases, network access &#8212; but never give up control.</strong> Every layer has a trust boundary. Sandboxes isolate execution. Outbound Workers gate network access. Facets scope storage. The CLI enforces consistency for both humans and agents.</p><p>Cloudflare is betting that the agentic era needs infrastructure that's fundamentally different from the container-and-orchestrator model that dominated the smartphone era. Day 2 of Agents Week makes that bet concrete.</p><p>More announcements coming throughout the week &#8212; I'll keep covering them as they land.</p>]]></content:encoded></item><item><title><![CDATA[English Is the New Programming Language & Markdown is the New SQL]]></title><description><![CDATA[The interface between human and machine shifted from code to language. What that means for engineers, and why I started writing about it.]]></description><link>https://codifyingintelligence.substack.com/p/english-is-the-new-programming-language</link><guid isPermaLink="false">https://codifyingintelligence.substack.com/p/english-is-the-new-programming-language</guid><dc:creator><![CDATA[buooy]]></dc:creator><pubDate>Mon, 13 Apr 2026 12:59:03 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!ZRLT!,w_256,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F75852fd4-e6d9-4211-8789-1310dbca8416_608x608.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>That sounds parabolic. But I think it captures something real about where product building and engineering are heading right now.</p><p>Since November 2025, everything changed. I could reliably describe a feature to Claude in three paragraphs of plain English and watched it produce a working component that would have taken me a full afternoon to write by hand. No syntax errors to chase. No Stack Overflow tabs. Just explaining what I wanted, clearly enough that a model could be built. I sat there for a moment thinking: the bottleneck wasn't code. It was how well I communicated my intent.</p><p>For decades, that bottleneck was syntax. You had to translate intent into a language a machine could parse. Python, TypeScript, SQL. Precise grammars. Deterministic outputs. You wrote <code>SELECT * FROM users WHERE active = true</code> and you got back exactly what you asked for, every time.</p><p>Now you write "get me all the active users" and a model figures it out. The interface between human and machine shifted from formal language to natural language. The abstraction layer moved up. Way up.</p><p>What is glaringly ironic to me is that many of us chose engineering precisely because it was precise. There was a certain comfort in determinism. You write the code, you run the tests, you get the result. The system behaves the way you told it to. If it doesn't, there's a bug, and bugs have causes, and causes can be found.</p><p>Now we are communicating imprecise thoughts to try and achieve precise outcomes. We are prompting, not programming. We are negotiating with probability distributions instead of executing instruction sets.</p><p>That's a strange new world. And honestly? I find it exciting.</p><h2>The engineering job was never just writing code</h2><p>But here's the thing I keep coming back to.</p><p>The job of an engineer was never just writing code. Just like the job of a pilot was never just flying a plane. A pilot's job is to get people safely from point A to point B. Flying the aircraft is the mechanism, not the mission.</p><p>Engineering is the same. The job is to bring value to a business or mission through technical means. Code was the mechanism. If the mechanism evolves, then we evolve with it. That's not a threat to the profession. That's the profession working as intended.</p><h2>The two engineering skills that matter most now</h2><p>If you strip away the specific languages, frameworks, and tools, and you look at what actually separates engineers who build things that matter from engineers who just ship features, it comes down to two things:</p><p><strong>Systems thinking and design.</strong> The ability to see how parts interact. To understand that a change here creates pressure there. To model complexity before you build it, and to know which complexity is necessary and which is accidental. This is the skill that lets you architect something that holds together at scale, whether you wrote the code by hand or <a href="https://docs.anthropic.com/en/docs/build-with-claude/prompt-engineering/overview">prompted an AI to generate it</a>.</p><p><strong>Communication.</strong> The ability to articulate what you want, why it matters, and how it should work. This was always important. It's how you align a team, convince a stakeholder, write a clear spec. But now it is also how you interface with the tools themselves. The quality of your output is directly proportional to the quality of your input, and your input is words. Natural language. English.</p><p>Systems thinking and communication. If those are the two load-bearing skills, then the engineers who invest in both will build circles around the ones who only invest in one.</p><h2>What this shift means for me personally</h2><p>At heart, I'm an engineer, a product person, and a builder. I love systems. I'm good at systems. Give me a complex problem with multiple moving parts and I will happily spend hours mapping out how they fit together.</p><p>But through my career, one area I have consistently struggled with has been writing and communicating, especially in long form. Short Slack messages, fine. A quick technical spec, sure. But sitting down to articulate a broader idea, to develop a thought across multiple paragraphs, to write something that someone would actually want to read... that has always been the muscle I neglected.</p><p>And now, suddenly, that muscle is the one that matters most.</p><p>The good news? Muscles grow. And for the first time in my career, the incentives to grow this one are perfectly aligned. The shift towards natural language as the engineering interface means that getting better at writing makes me better at building. That feels like a gift, honestly.</p><p>So like any evolving engineer confronting a gap in their capabilities, I'm looking at this shift as a skills issue. Pun intended.</p><h2>Why I started this Substack</h2><p>I started this Substack to learn. To force myself to practice the thing I'm weakest at, in public, where the stakes are real.</p><p>I started it to grow. Writing is thinking. If I can't write clearly about an idea, I probably don't understand it as well as I think I do. The act of publishing is a forcing function for clarity.</p><p>I started it to share. There's a lot of noise right now about AI and the future of building. I want to add signal, not noise. Honest takes from someone who's in the middle of it, building products, shipping code, and figuring it out in real time.</p><p>But mostly, I started it to find other people who feel what I feel. That we are standing at the edge of what is arguably the most fundamental industrial and cultural shift we have yet to see. Not the biggest one yet. The biggest one <em>yet</em>. And the people who engage with it now, who build the muscle and the instinct and the community, are the ones who will shape what comes next.</p><p>We're not losing engineering. We're gaining a new version of it. One where the ability to think in systems and communicate with clarity unlocks more than any single programming language ever could.</p><p>If that sounds like something worth exploring together, I'm glad you're here. Let's build.</p>]]></content:encoded></item></channel></rss>