<?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[The System Design Newsletter]]></title><description><![CDATA[Download my system design playbook on newsletter signup for FREE]]></description><link>https://newsletter.systemdesign.one</link><image><url>https://substackcdn.com/image/fetch/$s_!W5r-!,w_256,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa1c8067a-95bb-416b-9114-e0b9fb8821d4_256x256.png</url><title>The System Design Newsletter</title><link>https://newsletter.systemdesign.one</link></image><generator>Substack</generator><lastBuildDate>Tue, 13 Oct 2026 07:48:30 GMT</lastBuildDate><atom:link href="https://newsletter.systemdesign.one/feed" rel="self" type="application/rss+xml"/><copyright><![CDATA[Neo Kim]]></copyright><language><![CDATA[en]]></language><webMaster><![CDATA[systemdesignone@substack.com]]></webMaster><itunes:owner><itunes:email><![CDATA[systemdesignone@substack.com]]></itunes:email><itunes:name><![CDATA[Neo Kim]]></itunes:name></itunes:owner><itunes:author><![CDATA[Neo Kim]]></itunes:author><googleplay:owner><![CDATA[systemdesignone@substack.com]]></googleplay:owner><googleplay:email><![CDATA[systemdesignone@substack.com]]></googleplay:email><googleplay:author><![CDATA[Neo Kim]]></googleplay:author><itunes:block><![CDATA[Yes]]></itunes:block><item><title><![CDATA[How to Scale an “AI App” to 1 Million Users in Production]]></title><description><![CDATA[#189: Part 7 - Generative AI Masterclass]]></description><link>https://newsletter.systemdesign.one/p/llm-inference-cost-optimization</link><guid isPermaLink="false">https://newsletter.systemdesign.one/p/llm-inference-cost-optimization</guid><dc:creator><![CDATA[Louis-François Bouchard]]></dc:creator><pubDate>Mon, 12 Oct 2026 11:30:16 GMT</pubDate><enclosure url="https://substack-post-media.s3.amazonaws.com/public/images/a248d777-d0fd-4da0-bf04-c7573a9a721d_1280x720.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p></p><div class="captioned-image-container"><figure><a class="image-link image2" target="_blank" href="https://newsletter.systemdesign.one/subscribe?yearly=true" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!RKN7!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3689f342-2008-4ce6-b968-16461682508b_1280x300.png 424w, https://substackcdn.com/image/fetch/$s_!RKN7!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3689f342-2008-4ce6-b968-16461682508b_1280x300.png 848w, https://substackcdn.com/image/fetch/$s_!RKN7!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3689f342-2008-4ce6-b968-16461682508b_1280x300.png 1272w, https://substackcdn.com/image/fetch/$s_!RKN7!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3689f342-2008-4ce6-b968-16461682508b_1280x300.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!RKN7!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3689f342-2008-4ce6-b968-16461682508b_1280x300.png" width="1280" height="300" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/3689f342-2008-4ce6-b968-16461682508b_1280x300.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:300,&quot;width&quot;:1280,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:24224,&quot;alt&quot;:&quot;&quot;,&quot;title&quot;:&quot;&quot;,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:&quot;https://newsletter.systemdesign.one/subscribe?yearly=true&quot;,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:&quot;https://newsletter.systemdesign.one/i/192435842?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3689f342-2008-4ce6-b968-16461682508b_1280x300.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" title="" srcset="https://substackcdn.com/image/fetch/$s_!RKN7!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3689f342-2008-4ce6-b968-16461682508b_1280x300.png 424w, https://substackcdn.com/image/fetch/$s_!RKN7!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3689f342-2008-4ce6-b968-16461682508b_1280x300.png 848w, https://substackcdn.com/image/fetch/$s_!RKN7!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3689f342-2008-4ce6-b968-16461682508b_1280x300.png 1272w, https://substackcdn.com/image/fetch/$s_!RKN7!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3689f342-2008-4ce6-b968-16461682508b_1280x300.png 1456w" sizes="100vw" fetchpriority="high"></picture><div></div></div></a></figure></div><ul><li><p><em><a href="https://newsletter.systemdesign.one/p/llm-inference-cost-optimization/?action=share">Share this letter</a> &amp; I&#8217;ll send you some rewards for the referrals.</em></p></li></ul><div><hr></div><p>Traditional software gets cheaper per user as it scales.</p><p>Yet AI software on an API does not!&#8230;</p><p>Every request runs a model, every model call has a per-token price, and the price stays &#8220;flat&#8221; whether ten people use it or a million do.</p><p>Self-hosting changes this, as GPU costs amortize across users.</p><p>But it introduces a new problem: <em>capacity planning, hardware management, and a minimum spend that has to be justified before the first user arrives.</em></p><p>So scaling an AI product forces cost decisions most software never encounters, and most engineering teams face them only after users have already arrived.</p><p>Building an AI system that produces correct, grounded, and safe responses is one challenge&#8230;Serving those responses reliably and affordably to a million users is another.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!bZpH!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F761f1bff-41a3-48f3-b068-1871624222ae_1698x805.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!bZpH!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F761f1bff-41a3-48f3-b068-1871624222ae_1698x805.png 424w, https://substackcdn.com/image/fetch/$s_!bZpH!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F761f1bff-41a3-48f3-b068-1871624222ae_1698x805.png 848w, https://substackcdn.com/image/fetch/$s_!bZpH!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F761f1bff-41a3-48f3-b068-1871624222ae_1698x805.png 1272w, https://substackcdn.com/image/fetch/$s_!bZpH!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F761f1bff-41a3-48f3-b068-1871624222ae_1698x805.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!bZpH!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F761f1bff-41a3-48f3-b068-1871624222ae_1698x805.png" width="1456" height="690" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/761f1bff-41a3-48f3-b068-1871624222ae_1698x805.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:690,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:1014671,&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://newsletter.systemdesign.one/i/219568117?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F761f1bff-41a3-48f3-b068-1871624222ae_1698x805.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_!bZpH!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F761f1bff-41a3-48f3-b068-1871624222ae_1698x805.png 424w, https://substackcdn.com/image/fetch/$s_!bZpH!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F761f1bff-41a3-48f3-b068-1871624222ae_1698x805.png 848w, https://substackcdn.com/image/fetch/$s_!bZpH!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F761f1bff-41a3-48f3-b068-1871624222ae_1698x805.png 1272w, https://substackcdn.com/image/fetch/$s_!bZpH!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F761f1bff-41a3-48f3-b068-1871624222ae_1698x805.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 buttonBase-GK1x3M"><svg aria-hidden="true" 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" class="icon-noB79L"><g><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 buttonBase-GK1x3M"><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 icon-noB79L"><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">At one million daily users, admission control protects capacity, cache hits bypass inference, misses route across serving tiers, and traced outcomes plus reviewed feedback drive eval-gated releases.</figcaption></figure></div><p>This newsletter shows you how to redesign a <a href="https://newsletter.systemdesign.one/p/ai-chat-assistant">chat assistant</a> for large-scale production, reduce inference costs &amp; build the infrastructure needed to handle millions of users.</p><h4 style="text-align: center;"><strong>&#167;</strong></h4><div class="callout-block" data-callout="true"><h2><strong><a href="https://link.svix.com/system-01">Make your agents realtime (Partner)</a></strong></h2><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://link.svix.com/system-01" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!v-ZP!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fde8a87d9-0b90-4a74-857c-be37bba398f2_2000x1047.png 424w, https://substackcdn.com/image/fetch/$s_!v-ZP!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fde8a87d9-0b90-4a74-857c-be37bba398f2_2000x1047.png 848w, https://substackcdn.com/image/fetch/$s_!v-ZP!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fde8a87d9-0b90-4a74-857c-be37bba398f2_2000x1047.png 1272w, https://substackcdn.com/image/fetch/$s_!v-ZP!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fde8a87d9-0b90-4a74-857c-be37bba398f2_2000x1047.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!v-ZP!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fde8a87d9-0b90-4a74-857c-be37bba398f2_2000x1047.png" width="1456" height="762" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/de8a87d9-0b90-4a74-857c-be37bba398f2_2000x1047.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:762,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:212365,&quot;alt&quot;:&quot;&quot;,&quot;title&quot;:&quot;&quot;,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:&quot;https://link.svix.com/system-01&quot;,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://newsletter.systemdesign.one/i/211217193?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fde8a87d9-0b90-4a74-857c-be37bba398f2_2000x1047.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" title="" srcset="https://substackcdn.com/image/fetch/$s_!v-ZP!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fde8a87d9-0b90-4a74-857c-be37bba398f2_2000x1047.png 424w, https://substackcdn.com/image/fetch/$s_!v-ZP!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fde8a87d9-0b90-4a74-857c-be37bba398f2_2000x1047.png 848w, https://substackcdn.com/image/fetch/$s_!v-ZP!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fde8a87d9-0b90-4a74-857c-be37bba398f2_2000x1047.png 1272w, https://substackcdn.com/image/fetch/$s_!v-ZP!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fde8a87d9-0b90-4a74-857c-be37bba398f2_2000x1047.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 buttonBase-GK1x3M"><svg aria-hidden="true" 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" class="icon-noB79L"><g><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 buttonBase-GK1x3M"><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 icon-noB79L"><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>Agents are killing your apps with compounding latency across workflows.</p><p>Your customers want their agent workflows to be efficient, so you&#8217;re losing deals if you don&#8217;t make them event-driven. Webhooks solve this issue, but implementing them is harder than it looks.</p><p>If you homebrewed your webhooks and are getting pinged at 4 in the morning for failed deliveries, this is for you.</p><p><strong><a href="https://link.svix.com/system-01">Svix</a></strong> handles everything: retries, idempotency, security, and compliance. Qualified startups get $12,000 in free credits.</p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://link.svix.com/system-01&quot;,&quot;text&quot;:&quot;Get started for free&quot;,&quot;action&quot;:null,&quot;class&quot;:&quot;button-wrapper&quot;}" data-component-name="ButtonCreateButton"><a class="button primary button-wrapper" href="https://link.svix.com/system-01"><span>Get started for free</span></a></p><p><em>(Thanks to <strong><a href="https://link.svix.com/system-01">Svix</a></strong> for partnering on this newsletter.)</em></p></div><h4 style="text-align: center;"><strong>&#167;</strong></h4><div class="captioned-image-container"><figure><a class="image-link image2" target="_blank" href="https://www.youtube.com/@whatsai?sub_confirmation=1" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!Cu_b!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F14cb8599-59a4-4587-932c-fd09ddd0a595_1100x220.png 424w, https://substackcdn.com/image/fetch/$s_!Cu_b!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F14cb8599-59a4-4587-932c-fd09ddd0a595_1100x220.png 848w, https://substackcdn.com/image/fetch/$s_!Cu_b!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F14cb8599-59a4-4587-932c-fd09ddd0a595_1100x220.png 1272w, https://substackcdn.com/image/fetch/$s_!Cu_b!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F14cb8599-59a4-4587-932c-fd09ddd0a595_1100x220.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!Cu_b!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F14cb8599-59a4-4587-932c-fd09ddd0a595_1100x220.png" width="1100" height="220" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/14cb8599-59a4-4587-932c-fd09ddd0a595_1100x220.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:220,&quot;width&quot;:1100,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;&quot;,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:&quot;https://www.youtube.com/@whatsai?sub_confirmation=1&quot;,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" title="" srcset="https://substackcdn.com/image/fetch/$s_!Cu_b!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F14cb8599-59a4-4587-932c-fd09ddd0a595_1100x220.png 424w, https://substackcdn.com/image/fetch/$s_!Cu_b!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F14cb8599-59a4-4587-932c-fd09ddd0a595_1100x220.png 848w, https://substackcdn.com/image/fetch/$s_!Cu_b!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F14cb8599-59a4-4587-932c-fd09ddd0a595_1100x220.png 1272w, https://substackcdn.com/image/fetch/$s_!Cu_b!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F14cb8599-59a4-4587-932c-fd09ddd0a595_1100x220.png 1456w" sizes="100vw" loading="lazy"></picture><div></div></div></a></figure></div><p>I want to introduce <a href="https://louisbouchard.substack.com/">Louis-Fran&#231;ois Bouchard</a> as a guest author.</p><p>He&#8217;s a best-selling author (<a href="https://amzn.to/4bqYU9b">Building LLMs for Production</a>), the co-founder of <a href="https://academy.towardsai.net/?ref=1f9b29">Towards AI</a>, and the creator of the YouTube Channel, <a href="https://www.youtube.com/@whatsai?sub_confirmation=1">What&#8217;s AI</a>, where he helps people understand AI and learn how to apply it in the real world. Through his development work with clients, content, teaching, AI training programs, and the new Mentorship program at <a href="https://academy.towardsai.net/?ref=1f9b29">Towards AI Academy</a>, Louis focuses on making AI practical for builders, engineers, and curious learners alike.</p><p>At Towards AI, he and his team train AI engineers through courses and mentorship built for every stage, from beginner to advanced. That educational mission and the real-world experience building for his clients are exactly why I wanted him in this newsletter series.</p><h4 style="text-align: center;"><strong>&#167;</strong></h4><p><em><strong>Here&#8217;s what&#8217;s inside this newsletter:</strong></em></p><ul><li><p><strong>Your $193,000 AI bill could drop to $48,000.</strong> Three optimizations cut the projected monthly cost by 75% at 100,000 daily conversations. Most teams overlook where the biggest savings actually come from.</p></li><li><p><strong>Your smartest AI model could be your biggest money leak.</strong> Up to 70% of requests in our example go to a cheaper model, while the expensive one handles the rest. The surprising part is what happens to the total bill.</p></li><li><p><strong>At 100K users, renting AI could beat owning GPUs.</strong> A $48,000 API bill competes with a $49,560 self-hosted setup. At 1 million daily conversations, the economics flip dramatically.</p></li><li><p><strong>One GPU benchmark could wipe out $182,000 in monthly savings.</strong> Self-hosting looks 38% cheaper at scale, until lower throughput forces you to rent dozens of additional GPUs.</p></li><li><p><strong>Your AI could pass every test and still break in production.</strong> The hidden gaps between evaluations, guardrails, and real user behavior, and why production failures need to become tests before the next release.</p></li></ul><p></p><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://newsletter.systemdesign.one/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"><span data-color="#3a7bf9" style="color: rgb(58, 123, 249);">Golden members get all letters like these!&#8230;</span></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><h4 style="text-align: center;"><strong>&#167;</strong></h4><h2>Should You Plan for a Million Users?</h2><p>For most AI products, planning for a million users too early wastes time &amp; money.</p><p>An API key and a credit card are often enough to launch a prototype. You should focus on building a useful product before investing in complex infrastructure.</p><p>But as your user base grows, these challenges become HARD to ignore:</p><ul><li><p><strong>Cost increases with usage.</strong> A chat assistant costs approximately $0.064 per conversation using GPT-5.4. </p><ul><li><p>At 100 daily users, the monthly model bill reaches roughly $193.</p></li><li><p>At 100,000 daily users, it grows to $193,000.</p></li><li><p>At one million, it reaches $1.93 million.</p></li></ul><p>Model routing &amp; caching reduce the cost per conversation, but total spending still grows with usage.</p></li><li><p><strong>Latency increases under heavy traffic.</strong> An AI system that responds in 400 milliseconds with ten concurrent users could take two seconds with a thousand. As incoming requests approach the system&#8217;s serving capacity, queues grow &amp; response times increase.</p></li><li><p><strong>Small prompt changes become expensive.</strong> Adding 200 tokens to your system prompt across one million daily requests produces six billion additional input tokens per month. At GPT-5.4&#8217;s input price of $2.50 per million tokens, that adds $15,000 to your monthly bill before prompt caching.</p></li><li><p><strong>API rate limits restrict scalability.</strong> AI providers enforce limits on requests &amp; tokens per minute. As traffic grows, these limits could prevent your application from serving more users, even when your infrastructure has spare capacity.</p></li><li><p><strong>Unit economics determine profitability.</strong> If each conversation costs more than the revenue it generates, acquiring more users increases your losses. You need to measure cost per conversation against the revenue it produces.</p></li></ul><p>These challenges determine when your AI application needs more advanced production infrastructure.</p><p>So before moving beyond a managed API, evaluate these four constraints:</p><ul><li><p><strong>Unit economics:</strong> Does the cost per successful conversation support your target profit margin?</p></li><li><p><strong>Service level objectives (SLOs):</strong> Does the system meet your latency, availability, and reliability targets?</p></li><li><p><strong>Rate limits:</strong> Does your provider support your expected request and token volume?</p></li><li><p><strong>Data residency:</strong> Does the provider meet your requirements for where user data gets processed &amp; stored?</p></li></ul><p>As long as your API provider meets these requirements, staying with managed infrastructure is often the &#8220;simplest&#8221; choice.</p><p>The rest of this newsletter shows you how to estimate costs, identify scalability bottlenecks, and decide when more advanced infrastructure becomes necessary.</p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://newsletter.systemdesign.one/p/llm-inference-cost-optimization?utm_source=substack&utm_medium=email&utm_content=share&action=share&quot;,&quot;text&quot;:&quot;Share&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://newsletter.systemdesign.one/p/llm-inference-cost-optimization?utm_source=substack&utm_medium=email&utm_content=share&action=share"><span>Share</span></a></p><h4 style="text-align: center;"><strong>&#167;</strong></h4><h2>Target System Design</h2><p>Our goal is to scale an AI chat assistant to <em>one million daily users</em> while keeping inference costs under control.</p><p>For simplicity, we assume each daily active user starts one conversation. Each conversation contains eight requests to the language model.</p><p>Let&#8217;s define the token usage for each request:</p><ul><li><p><strong>Static input:</strong> 1,024 tokens for the system prompt and a fixed few-shot examples. This meets OpenAI&#8217;s minimum prefix length for prompt caching.</p></li><li><p><strong>Dynamic input:</strong> 400 tokens for conversation history &amp; current user message.</p></li><li><p><strong>Output:</strong> 300 billed tokens generated by the model.</p></li></ul><p>Each request therefore processes 1,424 input tokens &amp; generates 300 output tokens.</p><p>With eight requests per conversation, the total becomes:</p><ul><li><p><strong>Input:</strong> 11,392 tokens per conversation.</p></li><li><p><strong>Output:</strong> 2,400 tokens per conversation.</p></li></ul><p>(These are illustrative assumptions. In production, you should replace them with actual token usage collected from your application.)</p><h3>System Requirements</h3><p>Our production system must meet seven requirements:</p><ul><li><p><strong>Cost:</strong> Keep model costs below a budget of $0.02 per conversation. Determine your actual budget from revenue per successful conversation and required gross margin.</p></li><li><p><strong>Latency:</strong> Define service level objectives (<strong>SLOs</strong>) for each workload, including time to first token (<strong>TTFT</strong>) for interactive chat &amp; completion deadlines for asynchronous jobs.</p></li><li><p><strong>Availability:</strong> Maintain 99.9% uptime, including during model &amp; prompt updates.</p></li><li><p><strong>Safe deployments:</strong> Support model changes with a reliable rollback mechanism.</p></li><li><p><strong>Observability:</strong> Record token usage, cost, latency &amp; model information for each request.</p></li><li><p><strong>Feedback:</strong> Collect user feedback &amp; incorporate reviewed examples into evaluation datasets.</p></li><li><p><strong>Cost forecasting:</strong> Estimate the financial impact of every change before deployment.</p></li></ul><h3>Our Approach</h3><p>We&#8217;ll make five major design decisions:</p><ol><li><p><strong>Cost engineering:</strong> Reduce model costs by 50% to 80% through model routing, semantic caching, and prompt optimization.</p></li><li><p><strong>Inference optimization:</strong> Explore quantization, GPU utilization, and serving frameworks to determine when self-hosting makes financial and technical sense.</p></li><li><p><strong>Production infrastructure:</strong> Handle concurrent traffic, control overload, and deploy model updates without disrupting users.</p></li><li><p><strong>Data flywheels:</strong> Use production feedback to improve evaluation datasets &amp; model quality over time.</p></li><li><p><strong>Capacity and cost estimation:</strong> Calculate infrastructure requirements &amp; monthly costs at 10,000, 100,000, and one million daily users.</p></li></ol><p>We&#8217;ll start with cost engineering because the budget per request influences every infrastructure decision that follows&#8230;</p><h4 style="text-align: center;"><strong>&#167;</strong></h4><h2>Part 1: Cost Engineering</h2><p>Let&#8217;s dive in!</p><h3>Three Types of Token Costs</h3><p>Every request to a language model creates costs based on token usage.</p><p>For this example, we&#8217;ll focus on three types:</p><ul><li><p><strong>Uncached input tokens:</strong> Tokens you send to the model, including the system prompt, conversation history, and user message, without a cached-input discount.</p></li><li><p><strong>Cached input tokens:</strong> Previously processed input prefixes that the provider reuses at a discounted rate.</p></li><li><p><strong>Output tokens:</strong> Tokens the model generates, including any billable reasoning tokens.</p></li></ul><p>Output tokens typically cost more than input tokens because generating tokens one at a time (decode) has lower throughput than processing input tokens in parallel (prefill).</p><p>Some providers charge separately for extra features:</p><ul><li><p><strong>Cache writes:</strong> Anthropic charges approximately 1.25 to 2 times the standard input rate to create a cache entry, depending on its duration. Cache reads cost approximately 10% of the standard input rate.</p></li><li><p><strong>Tool usage:</strong> Certain tools or external services introduce extra charges.</p></li><li><p><strong>Priority processing:</strong> Higher-priority inference tiers could have different pricing.</p></li><li><p><strong>Data residency:</strong> Regional processing requirements could affect the final bill.</p></li></ul><p>So check your provider&#8217;s billing structure before estimating production costs.</p><p>For the two OpenAI models below, output tokens cost <em>six times </em>as much as uncached input tokens. </p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!o0ez!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb0f68e48-7673-40e0-b078-a1c00f767bfd_1774x887.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!o0ez!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb0f68e48-7673-40e0-b078-a1c00f767bfd_1774x887.png 424w, https://substackcdn.com/image/fetch/$s_!o0ez!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb0f68e48-7673-40e0-b078-a1c00f767bfd_1774x887.png 848w, https://substackcdn.com/image/fetch/$s_!o0ez!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb0f68e48-7673-40e0-b078-a1c00f767bfd_1774x887.png 1272w, https://substackcdn.com/image/fetch/$s_!o0ez!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb0f68e48-7673-40e0-b078-a1c00f767bfd_1774x887.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!o0ez!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb0f68e48-7673-40e0-b078-a1c00f767bfd_1774x887.png" width="1456" height="728" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/b0f68e48-7673-40e0-b078-a1c00f767bfd_1774x887.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:728,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:1263650,&quot;alt&quot;:&quot;&quot;,&quot;title&quot;:&quot;&quot;,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://newsletter.systemdesign.one/i/219568117?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb0f68e48-7673-40e0-b078-a1c00f767bfd_1774x887.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" title="" srcset="https://substackcdn.com/image/fetch/$s_!o0ez!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb0f68e48-7673-40e0-b078-a1c00f767bfd_1774x887.png 424w, https://substackcdn.com/image/fetch/$s_!o0ez!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb0f68e48-7673-40e0-b078-a1c00f767bfd_1774x887.png 848w, https://substackcdn.com/image/fetch/$s_!o0ez!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb0f68e48-7673-40e0-b078-a1c00f767bfd_1774x887.png 1272w, https://substackcdn.com/image/fetch/$s_!o0ez!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb0f68e48-7673-40e0-b078-a1c00f767bfd_1774x887.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 buttonBase-GK1x3M"><svg aria-hidden="true" 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" class="icon-noB79L"><g><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 buttonBase-GK1x3M"><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 icon-noB79L"><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">Standard short-context token prices for GPT-5.4 and GPT-5.4-mini as of 2026.</figcaption></figure></div><p>These prices are a historical snapshot&#8230; Model availability &amp; pricing change over time, so verify the latest rates before making deployment decisions.</p><p>Next, let&#8217;s use these token prices to calculate the monthly cost of serving thousands/millions of conversations.</p><h3>Estimation Funnel</h3><p>Estimate costs before building the system.</p><p>Start with requests per day, estimate input, output, and cached-input tokens per request, then apply their respective rates. Multiply the daily cost by the number of days to get the monthly bill.</p><p>The arithmetic is straightforward&#8230;The challenge is accounting for every cost.</p><p>Retries &amp; failed calls increase usage.</p><p>Agent loops multiply model calls per task. Embeddings and reranking add separate costs. Image and video processing introduce media-specific charges.</p><p>Semantic caching adds infrastructure costs, while provider-side prompt caching may introduce cache-write charges. Storage, network egress, observability, and idle GPU capacity when self-hosting also contribute to the total.</p><p>Even a complete cost estimate does not tell you whether the system produces useful answers. Track cost per successful task alongside total spending to measure <em>efficiency</em>.</p><h3>Cost per Successful Task</h3><p>Cost per successful task measures total spending divided by the number of tasks completed successfully.</p><p>Track it alongside quality and latency to understand the actual cost of delivering useful results. For example, suppose each conversation costs $0.064 on average. If 10% of conversations fail, the cost per successful conversation increases to approximately $0.071, assuming the average cost already includes failed attempts and retries.</p><p>The same principle applies to self-hosted models. Estimate the required token throughput, translate it into GPU capacity &amp; calculate infrastructure costs.</p><p>H100 GPU rentals may cost around $2 to $6 per GPU-hour, depending on the provider, region, and rental terms. Newer Blackwell-class accelerators may have higher hourly rental prices.</p><p>But GPU rental prices alone do not determine inference cost:</p><p>Utilization, batching efficiency, memory requirements &amp; model quality also affect the cost per successful task.</p><h3>Faster or Cheaper, and When You Get Both</h3><p>Latency &amp; cost typically involve tradeoffs.</p><p>More powerful GPUs and lower batching levels reduce response times but increase cost per request.</p><p>Some optimizations improve both.</p><p>Smaller models require fewer resources, while shorter prompts reduce input processing. Prompt caching, quantization, and efficient attention kernels also reduce latency and cost, depending on the workload.</p><p>Streaming lets users see the response as it&#8217;s generated.</p><p>This improves perceived responsiveness without necessarily reducing total computation. Measure time to first token (<strong>TTFT</strong>), total response time &amp; stream reliability separately.</p><p>Batching improves GPU utilization by processing multiple requests together.</p><p>Yet excessive batching can increase tail latency (p99). So interactive applications need different batching configurations from background workloads.</p><p>For tasks that do not require immediate responses, consider a provider&#8217;s Batch API. These asynchronous endpoints process requests within a specified window at a lower price.</p><p>OpenAI&#8217;s Batch API offers a 50% discount on supported workloads with a 24-hour completion window. Other providers have different pricing and processing limits.</p><h3>Reasoning-Token Line Item</h3><p>Some reasoning models generate internal reasoning tokens that users never see.</p><p>These tokens count toward output usage &amp; get billed at output token rates.</p><p>This increases costs when switching models. Different models use different default reasoning-effort settings. If you leave the setting unspecified, a model upgrade could generate more reasoning tokens and increase the bill, even when the visible response stays the same.</p><p>Set reasoning effort explicitly where supported.</p><p>Track reasoning-token usage and total output costs for each request. Increase reasoning effort only when evaluations show enough improvement in answer quality to justify the extra cost.</p><h3>The Anchor: 100K Conversations a Day</h3><p>Picture an AI assistant handling 100,000 conversations per day, with eight model requests per conversation.</p><p>Each request uses 1,424 input tokens and 300 billed output tokens.</p><p>Over 30 days, the system processes 34.176 billion input tokens and 7.2 billion output tokens.</p><p>At GPT-5.4 rates of $2.50 per million input tokens and $15 per million output tokens, the monthly cost is:</p><ul><li><p>Input: $85,440</p></li><li><p>Output: $108,000</p></li><li><p>Total: $193,440 or $0.064 per conversation.</p></li></ul><p>Suppose 70% of requests use GPT-5.4-mini, which costs $0.75 per million input tokens and $4.50 per million output tokens.</p><p>Assuming identical token usage across both models, routing reduces the monthly bill to approximately $98,635, a 49% reduction.</p><p>Plus, adding semantic caching, provider-side prompt caching, and shorter prompts could further reduce costs. Under a scenario with a 30% semantic-cache hit rate and additional prompt optimizations, the monthly bill could approach $48,000.</p><p>That represents approximately 75% savings compared with the original system.</p><p>Actual savings depend on traffic patterns, cache hit rates, token usage &amp; model quality. Validate these assumptions against production measurements before relying on the estimate.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!35RP!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc88f9382-c58f-4b18-958c-cb594ea298eb_2048x994.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!35RP!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc88f9382-c58f-4b18-958c-cb594ea298eb_2048x994.png 424w, https://substackcdn.com/image/fetch/$s_!35RP!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc88f9382-c58f-4b18-958c-cb594ea298eb_2048x994.png 848w, https://substackcdn.com/image/fetch/$s_!35RP!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc88f9382-c58f-4b18-958c-cb594ea298eb_2048x994.png 1272w, https://substackcdn.com/image/fetch/$s_!35RP!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc88f9382-c58f-4b18-958c-cb594ea298eb_2048x994.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!35RP!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc88f9382-c58f-4b18-958c-cb594ea298eb_2048x994.png" width="1456" height="707" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/c88f9382-c58f-4b18-958c-cb594ea298eb_2048x994.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:707,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!35RP!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc88f9382-c58f-4b18-958c-cb594ea298eb_2048x994.png 424w, https://substackcdn.com/image/fetch/$s_!35RP!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc88f9382-c58f-4b18-958c-cb594ea298eb_2048x994.png 848w, https://substackcdn.com/image/fetch/$s_!35RP!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc88f9382-c58f-4b18-958c-cb594ea298eb_2048x994.png 1272w, https://substackcdn.com/image/fetch/$s_!35RP!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc88f9382-c58f-4b18-958c-cb594ea298eb_2048x994.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 buttonBase-GK1x3M"><svg aria-hidden="true" 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" class="icon-noB79L"><g><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 buttonBase-GK1x3M"><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 icon-noB79L"><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">At 100K daily conversations, modeled workload produces 34.176B input and 7.2B billed output tokens per month. Routing, caching, and prompt trimming reduce the model-token estimate from $193,000 to $48,000, excluding retry overhead and adjacent infrastructure costs.</figcaption></figure></div><h3>Model Routing</h3><p>Model routing sends simpler requests to a cheaper model &amp; complex requests to a more capable model.</p><p>A lightweight classifier or a smaller language model could decide which model should handle each request.</p><p>At scale, this significantly reduces inference costs. For example, routing 70% of requests to a cheaper model could lower the monthly bill. But the actual split depends on your workload and should come from production traffic &amp; evaluation results.</p><p>The biggest risk is routing a complex request to a model that cannot handle it reliably. The smaller model may produce a confident but incorrect answer, reducing quality without an obvious failure.</p><p>To prevent this, evaluate the route system against the original system using a representative test dataset. Measure task success, factual accuracy, relevance, and other application-specific metrics.</p><p>The router should reduce costs while keeping quality within predefined acceptance thresholds. Track routing accuracy and cost per successful task to verify that the savings are worthwhile.</p><h3>Semantic Caching</h3><p>Model routing reduces costs by sending simpler requests to cheaper models.</p><p>Semantic caching goes further by reusing previously generated answers for similar questions, thus avoiding repeated model inference.</p><p>Semantic caching uses embeddings to find previously answered questions with similar meanings. If a cached answer passes the similarity and validity checks, the system returns it without calling the language model.</p><p>GPTCache is one open-source library for implementing this approach.</p><p>Cache effectiveness depends on traffic patterns. Frequently repeated questions, such as FAQs, produce higher hit rates, while unique or context-dependent queries benefit less.</p><p>Yet two failure modes require attention:</p><p><strong>1. False cache hit</strong></p><p>Two questions may have similar embeddings but require different answers.</p><p>Reusing an incorrect or outdated response silently reduces answer quality. Similarity thresholds, time-to-live (<strong>TTL</strong>) policies, and extra validation help reduce this risk.</p><p><strong>2. Cross-user data leakage</strong></p><p>Cache entries must be isolated by tenant &amp; authorization scope.</p><p>Cache validity should account for relevant prompt, model, and retrieval-index versions, along with data freshness requirements. Authorization checks must remain enforced even when a cached answer exists.</p><p>Personalized responses should only be cached within properly isolated scopes.</p><p>Requests that perform actions or modify data must execute the required operations rather than replay a cached response.</p><p>Finally, semantic caching has its own costs, including embedding generation, vector search, and cache storage. So measure cache hit rate, false-hit rate, latency, and net cost savings to determine whether it improves the system.</p><h3>Prompt Optimization</h3><p>The system prompt gets included in every model request.</p><p>So its length directly affects input-token usage and cost. In our example, the static prefix accounts for nearly three-quarters of each request&#8217;s input tokens.</p><p>Shortening instructions and removing unnecessary few-shot examples reduce token usage. But the actual savings depend on how much of the prompt already benefits from caching. Plus, removing important instructions reduces answer quality, so evaluate every change before deployment.</p><p>Prompt caching introduces another consideration:</p><p>Providers reuse previously processed input when requests share an identical token prefix. To maximize cache hits, place reusable instructions and examples first, followed by dynamic content such as user questions and retrieved documents.</p><p>For OpenAI&#8217;s automatic prompt caching, eligible prompts must contain at least 1,024 tokens. Shortening a reusable prefix below this threshold eliminates its caching benefit and potentially increases costs, even when the prompt becomes shorter.</p><p>In our cost example, we retain the 1,024-token static prefix and optimize the dynamic portion instead. This preserves the opportunity for prompt-cache savings while reducing unnecessary input tokens.</p><p>The goal is to minimize total input cost without sacrificing response quality.</p><p>Compare cached-token usage, total spending, and evaluation results before deciding which prompt version performs best.</p><h3>When Smaller Models Are Good Enough</h3><p>Smaller models significantly reduce inference costs, but only if they maintain acceptable answer quality.</p><p>Evaluate each candidate model against a representative test dataset that includes common requests, complex queries, and edge cases. Measure task success, factual accuracy, relevance, and other application-specific metrics.</p><p>If the smaller model meets predefined quality thresholds, it passes the quality gate. Before deployment, it must also satisfy latency, reliability, security &amp; rollback requirements.</p><p>Use evaluation results to decide when a smaller model is sufficient rather than relying on model size or benchmark rankings alone.</p><p>Model routing reduces average inference costs by selecting cheaper models, while semantic caching avoids repeated model calls.</p><p>The next step is optimizing the inference stack itself to reduce the computational cost of generating each token&#8230;</p><h4 style="text-align: center;"><strong>&#167;</strong></h4><div class="callout-block" data-callout="true"><p style="text-align: center;"><em><strong><span data-color="#3a7bf9" style="color: rgb(58, 123, 249);">Reminder: this is a teaser of the subscriber-only newsletter series, exclusive to my golden members.</span></strong></em></p><p>When you upgrade, you&#8217;ll get:</p><ul><li><p><strong>Simple breakdown of real-world architectures</strong></p></li><li><p>Frameworks you can plug into your work or business</p></li><li><p><strong>Proven systems behind ChatGPT, Perplexity, and Copilot</strong></p></li></ul><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://newsletter.systemdesign.one/subscribe&quot;,&quot;text&quot;:&quot;Unlock Full Access&quot;,&quot;action&quot;:null,&quot;class&quot;:&quot;button-wrapper&quot;}" data-component-name="ButtonCreateButton"><a class="button primary button-wrapper" href="https://newsletter.systemdesign.one/subscribe"><span>Unlock Full Access</span></a></p><p><em>Ready for the best part?</em></p></div><h4 style="text-align: center;"><strong>&#167;</strong></h4><h2>Part 2: Inference Optimization and Self-Hosting</h2>
      <p>
          <a href="https://newsletter.systemdesign.one/p/llm-inference-cost-optimization">
              Read more
          </a>
      </p>
   ]]></content:encoded></item><item><title><![CDATA[Claude Code on Autopilot: Schedule It Once and Walk Away]]></title><description><![CDATA[#188: Part 4 - Claude Code 24/7]]></description><link>https://newsletter.systemdesign.one/p/claude-code-website-monitoring-routine</link><guid isPermaLink="false">https://newsletter.systemdesign.one/p/claude-code-website-monitoring-routine</guid><dc:creator><![CDATA[Neo Kim]]></dc:creator><pubDate>Tue, 06 Oct 2026 14:08:32 GMT</pubDate><enclosure url="https://substack-post-media.s3.amazonaws.com/public/images/0470935b-085f-4f9d-9b1e-0b455c0164bc_1280x720.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p></p><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://newsletter.systemdesign.one/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"><span data-color="#3a7bf9" style="color: rgb(58, 123, 249);">Get my system design playbook for FREE on newsletter signup:</span></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><ul><li><p><em><a href="https://newsletter.systemdesign.one/p/claude-code-website-monitoring-routine/?action=share">Share this letter</a> &amp; I&#8217;ll send you some rewards for the referrals.</em></p></li></ul><div><hr></div><p><span>Every task you give Claude runs while you sit there &amp; watch it.</span></p><p><span>But some work does not need your presence at all&#8230; You can check your website for availability issues daily, watch a repo for changes, or let Claude send you a weekly report via Slack.</span></p><p><span>Anthropic created two different features for this:</span></p><ul><li><p><span>Claude Code calls them </span><strong><span>Routines</span></strong><a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-1" href="#footnote-1" target="_self">1</a><span>,</span></p></li><li><p><span>Cowork</span><a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-2" href="#footnote-2" target="_self">2</a><span> calls them </span><strong><span>Scheduled Tasks</span></strong><span>.</span></p></li></ul><p><span>You could create them from scratch or simply by prompting Claude.</span></p><p><span>Some of these automations run on your laptop. To make sure they work, your </span>laptop<span> needs to stay awake. But you can also run your code in the cloud on Anthropic&#8217;s servers. This works even when your laptop is closed.</span></p><p><span>Let&#8217;s build two of them in this newsletter &amp; explore their limitations.</span></p><p><span>At the end, we&#8217;ll also look at guardrails, because we all know that conversations between us and AI can leak, and we should take steps to make them safer.</span></p><p><span>Let&#8217;s get started!</span></p><h4 style="text-align: center;"><strong>&#167;</strong></h4><div class="callout-block" data-callout="true"><h3><strong><a href="https://getunblocked.com/events/how-to-stop-babysitting-your-agents-oct-7/?utm_source=systemdesign&amp;utm_medium=email&amp;utm_campaign=primary">[Webinar] How to stop babysitting your agents (Partner)</a></strong></h3><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://getunblocked.com/events/how-to-stop-babysitting-your-agents-oct-7/?utm_source=systemdesign&amp;utm_medium=email&amp;utm_campaign=primary" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!Nfs2!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F54df2fb6-ecbc-4828-ab3c-8386f50f0fba_1600x900.png 424w, https://substackcdn.com/image/fetch/$s_!Nfs2!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F54df2fb6-ecbc-4828-ab3c-8386f50f0fba_1600x900.png 848w, https://substackcdn.com/image/fetch/$s_!Nfs2!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F54df2fb6-ecbc-4828-ab3c-8386f50f0fba_1600x900.png 1272w, https://substackcdn.com/image/fetch/$s_!Nfs2!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F54df2fb6-ecbc-4828-ab3c-8386f50f0fba_1600x900.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!Nfs2!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F54df2fb6-ecbc-4828-ab3c-8386f50f0fba_1600x900.png" width="1456" height="819" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/54df2fb6-ecbc-4828-ab3c-8386f50f0fba_1600x900.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:819,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:1098056,&quot;alt&quot;:&quot;&quot;,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:&quot;https://getunblocked.com/events/how-to-stop-babysitting-your-agents-oct-7/?utm_source=systemdesign&amp;utm_medium=email&amp;utm_campaign=primary&quot;,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://newsletter.systemdesign.one/i/218241166?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F54df2fb6-ecbc-4828-ab3c-8386f50f0fba_1600x900.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" title="" srcset="https://substackcdn.com/image/fetch/$s_!Nfs2!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F54df2fb6-ecbc-4828-ab3c-8386f50f0fba_1600x900.png 424w, https://substackcdn.com/image/fetch/$s_!Nfs2!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F54df2fb6-ecbc-4828-ab3c-8386f50f0fba_1600x900.png 848w, https://substackcdn.com/image/fetch/$s_!Nfs2!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F54df2fb6-ecbc-4828-ab3c-8386f50f0fba_1600x900.png 1272w, https://substackcdn.com/image/fetch/$s_!Nfs2!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F54df2fb6-ecbc-4828-ab3c-8386f50f0fba_1600x900.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 buttonBase-GK1x3M"><svg aria-hidden="true" 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" class="icon-noB79L"><g><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 buttonBase-GK1x3M"><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 icon-noB79L"><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>Agents can generate code. Getting it right for your system, team conventions, and past decisions is the hard part. You end up wasting time and tokens in correction loops.</p><p>More MCPs give agents access to information but not understanding. The teams pulling ahead use a context layer to give agents exactly what they need.</p><p><strong><a href="https://getunblocked.com/events/how-to-stop-babysitting-your-agents-oct-7/?utm_source=systemdesign&amp;utm_medium=email&amp;utm_campaign=primary">Join live on Oct 7 (FREE)</a></strong> to see:</p><ul><li><p>Where teams get stuck on the AI maturity curve</p></li><li><p>How a context layer solves for quality, efficiency, and cost</p></li><li><p>Live demo: the same coding task with and without a context layer</p></li></ul><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://getunblocked.com/events/how-to-stop-babysitting-your-agents-oct-7/?utm_source=systemdesign&amp;utm_medium=email&amp;utm_campaign=primary&quot;,&quot;text&quot;:&quot;Register now&quot;,&quot;action&quot;:null,&quot;class&quot;:&quot;button-wrapper&quot;}" data-component-name="ButtonCreateButton"><a class="button primary button-wrapper" href="https://getunblocked.com/events/how-to-stop-babysitting-your-agents-oct-7/?utm_source=systemdesign&amp;utm_medium=email&amp;utm_campaign=primary"><span>Register now</span></a></p><p>(Thanks to <a href="https://getunblocked.com/events/how-to-stop-babysitting-your-agents-oct-7/?utm_source=systemdesign&amp;utm_medium=email&amp;utm_campaign=primary">Unblocked</a> for partnering on this newsletter.)</p></div><h4 style="text-align: center;"><strong>&#167;</strong></h4><p>I want to introduce <strong><a href="https://www.learnwithmeai.com/welcome">Gencay</a></strong> as the guest author.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://www.learnwithmeai.com/welcome" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!i2sU!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F79774ca3-8968-45f9-bb13-fb23bc404b4f_1442x668.png 424w, https://substackcdn.com/image/fetch/$s_!i2sU!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F79774ca3-8968-45f9-bb13-fb23bc404b4f_1442x668.png 848w, https://substackcdn.com/image/fetch/$s_!i2sU!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F79774ca3-8968-45f9-bb13-fb23bc404b4f_1442x668.png 1272w, https://substackcdn.com/image/fetch/$s_!i2sU!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F79774ca3-8968-45f9-bb13-fb23bc404b4f_1442x668.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!i2sU!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F79774ca3-8968-45f9-bb13-fb23bc404b4f_1442x668.png" width="1442" height="668" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/79774ca3-8968-45f9-bb13-fb23bc404b4f_1442x668.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:668,&quot;width&quot;:1442,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;&quot;,&quot;title&quot;:&quot;&quot;,&quot;type&quot;:null,&quot;href&quot;:&quot;https://www.learnwithmeai.com/welcome&quot;,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" title="" srcset="https://substackcdn.com/image/fetch/$s_!i2sU!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F79774ca3-8968-45f9-bb13-fb23bc404b4f_1442x668.png 424w, https://substackcdn.com/image/fetch/$s_!i2sU!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F79774ca3-8968-45f9-bb13-fb23bc404b4f_1442x668.png 848w, https://substackcdn.com/image/fetch/$s_!i2sU!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F79774ca3-8968-45f9-bb13-fb23bc404b4f_1442x668.png 1272w, https://substackcdn.com/image/fetch/$s_!i2sU!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F79774ca3-8968-45f9-bb13-fb23bc404b4f_1442x668.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 buttonBase-GK1x3M"><svg aria-hidden="true" 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" class="icon-noB79L"><g><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 buttonBase-GK1x3M"><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 icon-noB79L"><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>He has been building with AI since ChatGPT first shipped in 2022.</p><p>For years, he built for clients on Upwork: 7,300+ hours of it.</p><p>Now he builds in the open and shares every piece of it on <strong><a href="https://www.learnwithmeai.com/welcome">LearnAIWithMe</a></strong>, every Monday, Wednesday &amp; Friday.</p><p>Not just theory for its own sake. One real build at a time, from idea to running system.</p><h4 style="text-align: center;"><strong>&#167;</strong></h4><p><em>Here&#8217;s what you&#8217;ll find inside this newsletter:</em></p><ul><li><p><strong>What a schedule changes about an agent.</strong> Routines in Claude Code, Scheduled Tasks in Cowork, and why a job that runs without you is a different kind of worker than one you watch.</p></li><li><p><strong>Where your automation actually runs.</strong> Local routines that need your computer awake, cloud routines that keep running with the laptop closed, and the triggers (schedule, Git event, API) and delivery options (push, email, Slack) the cloud version adds.</p></li><li><p><strong>Headless mode, the engine underneath.</strong> <code>claude -p</code> runs Claude with no chat window at all, and every scheduled job is built on it.</p></li><li><p><strong>Two routines you can build, and how to reach them from anywhere.</strong> A morning site check and a GitHub watcher, each created from a single prompt, then dispatched from your phone with reports landing in Slack or a custom Telegram bot.</p></li><li><p><strong>How to trust a job you were asleep for.</strong> Guardrails on permissions, keys, and connectors, a validation harness where tests and hooks check the agent&#8217;s work, and reports worth reading.</p></li></ul><p></p><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://newsletter.systemdesign.one/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"><span data-color="#3a7bf9" style="color: rgb(58, 123, 249);">Golden members get all letters like these!&#8230;</span></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><h4 style="text-align: center;"><strong>&#167;</strong></h4><h2><span>What routines actually are</span></h2><p><span>Everything Claude does normally starts with you!</span></p><p><span>You type, it works, and when you leave the desk, the work stops&#8230;</span></p><p><span>A schedule </span><em><span>breaks</span></em><span> this link... The agent stops being an extension of your hands and becomes a worker in your absence, since the job now runs whether you are there/not. And that changes what you use it for, because the tasks worth scheduling are the ones you kept forgetting/postponing.</span></p><p><span>Routines let Claude work on a schedule you define.</span></p><p><span>They have two different modes:</span></p><ul><li><p><span>Local</span></p></li><li><p><span>Cloud</span></p></li></ul><p><span>(We&#8217;ll cover both in the next sections.)</span></p><p><span>Let&#8217;s first create a routine manually&#8230;</span></p><h3><span>Manual</span></h3><p><span>To create a routine, open your Claude app, click on &#8220;Routines&#8221; and &#8220;New routine&#8221;.</span></p><p><span>You will see two options:</span></p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!uVs2!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb65cb926-88ab-4118-84db-0974f5ac1a5f_2048x1121.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!uVs2!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb65cb926-88ab-4118-84db-0974f5ac1a5f_2048x1121.png 424w, https://substackcdn.com/image/fetch/$s_!uVs2!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb65cb926-88ab-4118-84db-0974f5ac1a5f_2048x1121.png 848w, https://substackcdn.com/image/fetch/$s_!uVs2!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb65cb926-88ab-4118-84db-0974f5ac1a5f_2048x1121.png 1272w, https://substackcdn.com/image/fetch/$s_!uVs2!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb65cb926-88ab-4118-84db-0974f5ac1a5f_2048x1121.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!uVs2!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb65cb926-88ab-4118-84db-0974f5ac1a5f_2048x1121.png" width="1456" height="797" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/b65cb926-88ab-4118-84db-0974f5ac1a5f_2048x1121.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:797,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!uVs2!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb65cb926-88ab-4118-84db-0974f5ac1a5f_2048x1121.png 424w, https://substackcdn.com/image/fetch/$s_!uVs2!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb65cb926-88ab-4118-84db-0974f5ac1a5f_2048x1121.png 848w, https://substackcdn.com/image/fetch/$s_!uVs2!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb65cb926-88ab-4118-84db-0974f5ac1a5f_2048x1121.png 1272w, https://substackcdn.com/image/fetch/$s_!uVs2!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb65cb926-88ab-4118-84db-0974f5ac1a5f_2048x1121.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 buttonBase-GK1x3M"><svg aria-hidden="true" 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" class="icon-noB79L"><g><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 buttonBase-GK1x3M"><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 icon-noB79L"><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><h4><span>Local</span></h4><p><span>Click on </span><strong><span>Local</span></strong><span>.</span></p><p><span>You can choose the model, set permissions &amp; schedule when you want the routine to run.</span></p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!D5Hn!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1cc7915d-c5ea-420e-8eb6-32d5f3e2ca3e_1716x1310.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!D5Hn!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1cc7915d-c5ea-420e-8eb6-32d5f3e2ca3e_1716x1310.png 424w, https://substackcdn.com/image/fetch/$s_!D5Hn!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1cc7915d-c5ea-420e-8eb6-32d5f3e2ca3e_1716x1310.png 848w, https://substackcdn.com/image/fetch/$s_!D5Hn!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1cc7915d-c5ea-420e-8eb6-32d5f3e2ca3e_1716x1310.png 1272w, https://substackcdn.com/image/fetch/$s_!D5Hn!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1cc7915d-c5ea-420e-8eb6-32d5f3e2ca3e_1716x1310.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!D5Hn!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1cc7915d-c5ea-420e-8eb6-32d5f3e2ca3e_1716x1310.png" width="1456" height="1112" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/1cc7915d-c5ea-420e-8eb6-32d5f3e2ca3e_1716x1310.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1112,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!D5Hn!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1cc7915d-c5ea-420e-8eb6-32d5f3e2ca3e_1716x1310.png 424w, https://substackcdn.com/image/fetch/$s_!D5Hn!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1cc7915d-c5ea-420e-8eb6-32d5f3e2ca3e_1716x1310.png 848w, https://substackcdn.com/image/fetch/$s_!D5Hn!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1cc7915d-c5ea-420e-8eb6-32d5f3e2ca3e_1716x1310.png 1272w, https://substackcdn.com/image/fetch/$s_!D5Hn!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1cc7915d-c5ea-420e-8eb6-32d5f3e2ca3e_1716x1310.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 buttonBase-GK1x3M"><svg aria-hidden="true" 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" class="icon-noB79L"><g><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 buttonBase-GK1x3M"><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 icon-noB79L"><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><h4><span>Cloud</span></h4><p><span>Now let&#8217;s check the cloud version.</span></p><p><span>This version lets you customize a lot more.</span></p><p><span>First, you can select a trigger: </span><strong><span>Schedule, Git Event, or API.</span></strong></p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!ZJy1!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F10f8aaee-58c4-4621-9e16-bc760d33dca0_1528x1638.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!ZJy1!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F10f8aaee-58c4-4621-9e16-bc760d33dca0_1528x1638.png 424w, https://substackcdn.com/image/fetch/$s_!ZJy1!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F10f8aaee-58c4-4621-9e16-bc760d33dca0_1528x1638.png 848w, https://substackcdn.com/image/fetch/$s_!ZJy1!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F10f8aaee-58c4-4621-9e16-bc760d33dca0_1528x1638.png 1272w, https://substackcdn.com/image/fetch/$s_!ZJy1!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F10f8aaee-58c4-4621-9e16-bc760d33dca0_1528x1638.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!ZJy1!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F10f8aaee-58c4-4621-9e16-bc760d33dca0_1528x1638.png" width="1456" height="1561" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/10f8aaee-58c4-4621-9e16-bc760d33dca0_1528x1638.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1561,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!ZJy1!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F10f8aaee-58c4-4621-9e16-bc760d33dca0_1528x1638.png 424w, https://substackcdn.com/image/fetch/$s_!ZJy1!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F10f8aaee-58c4-4621-9e16-bc760d33dca0_1528x1638.png 848w, https://substackcdn.com/image/fetch/$s_!ZJy1!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F10f8aaee-58c4-4621-9e16-bc760d33dca0_1528x1638.png 1272w, https://substackcdn.com/image/fetch/$s_!ZJy1!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F10f8aaee-58c4-4621-9e16-bc760d33dca0_1528x1638.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 buttonBase-GK1x3M"><svg aria-hidden="true" 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" class="icon-noB79L"><g><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 buttonBase-GK1x3M"><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 icon-noB79L"><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><span>Next, click </span><strong><span>Notifications</span></strong><span> to choose how the report is delivered to you.</span></p><p><span>The options are </span><strong><span>push notifications in the app, email, or Slack.</span></strong></p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!bG0U!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2935fd72-1f15-44e1-b314-28768115633a_1506x660.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!bG0U!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2935fd72-1f15-44e1-b314-28768115633a_1506x660.png 424w, https://substackcdn.com/image/fetch/$s_!bG0U!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2935fd72-1f15-44e1-b314-28768115633a_1506x660.png 848w, https://substackcdn.com/image/fetch/$s_!bG0U!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2935fd72-1f15-44e1-b314-28768115633a_1506x660.png 1272w, https://substackcdn.com/image/fetch/$s_!bG0U!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2935fd72-1f15-44e1-b314-28768115633a_1506x660.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!bG0U!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2935fd72-1f15-44e1-b314-28768115633a_1506x660.png" width="1456" height="638" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/2935fd72-1f15-44e1-b314-28768115633a_1506x660.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:638,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!bG0U!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2935fd72-1f15-44e1-b314-28768115633a_1506x660.png 424w, https://substackcdn.com/image/fetch/$s_!bG0U!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2935fd72-1f15-44e1-b314-28768115633a_1506x660.png 848w, https://substackcdn.com/image/fetch/$s_!bG0U!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2935fd72-1f15-44e1-b314-28768115633a_1506x660.png 1272w, https://substackcdn.com/image/fetch/$s_!bG0U!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2935fd72-1f15-44e1-b314-28768115633a_1506x660.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 buttonBase-GK1x3M"><svg aria-hidden="true" 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" class="icon-noB79L"><g><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 buttonBase-GK1x3M"><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 icon-noB79L"><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><span>You can also enable &#8220;Auto-fix&#8221; for pull requests.</span></p><p><span>This way Claude watches CI and review comments and pushes fixes automatically.</span></p><div class="captioned-image-container"><figure><div class="image-link image2" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!hGV0!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9f2f90db-752c-4738-9151-0d36d06e79c4_1474x340.png 424w, https://substackcdn.com/image/fetch/$s_!hGV0!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9f2f90db-752c-4738-9151-0d36d06e79c4_1474x340.png 848w, https://substackcdn.com/image/fetch/$s_!hGV0!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9f2f90db-752c-4738-9151-0d36d06e79c4_1474x340.png 1272w, https://substackcdn.com/image/fetch/$s_!hGV0!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9f2f90db-752c-4738-9151-0d36d06e79c4_1474x340.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!hGV0!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9f2f90db-752c-4738-9151-0d36d06e79c4_1474x340.png" width="1456" height="336" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/9f2f90db-752c-4738-9151-0d36d06e79c4_1474x340.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:336,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!hGV0!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9f2f90db-752c-4738-9151-0d36d06e79c4_1474x340.png 424w, https://substackcdn.com/image/fetch/$s_!hGV0!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9f2f90db-752c-4738-9151-0d36d06e79c4_1474x340.png 848w, https://substackcdn.com/image/fetch/$s_!hGV0!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9f2f90db-752c-4738-9151-0d36d06e79c4_1474x340.png 1272w, https://substackcdn.com/image/fetch/$s_!hGV0!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9f2f90db-752c-4738-9151-0d36d06e79c4_1474x340.png 1456w" sizes="100vw" loading="lazy"></picture><div></div></div></div></figure></div><h3><span>Create Routine by prompting</span></h3><p><span>Let&#8217;s create one routine by </span><em><span>prompting</span></em><span>.</span></p><p><span>Here is a site I run&#8230; I change it often, so pages break sometimes, and I check them by hand.</span></p><p><span>Follow along with any site you run, since the prompt only needs a URL.</span></p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!blI-!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7c732049-2cce-4279-9bbe-5465671486ad_2048x1040.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!blI-!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7c732049-2cce-4279-9bbe-5465671486ad_2048x1040.png 424w, https://substackcdn.com/image/fetch/$s_!blI-!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7c732049-2cce-4279-9bbe-5465671486ad_2048x1040.png 848w, https://substackcdn.com/image/fetch/$s_!blI-!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7c732049-2cce-4279-9bbe-5465671486ad_2048x1040.png 1272w, https://substackcdn.com/image/fetch/$s_!blI-!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7c732049-2cce-4279-9bbe-5465671486ad_2048x1040.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!blI-!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7c732049-2cce-4279-9bbe-5465671486ad_2048x1040.png" width="1456" height="739" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/7c732049-2cce-4279-9bbe-5465671486ad_2048x1040.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:739,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!blI-!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7c732049-2cce-4279-9bbe-5465671486ad_2048x1040.png 424w, https://substackcdn.com/image/fetch/$s_!blI-!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7c732049-2cce-4279-9bbe-5465671486ad_2048x1040.png 848w, https://substackcdn.com/image/fetch/$s_!blI-!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7c732049-2cce-4279-9bbe-5465671486ad_2048x1040.png 1272w, https://substackcdn.com/image/fetch/$s_!blI-!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7c732049-2cce-4279-9bbe-5465671486ad_2048x1040.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 buttonBase-GK1x3M"><svg aria-hidden="true" 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" class="icon-noB79L"><g><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 buttonBase-GK1x3M"><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 icon-noB79L"><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><span>Let&#8217;s hand this task off to Claude Code to save </span><em><span>time</span></em><span>.</span></p><p><span>Here is the prompt:</span></p><div class="highlighted_code_block" data-attrs="{&quot;language&quot;:&quot;plaintext&quot;,&quot;nodeId&quot;:&quot;5834099d-ca31-4e20-bf48-526b3ba82569&quot;}" data-component-name="HighlightedCodeBlockToDOM"><pre class="shiki"><code class="language-plaintext">Create a routine that runs every morning at 8.
It opens my AI Labs and AI Academy pages in Chrome,
checks for broken links, layout problems, and console errors.

If everything is fine, report one line saying clean.
Otherwise, list only the real issues to Slack.</code></pre></div><p><span>After pasting this prompt, Claude asks for my approval.</span></p><p><span>The first approval is to list the scheduled tasks.</span></p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!mer0!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe0d47c21-ad97-4356-9f02-723ebba1e572_1652x558.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!mer0!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe0d47c21-ad97-4356-9f02-723ebba1e572_1652x558.png 424w, https://substackcdn.com/image/fetch/$s_!mer0!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe0d47c21-ad97-4356-9f02-723ebba1e572_1652x558.png 848w, https://substackcdn.com/image/fetch/$s_!mer0!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe0d47c21-ad97-4356-9f02-723ebba1e572_1652x558.png 1272w, https://substackcdn.com/image/fetch/$s_!mer0!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe0d47c21-ad97-4356-9f02-723ebba1e572_1652x558.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!mer0!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe0d47c21-ad97-4356-9f02-723ebba1e572_1652x558.png" width="1456" height="492" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/e0d47c21-ad97-4356-9f02-723ebba1e572_1652x558.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:492,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!mer0!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe0d47c21-ad97-4356-9f02-723ebba1e572_1652x558.png 424w, https://substackcdn.com/image/fetch/$s_!mer0!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe0d47c21-ad97-4356-9f02-723ebba1e572_1652x558.png 848w, https://substackcdn.com/image/fetch/$s_!mer0!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe0d47c21-ad97-4356-9f02-723ebba1e572_1652x558.png 1272w, https://substackcdn.com/image/fetch/$s_!mer0!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe0d47c21-ad97-4356-9f02-723ebba1e572_1652x558.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 buttonBase-GK1x3M"><svg aria-hidden="true" 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" class="icon-noB79L"><g><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 buttonBase-GK1x3M"><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 icon-noB79L"><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><span>Next, it asks a couple of questions&#8230;</span></p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!LDL7!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F629e69f8-d35f-431f-9477-f40b8e2e8e7a_1612x808.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!LDL7!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F629e69f8-d35f-431f-9477-f40b8e2e8e7a_1612x808.png 424w, https://substackcdn.com/image/fetch/$s_!LDL7!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F629e69f8-d35f-431f-9477-f40b8e2e8e7a_1612x808.png 848w, https://substackcdn.com/image/fetch/$s_!LDL7!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F629e69f8-d35f-431f-9477-f40b8e2e8e7a_1612x808.png 1272w, https://substackcdn.com/image/fetch/$s_!LDL7!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F629e69f8-d35f-431f-9477-f40b8e2e8e7a_1612x808.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!LDL7!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F629e69f8-d35f-431f-9477-f40b8e2e8e7a_1612x808.png" width="1456" height="730" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/629e69f8-d35f-431f-9477-f40b8e2e8e7a_1612x808.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:730,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!LDL7!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F629e69f8-d35f-431f-9477-f40b8e2e8e7a_1612x808.png 424w, https://substackcdn.com/image/fetch/$s_!LDL7!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F629e69f8-d35f-431f-9477-f40b8e2e8e7a_1612x808.png 848w, https://substackcdn.com/image/fetch/$s_!LDL7!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F629e69f8-d35f-431f-9477-f40b8e2e8e7a_1612x808.png 1272w, https://substackcdn.com/image/fetch/$s_!LDL7!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F629e69f8-d35f-431f-9477-f40b8e2e8e7a_1612x808.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 buttonBase-GK1x3M"><svg aria-hidden="true" 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" class="icon-noB79L"><g><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 buttonBase-GK1x3M"><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 icon-noB79L"><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><span>After my answers, it started working on it&#8230;</span></p><p><span>Then it asked the final question before creating this routine.</span></p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!uPgR!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F86838e2f-e9bf-4df4-95a4-3ab5188d7ad5_1604x886.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!uPgR!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F86838e2f-e9bf-4df4-95a4-3ab5188d7ad5_1604x886.png 424w, https://substackcdn.com/image/fetch/$s_!uPgR!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F86838e2f-e9bf-4df4-95a4-3ab5188d7ad5_1604x886.png 848w, https://substackcdn.com/image/fetch/$s_!uPgR!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F86838e2f-e9bf-4df4-95a4-3ab5188d7ad5_1604x886.png 1272w, https://substackcdn.com/image/fetch/$s_!uPgR!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F86838e2f-e9bf-4df4-95a4-3ab5188d7ad5_1604x886.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!uPgR!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F86838e2f-e9bf-4df4-95a4-3ab5188d7ad5_1604x886.png" width="1456" height="804" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/86838e2f-e9bf-4df4-95a4-3ab5188d7ad5_1604x886.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:804,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!uPgR!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F86838e2f-e9bf-4df4-95a4-3ab5188d7ad5_1604x886.png 424w, https://substackcdn.com/image/fetch/$s_!uPgR!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F86838e2f-e9bf-4df4-95a4-3ab5188d7ad5_1604x886.png 848w, https://substackcdn.com/image/fetch/$s_!uPgR!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F86838e2f-e9bf-4df4-95a4-3ab5188d7ad5_1604x886.png 1272w, https://substackcdn.com/image/fetch/$s_!uPgR!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F86838e2f-e9bf-4df4-95a4-3ab5188d7ad5_1604x886.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 buttonBase-GK1x3M"><svg aria-hidden="true" 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" class="icon-noB79L"><g><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 buttonBase-GK1x3M"><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 icon-noB79L"><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><span>I allowed &amp; it created the routine.</span></p><p><span>When I went back to the routine tab, I saw mine.</span></p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!RY5l!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4157e04f-d2d3-4203-873a-f8b030187ce6_2048x927.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!RY5l!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4157e04f-d2d3-4203-873a-f8b030187ce6_2048x927.png 424w, https://substackcdn.com/image/fetch/$s_!RY5l!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4157e04f-d2d3-4203-873a-f8b030187ce6_2048x927.png 848w, https://substackcdn.com/image/fetch/$s_!RY5l!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4157e04f-d2d3-4203-873a-f8b030187ce6_2048x927.png 1272w, https://substackcdn.com/image/fetch/$s_!RY5l!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4157e04f-d2d3-4203-873a-f8b030187ce6_2048x927.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!RY5l!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4157e04f-d2d3-4203-873a-f8b030187ce6_2048x927.png" width="1456" height="659" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/4157e04f-d2d3-4203-873a-f8b030187ce6_2048x927.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:659,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!RY5l!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4157e04f-d2d3-4203-873a-f8b030187ce6_2048x927.png 424w, https://substackcdn.com/image/fetch/$s_!RY5l!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4157e04f-d2d3-4203-873a-f8b030187ce6_2048x927.png 848w, https://substackcdn.com/image/fetch/$s_!RY5l!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4157e04f-d2d3-4203-873a-f8b030187ce6_2048x927.png 1272w, https://substackcdn.com/image/fetch/$s_!RY5l!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4157e04f-d2d3-4203-873a-f8b030187ce6_2048x927.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 buttonBase-GK1x3M"><svg aria-hidden="true" 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" class="icon-noB79L"><g><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 buttonBase-GK1x3M"><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 icon-noB79L"><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><h3><span>Testing The Routine</span></h3><p><span>I clicked on the routine and &#8220;Run now&#8221;.</span></p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!5a0y!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F56c9dbf7-1f5e-4f4b-bd34-3789e24c069b_2048x962.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!5a0y!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F56c9dbf7-1f5e-4f4b-bd34-3789e24c069b_2048x962.png 424w, https://substackcdn.com/image/fetch/$s_!5a0y!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F56c9dbf7-1f5e-4f4b-bd34-3789e24c069b_2048x962.png 848w, https://substackcdn.com/image/fetch/$s_!5a0y!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F56c9dbf7-1f5e-4f4b-bd34-3789e24c069b_2048x962.png 1272w, https://substackcdn.com/image/fetch/$s_!5a0y!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F56c9dbf7-1f5e-4f4b-bd34-3789e24c069b_2048x962.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!5a0y!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F56c9dbf7-1f5e-4f4b-bd34-3789e24c069b_2048x962.png" width="1456" height="684" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/56c9dbf7-1f5e-4f4b-bd34-3789e24c069b_2048x962.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:684,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!5a0y!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F56c9dbf7-1f5e-4f4b-bd34-3789e24c069b_2048x962.png 424w, https://substackcdn.com/image/fetch/$s_!5a0y!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F56c9dbf7-1f5e-4f4b-bd34-3789e24c069b_2048x962.png 848w, https://substackcdn.com/image/fetch/$s_!5a0y!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F56c9dbf7-1f5e-4f4b-bd34-3789e24c069b_2048x962.png 1272w, https://substackcdn.com/image/fetch/$s_!5a0y!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F56c9dbf7-1f5e-4f4b-bd34-3789e24c069b_2048x962.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 buttonBase-GK1x3M"><svg aria-hidden="true" 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" class="icon-noB79L"><g><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 buttonBase-GK1x3M"><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 icon-noB79L"><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><span>And I saw this notification:</span></p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!Jgh4!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F96ae069f-b032-4bfb-a5c1-5b574943e2e7_2048x1281.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!Jgh4!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F96ae069f-b032-4bfb-a5c1-5b574943e2e7_2048x1281.png 424w, https://substackcdn.com/image/fetch/$s_!Jgh4!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F96ae069f-b032-4bfb-a5c1-5b574943e2e7_2048x1281.png 848w, https://substackcdn.com/image/fetch/$s_!Jgh4!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F96ae069f-b032-4bfb-a5c1-5b574943e2e7_2048x1281.png 1272w, https://substackcdn.com/image/fetch/$s_!Jgh4!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F96ae069f-b032-4bfb-a5c1-5b574943e2e7_2048x1281.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!Jgh4!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F96ae069f-b032-4bfb-a5c1-5b574943e2e7_2048x1281.png" width="1456" height="911" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/96ae069f-b032-4bfb-a5c1-5b574943e2e7_2048x1281.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:911,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!Jgh4!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F96ae069f-b032-4bfb-a5c1-5b574943e2e7_2048x1281.png 424w, https://substackcdn.com/image/fetch/$s_!Jgh4!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F96ae069f-b032-4bfb-a5c1-5b574943e2e7_2048x1281.png 848w, https://substackcdn.com/image/fetch/$s_!Jgh4!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F96ae069f-b032-4bfb-a5c1-5b574943e2e7_2048x1281.png 1272w, https://substackcdn.com/image/fetch/$s_!Jgh4!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F96ae069f-b032-4bfb-a5c1-5b574943e2e7_2048x1281.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 buttonBase-GK1x3M"><svg aria-hidden="true" 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" class="icon-noB79L"><g><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 buttonBase-GK1x3M"><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 icon-noB79L"><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><span>To see more details, you need to click on History. (I clicked it twice by mistake.)</span></p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!8fg-!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdc2b1280-218e-4875-8339-e853b9652788_2048x1140.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!8fg-!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdc2b1280-218e-4875-8339-e853b9652788_2048x1140.png 424w, https://substackcdn.com/image/fetch/$s_!8fg-!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdc2b1280-218e-4875-8339-e853b9652788_2048x1140.png 848w, https://substackcdn.com/image/fetch/$s_!8fg-!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdc2b1280-218e-4875-8339-e853b9652788_2048x1140.png 1272w, https://substackcdn.com/image/fetch/$s_!8fg-!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdc2b1280-218e-4875-8339-e853b9652788_2048x1140.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!8fg-!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdc2b1280-218e-4875-8339-e853b9652788_2048x1140.png" width="1456" height="810" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/dc2b1280-218e-4875-8339-e853b9652788_2048x1140.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:810,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!8fg-!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdc2b1280-218e-4875-8339-e853b9652788_2048x1140.png 424w, https://substackcdn.com/image/fetch/$s_!8fg-!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdc2b1280-218e-4875-8339-e853b9652788_2048x1140.png 848w, https://substackcdn.com/image/fetch/$s_!8fg-!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdc2b1280-218e-4875-8339-e853b9652788_2048x1140.png 1272w, https://substackcdn.com/image/fetch/$s_!8fg-!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdc2b1280-218e-4875-8339-e853b9652788_2048x1140.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 buttonBase-GK1x3M"><svg aria-hidden="true" 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" class="icon-noB79L"><g><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 buttonBase-GK1x3M"><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 icon-noB79L"><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><span>And Claude took control of my laptop &amp; started testing&#8230;</span></p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!hWXs!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc282e643-055b-4c18-9505-5b96b0e8ea60_2048x1179.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!hWXs!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc282e643-055b-4c18-9505-5b96b0e8ea60_2048x1179.png 424w, https://substackcdn.com/image/fetch/$s_!hWXs!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc282e643-055b-4c18-9505-5b96b0e8ea60_2048x1179.png 848w, https://substackcdn.com/image/fetch/$s_!hWXs!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc282e643-055b-4c18-9505-5b96b0e8ea60_2048x1179.png 1272w, https://substackcdn.com/image/fetch/$s_!hWXs!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc282e643-055b-4c18-9505-5b96b0e8ea60_2048x1179.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!hWXs!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc282e643-055b-4c18-9505-5b96b0e8ea60_2048x1179.png" width="1456" height="838" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/c282e643-055b-4c18-9505-5b96b0e8ea60_2048x1179.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:838,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!hWXs!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc282e643-055b-4c18-9505-5b96b0e8ea60_2048x1179.png 424w, https://substackcdn.com/image/fetch/$s_!hWXs!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc282e643-055b-4c18-9505-5b96b0e8ea60_2048x1179.png 848w, https://substackcdn.com/image/fetch/$s_!hWXs!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc282e643-055b-4c18-9505-5b96b0e8ea60_2048x1179.png 1272w, https://substackcdn.com/image/fetch/$s_!hWXs!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc282e643-055b-4c18-9505-5b96b0e8ea60_2048x1179.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 buttonBase-GK1x3M"><svg aria-hidden="true" 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" class="icon-noB79L"><g><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 buttonBase-GK1x3M"><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 icon-noB79L"><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><span>When I check Claude app, I see Claude took screenshots &amp; analyzed the pages.</span></p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!4LFn!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2ac00a41-e627-45c5-84c6-57a74dae2957_1690x1672.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!4LFn!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2ac00a41-e627-45c5-84c6-57a74dae2957_1690x1672.png 424w, https://substackcdn.com/image/fetch/$s_!4LFn!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2ac00a41-e627-45c5-84c6-57a74dae2957_1690x1672.png 848w, https://substackcdn.com/image/fetch/$s_!4LFn!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2ac00a41-e627-45c5-84c6-57a74dae2957_1690x1672.png 1272w, https://substackcdn.com/image/fetch/$s_!4LFn!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2ac00a41-e627-45c5-84c6-57a74dae2957_1690x1672.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!4LFn!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2ac00a41-e627-45c5-84c6-57a74dae2957_1690x1672.png" width="1456" height="1440" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/2ac00a41-e627-45c5-84c6-57a74dae2957_1690x1672.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1440,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!4LFn!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2ac00a41-e627-45c5-84c6-57a74dae2957_1690x1672.png 424w, https://substackcdn.com/image/fetch/$s_!4LFn!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2ac00a41-e627-45c5-84c6-57a74dae2957_1690x1672.png 848w, https://substackcdn.com/image/fetch/$s_!4LFn!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2ac00a41-e627-45c5-84c6-57a74dae2957_1690x1672.png 1272w, https://substackcdn.com/image/fetch/$s_!4LFn!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2ac00a41-e627-45c5-84c6-57a74dae2957_1690x1672.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 buttonBase-GK1x3M"><svg aria-hidden="true" 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" class="icon-noB79L"><g><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 buttonBase-GK1x3M"><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 icon-noB79L"><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><span>A couple of minutes later, I got this Slack message:</span></p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!ypMs!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F72dc0202-c356-4a66-b45a-7a2778db68a1_2048x1502.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!ypMs!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F72dc0202-c356-4a66-b45a-7a2778db68a1_2048x1502.png 424w, https://substackcdn.com/image/fetch/$s_!ypMs!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F72dc0202-c356-4a66-b45a-7a2778db68a1_2048x1502.png 848w, https://substackcdn.com/image/fetch/$s_!ypMs!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F72dc0202-c356-4a66-b45a-7a2778db68a1_2048x1502.png 1272w, https://substackcdn.com/image/fetch/$s_!ypMs!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F72dc0202-c356-4a66-b45a-7a2778db68a1_2048x1502.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!ypMs!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F72dc0202-c356-4a66-b45a-7a2778db68a1_2048x1502.png" width="1456" height="1068" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/72dc0202-c356-4a66-b45a-7a2778db68a1_2048x1502.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1068,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!ypMs!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F72dc0202-c356-4a66-b45a-7a2778db68a1_2048x1502.png 424w, https://substackcdn.com/image/fetch/$s_!ypMs!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F72dc0202-c356-4a66-b45a-7a2778db68a1_2048x1502.png 848w, https://substackcdn.com/image/fetch/$s_!ypMs!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F72dc0202-c356-4a66-b45a-7a2778db68a1_2048x1502.png 1272w, https://substackcdn.com/image/fetch/$s_!ypMs!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F72dc0202-c356-4a66-b45a-7a2778db68a1_2048x1502.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 buttonBase-GK1x3M"><svg aria-hidden="true" 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" class="icon-noB79L"><g><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 buttonBase-GK1x3M"><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 icon-noB79L"><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><span>&#8220;Clean&#8221;, simple yet effective.</span></p><p><span>Here is a more detailed report:</span></p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!GwDr!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F673fbfb6-2f2c-45bd-95cd-8baf17224f9e_1612x1352.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!GwDr!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F673fbfb6-2f2c-45bd-95cd-8baf17224f9e_1612x1352.png 424w, https://substackcdn.com/image/fetch/$s_!GwDr!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F673fbfb6-2f2c-45bd-95cd-8baf17224f9e_1612x1352.png 848w, https://substackcdn.com/image/fetch/$s_!GwDr!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F673fbfb6-2f2c-45bd-95cd-8baf17224f9e_1612x1352.png 1272w, https://substackcdn.com/image/fetch/$s_!GwDr!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F673fbfb6-2f2c-45bd-95cd-8baf17224f9e_1612x1352.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!GwDr!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F673fbfb6-2f2c-45bd-95cd-8baf17224f9e_1612x1352.png" width="1456" height="1221" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/673fbfb6-2f2c-45bd-95cd-8baf17224f9e_1612x1352.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1221,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!GwDr!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F673fbfb6-2f2c-45bd-95cd-8baf17224f9e_1612x1352.png 424w, https://substackcdn.com/image/fetch/$s_!GwDr!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F673fbfb6-2f2c-45bd-95cd-8baf17224f9e_1612x1352.png 848w, https://substackcdn.com/image/fetch/$s_!GwDr!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F673fbfb6-2f2c-45bd-95cd-8baf17224f9e_1612x1352.png 1272w, https://substackcdn.com/image/fetch/$s_!GwDr!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F673fbfb6-2f2c-45bd-95cd-8baf17224f9e_1612x1352.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 buttonBase-GK1x3M"><svg aria-hidden="true" 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" class="icon-noB79L"><g><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 buttonBase-GK1x3M"><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 icon-noB79L"><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><h4 style="text-align: center;"><strong>&#167;</strong></h4><div class="callout-block" data-callout="true"><p style="text-align: center;"><em><strong><span data-color="#3a7bf9" style="color: rgb(58, 123, 249);">Reminder: this is a teaser of the subscriber-only newsletter, exclusive to my golden members.</span></strong></em></p><p>When you upgrade, you&#8217;ll get:</p><ul><li><p><strong>A complete Claude Code setup, from your first session to a fully automated one.</strong></p></li><li><p>Deep dives into how MCP, subagents, agent orchestration &amp; hooks actually work inside Claude Code.</p></li><li><p><strong>How real Claude Code projects handle context, scale &amp; running without you.</strong></p></li></ul><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://newsletter.systemdesign.one/subscribe&quot;,&quot;text&quot;:&quot;Unlock Full Access&quot;,&quot;action&quot;:null,&quot;class&quot;:&quot;button-wrapper&quot;}" data-component-name="ButtonCreateButton"><a class="button primary button-wrapper" href="https://newsletter.systemdesign.one/subscribe"><span>Unlock Full Access</span></a></p><p>(If this newsletter has helped you become a better software engineer, consider subscribing to support my work.)</p></div><h4 style="text-align: center;"><strong>&#167;</strong></h4><h2><span>Routine vs scheduled</span></h2>
      <p>
          <a href="https://newsletter.systemdesign.one/p/claude-code-website-monitoring-routine">
              Read more
          </a>
      </p>
   ]]></content:encoded></item><item><title><![CDATA[64 AI Concepts Every Software Engineer Should Know]]></title><description><![CDATA[#187: Part 1 - Generative AI, RAG, AI Agents, and 14 others.]]></description><link>https://newsletter.systemdesign.one/p/ai-concepts-explained-for-beginners</link><guid isPermaLink="false">https://newsletter.systemdesign.one/p/ai-concepts-explained-for-beginners</guid><dc:creator><![CDATA[Neo Kim]]></dc:creator><pubDate>Mon, 05 Oct 2026 13:44:22 GMT</pubDate><enclosure url="https://substack-post-media.s3.amazonaws.com/public/images/f0daa132-5989-4780-8c01-725680a43fde_1280x720.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p></p><p></p><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://newsletter.systemdesign.one/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"><span data-color="#3a7bf9" style="color: rgb(58, 123, 249);">Get my system design playbook for FREE on newsletter signup:</span></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><ul><li><p><em><a href="https://newsletter.systemdesign.one/p/ai-concepts-explained-for-beginners/?action=share">Share this letter</a> &amp; I&#8217;ll send you some rewards for the referrals.</em></p></li></ul><div><hr></div><p>You ask an AI assistant a question&#8230;</p><p>&#8230;it answers in <em>seconds</em>!</p><p>But what actually happened between your question &amp; the answer?</p><p>Behind that simple interaction sits a stack of models, tokens, context, retrieval, tools, evaluations, and infrastructure.</p><p>These 64 concepts<a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-1" href="#footnote-1" target="_self">1</a> will help you understand how modern AI systems actually work, from the neural networks underneath them to agents &amp; applications built on top.</p><p>Curious to know how many were new to you:</p><ol><li><p>Large language models,</p></li><li><p>Generative AI,</p></li><li><p>Machine learning,</p></li><li><p>Deep learning,</p></li><li><p>Neural networks,</p></li><li><p>Retrieval augmented generation,</p></li><li><p>AI agents &amp; agentic workflows,</p></li><li><p>Prompt engineering,</p></li><li><p>Transformers and self-attention,</p></li><li><p>Embeddings,</p></li><li><p>Tool &amp; function calling,</p></li><li><p>Model evaluation and evaluation-driven development,</p></li><li><p>Context engineering,</p></li><li><p>Multimodal AI,</p></li><li><p>Fine tuning and instruction tuning,</p></li><li><p>Tokenization,</p></li><li><p>Reasoning &amp; chain-of-thought.</p></li></ol><p>( &#8230;and much more in Parts 2, 3 &amp; 4!)</p><p>For each, I&#8217;ll share:</p><ul><li><p>What it means and how it works,</p></li><li><p>A real-world analogy where useful,</p></li><li><p>A common mistake to avoid,</p></li><li><p>Why it matters.</p></li></ul><p>Let&#8217;s dive in!</p><h4 style="text-align: center;"><strong>&#167;</strong></h4><div class="callout-block" data-callout="true"><h2><strong><a href="https://link.svix.com/system-01">Make your agents realtime (Partner)</a></strong></h2><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://link.svix.com/system-01" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!v-ZP!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fde8a87d9-0b90-4a74-857c-be37bba398f2_2000x1047.png 424w, https://substackcdn.com/image/fetch/$s_!v-ZP!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fde8a87d9-0b90-4a74-857c-be37bba398f2_2000x1047.png 848w, https://substackcdn.com/image/fetch/$s_!v-ZP!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fde8a87d9-0b90-4a74-857c-be37bba398f2_2000x1047.png 1272w, https://substackcdn.com/image/fetch/$s_!v-ZP!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fde8a87d9-0b90-4a74-857c-be37bba398f2_2000x1047.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!v-ZP!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fde8a87d9-0b90-4a74-857c-be37bba398f2_2000x1047.png" width="1456" height="762" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/de8a87d9-0b90-4a74-857c-be37bba398f2_2000x1047.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:762,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:212365,&quot;alt&quot;:&quot;&quot;,&quot;title&quot;:&quot;&quot;,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:&quot;https://link.svix.com/system-01&quot;,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://newsletter.systemdesign.one/i/211217193?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fde8a87d9-0b90-4a74-857c-be37bba398f2_2000x1047.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" title="" srcset="https://substackcdn.com/image/fetch/$s_!v-ZP!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fde8a87d9-0b90-4a74-857c-be37bba398f2_2000x1047.png 424w, https://substackcdn.com/image/fetch/$s_!v-ZP!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fde8a87d9-0b90-4a74-857c-be37bba398f2_2000x1047.png 848w, https://substackcdn.com/image/fetch/$s_!v-ZP!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fde8a87d9-0b90-4a74-857c-be37bba398f2_2000x1047.png 1272w, https://substackcdn.com/image/fetch/$s_!v-ZP!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fde8a87d9-0b90-4a74-857c-be37bba398f2_2000x1047.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 buttonBase-GK1x3M"><svg aria-hidden="true" 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" class="icon-noB79L"><g><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 buttonBase-GK1x3M"><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 icon-noB79L"><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>Agents are killing your apps with compounding latency across workflows.</p><p>Your customers want their agent workflows to be efficient, so you&#8217;re losing deals if you don&#8217;t make them event-driven. Webhooks solve this issue, but implementing them is harder than it looks.</p><p>If you homebrewed your webhooks and are getting pinged at 4 in the morning for failed deliveries, this is for you.</p><p><strong><a href="https://link.svix.com/system-01">Svix</a></strong> handles everything: retries, idempotency, security, and compliance. Qualified startups get $12,000 in free credits.</p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://link.svix.com/system-01&quot;,&quot;text&quot;:&quot;Get started for free&quot;,&quot;action&quot;:null,&quot;class&quot;:&quot;button-wrapper&quot;}" data-component-name="ButtonCreateButton"><a class="button primary button-wrapper" href="https://link.svix.com/system-01"><span>Get started for free</span></a></p><p><em>(Thanks to <strong><a href="https://link.svix.com/system-01">Svix</a></strong> for partnering on this newsletter.)</em></p></div><h4 style="text-align: center;"><strong>&#167;</strong></h4><h2><strong>1. Large Language Models</strong></h2><blockquote><p>A large language model (<strong>LLM</strong>) is an AI model trained on vast amounts of text to learn language patterns.</p></blockquote><p>You type <em>&#8220;Why is the sky blue?&#8221;</em> into a chatbot &amp; hit Enter.</p><p>The model processes your question as small pieces of text called <strong>tokens</strong>. A token could be a word, part of a word, or punctuation. A typical text-generating LLM selects the next token based on your question and the text it has produced so far.</p><p>Then it repeats. Token by token, the answer appears&#8230;</p><p>During training, the model adjusted internal numerical values called <strong>weights</strong>. Those weights capture patterns useful for language tasks, from sentence structure to relationships between ideas.</p><p>Your prompt gives the model context for its response.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!wtQ-!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc9c9f692-b971-4c90-b9f1-c3ee44f0a364_1448x1086.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!wtQ-!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc9c9f692-b971-4c90-b9f1-c3ee44f0a364_1448x1086.png 424w, https://substackcdn.com/image/fetch/$s_!wtQ-!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc9c9f692-b971-4c90-b9f1-c3ee44f0a364_1448x1086.png 848w, https://substackcdn.com/image/fetch/$s_!wtQ-!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc9c9f692-b971-4c90-b9f1-c3ee44f0a364_1448x1086.png 1272w, https://substackcdn.com/image/fetch/$s_!wtQ-!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc9c9f692-b971-4c90-b9f1-c3ee44f0a364_1448x1086.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!wtQ-!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc9c9f692-b971-4c90-b9f1-c3ee44f0a364_1448x1086.png" width="1448" height="1086" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/c9c9f692-b971-4c90-b9f1-c3ee44f0a364_1448x1086.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1086,&quot;width&quot;:1448,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!wtQ-!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc9c9f692-b971-4c90-b9f1-c3ee44f0a364_1448x1086.png 424w, https://substackcdn.com/image/fetch/$s_!wtQ-!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc9c9f692-b971-4c90-b9f1-c3ee44f0a364_1448x1086.png 848w, https://substackcdn.com/image/fetch/$s_!wtQ-!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc9c9f692-b971-4c90-b9f1-c3ee44f0a364_1448x1086.png 1272w, https://substackcdn.com/image/fetch/$s_!wtQ-!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc9c9f692-b971-4c90-b9f1-c3ee44f0a364_1448x1086.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 buttonBase-GK1x3M"><svg aria-hidden="true" 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" class="icon-noB79L"><g><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 buttonBase-GK1x3M"><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 icon-noB79L"><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><h3><strong>Analogy</strong></h3><p>Think of autocomplete on your phone:</p><p>You type <em>&#8220;See you,&#8221;</em> and the keyboard suggests &#8220;<em>soon</em>.&#8221; An LLM takes this idea much further, using the available conversation to produce paragraphs, explanations, or code.</p><p>Predicting a plausible continuation still leaves room for a wrong answer.</p><h3><strong>Common mistake</strong></h3><p>Trusting an answer simply because it sounds <em>confident</em>.</p><p>Suppose you ask for code to resize an image. The model could suggest a function with a sensible name that the library doesn&#8217;t provide. Check the documentation &amp; run the code before you rely on it.</p><h3><strong>Why it matters</strong></h3><p>You don&#8217;t need a separate model for every language task.</p><p>Different instructions let the same LLM summarize a document, explain an error, or draft a reply.</p><p>That flexibility makes LLMs useful across many software products.</p><h2><strong>2. Generative AI</strong></h2><blockquote><p>Generative AI produces content such as text, images, audio &amp; video from patterns learned during training.</p></blockquote><p>Ask an image generator for <em>&#8220;a red bicycle outside a bakery.&#8221;</em></p><p>Your description guides the model toward a result. Some image models begin with random noise and refine it step by step into an image. A text model uses a different process, typically selecting tokens in sequence.</p><p>Both produce content from learned patterns.</p><p>Generative AI is the broader category&#8230; Text-generating LLMs are one example; image and audio generators are others.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!lCDy!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3c2c80fa-3ada-44d6-b5fc-6158721873e8_1448x1086.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!lCDy!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3c2c80fa-3ada-44d6-b5fc-6158721873e8_1448x1086.png 424w, https://substackcdn.com/image/fetch/$s_!lCDy!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3c2c80fa-3ada-44d6-b5fc-6158721873e8_1448x1086.png 848w, https://substackcdn.com/image/fetch/$s_!lCDy!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3c2c80fa-3ada-44d6-b5fc-6158721873e8_1448x1086.png 1272w, https://substackcdn.com/image/fetch/$s_!lCDy!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3c2c80fa-3ada-44d6-b5fc-6158721873e8_1448x1086.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!lCDy!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3c2c80fa-3ada-44d6-b5fc-6158721873e8_1448x1086.png" width="1448" height="1086" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/3c2c80fa-3ada-44d6-b5fc-6158721873e8_1448x1086.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1086,&quot;width&quot;:1448,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!lCDy!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3c2c80fa-3ada-44d6-b5fc-6158721873e8_1448x1086.png 424w, https://substackcdn.com/image/fetch/$s_!lCDy!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3c2c80fa-3ada-44d6-b5fc-6158721873e8_1448x1086.png 848w, https://substackcdn.com/image/fetch/$s_!lCDy!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3c2c80fa-3ada-44d6-b5fc-6158721873e8_1448x1086.png 1272w, https://substackcdn.com/image/fetch/$s_!lCDy!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3c2c80fa-3ada-44d6-b5fc-6158721873e8_1448x1086.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 buttonBase-GK1x3M"><svg aria-hidden="true" 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" class="icon-noB79L"><g><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 buttonBase-GK1x3M"><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 icon-noB79L"><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><h3><strong>Analogy</strong></h3><p>Think of a cook who has learned from hundreds of recipes:</p><p>You ask for a spicy vegetable dish. The cook draws on familiar ingredients and techniques to prepare something that fits your request.</p><p>You still taste the dish before you serve it.</p><h3><strong>Common mistake</strong></h3><p>Assuming the generated content is ready to use.</p><p>An image could contain unreadable labels. A summary could leave out a key decision. Review the result against your original request and check factual details against the source.</p><h3><strong>Why it matters</strong></h3><p>Generative AI helps you get from a blank page to a first draft.</p><p>A few notes become an email, a description becomes an illustration, or a specification becomes starter code.</p><p>The next step is to check whether the draft does the job.</p><h2><strong>3. Machine Learning</strong></h2><blockquote><p>Machine Learning (<strong>ML</strong>) is a branch of AI in which systems learn from data to perform tasks without explicit rules for every situation.</p></blockquote><p>Think about the spam folder in your inbox:</p><p>You could write a rule to block every email containing <em>&#8220;free money.&#8221;</em> But a spammer could change the wording; also, a legitimate email could contain the same phrase. A model learns from examples &amp; considers several clues together.</p><p>Those clues help it assess a new message.</p><p>For a spam filter, training examples typically include the correct label:<em> spam or legitimate</em>. The training algorithm adjusts the model to reduce classification errors.</p><p>This approach is called <strong>supervised learning</strong>.</p><p>Other approaches discover patterns in unlabeled data or learn through rewards after actions.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!9-tF!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc01348b3-cb95-4017-84c9-217cdf57ae08_1448x1086.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!9-tF!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc01348b3-cb95-4017-84c9-217cdf57ae08_1448x1086.png 424w, https://substackcdn.com/image/fetch/$s_!9-tF!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc01348b3-cb95-4017-84c9-217cdf57ae08_1448x1086.png 848w, https://substackcdn.com/image/fetch/$s_!9-tF!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc01348b3-cb95-4017-84c9-217cdf57ae08_1448x1086.png 1272w, https://substackcdn.com/image/fetch/$s_!9-tF!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc01348b3-cb95-4017-84c9-217cdf57ae08_1448x1086.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!9-tF!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc01348b3-cb95-4017-84c9-217cdf57ae08_1448x1086.png" width="1448" height="1086" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/c01348b3-cb95-4017-84c9-217cdf57ae08_1448x1086.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1086,&quot;width&quot;:1448,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!9-tF!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc01348b3-cb95-4017-84c9-217cdf57ae08_1448x1086.png 424w, https://substackcdn.com/image/fetch/$s_!9-tF!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc01348b3-cb95-4017-84c9-217cdf57ae08_1448x1086.png 848w, https://substackcdn.com/image/fetch/$s_!9-tF!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc01348b3-cb95-4017-84c9-217cdf57ae08_1448x1086.png 1272w, https://substackcdn.com/image/fetch/$s_!9-tF!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc01348b3-cb95-4017-84c9-217cdf57ae08_1448x1086.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 buttonBase-GK1x3M"><svg aria-hidden="true" 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" class="icon-noB79L"><g><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 buttonBase-GK1x3M"><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 icon-noB79L"><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><h3><strong>Analogy</strong></h3><p>Think about how you learn to choose ripe fruit:</p><p>Someone shows you a few good examples &amp; a few bad ones. Over time, you connect color, firmness, and smell with ripeness.</p><p>You use those clues on your next trip to the market.</p><h3><strong>Common mistake</strong></h3><p>Testing the model with the same examples it learned from.</p><p>That&#8217;s like giving a student the practice questions again and calling it a final exam. Reserve separate examples to check whether the model handles unfamiliar data.</p><h3><strong>Why it matters</strong></h3><p>ML helps when a task involves more patterns than you could reasonably capture in hand-written rules. It powers uses such as spam filters, fraud detection, and product recommendations.</p><p>The goal is useful predictions on new data.</p><h4 style="text-align: center;"><strong>&#167;</strong></h4><div class="captioned-button-wrap" data-attrs="{&quot;url&quot;:&quot;https://newsletter.systemdesign.one/p/ai-concepts-explained-for-beginners?utm_source=substack&utm_medium=email&utm_content=share&action=share&quot;,&quot;text&quot;:&quot;Share&quot;}" data-component-name="CaptionedButtonToDOM"><div class="preamble"><p class="cta-caption"><em><span data-color="#3a7bf9" style="color: rgb(58, 123, 249);">If something resonated with you today, share this letter. Because one idea, one action, can change everything.</span></em></p></div><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://newsletter.systemdesign.one/p/ai-concepts-explained-for-beginners?utm_source=substack&utm_medium=email&utm_content=share&action=share&quot;,&quot;text&quot;:&quot;Share&quot;}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://newsletter.systemdesign.one/p/ai-concepts-explained-for-beginners?utm_source=substack&utm_medium=email&utm_content=share&action=share"><span>Share</span></a></p></div><h4 style="text-align: center;"><strong>&#167;</strong></h4><h2><strong>4. Deep Learning</strong></h2><blockquote><p>Deep learning (<strong>DL</strong><a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-2" href="#footnote-2" target="_self">2</a>) is a type of ML that uses multiple layers of a neural network to learn complex patterns.</p></blockquote><p>Show a model a photograph of a bicycle.</p><p>The model receives numbers representing the image&#8217;s pixels. Early layers often detect simple features, such as edges &amp; textures. Later layers combine these features into more complex shapes &amp; object parts.</p><p>Together, the layers help the model recognize the bicycle.</p><p>The word &#8220;deep&#8221; refers to these multiple layers. During training, the model adjusts them to improve its predictions.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!HfUv!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9faf1b2e-a4ee-4c07-9747-d99e37e345d1_1448x1086.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!HfUv!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9faf1b2e-a4ee-4c07-9747-d99e37e345d1_1448x1086.png 424w, https://substackcdn.com/image/fetch/$s_!HfUv!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9faf1b2e-a4ee-4c07-9747-d99e37e345d1_1448x1086.png 848w, https://substackcdn.com/image/fetch/$s_!HfUv!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9faf1b2e-a4ee-4c07-9747-d99e37e345d1_1448x1086.png 1272w, https://substackcdn.com/image/fetch/$s_!HfUv!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9faf1b2e-a4ee-4c07-9747-d99e37e345d1_1448x1086.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!HfUv!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9faf1b2e-a4ee-4c07-9747-d99e37e345d1_1448x1086.png" width="1448" height="1086" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/9faf1b2e-a4ee-4c07-9747-d99e37e345d1_1448x1086.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1086,&quot;width&quot;:1448,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!HfUv!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9faf1b2e-a4ee-4c07-9747-d99e37e345d1_1448x1086.png 424w, https://substackcdn.com/image/fetch/$s_!HfUv!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9faf1b2e-a4ee-4c07-9747-d99e37e345d1_1448x1086.png 848w, https://substackcdn.com/image/fetch/$s_!HfUv!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9faf1b2e-a4ee-4c07-9747-d99e37e345d1_1448x1086.png 1272w, https://substackcdn.com/image/fetch/$s_!HfUv!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9faf1b2e-a4ee-4c07-9747-d99e37e345d1_1448x1086.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 buttonBase-GK1x3M"><svg aria-hidden="true" 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" class="icon-noB79L"><g><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 buttonBase-GK1x3M"><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 icon-noB79L"><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><h3><strong>Analogy</strong></h3><p>Think of a sketch as someone draws it:</p><p>First, you see a few lines and circles. Add a frame, handlebars, and pedals, and the shapes start to make sense together.</p><p>A deep network also combines simpler features into more complex patterns.</p><h3><strong>Common mistake</strong></h3><p>Assuming every problem needs deep learning.</p><p>For a small spreadsheet of house sizes and prices, a simpler model could do the job well. Test a basic approach first, then compare whether a deep network earns its extra cost and complexity.</p><h3><strong>Why it matters</strong></h3><p>Images, speech &amp; language contain patterns which are difficult to describe with fixed rules. Deep learning helps models learn useful features from these inputs.</p><p>It underpins tools such as speech recognition &amp; image classification.</p><h2><strong>5. Neural Networks</strong></h2><blockquote><p>A neural network<a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-3" href="#footnote-3" target="_self">3</a> is a model made of connected mathematical units that transform inputs into an output.</p></blockquote><p>Let&#8217;s look inside the layers we just discussed:</p><p>Each unit receives numbers, combines them, and passes a result onward. Connections have adjustable values called weights, which control how much each input contributes. Layers also apply transformations, so the network learns more complex relationships.</p><p>The final layer produces the model&#8217;s output.</p><p>During training, an error measure tells the system how far its predictions are from the target. The training algorithm uses this feedback to adjust weights and other values across the network.</p><p>Tiny adjustments, repeated across many examples, change its predictions.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!3ju9!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc59287b4-bd90-49b6-b573-1487d7b2d367_1448x1086.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!3ju9!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc59287b4-bd90-49b6-b573-1487d7b2d367_1448x1086.png 424w, https://substackcdn.com/image/fetch/$s_!3ju9!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc59287b4-bd90-49b6-b573-1487d7b2d367_1448x1086.png 848w, https://substackcdn.com/image/fetch/$s_!3ju9!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc59287b4-bd90-49b6-b573-1487d7b2d367_1448x1086.png 1272w, https://substackcdn.com/image/fetch/$s_!3ju9!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc59287b4-bd90-49b6-b573-1487d7b2d367_1448x1086.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!3ju9!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc59287b4-bd90-49b6-b573-1487d7b2d367_1448x1086.png" width="1448" height="1086" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/c59287b4-bd90-49b6-b573-1487d7b2d367_1448x1086.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1086,&quot;width&quot;:1448,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!3ju9!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc59287b4-bd90-49b6-b573-1487d7b2d367_1448x1086.png 424w, https://substackcdn.com/image/fetch/$s_!3ju9!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc59287b4-bd90-49b6-b573-1487d7b2d367_1448x1086.png 848w, https://substackcdn.com/image/fetch/$s_!3ju9!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc59287b4-bd90-49b6-b573-1487d7b2d367_1448x1086.png 1272w, https://substackcdn.com/image/fetch/$s_!3ju9!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc59287b4-bd90-49b6-b573-1487d7b2d367_1448x1086.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 buttonBase-GK1x3M"><svg aria-hidden="true" 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" class="icon-noB79L"><g><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 buttonBase-GK1x3M"><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 icon-noB79L"><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><h3><strong>Analogy</strong></h3><p>Think of the controls on a sound mixing desk:</p><p>One control increases the voice; another reduces the drums. Changing the controls changes the final sound.</p><p>Weights play a similar role in how a network combines its inputs.</p><h3><strong>Common mistake</strong></h3><p>Taking the word &#8220;neural&#8221; too literally.</p><p>The name draws inspiration from the brain, but these units perform mathematical operations. A network&#8217;s ability to recognize a face or produce a sentence doesn&#8217;t establish human-like thought.</p><h3><strong>Why it matters</strong></h3><p>Neural networks provide the structure behind deep learning.</p><p>Understanding weights also explains what training changes: numerical values a model uses to turn an input into a prediction.</p><h2><strong>6. Retrieval-Augmented Generation</strong></h2><blockquote><p>RAG is an approach that retrieves relevant information &amp; supplies it to a model to help generate an answer.</p></blockquote><p>Ask a company assistant, <em>&#8220;How long do I have to return this order?&#8221;</em></p><p>The application searches the company&#8217;s documents for the relevant return policy. It places matching passages alongside your question. The model uses those passages to write its response.</p><p>The answer has information from the company&#8217;s documents.</p><p>Updating those documents gives the application new material to retrieve. It doesn&#8217;t require a new training run for every policy change.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!kftM!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fae54d9a8-e6c9-420d-b231-1c188d7cfdb7_1448x1086.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!kftM!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fae54d9a8-e6c9-420d-b231-1c188d7cfdb7_1448x1086.png 424w, https://substackcdn.com/image/fetch/$s_!kftM!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fae54d9a8-e6c9-420d-b231-1c188d7cfdb7_1448x1086.png 848w, https://substackcdn.com/image/fetch/$s_!kftM!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fae54d9a8-e6c9-420d-b231-1c188d7cfdb7_1448x1086.png 1272w, https://substackcdn.com/image/fetch/$s_!kftM!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fae54d9a8-e6c9-420d-b231-1c188d7cfdb7_1448x1086.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!kftM!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fae54d9a8-e6c9-420d-b231-1c188d7cfdb7_1448x1086.png" width="1448" height="1086" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/ae54d9a8-e6c9-420d-b231-1c188d7cfdb7_1448x1086.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1086,&quot;width&quot;:1448,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!kftM!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fae54d9a8-e6c9-420d-b231-1c188d7cfdb7_1448x1086.png 424w, https://substackcdn.com/image/fetch/$s_!kftM!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fae54d9a8-e6c9-420d-b231-1c188d7cfdb7_1448x1086.png 848w, https://substackcdn.com/image/fetch/$s_!kftM!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fae54d9a8-e6c9-420d-b231-1c188d7cfdb7_1448x1086.png 1272w, https://substackcdn.com/image/fetch/$s_!kftM!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fae54d9a8-e6c9-420d-b231-1c188d7cfdb7_1448x1086.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 buttonBase-GK1x3M"><svg aria-hidden="true" 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" class="icon-noB79L"><g><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 buttonBase-GK1x3M"><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 icon-noB79L"><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><h3><strong>Analogy</strong></h3><p>Think of an open-book exam:</p><p>You find the relevant pages before you answer. Your result depends on both finding the right material &amp; interpreting it correctly.</p><h3><strong>Common mistake</strong></h3><p>Assuming retrieval guarantees a correct answer.</p><p>The search could return an outdated policy and/or miss an exception. So check the retrieved passages &amp; final response. When the evidence is missing, the assistant should say so.</p><h3><strong>Why it matters</strong></h3><p>RAG helps assistants answer questions about private or frequently updated information. Also it gives readers source material to check against the answer.</p><h2><strong>7. AI Agents and Agentic Workflows</strong></h2><blockquote><p>An AI agent uses a model to choose actions toward a goal and respond to the results. Agentic workflows organize model and tool steps into a process.</p></blockquote><p>Ask an assistant to investigate a failed software test.</p><p>An agent would inspect the error, open a file, make an edit, and rerun the tests. The result helps it decide what to do next. A fixed workflow follows a prewritten sequence, such as &#8220;<em>summarize the ticket, classify it, then route it.</em>&#8221;</p><p>The difference is how much control the model has over the next step.</p><p>The term &#8220;agentic workflow&#8221; covers a range of designs. Some follow mostly fixed steps; others give the model more freedom to choose.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!rMan!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F39e6f430-a713-45f6-bd1d-395847b2d4cf_1448x1086.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!rMan!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F39e6f430-a713-45f6-bd1d-395847b2d4cf_1448x1086.png 424w, https://substackcdn.com/image/fetch/$s_!rMan!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F39e6f430-a713-45f6-bd1d-395847b2d4cf_1448x1086.png 848w, https://substackcdn.com/image/fetch/$s_!rMan!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F39e6f430-a713-45f6-bd1d-395847b2d4cf_1448x1086.png 1272w, https://substackcdn.com/image/fetch/$s_!rMan!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F39e6f430-a713-45f6-bd1d-395847b2d4cf_1448x1086.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!rMan!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F39e6f430-a713-45f6-bd1d-395847b2d4cf_1448x1086.png" width="1448" height="1086" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/39e6f430-a713-45f6-bd1d-395847b2d4cf_1448x1086.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1086,&quot;width&quot;:1448,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!rMan!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F39e6f430-a713-45f6-bd1d-395847b2d4cf_1448x1086.png 424w, https://substackcdn.com/image/fetch/$s_!rMan!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F39e6f430-a713-45f6-bd1d-395847b2d4cf_1448x1086.png 848w, https://substackcdn.com/image/fetch/$s_!rMan!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F39e6f430-a713-45f6-bd1d-395847b2d4cf_1448x1086.png 1272w, https://substackcdn.com/image/fetch/$s_!rMan!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F39e6f430-a713-45f6-bd1d-395847b2d4cf_1448x1086.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 buttonBase-GK1x3M"><svg aria-hidden="true" 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" class="icon-noB79L"><g><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 buttonBase-GK1x3M"><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 icon-noB79L"><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><h3><strong>Analogy</strong></h3><p>Think of a technician with a checklist:</p><p>For a routine inspection, the checklist determines the order. For an unfamiliar fault, the technician chooses the next check based on what the previous one revealed.</p><h3><strong>Common mistake</strong></h3><p>Giving an agent tools without clear limits.</p><p>A failed action could trigger repeated retries/unwanted changes. So set permissions, spending limits, and stopping conditions. Plus, require approval before consequential actions, such as a payment/deletion.</p><h3><strong>Why it matters</strong></h3><p>Agents help with tasks whose steps depend on discoveries along the way.</p><p>Fixed workflows work when the sequence is known and predictable execution matters.</p><h4 style="text-align: center;"><strong>&#167;</strong></h4><div class="callout-block" data-callout="true"><p style="text-align: center;"><em><strong><span data-color="#3a7bf9" style="color: rgb(58, 123, 249);">Reminder: this is a teaser of the subscriber-only newsletter series, exclusive to my golden members.</span></strong></em></p><p>When you upgrade, you&#8217;ll get:</p><ul><li><p><strong>Simple breakdown of real-world architectures</strong></p></li><li><p>Frameworks you can plug into your work or business</p></li><li><p><strong>Proven systems behind ChatGPT, Perplexity, and Copilot</strong></p></li></ul><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://newsletter.systemdesign.one/subscribe&quot;,&quot;text&quot;:&quot;Unlock Full Access&quot;,&quot;action&quot;:null,&quot;class&quot;:&quot;button-wrapper&quot;}" data-component-name="ButtonCreateButton"><a class="button primary button-wrapper" href="https://newsletter.systemdesign.one/subscribe"><span>Unlock Full Access</span></a></p><p><em>Ready for the best part?</em></p></div><h4 style="text-align: center;"><strong>&#167;</strong></h4><h2><strong>8. Prompt Engineering</strong></h2>
      <p>
          <a href="https://newsletter.systemdesign.one/p/ai-concepts-explained-for-beginners">
              Read more
          </a>
      </p>
   ]]></content:encoded></item><item><title><![CDATA[How Vector Database Search Billions of Vectors in Milliseconds]]></title><description><![CDATA[#186: Understand HNSW Graphs, Approximate Nearest Neighbor Search, and Key Parameters Engineers Tune in Production]]></description><link>https://newsletter.systemdesign.one/p/hnsw-vector-search-explained</link><guid isPermaLink="false">https://newsletter.systemdesign.one/p/hnsw-vector-search-explained</guid><dc:creator><![CDATA[Avani Chaskar]]></dc:creator><pubDate>Sun, 04 Oct 2026 11:15:38 GMT</pubDate><enclosure url="https://substack-post-media.s3.amazonaws.com/public/images/4565e04a-0d72-47f2-840f-cf7f3ad78b61_1280x720.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<div class="callout-block" data-callout="true"><h3><a href="https://pages.awscloud.com/awsmp-gim-ccrs-adhoc-aim-ent-ai-data-leader-daiml-book-2.html?trk=d31756f3-462c-47bd-bf63-56442ebd0459&amp;sc_channel=el">Download the &#8220;Agentic AI&#8221; e-book for free</a></h3><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://pages.awscloud.com/awsmp-gim-ccrs-adhoc-aim-ent-ai-data-leader-daiml-book-2.html?trk=d31756f3-462c-47bd-bf63-56442ebd0459&amp;sc_channel=el" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!hI46!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcc857d6e-a3ab-4e0a-b8c3-6343613e0364_1280x720.png 424w, https://substackcdn.com/image/fetch/$s_!hI46!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcc857d6e-a3ab-4e0a-b8c3-6343613e0364_1280x720.png 848w, https://substackcdn.com/image/fetch/$s_!hI46!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcc857d6e-a3ab-4e0a-b8c3-6343613e0364_1280x720.png 1272w, https://substackcdn.com/image/fetch/$s_!hI46!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcc857d6e-a3ab-4e0a-b8c3-6343613e0364_1280x720.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!hI46!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcc857d6e-a3ab-4e0a-b8c3-6343613e0364_1280x720.png" width="1280" height="720" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/cc857d6e-a3ab-4e0a-b8c3-6343613e0364_1280x720.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:720,&quot;width&quot;:1280,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:543468,&quot;alt&quot;:&quot;&quot;,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:&quot;https://pages.awscloud.com/awsmp-gim-ccrs-adhoc-aim-ent-ai-data-leader-daiml-book-2.html?trk=d31756f3-462c-47bd-bf63-56442ebd0459&amp;sc_channel=el&quot;,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:&quot;https://newsletter.systemdesign.one/i/217297135?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcc857d6e-a3ab-4e0a-b8c3-6343613e0364_1280x720.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" title="" srcset="https://substackcdn.com/image/fetch/$s_!hI46!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcc857d6e-a3ab-4e0a-b8c3-6343613e0364_1280x720.png 424w, https://substackcdn.com/image/fetch/$s_!hI46!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcc857d6e-a3ab-4e0a-b8c3-6343613e0364_1280x720.png 848w, https://substackcdn.com/image/fetch/$s_!hI46!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcc857d6e-a3ab-4e0a-b8c3-6343613e0364_1280x720.png 1272w, https://substackcdn.com/image/fetch/$s_!hI46!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcc857d6e-a3ab-4e0a-b8c3-6343613e0364_1280x720.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 buttonBase-GK1x3M"><svg aria-hidden="true" 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" class="icon-noB79L"><g><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 buttonBase-GK1x3M"><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 icon-noB79L"><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><a href="https://pages.awscloud.com/awsmp-gim-ccrs-adhoc-aim-ent-ai-data-leader-daiml-book-2.html?trk=d31756f3-462c-47bd-bf63-56442ebd0459&amp;sc_channel=el">AWS</a></strong> isn&#8217;t winning the AI race with the smartest model. It&#8217;s winning by owning everything that surrounds the model. Six layers. Sixty-plus services. <br><br>But how do you actually put all those pieces together?<br><br><a href="https://pages.awscloud.com/awsmp-gim-ccrs-adhoc-aim-ent-ai-data-leader-daiml-book-2.html?trk=d31756f3-462c-47bd-bf63-56442ebd0459&amp;sc_channel=el">AWS</a> asked 15+ data and AI leaders from companies including PayPal, Siemens, Morgan Stanley, and Sanofi how they are approaching agentic AI in the enterprise. <br><br>The result is The Agentic Enterprise: a 16-chapter e-book covering practical topics such as:</p><ul><li><p>Building, monitoring, and governing reliable AI agents</p></li><li><p>Improving agent performance and scalability</p></li><li><p>Implementing guardrails throughout the AI lifecycle</p></li><li><p>Moving agentic systems toward production </p></li></ul><p>If you&#8217;re working on AI agents beyond the prototype stage, it&#8217;s worth a read.</p><p><strong><a href="https://pages.awscloud.com/awsmp-gim-ccrs-adhoc-aim-ent-ai-data-leader-daiml-book-2.html?trk=d31756f3-462c-47bd-bf63-56442ebd0459&amp;sc_channel=el"><mark data-color="rgb(255, 255, 0)" style="background-color: rgb(255, 255, 0); color: rgb(0, 0, 0);">Download the e-book for free here &#187;</mark></a></strong></p><p><em>(Thanks to <a href="https://pages.awscloud.com/awsmp-gim-ccrs-adhoc-aim-ent-ai-data-leader-daiml-book-2.html?trk=d31756f3-462c-47bd-bf63-56442ebd0459&amp;sc_channel=el">AWS</a> for partnering on this newsletter.)</em></p></div><p><span>Imagine you&#8217;re building Shazam</span><a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-1" href="#footnote-1" target="_self">1</a><span>.</span></p><p><span>A user hums a 10-second song clip&#8230;Your system has 100 million songs.</span></p><p><span>Your job is simple: </span><em><span>find the most similar songs in less than 50 milliseconds.</span></em></p><p><span>So how&#8217;d you do it?</span></p><p><span>Here&#8217;s the obvious solution: </span><em><span>compare the user&#8217;s song with each song in the database.</span></em></p><div class="highlighted_code_block" data-attrs="{&quot;language&quot;:&quot;plaintext&quot;,&quot;nodeId&quot;:&quot;96a4fe8d-0ef5-4dc4-b423-922aa50901ff&quot;}" data-component-name="HighlightedCodeBlockToDOM"><pre class="shiki"><code class="language-plaintext">Query song
   &#8595;
Song 1
Song 2
Song 3
...
Song 100,000,000</code></pre></div><p><span>Yet this does NOT work at </span><em><span>scale</span></em><span>.</span></p><p><span>Even if each comparison is fast, 100 million comparisons are &#8220;expensive&#8221;.</span></p><p><span>When you search documents in a Retrieval-Augmented Generation (</span><strong><span>RAG</span></strong><a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-2" href="#footnote-2" target="_self">2</a><span>) system, find similar images, or generate recommendations, the system is doing the same thing:</span></p><blockquote><p><span>Find the most similar items in a massive collection.</span></p></blockquote><p><span>This is where Hierarchical Navigable Small World (</span><strong><span>HNSW</span></strong><a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-3" href="#footnote-3" target="_self">3</a><span>) comes in&#8230;</span></p><h4 style="text-align: center;"><strong>&#167;</strong></h4><p></p><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://newsletter.systemdesign.one/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"><span data-color="#3a7bf9" style="color: rgb(58, 123, 249);">Get my system design playbook for FREE on newsletter signup:</span></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><ul><li><p><em><a href="https://newsletter.systemdesign.one/p/hnsw-vector-search-explained/?action=share">Share this letter</a> &amp; I&#8217;ll send you some rewards for the referrals.</em></p></li></ul><h4 style="text-align: center;"><strong>&#167;</strong></h4><p><span>I want to introduce </span><a href="https://www.linkedin.com/in/avani-chaskar/"><span>Avani</span></a><strong><a href="https://www.linkedin.com/in/avani-chaskar/"><span> </span></a></strong><a href="https://www.linkedin.com/in/avani-chaskar/"><span>Chaskar</span></a><strong><span> </span></strong><span>as the guest author.</span></p><div class="captioned-image-container"><figure><a class="image-link image2" target="_blank" href="http://avanichaskar.substack.com/welcome" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!dWym!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F575d02fe-c4c6-45e3-8e65-546d6567dc9c_2048x410.png 424w, https://substackcdn.com/image/fetch/$s_!dWym!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F575d02fe-c4c6-45e3-8e65-546d6567dc9c_2048x410.png 848w, https://substackcdn.com/image/fetch/$s_!dWym!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F575d02fe-c4c6-45e3-8e65-546d6567dc9c_2048x410.png 1272w, https://substackcdn.com/image/fetch/$s_!dWym!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F575d02fe-c4c6-45e3-8e65-546d6567dc9c_2048x410.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!dWym!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F575d02fe-c4c6-45e3-8e65-546d6567dc9c_2048x410.png" width="1456" height="291" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/575d02fe-c4c6-45e3-8e65-546d6567dc9c_2048x410.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;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:&quot;http://avanichaskar.substack.com/welcome&quot;,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!dWym!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F575d02fe-c4c6-45e3-8e65-546d6567dc9c_2048x410.png 424w, https://substackcdn.com/image/fetch/$s_!dWym!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F575d02fe-c4c6-45e3-8e65-546d6567dc9c_2048x410.png 848w, https://substackcdn.com/image/fetch/$s_!dWym!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F575d02fe-c4c6-45e3-8e65-546d6567dc9c_2048x410.png 1272w, https://substackcdn.com/image/fetch/$s_!dWym!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F575d02fe-c4c6-45e3-8e65-546d6567dc9c_2048x410.png 1456w" sizes="100vw" loading="lazy"></picture><div></div></div></a></figure></div><p><span>She writes technical guides on building, evaluating &amp; scaling deterministic AI systems.</span></p><p><span>Subscribe to her </span><strong><a href="http://avanichaskar.substack.com/welcome"><span>newsletter</span></a></strong><span> to join developers receiving her latest engineering breakdowns.</span></p><h4 style="text-align: center;"><strong>&#167;</strong></h4><h2>The Idea: Search Only What Matters</h2><p><span>The idea behind HNSW is simple:</span></p><blockquote><p><span>Instead of comparing against every item, build shortcuts that lead you close to the answer.</span></p></blockquote><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!z3qI!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb4bb3a2c-1b09-41c5-9e05-e6f50480b769_1792x1008.jpeg" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!z3qI!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb4bb3a2c-1b09-41c5-9e05-e6f50480b769_1792x1008.jpeg 424w, https://substackcdn.com/image/fetch/$s_!z3qI!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb4bb3a2c-1b09-41c5-9e05-e6f50480b769_1792x1008.jpeg 848w, https://substackcdn.com/image/fetch/$s_!z3qI!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb4bb3a2c-1b09-41c5-9e05-e6f50480b769_1792x1008.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!z3qI!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb4bb3a2c-1b09-41c5-9e05-e6f50480b769_1792x1008.jpeg 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!z3qI!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb4bb3a2c-1b09-41c5-9e05-e6f50480b769_1792x1008.jpeg" width="1456" height="819" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/b4bb3a2c-1b09-41c5-9e05-e6f50480b769_1792x1008.jpeg&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:819,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:487117,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/jpeg&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://newsletter.systemdesign.one/i/217040199?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb4bb3a2c-1b09-41c5-9e05-e6f50480b769_1792x1008.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_!z3qI!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb4bb3a2c-1b09-41c5-9e05-e6f50480b769_1792x1008.jpeg 424w, https://substackcdn.com/image/fetch/$s_!z3qI!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb4bb3a2c-1b09-41c5-9e05-e6f50480b769_1792x1008.jpeg 848w, https://substackcdn.com/image/fetch/$s_!z3qI!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb4bb3a2c-1b09-41c5-9e05-e6f50480b769_1792x1008.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!z3qI!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb4bb3a2c-1b09-41c5-9e05-e6f50480b769_1792x1008.jpeg 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 buttonBase-GK1x3M"><svg aria-hidden="true" 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" class="icon-noB79L"><g><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 buttonBase-GK1x3M"><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 icon-noB79L"><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>Think about finding a coffee shop in a city you do not know.</p><p><span>You would not walk down every street&#8230;Instead, you&#8217;d:</span></p><ol><li><p><span>Use highways to reach the right area.</span></p></li><li><p><span>Take the main road to get closer.</span></p></li><li><p><span>Then use local streets to find the exact place.</span></p></li></ol><h4 style="text-align: center;"><strong>&#167;</strong></h4><h2>First Attempt: Build a Graph</h2><p><span>Let&#8217;s go back to our 100 million songs.</span></p><p><span>Suppose each song is connected to </span><em><span>similar</span></em><span> songs:</span></p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!EAqj!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd56d4d45-0040-429c-9a61-165cddfd0d08_1536x1024.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!EAqj!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd56d4d45-0040-429c-9a61-165cddfd0d08_1536x1024.png 424w, https://substackcdn.com/image/fetch/$s_!EAqj!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd56d4d45-0040-429c-9a61-165cddfd0d08_1536x1024.png 848w, https://substackcdn.com/image/fetch/$s_!EAqj!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd56d4d45-0040-429c-9a61-165cddfd0d08_1536x1024.png 1272w, https://substackcdn.com/image/fetch/$s_!EAqj!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd56d4d45-0040-429c-9a61-165cddfd0d08_1536x1024.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!EAqj!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd56d4d45-0040-429c-9a61-165cddfd0d08_1536x1024.png" width="502" height="334.7815934065934" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/d56d4d45-0040-429c-9a61-165cddfd0d08_1536x1024.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:971,&quot;width&quot;:1456,&quot;resizeWidth&quot;:502,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!EAqj!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd56d4d45-0040-429c-9a61-165cddfd0d08_1536x1024.png 424w, https://substackcdn.com/image/fetch/$s_!EAqj!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd56d4d45-0040-429c-9a61-165cddfd0d08_1536x1024.png 848w, https://substackcdn.com/image/fetch/$s_!EAqj!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd56d4d45-0040-429c-9a61-165cddfd0d08_1536x1024.png 1272w, https://substackcdn.com/image/fetch/$s_!EAqj!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd56d4d45-0040-429c-9a61-165cddfd0d08_1536x1024.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 buttonBase-GK1x3M"><svg aria-hidden="true" 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" class="icon-noB79L"><g><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 buttonBase-GK1x3M"><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 icon-noB79L"><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><span>If Song B is similar to Song E, we connect them&#8230;</span></p><p><span>So instead of checking every song, we can jump from one song to another.</span></p><p><span>Start somewhere:</span></p><ul><li><p><span>Move to a neighbor that is closer to the query,</span></p></li><li><p><span>Then repeat.</span></p></li></ul><p><span>This is much faster!..</span></p><p><span>But there is still a problem: </span><em><span>a graph with 100 million nodes still requires &#8220;many&#8221; hops.</span></em></p><p><span>i.e., we need a faster way to move&#8230;</span></p><h4 style="text-align: center;"><strong>&#167;</strong></h4><h2><strong>But What Does &#8220;Similar&#8221; Actually Mean?</strong></h2><p><span>Before HNSW navigates the graph, it needs a way to measure how close two vectors</span><a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-4" href="#footnote-4" target="_self">4</a><span> are.</span></p><p><span>Here are the most common distance or similarity metrics:</span></p><ul><li><p><strong><span>Cosine similarity:</span></strong><span> Measures the angle between vectors. A smaller angle means higher similarity. It ignores vector length, making it ideal for </span><em><span>text </span></em><span>and</span><em><span> NLP</span></em><a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-5" href="#footnote-5" target="_self">5</a><span>.</span></p></li><li><p><strong><span>Dot product/inner product:</span></strong><span> Multiplies &amp; sums elements. A larger positive value means higher similarity (it grows with both alignment and length). It&#8217;s commonly used in </span><em><span>recommendation systems</span></em><span>.</span></p></li><li><p><strong><span>Euclidean distance (L2):</span></strong><span> Measures straight-line distance. A smaller distance means higher similarity. It captures absolute size differences, making it great for </span><em><span>images</span></em><span>.</span></p></li></ul><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!XQG5!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F64b22d2d-6e5f-469b-afc2-27375ea51ea5_1200x896.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!XQG5!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F64b22d2d-6e5f-469b-afc2-27375ea51ea5_1200x896.png 424w, https://substackcdn.com/image/fetch/$s_!XQG5!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F64b22d2d-6e5f-469b-afc2-27375ea51ea5_1200x896.png 848w, https://substackcdn.com/image/fetch/$s_!XQG5!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F64b22d2d-6e5f-469b-afc2-27375ea51ea5_1200x896.png 1272w, https://substackcdn.com/image/fetch/$s_!XQG5!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F64b22d2d-6e5f-469b-afc2-27375ea51ea5_1200x896.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!XQG5!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F64b22d2d-6e5f-469b-afc2-27375ea51ea5_1200x896.png" width="1200" height="896" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/64b22d2d-6e5f-469b-afc2-27375ea51ea5_1200x896.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:896,&quot;width&quot;:1200,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!XQG5!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F64b22d2d-6e5f-469b-afc2-27375ea51ea5_1200x896.png 424w, https://substackcdn.com/image/fetch/$s_!XQG5!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F64b22d2d-6e5f-469b-afc2-27375ea51ea5_1200x896.png 848w, https://substackcdn.com/image/fetch/$s_!XQG5!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F64b22d2d-6e5f-469b-afc2-27375ea51ea5_1200x896.png 1272w, https://substackcdn.com/image/fetch/$s_!XQG5!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F64b22d2d-6e5f-469b-afc2-27375ea51ea5_1200x896.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 buttonBase-GK1x3M"><svg aria-hidden="true" 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" class="icon-noB79L"><g><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 buttonBase-GK1x3M"><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 icon-noB79L"><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><span>So the right similarity metric depends on the embedding model</span><a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-6" href="#footnote-6" target="_self">6</a><span> &amp; use case.</span></p><p><span>For HNSW, the important idea is simple:</span></p><blockquote><p>The closer a vector is to the query according to the chosen metric, the better the match.</p></blockquote><h4 style="text-align: center;"><strong>&#167;</strong></h4><h2><strong>Exact Search vs Approximate Search</strong></h2><p><span>There are two ways to find the nearest vectors:</span></p><ul><li><p><strong><span>Exact search</span></strong><span>: Compares the query against every vector &amp; returns the mathematically closest results. That gives us the true nearest neighbors, but at 100 million or a billion vectors, checking everything is &#8220;expensive&#8221;.</span></p></li><li><p><strong><span>Approximate Nearest Neighbor (ANN):</span></strong><span> Instead of examining the entire dataset, it explores the most promising clusters of the index and returns results that are </span><em><span>very likely</span></em><span> to be the true nearest neighbors.</span></p></li></ul><blockquote><p><span>HNSW is an ANN algorithm.</span></p></blockquote><p><span>Yet this creates an important tradeoff:</span></p><ul><li><p>Explore more &#8594; higher recall<a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-7" href="#footnote-7" target="_self">7</a>, higher latency.</p></li><li><p>Explore less &#8594; lower latency, potentially lower recall.</p></li></ul><p><span>To measure search effectiveness, we use </span><strong><span>Recall@k</span></strong><span>.</span></p><p><span>It measures how many of the true top-k nearest neighbors an approximate search actually retrieves.</span></p><blockquote><p>HNSW<em><span> </span></em><span>gives us a way to search a tiny fraction of the dataset while still achieving high recall.</span></p></blockquote><h4 style="text-align: center;"><strong>&#167;</strong></h4><h2><strong><span>The Real Trick: Add Layers</span></strong></h2><p><span>This is the key idea behind HNSW:</span></p><blockquote><p>HNSW builds many layers of graphs<a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-8" href="#footnote-8" target="_self">8</a>.</p></blockquote><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!BEy5!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5ebd03eb-c15b-47e4-ad8b-f256c2b61b78_1534x1025.jpeg" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!BEy5!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5ebd03eb-c15b-47e4-ad8b-f256c2b61b78_1534x1025.jpeg 424w, https://substackcdn.com/image/fetch/$s_!BEy5!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5ebd03eb-c15b-47e4-ad8b-f256c2b61b78_1534x1025.jpeg 848w, https://substackcdn.com/image/fetch/$s_!BEy5!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5ebd03eb-c15b-47e4-ad8b-f256c2b61b78_1534x1025.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!BEy5!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5ebd03eb-c15b-47e4-ad8b-f256c2b61b78_1534x1025.jpeg 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!BEy5!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5ebd03eb-c15b-47e4-ad8b-f256c2b61b78_1534x1025.jpeg" width="1456" height="973" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/5ebd03eb-c15b-47e4-ad8b-f256c2b61b78_1534x1025.jpeg&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:973,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:1069804,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/jpeg&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://newsletter.systemdesign.one/i/217040199?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5ebd03eb-c15b-47e4-ad8b-f256c2b61b78_1534x1025.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_!BEy5!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5ebd03eb-c15b-47e4-ad8b-f256c2b61b78_1534x1025.jpeg 424w, https://substackcdn.com/image/fetch/$s_!BEy5!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5ebd03eb-c15b-47e4-ad8b-f256c2b61b78_1534x1025.jpeg 848w, https://substackcdn.com/image/fetch/$s_!BEy5!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5ebd03eb-c15b-47e4-ad8b-f256c2b61b78_1534x1025.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!BEy5!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5ebd03eb-c15b-47e4-ad8b-f256c2b61b78_1534x1025.jpeg 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 buttonBase-GK1x3M"><svg aria-hidden="true" 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" class="icon-noB79L"><g><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 buttonBase-GK1x3M"><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 icon-noB79L"><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><span>The bottom layer contains every song.</span></p><p><span>Higher layers contain </span><em><span>fewer</span></em><span> songs. The higher you go, the fewer nodes exist. These upper layers create long-distance shortcuts.</span></p><p><span>This makes HNSW fast!</span></p><h4 style="text-align: center;"><strong>&#167;</strong></h4><h2><strong><span>How HNSW Search Works</span></strong></h2><p>Here&#8217;s how:</p><ul><li><p><span>A user hums a song: the system converts it into a vector.</span></p><ul><li><p><span>A vector is simply a list of numbers: </span><code>[0.12, 0.87, 0.34, 0.91, ...]</code><span>.</span></p></li><li><p><span>Songs with similar vectors sound similar.</span></p></li></ul><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!wav8!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbeb79a0d-b53b-4372-9e57-2f522111aebf_1408x1117.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!wav8!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbeb79a0d-b53b-4372-9e57-2f522111aebf_1408x1117.png 424w, https://substackcdn.com/image/fetch/$s_!wav8!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbeb79a0d-b53b-4372-9e57-2f522111aebf_1408x1117.png 848w, https://substackcdn.com/image/fetch/$s_!wav8!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbeb79a0d-b53b-4372-9e57-2f522111aebf_1408x1117.png 1272w, https://substackcdn.com/image/fetch/$s_!wav8!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbeb79a0d-b53b-4372-9e57-2f522111aebf_1408x1117.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!wav8!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbeb79a0d-b53b-4372-9e57-2f522111aebf_1408x1117.png" width="1408" height="1117" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/beb79a0d-b53b-4372-9e57-2f522111aebf_1408x1117.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1117,&quot;width&quot;:1408,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!wav8!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbeb79a0d-b53b-4372-9e57-2f522111aebf_1408x1117.png 424w, https://substackcdn.com/image/fetch/$s_!wav8!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbeb79a0d-b53b-4372-9e57-2f522111aebf_1408x1117.png 848w, https://substackcdn.com/image/fetch/$s_!wav8!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbeb79a0d-b53b-4372-9e57-2f522111aebf_1408x1117.png 1272w, https://substackcdn.com/image/fetch/$s_!wav8!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbeb79a0d-b53b-4372-9e57-2f522111aebf_1408x1117.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 buttonBase-GK1x3M"><svg aria-hidden="true" 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" class="icon-noB79L"><g><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 buttonBase-GK1x3M"><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 icon-noB79L"><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></li></ul><ol start="2"><li><p><span>Now the search begins&#8230;</span></p><ul><li><p><strong><span>Step 1 (Top Layer):</span></strong><span> Performs a high-level traversal on a sparse graph (</span><code>A &#8594; C &#8594; D</code><span>) to locate the general neighborhood rapidly.</span></p></li><li><p><strong><span>Step 2 (Middle Layers):</span></strong><span> Drops down through denser layers (</span><code>D &#8594; F &#8594; G</code><span>), narrowing the distance to refine the search space.</span></p></li><li><p><strong><span>Step 3 (Bottom Layer):</span></strong><span> Executes a targeted, local search among millions of nodes- exploring only a tiny fraction of the dataset to return Approximate Nearest Neighbors.</span></p></li></ul></li></ol><div class="callout-block" data-callout="true"><h4><strong>Key Insight</strong></h4><p>HNSW does not make 100 million comparisons faster.</p><p>It avoids making 100 million comparisons in the first place.</p><p>That is the entire trick.</p></div><h4 style="text-align: center;"><strong>&#167;</strong></h4><h2><strong><span>Why the &#8220;Small World&#8221; Matters</span></strong></h2><p><span>Think about social networks:</span></p><p><em><span>You know someone. That person knows someone else. After a few connections, you could reach almost anybody.</span></em></p><p><span>Graphs with this property are called </span><strong><span>small-world graphs</span></strong><a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-9" href="#footnote-9" target="_self">9</a><span>.</span></p><p><span>HNSW uses this idea:</span></p><p><em><span>Most connections are local&#8230;some connections jump far.</span></em></p><p><span>Together, they create short paths through huge datasets.</span></p><h4 style="text-align: center;"><strong>&#167;</strong></h4><h2><strong><span>Why &#8220;Hierarchical&#8221;?</span></strong></h2><p><span>Because there are layers&#8230;</span></p><p><span>Each higher layer contains exponentially fewer nodes.</span></p><p><span>Think of it like this:</span></p><ul><li><p><span>Layer 3: Highways</span></p></li><li><p><span>Layer 2: Major roads</span></p></li><li><p><span>Layer 1: Streets</span></p></li><li><p><span>Layer 0: Every location</span></p></li></ul><p><span>Search starts &#8220;</span><em><span>fast&#8221;</span></em><span>&#8230;then becomes &#8220;</span><em><span>precise</span></em><span>&#8221;.</span></p><h4 style="text-align: center;"><strong>&#167;</strong></h4><h2><strong>How Layers Get Built?</strong></h2><p><span>When inserting a new vector into an HNSW index:</span></p><ul><li><p><span>The algorithm assigns the vector a maximum height layer based on a decaying probability distribution</span><a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-10" href="#footnote-10" target="_self">10</a><span>.</span></p></li><li><p><span>Most vectors reside exclusively on Layer 0.</span></p></li><li><p><span>A small fraction are promoted to middle layers, and only a tiny minority reach the sparse top layer.</span></p></li></ul><p><span>This is similar to a data structure called a </span><strong><span>skip list</span></strong><a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-11" href="#footnote-11" target="_self">11</a><span>.</span></p><p><span>Skip lists let you jump over many elements.</span></p><p><span>HNSW applies the same idea to vectors.</span></p><blockquote><p>Randomness creates shortcuts &#8594; Those shortcuts make navigation efficient.</p></blockquote><h4 style="text-align: center;"><strong>&#167;</strong></h4><h2><strong>How HNSW Builds the Graph</strong></h2><p><span>When a new vector gets inserted, HNSW searches the existing graph to find </span><em><span>promising</span></em><span> neighbors.</span></p><p><span>It does NOT simply connect the new vector to the closest M vectors it happens to find. Instead, a neighbor-selection heuristic tries to keep connections useful and diverse, avoiding too many redundant links.</span></p><p><span>The process looks roughly like this:</span></p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!UHlE!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc36b3c27-c3ff-45b6-b40e-8a997a24556f_1059x1024.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!UHlE!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc36b3c27-c3ff-45b6-b40e-8a997a24556f_1059x1024.png 424w, https://substackcdn.com/image/fetch/$s_!UHlE!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc36b3c27-c3ff-45b6-b40e-8a997a24556f_1059x1024.png 848w, https://substackcdn.com/image/fetch/$s_!UHlE!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc36b3c27-c3ff-45b6-b40e-8a997a24556f_1059x1024.png 1272w, https://substackcdn.com/image/fetch/$s_!UHlE!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc36b3c27-c3ff-45b6-b40e-8a997a24556f_1059x1024.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!UHlE!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc36b3c27-c3ff-45b6-b40e-8a997a24556f_1059x1024.png" width="420" height="406.1189801699717" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/c36b3c27-c3ff-45b6-b40e-8a997a24556f_1059x1024.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1024,&quot;width&quot;:1059,&quot;resizeWidth&quot;:420,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!UHlE!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc36b3c27-c3ff-45b6-b40e-8a997a24556f_1059x1024.png 424w, https://substackcdn.com/image/fetch/$s_!UHlE!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc36b3c27-c3ff-45b6-b40e-8a997a24556f_1059x1024.png 848w, https://substackcdn.com/image/fetch/$s_!UHlE!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc36b3c27-c3ff-45b6-b40e-8a997a24556f_1059x1024.png 1272w, https://substackcdn.com/image/fetch/$s_!UHlE!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc36b3c27-c3ff-45b6-b40e-8a997a24556f_1059x1024.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 buttonBase-GK1x3M"><svg aria-hidden="true" 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" class="icon-noB79L"><g><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 buttonBase-GK1x3M"><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 icon-noB79L"><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><span>This is where efConstruction</span><a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-12" href="#footnote-12" target="_self">12</a><span> matters:</span></p><ul><li><p><span>A higher efConstruction means the algorithm considers a larger candidate set while building the graph. That usually produces a better-connected graph, but indexing takes longer.</span></p></li><li><p><span>A lower value makes construction faster, but the resulting graph may provide fewer useful paths during search.</span></p></li></ul><p><span>Good graph construction matters because graph quality directly affects both search speed &amp; recall.</span></p><h4 style="text-align: center;"><strong>&#167;</strong></h4><div class="captioned-button-wrap" data-attrs="{&quot;url&quot;:&quot;https://newsletter.systemdesign.one/p/hnsw-vector-search-explained?utm_source=substack&utm_medium=email&utm_content=share&action=share&quot;,&quot;text&quot;:&quot;Share&quot;}" data-component-name="CaptionedButtonToDOM"><div class="preamble"><p class="cta-caption"><em><span data-color="#3a7bf9" style="color: rgb(58, 123, 249);">Share this letter &amp; I&#8217;ll send you some rewards for the referrals.</span></em></p></div><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://newsletter.systemdesign.one/p/hnsw-vector-search-explained?utm_source=substack&utm_medium=email&utm_content=share&action=share&quot;,&quot;text&quot;:&quot;Share&quot;}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://newsletter.systemdesign.one/p/hnsw-vector-search-explained?utm_source=substack&utm_medium=email&utm_content=share&action=share"><span>Share</span></a></p></div><h4 style="text-align: center;"><strong>&#167;</strong></h4><h2><strong>Three Knobs Engineers Tune</strong></h2><p><span>In production systems, these three parameters matter most:</span></p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!kmfE!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F478346bf-7a5b-4d93-b1f7-e0d7aa6e6357_1935x812.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!kmfE!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F478346bf-7a5b-4d93-b1f7-e0d7aa6e6357_1935x812.png 424w, https://substackcdn.com/image/fetch/$s_!kmfE!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F478346bf-7a5b-4d93-b1f7-e0d7aa6e6357_1935x812.png 848w, https://substackcdn.com/image/fetch/$s_!kmfE!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F478346bf-7a5b-4d93-b1f7-e0d7aa6e6357_1935x812.png 1272w, https://substackcdn.com/image/fetch/$s_!kmfE!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F478346bf-7a5b-4d93-b1f7-e0d7aa6e6357_1935x812.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!kmfE!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F478346bf-7a5b-4d93-b1f7-e0d7aa6e6357_1935x812.png" width="1456" height="611" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/478346bf-7a5b-4d93-b1f7-e0d7aa6e6357_1935x812.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:611,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!kmfE!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F478346bf-7a5b-4d93-b1f7-e0d7aa6e6357_1935x812.png 424w, https://substackcdn.com/image/fetch/$s_!kmfE!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F478346bf-7a5b-4d93-b1f7-e0d7aa6e6357_1935x812.png 848w, https://substackcdn.com/image/fetch/$s_!kmfE!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F478346bf-7a5b-4d93-b1f7-e0d7aa6e6357_1935x812.png 1272w, https://substackcdn.com/image/fetch/$s_!kmfE!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F478346bf-7a5b-4d93-b1f7-e0d7aa6e6357_1935x812.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 buttonBase-GK1x3M"><svg aria-hidden="true" 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" class="icon-noB79L"><g><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 buttonBase-GK1x3M"><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 icon-noB79L"><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><h4><strong><span>1. M</span></strong></h4><p><span>M controls how many connections each node has.</span></p><p><span>More connections mean:</span></p><ul><li><p><span>Better search quality</span></p></li><li><p><span>More memory usage</span></p></li></ul><p><em><span>Think of it as building more roads:</span></em></p><ul><li><p><span>More roads improve navigation.</span></p></li><li><p><span>But roads are expensive.</span></p></li></ul><h4><strong><span>2. efConstruction</span></strong></h4><p><span>This controls how carefully the graph gets built.</span></p><p><span>Higher values mean:</span></p><ul><li><p><span>Better graph quality</span></p></li><li><p><span>Slower indexing</span></p></li></ul><p><span>Lower values mean:</span></p><ul><li><p><span>Faster indexing</span></p></li><li><p><span>Slightly lower search quality</span></p></li></ul><p><span>This matters if you insert data </span><em><span>frequently</span></em><span>.</span></p><h4><strong><span>3. efSearch</span></strong></h4><p><span>This determines how many candidate nodes the system explores during the search.</span></p><p><span>Higher values mean:</span></p><ul><li><p><span>Better recall</span></p></li><li><p><span>Higher latency</span></p></li></ul><p><span>Lower values mean:</span></p><ul><li><p><span>Faster queries</span></p></li><li><p><span>Lower recall</span></p></li></ul><p><span>For example:</span></p><div class="highlighted_code_block" data-attrs="{&quot;language&quot;:&quot;plaintext&quot;,&quot;nodeId&quot;:&quot;6ff819ad-310a-4625-910c-1da95b578c89&quot;}" data-component-name="HighlightedCodeBlockToDOM"><pre class="shiki"><code class="language-plaintext">efSearch = 50
&gt;Recall = 92%
&gt;Latency = 8 ms


efSearch = 200
&gt;Recall = 98%
&gt;Latency = 20 ms</code></pre></div><p><span>The exact values depend on the dataset...this is an engineering </span><em><span>tradeoff</span></em><span>.</span></p><h4 style="text-align: center;"><strong>&#167;</strong></h4><h2><strong><span>Why HNSW Uses So Much Memory</span></strong></h2><p><span>HNSW stores:</span></p><ul><li><p><span>Vectors,</span></p></li><li><p><span>Graph connections,</span></p></li><li><p><span>Metadata.</span></p></li></ul><p><span>The graph itself could become large&#8230;for millions/billions of vectors, memory usage grows quickly&#8230;</span></p><p><span>So many systems combine HNSW with compression techniques such as:</span></p><ul><li><p><strong><span>Scalar Quantization (SQ8):</span></strong><span> Compresses float32 vectors down to int8, reducing RAM footprint by ~75% with minimal recall impact.</span></p></li><li><p><strong><span>Product Quantization</span></strong><a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-13" href="#footnote-13" target="_self">13</a><strong><span> (PQ):</span></strong><span> Segments vectors into sub-vectors and quantizes them into cluster centroids, unlocking extreme memory savings for billion-scale indexes.</span></p></li></ul><div class="callout-block" data-callout="true"><h4><strong>Key Insight</strong></h4><p>Compression reduces memory usage.</p><p>So you lose a little precision.</p><p>But you save a ton of space.</p></div><h4 style="text-align: center;"><strong>&#167;</strong></h4><h2><strong><span>When to Use HNSW</span></strong></h2><p><span>HNSW is a good choice when:</span></p><ul><li><p><strong><span>Search speed matters</span></strong><span>: get results in milliseconds at large scale.</span></p></li><li><p><strong><span>High recall matters</span></strong><span>: for the search to capture most of the truly similar results.</span></p></li><li><p><strong><span>The dataset fits in memory</span></strong><span>: larger datasets demand more RAM, since HNSW keeps its graph in memory</span></p></li><li><p><strong><span>Data updates are moderate</span></strong><span>: HNSW works best when vectors get added occasionally, and not constantly.</span></p></li></ul><p><span>Best use cases:</span></p><ul><li><p><span>RAG systems,</span></p></li><li><p><span>Image search,</span></p></li><li><p><span>Audio matching,</span></p></li><li><p><span>Semantic search,</span></p></li><li><p>Recommendations.</p></li></ul><p><span>But HNSW is NOT ideal when:</span></p><ul><li><p><strong><span>Memory is very limited</span></strong><span>: Graph connections add significant RAM overhead.</span></p></li><li><p><strong><span>Data changes constantly</span></strong><span>: Frequent updates make the graph expensive to maintain.</span></p></li><li><p><strong><span>Exact nearest neighbors are required</span></strong><span>: HNSW is approximate, so it occasionally misses the mathematically closest match.</span></p></li></ul><blockquote><p><span>No algorithm is free &#8594; HNSW trades memory for speed &amp; search quality.</span></p></blockquote><h4 style="text-align: center;"><strong>&#167;</strong></h4><h2><strong><span>The HNSW Mental Model</span></strong></h2><p><span>HNSW is built around one simple idea:</span></p><blockquote><p><span>Don&#8217;t make the search </span><em><span>faster</span></em><span>&#8230;Make the search </span><em><span>smaller</span></em><span>.</span></p></blockquote><p><span>Instead of looking at every vector, build a structure that tells you where to look.</span></p><p><span>The idea is simple&#8230;The scale it unlocks is not.</span></p><p><span>Millions of vectors. Billions of vectors. Milliseconds.</span></p><p><span>That&#8217;s the power of HNSW.</span></p><h4 style="text-align: center;"><strong>&#167;</strong></h4><p>I&#8217;d like to thank <strong><a href="https://www.linkedin.com/in/avani-chaskar/">Avani Chaskar</a> </strong>for writing this newsletter.</p><p>She writes technical guides on building, evaluating &amp; scaling deterministic AI systems.</p><p>Subscribe to her <a href="http://avanichaskar.substack.com/welcome">newsletter</a> for more such quick reads on AI Engineering topics.</p><h4 style="text-align: center;"><strong>&#167;</strong></h4><p style="text-align: center;"><em><span data-color="#3a7bf9" style="color: rgb(58, 123, 249);">If you&#8217;re serious about AI engineering, you really can&#8217;t miss out on the footnotes:</span></em></p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://newsletter.systemdesign.one/subscribe&quot;,&quot;text&quot;:&quot;Get Instant Access Now&quot;,&quot;action&quot;:null,&quot;class&quot;:&quot;button-wrapper&quot;}" data-component-name="ButtonCreateButton"><a class="button primary button-wrapper" href="https://newsletter.systemdesign.one/subscribe"><span>Get Instant Access Now</span></a></p><div><hr></div><div class="captioned-image-container"><figure><a class="image-link image2" target="_blank" href="https://www.linkedin.com/in/nk-systemdesign-one/" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!68aQ!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe4eab3a0-fda8-4df8-b651-0f976b223e9a_320x320.png 424w, https://substackcdn.com/image/fetch/$s_!68aQ!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe4eab3a0-fda8-4df8-b651-0f976b223e9a_320x320.png 848w, https://substackcdn.com/image/fetch/$s_!68aQ!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe4eab3a0-fda8-4df8-b651-0f976b223e9a_320x320.png 1272w, https://substackcdn.com/image/fetch/$s_!68aQ!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe4eab3a0-fda8-4df8-b651-0f976b223e9a_320x320.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!68aQ!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe4eab3a0-fda8-4df8-b651-0f976b223e9a_320x320.png" width="160" height="160" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/e4eab3a0-fda8-4df8-b651-0f976b223e9a_320x320.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:320,&quot;width&quot;:320,&quot;resizeWidth&quot;:160,&quot;bytes&quot;:121414,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:&quot;https://www.linkedin.com/in/nk-systemdesign-one/&quot;,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://newsletter.systemdesign.one/i/136161496?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe4eab3a0-fda8-4df8-b651-0f976b223e9a_320x320.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_!68aQ!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe4eab3a0-fda8-4df8-b651-0f976b223e9a_320x320.png 424w, https://substackcdn.com/image/fetch/$s_!68aQ!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe4eab3a0-fda8-4df8-b651-0f976b223e9a_320x320.png 848w, https://substackcdn.com/image/fetch/$s_!68aQ!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe4eab3a0-fda8-4df8-b651-0f976b223e9a_320x320.png 1272w, https://substackcdn.com/image/fetch/$s_!68aQ!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe4eab3a0-fda8-4df8-b651-0f976b223e9a_320x320.png 1456w" sizes="100vw" loading="lazy"></picture><div></div></div></a><figcaption class="image-caption"><strong>Find me elsewhere: <a href="https://www.linkedin.com/in/nk-systemdesign-one/">LinkedIn</a> | <a href="https://x.com/intent/follow?screen_name=systemdesignone">Twitter</a> | <a href="https://www.instagram.com/systemdesignone/">Instagram</a></strong></figcaption></figure></div><div><hr></div><p><strong>Want to reach 250K+ tech professionals at scale? </strong>&#128240;</p><p>If your company wants to reach 250K+ tech professionals, <a href="https://newsletter.systemdesign.one/p/sponsorship">advertise with me</a>.</p><div><hr></div><p>Thank you for supporting this newsletter.</p><p>You are now 250,001+ readers strong, very close to 251k. Let&#8217;s try to get 251k readers by 17 October. Consider sharing this letter with your friends &amp; get rewards.</p><p>Y&#8217;all are the best.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!6oWl!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2e739087-a910-4643-be36-997b6dd5b4af_800x500.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!6oWl!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2e739087-a910-4643-be36-997b6dd5b4af_800x500.png 424w, https://substackcdn.com/image/fetch/$s_!6oWl!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2e739087-a910-4643-be36-997b6dd5b4af_800x500.png 848w, https://substackcdn.com/image/fetch/$s_!6oWl!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2e739087-a910-4643-be36-997b6dd5b4af_800x500.png 1272w, https://substackcdn.com/image/fetch/$s_!6oWl!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2e739087-a910-4643-be36-997b6dd5b4af_800x500.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!6oWl!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2e739087-a910-4643-be36-997b6dd5b4af_800x500.png" width="590" height="368.75" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/2e739087-a910-4643-be36-997b6dd5b4af_800x500.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:500,&quot;width&quot;:800,&quot;resizeWidth&quot;:590,&quot;bytes&quot;:87878,&quot;alt&quot;:&quot;system design newsletter&quot;,&quot;title&quot;:&quot;system design newsletter&quot;,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://newsletter.systemdesign.one/i/163380418?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2e739087-a910-4643-be36-997b6dd5b4af_800x500.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="system design newsletter" title="system design newsletter" srcset="https://substackcdn.com/image/fetch/$s_!6oWl!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2e739087-a910-4643-be36-997b6dd5b4af_800x500.png 424w, https://substackcdn.com/image/fetch/$s_!6oWl!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2e739087-a910-4643-be36-997b6dd5b4af_800x500.png 848w, https://substackcdn.com/image/fetch/$s_!6oWl!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2e739087-a910-4643-be36-997b6dd5b4af_800x500.png 1272w, https://substackcdn.com/image/fetch/$s_!6oWl!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2e739087-a910-4643-be36-997b6dd5b4af_800x500.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 buttonBase-GK1x3M"><svg aria-hidden="true" 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" class="icon-noB79L"><g><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 buttonBase-GK1x3M"><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 icon-noB79L"><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 class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://newsletter.systemdesign.one/p/hnsw-vector-search-explained?utm_source=substack&utm_medium=email&utm_content=share&action=share&quot;,&quot;text&quot;:&quot;Share&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://newsletter.systemdesign.one/p/hnsw-vector-search-explained?utm_source=substack&utm_medium=email&utm_content=share&action=share"><span>Share</span></a></p>
      <p>
          <a href="https://newsletter.systemdesign.one/p/hnsw-vector-search-explained">
              Read more
          </a>
      </p>
   ]]></content:encoded></item><item><title><![CDATA[API design was HARD until I learned these 33 concepts]]></title><description><![CDATA[#185: Part 2 - JWT, WebSockets, OpenAPI, and 13 others.]]></description><link>https://newsletter.systemdesign.one/p/api-concepts-for-software-engineers</link><guid isPermaLink="false">https://newsletter.systemdesign.one/p/api-concepts-for-software-engineers</guid><dc:creator><![CDATA[Neo Kim]]></dc:creator><pubDate>Sat, 03 Oct 2026 12:03:37 GMT</pubDate><enclosure url="https://substack-post-media.s3.amazonaws.com/public/images/b7316f51-56b4-493c-8eee-3cc309440dfb_1280x720.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p></p><p></p><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://newsletter.systemdesign.one/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"><span data-color="#3a7bf9" style="color: rgb(58, 123, 249);">Get my system design playbook for FREE on newsletter signup:</span></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><ul><li><p><em><a href="https://newsletter.systemdesign.one/p/api-concepts-for-software-engineers/?action=share">Share this letter</a> &amp; I&#8217;ll send you some rewards for the referrals.</em></p></li></ul><div><hr></div><p>No time for small talk today:</p><p>The following is the second of a premium 2-part newsletter... if you&#8217;re serious about API design in 2026, then this newsletter is for YOU.</p><p>On with part 2 of the newsletter:</p><p>===</p><p>Some of these API design concepts are <em>foundational</em>, and some are <em>advanced</em>. ALL of them are super useful to software engineers building scalable APIs.</p><p>Curious to know how many were new to you:</p><ol start="18"><li><p>JSON Web Token,</p></li><li><p>Throttling,</p></li><li><p>Endpoint,</p></li><li><p>Request-Response,</p></li><li><p>Headers,</p></li><li><p>OpenAPI,</p></li><li><p>Timeouts,</p></li><li><p>Microservices,</p></li><li><p>WebSockets,</p></li><li><p>CORS,</p></li><li><p>HTTPS and TLS,</p></li><li><p>Filtering &amp; Sorting,</p></li><li><p>Retries with Backoff,</p></li><li><p>Load Balancing,</p></li><li><p>Circuit Breaker,</p></li><li><p>Error Handling.</p></li></ol><p>For each, I&#8217;ll share:</p><ul><li><p>What it is &amp; how it works (in plain English),</p></li><li><p>A real-world analogy (if I found one),</p></li><li><p>Tradeoffs,</p></li><li><p>Why it matters.</p></li></ul><p>Let&#8217;s go!</p><h4 style="text-align: center;"><strong>&#167;</strong></h4><div class="callout-block" data-callout="true"><h3><a href="https://getunblocked.com/events/how-to-stop-babysitting-your-agents-oct-7/?utm_source=systemdesign&amp;utm_medium=email&amp;utm_campaign=primary">[Webinar] How to stop babysitting your agents (Partner)</a></h3><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://getunblocked.com/events/how-to-stop-babysitting-your-agents-oct-7/?utm_source=systemdesign&amp;utm_medium=email&amp;utm_campaign=primary" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!Nfs2!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F54df2fb6-ecbc-4828-ab3c-8386f50f0fba_1600x900.png 424w, https://substackcdn.com/image/fetch/$s_!Nfs2!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F54df2fb6-ecbc-4828-ab3c-8386f50f0fba_1600x900.png 848w, https://substackcdn.com/image/fetch/$s_!Nfs2!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F54df2fb6-ecbc-4828-ab3c-8386f50f0fba_1600x900.png 1272w, https://substackcdn.com/image/fetch/$s_!Nfs2!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F54df2fb6-ecbc-4828-ab3c-8386f50f0fba_1600x900.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!Nfs2!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F54df2fb6-ecbc-4828-ab3c-8386f50f0fba_1600x900.png" width="1456" height="819" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/54df2fb6-ecbc-4828-ab3c-8386f50f0fba_1600x900.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:819,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:1098056,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:&quot;https://getunblocked.com/events/how-to-stop-babysitting-your-agents-oct-7/?utm_source=systemdesign&amp;utm_medium=email&amp;utm_campaign=primary&quot;,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://newsletter.systemdesign.one/i/218241166?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F54df2fb6-ecbc-4828-ab3c-8386f50f0fba_1600x900.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_!Nfs2!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F54df2fb6-ecbc-4828-ab3c-8386f50f0fba_1600x900.png 424w, https://substackcdn.com/image/fetch/$s_!Nfs2!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F54df2fb6-ecbc-4828-ab3c-8386f50f0fba_1600x900.png 848w, https://substackcdn.com/image/fetch/$s_!Nfs2!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F54df2fb6-ecbc-4828-ab3c-8386f50f0fba_1600x900.png 1272w, https://substackcdn.com/image/fetch/$s_!Nfs2!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F54df2fb6-ecbc-4828-ab3c-8386f50f0fba_1600x900.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 buttonBase-GK1x3M"><svg aria-hidden="true" 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" class="icon-noB79L"><g><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 buttonBase-GK1x3M"><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 icon-noB79L"><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>Agents can generate code. Getting it right for your system, team conventions, and past decisions is the hard part. You end up wasting time and tokens in correction loops.</p><p>More MCPs give agents access to information but not understanding. The teams pulling ahead use a context layer to give agents exactly what they need.</p><p><a href="https://getunblocked.com/events/how-to-stop-babysitting-your-agents-oct-7/?utm_source=systemdesign&amp;utm_medium=email&amp;utm_campaign=primary">Join live on Oct 7 (FREE)</a> to see:</p><ul><li><p>Where teams get stuck on the AI maturity curve</p></li><li><p>How a context layer solves for quality, efficiency, and cost</p></li><li><p>Live demo: the same coding task with and without a context layer</p></li></ul><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://getunblocked.com/events/how-to-stop-babysitting-your-agents-oct-7/?utm_source=systemdesign&amp;utm_medium=email&amp;utm_campaign=primary&quot;,&quot;text&quot;:&quot;Register now&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://getunblocked.com/events/how-to-stop-babysitting-your-agents-oct-7/?utm_source=systemdesign&amp;utm_medium=email&amp;utm_campaign=primary"><span>Register now</span></a></p><p>(Thanks to <a href="https://getunblocked.com/events/how-to-stop-babysitting-your-agents-oct-7/?utm_source=systemdesign&amp;utm_medium=email&amp;utm_campaign=primary">Unblocked</a> for partnering on this newsletter.)</p></div><h4 style="text-align: center;"><strong>&#167;</strong></h4><h2><strong>18. JSON Web Token</strong></h2><blockquote><p>JSON Web Token (<strong>JWT</strong>) is a signed token that contains claims about the caller.</p></blockquote><p>Three parts, separated by dots.</p><ul><li><p><strong>Header</strong> names the algorithm.</p></li><li><p><strong>Payload</strong> holds the claims: <em>this is user 42, they expire at noon, and have the admin role.</em></p></li><li><p><strong>Signature</strong> proves nobody altered the first two parts. The server verifies signature with a key it already holds, reads the claims, and answers the request without touching a session store.</p></li></ul><p>The token carries its own proof, so verification costs no database call.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!FU66!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6d369917-2260-487b-90c4-abe92ade116d_1536x1024.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!FU66!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6d369917-2260-487b-90c4-abe92ade116d_1536x1024.png 424w, https://substackcdn.com/image/fetch/$s_!FU66!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6d369917-2260-487b-90c4-abe92ade116d_1536x1024.png 848w, https://substackcdn.com/image/fetch/$s_!FU66!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6d369917-2260-487b-90c4-abe92ade116d_1536x1024.png 1272w, https://substackcdn.com/image/fetch/$s_!FU66!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6d369917-2260-487b-90c4-abe92ade116d_1536x1024.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!FU66!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6d369917-2260-487b-90c4-abe92ade116d_1536x1024.png" width="1456" height="971" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/6d369917-2260-487b-90c4-abe92ade116d_1536x1024.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:971,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;&quot;,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" title="" srcset="https://substackcdn.com/image/fetch/$s_!FU66!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6d369917-2260-487b-90c4-abe92ade116d_1536x1024.png 424w, https://substackcdn.com/image/fetch/$s_!FU66!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6d369917-2260-487b-90c4-abe92ade116d_1536x1024.png 848w, https://substackcdn.com/image/fetch/$s_!FU66!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6d369917-2260-487b-90c4-abe92ade116d_1536x1024.png 1272w, https://substackcdn.com/image/fetch/$s_!FU66!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6d369917-2260-487b-90c4-abe92ade116d_1536x1024.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 buttonBase-GK1x3M"><svg aria-hidden="true" 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" class="icon-noB79L"><g><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 buttonBase-GK1x3M"><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 icon-noB79L"><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><h3><strong>Analogy</strong></h3><p>A festival wristband.</p><p>It says which zones you may enter and which day it dies. Security reads it in a glance without radioing the ticket office. If you tamper with it, the seal breaks, so the guard knows.</p><h3><strong>Tradeoff</strong></h3><p>You cannot easily revoke a token.</p><p>Fire an employee at nine, and their token still opens doors until it expires. The payload is signed, not encrypted, so anyone holding the token can read every claim inside it.</p><p>So keep expiry short, keep secrets out of payload, and use a refresh token to renew.</p><h3><strong>Why it matters</strong></h3><p>Stateless authentication across microservices, and the access token most OAuth providers hand back.</p><p>Its structure is fixed by a public specification, which is why every language has a library for it. Pair it with Authentication, which is the job it exists to do.</p><h2><strong>19. Throttling</strong></h2><blockquote><p>Throttling slows down a caller instead of turning them away.</p></blockquote><p>Rate limiting &amp; throttling get used interchangeably, and they do different things.</p><p>A rate limiter counts requests and rejects the ones over the cap with a <code>429</code>. A throttle accepts the request and delays it. It queues the call, releases it when capacity frees up, or answers with a <code>Retry-After</code> that asks the client to come back shortly. The work still happens, just later and more slowly.</p><p>Rejection protects the server&#8230;Throttling protects the server &amp; keeps the caller alive.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!SZyD!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb958b9c8-59ad-408f-89e1-a54d07099cb0_1536x1024.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!SZyD!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb958b9c8-59ad-408f-89e1-a54d07099cb0_1536x1024.png 424w, https://substackcdn.com/image/fetch/$s_!SZyD!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb958b9c8-59ad-408f-89e1-a54d07099cb0_1536x1024.png 848w, https://substackcdn.com/image/fetch/$s_!SZyD!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb958b9c8-59ad-408f-89e1-a54d07099cb0_1536x1024.png 1272w, https://substackcdn.com/image/fetch/$s_!SZyD!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb958b9c8-59ad-408f-89e1-a54d07099cb0_1536x1024.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!SZyD!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb958b9c8-59ad-408f-89e1-a54d07099cb0_1536x1024.png" width="1456" height="971" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/b958b9c8-59ad-408f-89e1-a54d07099cb0_1536x1024.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:971,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;&quot;,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" title="" srcset="https://substackcdn.com/image/fetch/$s_!SZyD!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb958b9c8-59ad-408f-89e1-a54d07099cb0_1536x1024.png 424w, https://substackcdn.com/image/fetch/$s_!SZyD!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb958b9c8-59ad-408f-89e1-a54d07099cb0_1536x1024.png 848w, https://substackcdn.com/image/fetch/$s_!SZyD!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb958b9c8-59ad-408f-89e1-a54d07099cb0_1536x1024.png 1272w, https://substackcdn.com/image/fetch/$s_!SZyD!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb958b9c8-59ad-408f-89e1-a54d07099cb0_1536x1024.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 buttonBase-GK1x3M"><svg aria-hidden="true" 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" class="icon-noB79L"><g><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 buttonBase-GK1x3M"><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 icon-noB79L"><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><h3><strong>Analogy</strong></h3><p>A metered on-ramp to a motorway.</p><p>The light drips cars onto the carriageway one at a time. Nobody is sent home. The queue on the ramp is annoying, and it's why the motorway itself keeps moving at seventy.</p><h3><strong>Tradeoff</strong></h3><p>A queued request holds a connection, and enough of them exhaust the very resource you were protecting.</p><p>Plus, delay hides the problem, so a service that has been struggling for an hour looks merely sluggish. So cap the queue &amp; alert on the delay rather than the errors.</p><h3><strong>Why it matters</strong></h3><p>Expensive operations, shared infrastructure, and any burst you would rather absorb than reject.</p><p>Envoy, Kong, and most message queues implement it. Pair it with rate limiting, and be explicit in your documentation about which one you are doing.</p><h2><strong>20. Endpoint</strong></h2><blockquote><p>An endpoint is a uniform resource locator (<strong>URL</strong>) that points to one resource on your server.</p></blockquote><p>It&#8217;s the address you aim a request at.</p><ul><li><p><code>/users</code> is the collection.</p></li><li><p><code>/users/42</code> is one user.</p></li><li><p><code>/users/42/orders</code> is that user&#8217;s orders.</p></li></ul><p>The path names the resource &amp; the method names the action; together, they define one operation. Get the path wrong, and you receive a <code>404</code> rather than the data you meant to ask for.</p><p>Read a good endpoint aloud, and it explains itself.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!Tdcm!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd4d17794-a6cf-4731-b592-9b4408ce82b0_1536x1024.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!Tdcm!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd4d17794-a6cf-4731-b592-9b4408ce82b0_1536x1024.png 424w, https://substackcdn.com/image/fetch/$s_!Tdcm!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd4d17794-a6cf-4731-b592-9b4408ce82b0_1536x1024.png 848w, https://substackcdn.com/image/fetch/$s_!Tdcm!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd4d17794-a6cf-4731-b592-9b4408ce82b0_1536x1024.png 1272w, https://substackcdn.com/image/fetch/$s_!Tdcm!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd4d17794-a6cf-4731-b592-9b4408ce82b0_1536x1024.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!Tdcm!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd4d17794-a6cf-4731-b592-9b4408ce82b0_1536x1024.png" width="1456" height="971" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/d4d17794-a6cf-4731-b592-9b4408ce82b0_1536x1024.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:971,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;&quot;,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" title="" srcset="https://substackcdn.com/image/fetch/$s_!Tdcm!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd4d17794-a6cf-4731-b592-9b4408ce82b0_1536x1024.png 424w, https://substackcdn.com/image/fetch/$s_!Tdcm!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd4d17794-a6cf-4731-b592-9b4408ce82b0_1536x1024.png 848w, https://substackcdn.com/image/fetch/$s_!Tdcm!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd4d17794-a6cf-4731-b592-9b4408ce82b0_1536x1024.png 1272w, https://substackcdn.com/image/fetch/$s_!Tdcm!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd4d17794-a6cf-4731-b592-9b4408ce82b0_1536x1024.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 buttonBase-GK1x3M"><svg aria-hidden="true" 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" class="icon-noB79L"><g><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 buttonBase-GK1x3M"><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 icon-noB79L"><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><h3><strong>Analogy</strong></h3><p>A street address.</p><p>The number and the road identify one door out of a million. Post a letter to the wrong number, and it arrives somewhere real, which is worse than it not arriving at all.</p><h3><strong>Tradeoff</strong></h3><p>Endpoint names drift as the API grows.</p><p>One person writes <code>/users</code>, the next writes <code>/getUser</code>, and six months later your API reads like it was designed by a committee that never met.</p><p>Use plural nouns for collections and let the verb live in the method.</p><h3><strong>Why it matters</strong></h3><p>The first thing anybody learns about your API, and the thing they will curse if you got it wrong.</p><p>Every REST framework routes on them. Pair it with OpenAPI, which turns your endpoint list into documentation nobody has to maintain by hand.</p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://newsletter.systemdesign.one/p/api-concepts-for-software-engineers?utm_source=substack&utm_medium=email&utm_content=share&action=share&quot;,&quot;text&quot;:&quot;Share&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://newsletter.systemdesign.one/p/api-concepts-for-software-engineers?utm_source=substack&utm_medium=email&utm_content=share&action=share"><span>Share</span></a></p><h2><strong>21. Request-Response</strong></h2><blockquote><p>The request-response cycle is the basic way clients &amp; servers communicate. The client sends a request, and server returns a response.</p></blockquote><p>Every call follows the same simple script.</p><p>A request names what you want and where: <em>a method, a path, a few headers, a body when there is one to send</em>. The server reads it, does the work, and answers with a status code and usually a body of its own. The exchange is synchronous, so the client holds the line open and waits for that single reply before it does anything else.</p><p>Send, wait, read the reply. That is the entire cycle.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!oo9k!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc4dc47df-5573-4764-9ea2-f35f5bc038fa_1536x1024.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!oo9k!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc4dc47df-5573-4764-9ea2-f35f5bc038fa_1536x1024.png 424w, https://substackcdn.com/image/fetch/$s_!oo9k!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc4dc47df-5573-4764-9ea2-f35f5bc038fa_1536x1024.png 848w, https://substackcdn.com/image/fetch/$s_!oo9k!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc4dc47df-5573-4764-9ea2-f35f5bc038fa_1536x1024.png 1272w, https://substackcdn.com/image/fetch/$s_!oo9k!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc4dc47df-5573-4764-9ea2-f35f5bc038fa_1536x1024.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!oo9k!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc4dc47df-5573-4764-9ea2-f35f5bc038fa_1536x1024.png" width="1456" height="971" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/c4dc47df-5573-4764-9ea2-f35f5bc038fa_1536x1024.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:971,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;&quot;,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" title="" srcset="https://substackcdn.com/image/fetch/$s_!oo9k!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc4dc47df-5573-4764-9ea2-f35f5bc038fa_1536x1024.png 424w, https://substackcdn.com/image/fetch/$s_!oo9k!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc4dc47df-5573-4764-9ea2-f35f5bc038fa_1536x1024.png 848w, https://substackcdn.com/image/fetch/$s_!oo9k!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc4dc47df-5573-4764-9ea2-f35f5bc038fa_1536x1024.png 1272w, https://substackcdn.com/image/fetch/$s_!oo9k!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc4dc47df-5573-4764-9ea2-f35f5bc038fa_1536x1024.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 buttonBase-GK1x3M"><svg aria-hidden="true" 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" class="icon-noB79L"><g><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 buttonBase-GK1x3M"><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 icon-noB79L"><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><h3><strong>Analogy</strong></h3><p>Posting a letter and waiting by the mailbox.</p><p>You write the address on the envelope, the details inside, and a return address on the back. Then you stand there. Nothing else happens until the reply lands.</p><h3><strong>Tradeoff</strong></h3><p>The client blocks and a slow server holds that connection, and work that takes two minutes leaves a user staring at a spinner. Nothing comes back until everything comes back.</p><p>Accept the request, return a <code>202</code>, and finish the work in the background.</p><h3><strong>Why it matters</strong></h3><p>The foundation under REST, GraphQL, and almost every API you will build.</p><p>Its rules are set by the HTTP specification. Pair it with Webhooks and WebSockets, the two answers for when waiting is the wrong shape.</p><div class="callout-block" data-callout="true"><p><strong>Want life to feel a little easier?</strong></p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://benmeer.com/yearofsystems/" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!Ql7g!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0f9d4e28-d671-4556-9493-8e551c9539f7_1200x627.jpeg 424w, https://substackcdn.com/image/fetch/$s_!Ql7g!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0f9d4e28-d671-4556-9493-8e551c9539f7_1200x627.jpeg 848w, https://substackcdn.com/image/fetch/$s_!Ql7g!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0f9d4e28-d671-4556-9493-8e551c9539f7_1200x627.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!Ql7g!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0f9d4e28-d671-4556-9493-8e551c9539f7_1200x627.jpeg 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!Ql7g!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0f9d4e28-d671-4556-9493-8e551c9539f7_1200x627.jpeg" width="1200" height="627" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/0f9d4e28-d671-4556-9493-8e551c9539f7_1200x627.jpeg&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;:25651,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/jpeg&quot;,&quot;href&quot;:&quot;https://benmeer.com/yearofsystems/&quot;,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://newsletter.systemdesign.one/i/218241166?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0f9d4e28-d671-4556-9493-8e551c9539f7_1200x627.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_!Ql7g!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0f9d4e28-d671-4556-9493-8e551c9539f7_1200x627.jpeg 424w, https://substackcdn.com/image/fetch/$s_!Ql7g!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0f9d4e28-d671-4556-9493-8e551c9539f7_1200x627.jpeg 848w, https://substackcdn.com/image/fetch/$s_!Ql7g!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0f9d4e28-d671-4556-9493-8e551c9539f7_1200x627.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!Ql7g!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0f9d4e28-d671-4556-9493-8e551c9539f7_1200x627.jpeg 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 buttonBase-GK1x3M"><svg aria-hidden="true" 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" class="icon-noB79L"><g><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 buttonBase-GK1x3M"><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 icon-noB79L"><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>Ben Meer&#8217;s new book, <em>How to Be Good at Life</em>, is packed with practical systems for work, health, money, relationships, home, and more.</p><p><strong><a href="https://benmeer.com/yearofsystems/">Get the book &#8594;</a></strong></p></div><h2><strong>22. Headers</strong></h2><blockquote><p>Headers are key-value pairs that carry information about a request/response, separate from the body.</p></blockquote><p>They describe the message rather than contain it.</p><ul><li><p><code>Content-Type</code> says what format the body is in.</p></li><li><p><code>Authorization</code> carries the credential.</p></li><li><p><code>Cache-Control</code> tells every cache along the path how long to keep a copy.</p></li><li><p><code>Accept</code> states what the client can understand.</p></li><li><p><code>User-Agent</code> names the software that called.</p></li></ul><p>Servers, proxies, and browsers all read them before touching the body.</p><p>Metadata belongs on the outside.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!sm2Q!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F53babfa7-129d-435c-9fbd-06487dd4a7bf_1536x1024.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!sm2Q!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F53babfa7-129d-435c-9fbd-06487dd4a7bf_1536x1024.png 424w, https://substackcdn.com/image/fetch/$s_!sm2Q!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F53babfa7-129d-435c-9fbd-06487dd4a7bf_1536x1024.png 848w, https://substackcdn.com/image/fetch/$s_!sm2Q!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F53babfa7-129d-435c-9fbd-06487dd4a7bf_1536x1024.png 1272w, https://substackcdn.com/image/fetch/$s_!sm2Q!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F53babfa7-129d-435c-9fbd-06487dd4a7bf_1536x1024.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!sm2Q!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F53babfa7-129d-435c-9fbd-06487dd4a7bf_1536x1024.png" width="1456" height="971" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/53babfa7-129d-435c-9fbd-06487dd4a7bf_1536x1024.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:971,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;&quot;,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" title="" srcset="https://substackcdn.com/image/fetch/$s_!sm2Q!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F53babfa7-129d-435c-9fbd-06487dd4a7bf_1536x1024.png 424w, https://substackcdn.com/image/fetch/$s_!sm2Q!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F53babfa7-129d-435c-9fbd-06487dd4a7bf_1536x1024.png 848w, https://substackcdn.com/image/fetch/$s_!sm2Q!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F53babfa7-129d-435c-9fbd-06487dd4a7bf_1536x1024.png 1272w, https://substackcdn.com/image/fetch/$s_!sm2Q!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F53babfa7-129d-435c-9fbd-06487dd4a7bf_1536x1024.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 buttonBase-GK1x3M"><svg aria-hidden="true" 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" class="icon-noB79L"><g><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 buttonBase-GK1x3M"><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 icon-noB79L"><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><h3><strong>Analogy</strong></h3><p>The outside of an envelope.</p><p>Stamps, postcodes, fragile stickers, return address. Every courier along the route reads the outside and acts on it. None of them open the letter.</p><h3><strong>Tradeoff</strong></h3><p>Headers are easy to forget, which is why so many bugs end in a <code>Content-Type</code> nobody set.</p><p>Sizes are capped, casing rules surprise people, and a header stripped by a proxy fails silently rather than loudly. So log the headers you rely on, and set <code>Content-Type</code> explicitly every time.</p><h3><strong>Why it matters</strong></h3><p>Authentication, caching, versioning, compression, and cross-origin rules all ride on them.</p><p>Any browser&#8217;s network tab shows you every one. Pair it with Caching, which does nothing at all unless the headers say so.</p><h2><strong>23. OpenAPI</strong></h2><blockquote><p>OpenAPI is a standard file that describes every endpoint, parameter, and response of your API in one place.</p></blockquote><p>You write it in YAML/JSON, and machines read it.</p><p>From that one file, you generate interactive documentation, client libraries in eight languages, a mock server for the front end to build against, and a test suite that catches the day your response shape quietly changed. The specification becomes the contract, and the contract becomes the source of truth.</p><p>Write it once &amp; stop maintaining documentation by hand.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!JtQh!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2be2563d-f547-449c-a7d8-974f22c28a96_1536x1024.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!JtQh!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2be2563d-f547-449c-a7d8-974f22c28a96_1536x1024.png 424w, https://substackcdn.com/image/fetch/$s_!JtQh!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2be2563d-f547-449c-a7d8-974f22c28a96_1536x1024.png 848w, https://substackcdn.com/image/fetch/$s_!JtQh!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2be2563d-f547-449c-a7d8-974f22c28a96_1536x1024.png 1272w, https://substackcdn.com/image/fetch/$s_!JtQh!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2be2563d-f547-449c-a7d8-974f22c28a96_1536x1024.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!JtQh!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2be2563d-f547-449c-a7d8-974f22c28a96_1536x1024.png" width="1456" height="971" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/2be2563d-f547-449c-a7d8-974f22c28a96_1536x1024.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:971,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;&quot;,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" title="" srcset="https://substackcdn.com/image/fetch/$s_!JtQh!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2be2563d-f547-449c-a7d8-974f22c28a96_1536x1024.png 424w, https://substackcdn.com/image/fetch/$s_!JtQh!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2be2563d-f547-449c-a7d8-974f22c28a96_1536x1024.png 848w, https://substackcdn.com/image/fetch/$s_!JtQh!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2be2563d-f547-449c-a7d8-974f22c28a96_1536x1024.png 1272w, https://substackcdn.com/image/fetch/$s_!JtQh!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2be2563d-f547-449c-a7d8-974f22c28a96_1536x1024.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 buttonBase-GK1x3M"><svg aria-hidden="true" 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" class="icon-noB79L"><g><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 buttonBase-GK1x3M"><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 icon-noB79L"><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><h3><strong>Analogy</strong></h3><p>An architect&#8217;s blueprint.</p><p>The plumber, electrician, and joiner all work from the same drawing without ever meeting. Change the drawing, and everyone sees the change. Change the wall without changing the drawing, and somebody drills through a pipe.</p><h3><strong>Tradeoff</strong></h3><p>A hand-written spec drifts from the code within weeks, and a spec that lies is worse than no spec at all. The file grows long, and reviewing a two-thousand-line YAML diff is nobody&#8217;s favorite afternoon.</p><p>Generate the spec from your code, or test your code against the spec.</p><h3><strong>Why it matters</strong></h3><p>Public APIs, partner integrations, and any backend whose consumers sit in a different room.</p><p>Swagger UI, Redoc, and Stoplight render it. Pair it with API Versioning, since each version deserves its own contract.</p><h2><strong>24. Timeouts</strong></h2><blockquote><p>A timeout is the longest a caller will wait for a response before giving up.</p></blockquote><p>Without one, a caller waits forever.</p><p>Set a connect timeout for reaching the server and a read timeout for hearing back. When a downstream service hangs, your request fails in two seconds instead of hanging alongside it. This matters because every waiting request holds a thread, a connection, and a slot in your pool. Enough of them &amp; your healthy service falls over next to the sick one.</p><p>A fast failure beats a slow hang.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!r84S!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0d0708a1-65cd-4259-862b-3c0efc6f6929_1536x1024.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!r84S!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0d0708a1-65cd-4259-862b-3c0efc6f6929_1536x1024.png 424w, https://substackcdn.com/image/fetch/$s_!r84S!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0d0708a1-65cd-4259-862b-3c0efc6f6929_1536x1024.png 848w, https://substackcdn.com/image/fetch/$s_!r84S!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0d0708a1-65cd-4259-862b-3c0efc6f6929_1536x1024.png 1272w, https://substackcdn.com/image/fetch/$s_!r84S!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0d0708a1-65cd-4259-862b-3c0efc6f6929_1536x1024.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!r84S!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0d0708a1-65cd-4259-862b-3c0efc6f6929_1536x1024.png" width="1456" height="971" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/0d0708a1-65cd-4259-862b-3c0efc6f6929_1536x1024.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:971,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;&quot;,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" title="" srcset="https://substackcdn.com/image/fetch/$s_!r84S!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0d0708a1-65cd-4259-862b-3c0efc6f6929_1536x1024.png 424w, https://substackcdn.com/image/fetch/$s_!r84S!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0d0708a1-65cd-4259-862b-3c0efc6f6929_1536x1024.png 848w, https://substackcdn.com/image/fetch/$s_!r84S!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0d0708a1-65cd-4259-862b-3c0efc6f6929_1536x1024.png 1272w, https://substackcdn.com/image/fetch/$s_!r84S!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0d0708a1-65cd-4259-862b-3c0efc6f6929_1536x1024.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 buttonBase-GK1x3M"><svg aria-hidden="true" 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" class="icon-noB79L"><g><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 buttonBase-GK1x3M"><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 icon-noB79L"><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><h3><strong>Analogy</strong></h3><p>Hanging up after thirty seconds of ringing.</p><p>Nobody is home. Listening to the ringtone for an hour won't make them answer, and it stops you from calling anybody else.</p><h3><strong>Tradeoff</strong></h3><p>Set one too tight, and you kill healthy requests that were simply slow; then you retry them, and you have doubled the load on a service that was only having a bad minute.</p><p>Measure your ninety-ninth percentile, then set the timeout above it.</p><h3><strong>Why it matters</strong></h3><p>Every network call you make is the first line of defense against a cascading failure.</p><p>Every HTTP client has a default, and the default is usually wrong. Pair it with Circuit Breaker, which you reach for when timeouts stop being occasional.</p><h2><strong>25. Microservices</strong></h2><blockquote><p>Microservices split one application into small, independent services that talk to each other over APIs.</p></blockquote><p>Each service owns one job and its own data.</p><p>The <code>orders</code> service owns the orders table. The <code>payments</code> service owns payments. Neither reaches into the other&#8217;s database. They call each other&#8217;s APIs, deploy on their own schedule, and scale independently, so a search feature under load gets more servers without anybody touching checkout.</p><p>Independence is the whole point, and the network is the whole cost.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!6OM1!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8a34092a-f273-4aa5-9777-e5a5a389df0b_1536x1024.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!6OM1!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8a34092a-f273-4aa5-9777-e5a5a389df0b_1536x1024.png 424w, https://substackcdn.com/image/fetch/$s_!6OM1!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8a34092a-f273-4aa5-9777-e5a5a389df0b_1536x1024.png 848w, https://substackcdn.com/image/fetch/$s_!6OM1!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8a34092a-f273-4aa5-9777-e5a5a389df0b_1536x1024.png 1272w, https://substackcdn.com/image/fetch/$s_!6OM1!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8a34092a-f273-4aa5-9777-e5a5a389df0b_1536x1024.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!6OM1!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8a34092a-f273-4aa5-9777-e5a5a389df0b_1536x1024.png" width="1456" height="971" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/8a34092a-f273-4aa5-9777-e5a5a389df0b_1536x1024.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:971,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;&quot;,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" title="" srcset="https://substackcdn.com/image/fetch/$s_!6OM1!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8a34092a-f273-4aa5-9777-e5a5a389df0b_1536x1024.png 424w, https://substackcdn.com/image/fetch/$s_!6OM1!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8a34092a-f273-4aa5-9777-e5a5a389df0b_1536x1024.png 848w, https://substackcdn.com/image/fetch/$s_!6OM1!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8a34092a-f273-4aa5-9777-e5a5a389df0b_1536x1024.png 1272w, https://substackcdn.com/image/fetch/$s_!6OM1!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8a34092a-f273-4aa5-9777-e5a5a389df0b_1536x1024.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 buttonBase-GK1x3M"><svg aria-hidden="true" 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" class="icon-noB79L"><g><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 buttonBase-GK1x3M"><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 icon-noB79L"><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><h3><strong>Analogy</strong></h3><p>A food court instead of one enormous kitchen.</p><p>Each unit runs its own stoves, staff, and menu. The pizza place closes for a refit, and everyone else keeps serving. Ordering a meal from three units means three queues.</p><h3><strong>Tradeoff</strong></h3><p>Every function call you used to make in memory is now a network call that can time out, arrive twice, or never arrive.</p><p>A bug spans four services and six log files. Keeping data consistent across services is a hard problem with no free answer. So start with a monolith, and split it when the pain is real, not theoretical.</p><h3><strong>Why it matters</strong></h3><p>Large systems, large organizations, and any codebase where two changes cannot ship without waiting for each other.</p><p>The patterns that make it survivable deserve an article of their own. Pair it with API Gateway and gRPC, which keep the pieces reachable and fast.</p><h4 style="text-align: center;"><strong>&#167;</strong></h4><div class="callout-block" data-callout="true"><p style="text-align: center;"><em><strong><span data-color="#3a7bf9" style="color: rgb(58, 123, 249);">Reminder: this is a teaser of the subscriber-only newsletter, exclusive to my golden members.</span></strong></em></p><p>When you upgrade, you&#8217;ll get:</p><ul><li><p><strong>High-level architecture of real-world systems.</strong></p></li><li><p>Deep dive into how popular real-world systems work.</p></li><li><p><strong>How real-world systems handle scale, reliability, and performance.</strong></p></li></ul><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://newsletter.systemdesign.one/subscribe&quot;,&quot;text&quot;:&quot;Unlock Full Access&quot;,&quot;action&quot;:null,&quot;class&quot;:&quot;button-wrapper&quot;}" data-component-name="ButtonCreateButton"><a class="button primary button-wrapper" href="https://newsletter.systemdesign.one/subscribe"><span>Unlock Full Access</span></a></p><p>(If this newsletter has helped you become a better software engineer, consider subscribing to support my work.)</p></div><h4 style="text-align: center;"><strong>&#167;</strong></h4><h2><strong>26. WebSockets</strong></h2>
      <p>
          <a href="https://newsletter.systemdesign.one/p/api-concepts-for-software-engineers">
              Read more
          </a>
      </p>
   ]]></content:encoded></item><item><title><![CDATA[I struggled with "API design" until I learned these 33 concepts]]></title><description><![CDATA[#184: Part 1 - REST, GraphQL, Authentication, and 14 others.]]></description><link>https://newsletter.systemdesign.one/p/api-concepts-every-software-engineer-should-know</link><guid isPermaLink="false">https://newsletter.systemdesign.one/p/api-concepts-every-software-engineer-should-know</guid><dc:creator><![CDATA[Neo Kim]]></dc:creator><pubDate>Fri, 02 Oct 2026 11:26:36 GMT</pubDate><enclosure url="https://substack-post-media.s3.amazonaws.com/public/images/3bdb59b8-00d3-488b-8950-31d822edcc06_1280x720.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p style="text-align: center;"></p><p></p><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://newsletter.systemdesign.one/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"><span data-color="#3a7bf9" style="color: rgb(58, 123, 249);">Get my system design playbook for FREE on newsletter signup:</span></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><ul><li><p><em><a href="https://newsletter.systemdesign.one/p/api-concepts-every-software-engineer-should-know/?action=share">Share this letter</a> &amp; I&#8217;ll send you some rewards for the referrals.</em></p></li></ul><div><hr></div><p><span>Some of these API design concepts are </span><em><span>foundational</span></em><span>, and some are </span><em><span>advanced</span></em><span>. ALL of them are super useful to software engineers building scalable APIs.</span></p><p><span>Curious to know how many were new to you:</span></p><ol><li><p><span>REST,</span></p></li><li><p><span>GraphQL,</span></p></li><li><p><span>Authentication,</span></p></li><li><p><span>Authorization,</span></p></li><li><p><span>Rate Limiting,</span></p></li><li><p><span>Caching,</span></p></li><li><p><span>Pagination,</span></p></li><li><p><span>Status Codes,</span></p></li><li><p><span>Webhooks,</span></p></li><li><p><span>Idempotency,</span></p></li><li><p><span>API Gateway,</span></p></li><li><p><span>API Versioning,</span></p></li><li><p><span>JSON,</span></p></li><li><p><span>OAuth 2.0,</span></p></li><li><p><span>HTTP Methods,</span></p></li><li><p><span>gRPC,</span></p></li><li><p><span>API Keys.</span></p></li></ol><p>(&#8230;and much more in Part 2!)</p><p><span>For each, I&#8217;ll share:</span></p><ul><li><p><span>What it is &amp; how it works (in plain English),</span></p></li><li><p><span>A real-world analogy (if I found one),</span></p></li><li><p><span>Tradeoffs,</span></p></li><li><p><span>Why it matters.</span></p></li></ul><p><span>Let&#8217;s go!</span></p><h4 style="text-align: center;"><strong>&#167;</strong></h4><div class="callout-block" data-callout="true"><h3><a href="https://www.linkedin.com/events/7508580324667465728/?viewAsMember=true">Beyond the Coding Agent: Building at Enterprise Scale (Partner)</a></h3><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://www.linkedin.com/events/7508580324667465728/?viewAsMember=true" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!gdg5!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7d3807e0-5296-45eb-ad56-89a54ea50b12_3590x1886.jpeg 424w, https://substackcdn.com/image/fetch/$s_!gdg5!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7d3807e0-5296-45eb-ad56-89a54ea50b12_3590x1886.jpeg 848w, https://substackcdn.com/image/fetch/$s_!gdg5!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7d3807e0-5296-45eb-ad56-89a54ea50b12_3590x1886.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!gdg5!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7d3807e0-5296-45eb-ad56-89a54ea50b12_3590x1886.jpeg 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!gdg5!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7d3807e0-5296-45eb-ad56-89a54ea50b12_3590x1886.jpeg" width="1456" height="765" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/7d3807e0-5296-45eb-ad56-89a54ea50b12_3590x1886.jpeg&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:765,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:5731269,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/jpeg&quot;,&quot;href&quot;:&quot;https://www.linkedin.com/events/7508580324667465728/?viewAsMember=true&quot;,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://newsletter.systemdesign.one/i/209402880?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7d3807e0-5296-45eb-ad56-89a54ea50b12_3590x1886.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_!gdg5!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7d3807e0-5296-45eb-ad56-89a54ea50b12_3590x1886.jpeg 424w, https://substackcdn.com/image/fetch/$s_!gdg5!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7d3807e0-5296-45eb-ad56-89a54ea50b12_3590x1886.jpeg 848w, https://substackcdn.com/image/fetch/$s_!gdg5!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7d3807e0-5296-45eb-ad56-89a54ea50b12_3590x1886.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!gdg5!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7d3807e0-5296-45eb-ad56-89a54ea50b12_3590x1886.jpeg 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 buttonBase-GK1x3M"><svg aria-hidden="true" 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" class="icon-noB79L"><g><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 buttonBase-GK1x3M"><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 icon-noB79L"><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>Coding agents made individual tasks faster. They didn&#8217;t remove the coordination, validation, and handoffs that actually determine how fast enterprise software ships.</p><p><a href="https://www.linkedin.com/events/7508580324667465728/?viewAsMember=true">Join Sid, CTO and Co-founder of Blitzy, for a live session</a> on what changes when a system can hold context across an entire codebase, not just a single file or function. Sid will walk through a real project in Blitzy, covering everything from reverse engineering and tech spec generation to the Agent Action Plan, code generation, and PR Review. You&#8217;ll see what happens at each stage and where human review gates the process.</p><p><strong>What you&#8217;ll see:</strong></p><ul><li><p>Reverse engineering and tech spec generation on a real codebase</p></li><li><p>Where human review sits in an autonomous build: sign-off at the plan stage, approval at the merge stage</p></li><li><p>Enterprise modernization results</p></li></ul><p>We&#8217;ll close with an open Q&amp;A, so bring your questions on agent orchestration and governance at scale.</p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://www.linkedin.com/events/7508580324667465728/?viewAsMember=true&quot;,&quot;text&quot;:&quot;Save Your Seat&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://www.linkedin.com/events/7508580324667465728/?viewAsMember=true"><span>Save Your Seat</span></a></p><p><em>(Thanks to <a href="https://www.linkedin.com/events/7508580324667465728/?viewAsMember=true">Blitzy</a> for partnering on this newsletter.)</em></p></div><h4 style="text-align: center;"><strong>&#167;</strong></h4><h2><strong><span>1. REST</span></strong></h2><blockquote><p><span>Representational State Transfer (</span><strong><span>REST</span></strong><span>) is a way to build APIs that organizes data as resources and uses standard HTTP methods to work with them.</span></p></blockquote><p><span>Every resource gets its own address.</span></p><p>Each resource has its own URL. For example, a user is at <code>/users/42</code> and an order is at <code>/orders/17</code>. </p><p>Use:</p><ul><li><p><code>GET</code> to read it, </p></li><li><p><code>POST</code> to create it, </p></li><li><p><code>PUT</code> to replace it,</p></li><li><p><code>DELETE</code> to remove it.</p></li></ul><p>The HTTP method defines the action, and the URL identifies the resource. Both the client and server follow the same contract.</p><p><span>REST also stays stateless, so any server can answer any request.</span></p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!5o2X!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6deaf205-89bb-4133-a893-da14bc2c2834_1402x1122.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!5o2X!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6deaf205-89bb-4133-a893-da14bc2c2834_1402x1122.png 424w, https://substackcdn.com/image/fetch/$s_!5o2X!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6deaf205-89bb-4133-a893-da14bc2c2834_1402x1122.png 848w, https://substackcdn.com/image/fetch/$s_!5o2X!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6deaf205-89bb-4133-a893-da14bc2c2834_1402x1122.png 1272w, https://substackcdn.com/image/fetch/$s_!5o2X!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6deaf205-89bb-4133-a893-da14bc2c2834_1402x1122.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!5o2X!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6deaf205-89bb-4133-a893-da14bc2c2834_1402x1122.png" width="1402" height="1122" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/6deaf205-89bb-4133-a893-da14bc2c2834_1402x1122.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1122,&quot;width&quot;:1402,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!5o2X!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6deaf205-89bb-4133-a893-da14bc2c2834_1402x1122.png 424w, https://substackcdn.com/image/fetch/$s_!5o2X!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6deaf205-89bb-4133-a893-da14bc2c2834_1402x1122.png 848w, https://substackcdn.com/image/fetch/$s_!5o2X!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6deaf205-89bb-4133-a893-da14bc2c2834_1402x1122.png 1272w, https://substackcdn.com/image/fetch/$s_!5o2X!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6deaf205-89bb-4133-a893-da14bc2c2834_1402x1122.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 buttonBase-GK1x3M"><svg aria-hidden="true" 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" class="icon-noB79L"><g><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 buttonBase-GK1x3M"><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 icon-noB79L"><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><h3><strong><span>Analogy</span></strong></h3><p><span>A library with a fixed shelf number for every book:</span></p><p><span>You hand the librarian a shelf number and say borrow, return, or replace. They never ask what you meant.</span></p><p><span>The number identifies the book; the verb identifies the action; they leave no room for guessing.</span></p><h3><strong><span>Tradeoff</span></strong></h3><p><span>REST wastes requests &amp; bandwidth.</span></p><p><span>One screen may need a user, their orders, and their payment method, which costs three round trips. Ask for a user, and the server sends every field, including the twenty you ignore. Add a field for one client, and you risk breaking another.</span></p><p><span>So keep your resources small and reach for GraphQL when clients need to shape their own responses.</span></p><h3><strong><span>Why it matters</span></strong></h3><p><span>Public APIs, mobile and web clients, anything cached at the edge, and any service where a new developer should guess the right endpoint on the first try.</span></p><p><span>Spring, Express, Django REST Framework, and FastAPI all lean on it. Pair it with OpenAPI so the contract stays readable, and with API Versioning so today&#8217;s shape survives tomorrow&#8217;s change.</span></p><h2><strong><span>2. GraphQL</span></strong></h2><blockquote><p><span>GraphQL is a query language for APIs that lets clients request exactly the data they need in a single response.</span></p></blockquote><p><span>There is one endpoint instead of dozens.</span></p><p><span>Client sends a query that names the fields it needs. The server walks the query, fetches each field, and returns a response shaped like the request. Queries read data, mutations change it, and subscriptions stream updates as they happen. Ask for three things at once, and you get one round trip.</span></p><p><span>The client decides the shape, so the server stops guessing.</span></p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!LIKl!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6538dc5e-9cbb-4f5e-80e9-e5eb112dabdf_1402x1122.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!LIKl!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6538dc5e-9cbb-4f5e-80e9-e5eb112dabdf_1402x1122.png 424w, https://substackcdn.com/image/fetch/$s_!LIKl!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6538dc5e-9cbb-4f5e-80e9-e5eb112dabdf_1402x1122.png 848w, https://substackcdn.com/image/fetch/$s_!LIKl!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6538dc5e-9cbb-4f5e-80e9-e5eb112dabdf_1402x1122.png 1272w, https://substackcdn.com/image/fetch/$s_!LIKl!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6538dc5e-9cbb-4f5e-80e9-e5eb112dabdf_1402x1122.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!LIKl!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6538dc5e-9cbb-4f5e-80e9-e5eb112dabdf_1402x1122.png" width="1402" height="1122" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/6538dc5e-9cbb-4f5e-80e9-e5eb112dabdf_1402x1122.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1122,&quot;width&quot;:1402,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!LIKl!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6538dc5e-9cbb-4f5e-80e9-e5eb112dabdf_1402x1122.png 424w, https://substackcdn.com/image/fetch/$s_!LIKl!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6538dc5e-9cbb-4f5e-80e9-e5eb112dabdf_1402x1122.png 848w, https://substackcdn.com/image/fetch/$s_!LIKl!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6538dc5e-9cbb-4f5e-80e9-e5eb112dabdf_1402x1122.png 1272w, https://substackcdn.com/image/fetch/$s_!LIKl!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6538dc5e-9cbb-4f5e-80e9-e5eb112dabdf_1402x1122.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 buttonBase-GK1x3M"><svg aria-hidden="true" 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" class="icon-noB79L"><g><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 buttonBase-GK1x3M"><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 icon-noB79L"><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><h3><strong><span>Analogy</span></strong></h3><p><span>A sandwich counter where you name every ingredient:</span></p><p><span>A fixed combo hands you the pickles you scrape off and skips the extra cheese you wanted. Naming each ingredient gets you the sandwich you meant to order, in one pass down the counter.</span></p><h3><strong><span>Tradeoff</span></strong></h3><p><span>GraphQL costs you more.</span></p><p><span>Caching gets harder because every query is a </span><code>POST</code><span> to the same URL. Plus one careless nested query could walk your database for a minute. You carry a schema, a resolver for every field, and a plan for the N+1 problem.</span></p><p><span>So set a depth limit and a query cost budget on day one.</span></p><h3><strong><span>Why it matters</span></strong></h3><p><span>Mobile clients on slow networks, screens that stitch together several resources, and front ends that change faster than the backend.</span></p><p><span>Apollo, Relay, Hasura, and graphql-js are common choices. Pair it with Rate Limiting, because a single expensive query can cost more than a thousand REST calls.</span></p><h2><strong><span>3. Authentication</span></strong></h2><blockquote><p><span>Authentication proves &#8220;who&#8221; is calling your API.</span></p></blockquote><p><span>The caller presents a credential &amp; server checks it.</span></p><p><span>That credential could be a password, an API key, or a signed token. The server verifies it against something it trusts, then attaches an identity to the request. Everything downstream reads that identity.</span></p><p><span>A caller who fails the check gets a </span><code>401</code><span> and never reaches the business logic.</span></p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!bcnS!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9379c838-85c0-4ec7-9ce0-02ce36618f1f_1536x1024.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!bcnS!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9379c838-85c0-4ec7-9ce0-02ce36618f1f_1536x1024.png 424w, https://substackcdn.com/image/fetch/$s_!bcnS!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9379c838-85c0-4ec7-9ce0-02ce36618f1f_1536x1024.png 848w, https://substackcdn.com/image/fetch/$s_!bcnS!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9379c838-85c0-4ec7-9ce0-02ce36618f1f_1536x1024.png 1272w, https://substackcdn.com/image/fetch/$s_!bcnS!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9379c838-85c0-4ec7-9ce0-02ce36618f1f_1536x1024.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!bcnS!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9379c838-85c0-4ec7-9ce0-02ce36618f1f_1536x1024.png" width="1456" height="971" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/9379c838-85c0-4ec7-9ce0-02ce36618f1f_1536x1024.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:971,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!bcnS!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9379c838-85c0-4ec7-9ce0-02ce36618f1f_1536x1024.png 424w, https://substackcdn.com/image/fetch/$s_!bcnS!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9379c838-85c0-4ec7-9ce0-02ce36618f1f_1536x1024.png 848w, https://substackcdn.com/image/fetch/$s_!bcnS!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9379c838-85c0-4ec7-9ce0-02ce36618f1f_1536x1024.png 1272w, https://substackcdn.com/image/fetch/$s_!bcnS!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9379c838-85c0-4ec7-9ce0-02ce36618f1f_1536x1024.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 buttonBase-GK1x3M"><svg aria-hidden="true" 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" class="icon-noB79L"><g><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 buttonBase-GK1x3M"><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 icon-noB79L"><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><h3><strong><span>Analogy</span></strong></h3><p><span>Showing your passport at the border desk.</span></p><p><span>The officer compares the photo to your face &amp; the name to a list. They are not deciding where you may travel inside the country. They only confirm you are the person on the document.</span></p><h3><strong><span>Tradeoff</span></strong></h3><p><span>Each check costs a lookup/signature verification.</span></p><p><span>Secrets leak through logs, screenshots, and public repositories. Sessions expire at the worst moment for the user.</span></p><p><span>So rotate credentials on a schedule &amp; keep them out of your URLs.</span></p><h3><strong><span>Why it matters</span></strong></h3><p><span>Every API that touches private data, money, or a user account.</span></p><p><span>Auth0, Okta, Keycloak, and Firebase Auth handle the hard parts. Pair it with Authorization, because proving who you are says nothing about what you may do.</span></p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://newsletter.systemdesign.one/p/api-concepts-every-software-engineer-should-know?utm_source=substack&utm_medium=email&utm_content=share&action=share&quot;,&quot;text&quot;:&quot;Share&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://newsletter.systemdesign.one/p/api-concepts-every-software-engineer-should-know?utm_source=substack&utm_medium=email&utm_content=share&action=share"><span>Share</span></a></p><h2><strong><span>4. Authorization</span></strong></h2><blockquote><p><span>Authorization decides what a proven caller is allowed to do.</span></p></blockquote><p><span>Authentication runs first, then authorization runs.</span></p><p><span>The server knows the identity &amp; now checks the rules:</span></p><ul><li><p><em><span>Does this user own this order?</span></em></p></li><li><p><em><span>Does this token carry the write scope?</span></em></p></li><li><p><em><span>Does this role permit a delete?</span></em></p></li></ul><p><span>A caller who fails the check gets a </span><code>403</code><span> i.e., the server knows exactly who you are and still says no.</span></p><p><span>Authorization answers a second question: </span><em><span>what may you touch?</span></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_!oF1F!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff8f776c7-5150-4825-aef8-f3ddfc932391_1536x1024.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!oF1F!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff8f776c7-5150-4825-aef8-f3ddfc932391_1536x1024.png 424w, https://substackcdn.com/image/fetch/$s_!oF1F!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff8f776c7-5150-4825-aef8-f3ddfc932391_1536x1024.png 848w, https://substackcdn.com/image/fetch/$s_!oF1F!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff8f776c7-5150-4825-aef8-f3ddfc932391_1536x1024.png 1272w, https://substackcdn.com/image/fetch/$s_!oF1F!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff8f776c7-5150-4825-aef8-f3ddfc932391_1536x1024.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!oF1F!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff8f776c7-5150-4825-aef8-f3ddfc932391_1536x1024.png" width="1456" height="971" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/f8f776c7-5150-4825-aef8-f3ddfc932391_1536x1024.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:971,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!oF1F!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff8f776c7-5150-4825-aef8-f3ddfc932391_1536x1024.png 424w, https://substackcdn.com/image/fetch/$s_!oF1F!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff8f776c7-5150-4825-aef8-f3ddfc932391_1536x1024.png 848w, https://substackcdn.com/image/fetch/$s_!oF1F!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff8f776c7-5150-4825-aef8-f3ddfc932391_1536x1024.png 1272w, https://substackcdn.com/image/fetch/$s_!oF1F!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff8f776c7-5150-4825-aef8-f3ddfc932391_1536x1024.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 buttonBase-GK1x3M"><svg aria-hidden="true" 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" class="icon-noB79L"><g><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 buttonBase-GK1x3M"><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 icon-noB79L"><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><h3><strong><span>Analogy</span></strong></h3><p><span>A hotel keycard.</span></p><p><span>The card proves nothing about your name. It opens your room and the gym on the third floor. It stays dead against the manager&#8217;s office and the room next door, no matter how many times you tap it.</span></p><h3><strong><span>Tradeoff</span></strong></h3><p><span>Rules sprawl across the codebase, and one missing check becomes a breach.</span></p><p><span>Test the negative cases, because a passing test that proves a user can read their own order says nothing about whether they can read somebody else&#8217;s.</span></p><p><span>So check ownership at the data layer &amp; at the route.</span></p><h3><strong><span>Why it matters</span></strong></h3><p><span>Multi-tenant systems, admin panels, and any endpoint where one user&#8217;s record sits next to another&#8217;s.</span></p><p><span>Role-based access control and attribute-based access control are the two common models. Pair it with OAuth 2.0, whose scopes carry authorization decisions across service boundaries.</span></p><h2><strong><span>5. Rate Limiting</span></strong></h2><blockquote><p><span>Rate limiting caps how many requests one caller can send in a </span>time <span>window.</span></p></blockquote><p><span>The server counts &amp; past the cap, refuses them.</span></p><p><span>A common limit is a hundred requests per minute per API key. Cross it, and the server returns </span><code>429 Too Many Requests</code><span> along with a </span><code>Retry-After</code><span> header. Response headers usually report the ceiling and how much of it you have left, so a well-behaved client slows itself down before it gets refused.</span></p><p><span>One noisy caller stops starving everyone else.</span></p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!xuKL!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbc2d39f1-87c2-4e1e-b241-da5b61a9b470_1774x887.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!xuKL!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbc2d39f1-87c2-4e1e-b241-da5b61a9b470_1774x887.png 424w, https://substackcdn.com/image/fetch/$s_!xuKL!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbc2d39f1-87c2-4e1e-b241-da5b61a9b470_1774x887.png 848w, https://substackcdn.com/image/fetch/$s_!xuKL!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbc2d39f1-87c2-4e1e-b241-da5b61a9b470_1774x887.png 1272w, https://substackcdn.com/image/fetch/$s_!xuKL!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbc2d39f1-87c2-4e1e-b241-da5b61a9b470_1774x887.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!xuKL!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbc2d39f1-87c2-4e1e-b241-da5b61a9b470_1774x887.png" width="1456" height="728" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/bc2d39f1-87c2-4e1e-b241-da5b61a9b470_1774x887.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:728,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!xuKL!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbc2d39f1-87c2-4e1e-b241-da5b61a9b470_1774x887.png 424w, https://substackcdn.com/image/fetch/$s_!xuKL!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbc2d39f1-87c2-4e1e-b241-da5b61a9b470_1774x887.png 848w, https://substackcdn.com/image/fetch/$s_!xuKL!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbc2d39f1-87c2-4e1e-b241-da5b61a9b470_1774x887.png 1272w, https://substackcdn.com/image/fetch/$s_!xuKL!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbc2d39f1-87c2-4e1e-b241-da5b61a9b470_1774x887.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 buttonBase-GK1x3M"><svg aria-hidden="true" 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" class="icon-noB79L"><g><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 buttonBase-GK1x3M"><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 icon-noB79L"><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><h3><strong><span>Analogy</span></strong></h3><p><span>A nightclub with a counter at the door.</span></p><p><span>The room holds four hundred people. The doorman counts everyone in &amp; everyone out. When the room is full, the next person waits outside, and the people already dancing keep enjoying the music.</span></p><h3><strong><span>Tradeoff</span></strong></h3><p><span>Limits frustrate honest heavy users, and a limit that seems generous in testing looks tight during a launch.</span></p><p><span>Counting across many servers means shared state, which is one more thing that can go down. Token bucket handles bursts better than a fixed window.</span></p><h3><strong><span>Why it matters</span></strong></h3><p><span>Public APIs, free tiers, login endpoints, and any expensive operations like search or export.</span></p><p><span>Redis backs most implementations, and NGINX, Envoy, and Kong ship it built in. Pair it with throttling, which slows a caller instead of turning them away.</span></p><h2><strong><span>6. Caching</span></strong></h2><blockquote><p><span>Caching stores a copy of the response so next identical request skips extra work.</span></p></blockquote><p><span>The fastest request is the one your server never handles.</span></p><p><span>A cache sits between the client and the origin and holds recent responses. When a matching request arrives, the cache answers from memory in a millisecond. </span><code>Cache-Control</code><span> headers say how long a copy stays fresh. An </span><code>ETag</code><span> lets the client ask whether its copy is still good, and the server answers </span><code>304 Not Modified</code><span> without sending the body again.</span></p><p><span>Read-heavy APIs live/die on this.</span></p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!k2qv!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2e21d50d-2b3d-4423-9773-54a966dc59d2_1536x1024.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!k2qv!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2e21d50d-2b3d-4423-9773-54a966dc59d2_1536x1024.png 424w, https://substackcdn.com/image/fetch/$s_!k2qv!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2e21d50d-2b3d-4423-9773-54a966dc59d2_1536x1024.png 848w, https://substackcdn.com/image/fetch/$s_!k2qv!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2e21d50d-2b3d-4423-9773-54a966dc59d2_1536x1024.png 1272w, https://substackcdn.com/image/fetch/$s_!k2qv!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2e21d50d-2b3d-4423-9773-54a966dc59d2_1536x1024.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!k2qv!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2e21d50d-2b3d-4423-9773-54a966dc59d2_1536x1024.png" width="1456" height="971" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/2e21d50d-2b3d-4423-9773-54a966dc59d2_1536x1024.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:971,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!k2qv!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2e21d50d-2b3d-4423-9773-54a966dc59d2_1536x1024.png 424w, https://substackcdn.com/image/fetch/$s_!k2qv!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2e21d50d-2b3d-4423-9773-54a966dc59d2_1536x1024.png 848w, https://substackcdn.com/image/fetch/$s_!k2qv!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2e21d50d-2b3d-4423-9773-54a966dc59d2_1536x1024.png 1272w, https://substackcdn.com/image/fetch/$s_!k2qv!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2e21d50d-2b3d-4423-9773-54a966dc59d2_1536x1024.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 buttonBase-GK1x3M"><svg aria-hidden="true" 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" class="icon-noB79L"><g><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 buttonBase-GK1x3M"><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 icon-noB79L"><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><h3><strong><span>Analogy</span></strong></h3><p><span>A barista who writes your usual on a card.</span></p><p><span>You walk in; they glance at the card, and the drink is ready before you finish greeting them. They only ask again when you tell them your order has changed.</span></p><h3><strong><span>Tradeoff</span></strong></h3><p><span>Cached data goes stale, and a user who updates their profile &amp; still sees the old name loses trust immediately. Knowing when to throw a copy away is one of the hard problems in computing.</span></p><p><span>So cache aggressively on data that rarely changes. Plus, never cache a private response in a </span><em><span>shared</span></em><span> layer.</span></p><h3><strong><span>Why it matters</span></strong></h3><p><span>Product catalogs, public profiles, search results, and anything a thousand people read for every one person who writes.</span></p><p><span>Redis, Memcached, Varnish, and any content delivery network do this well. Pair it with Headers, which carry every instruction a cache obeys.</span></p><h2><strong><span>7. Pagination</span></strong></h2><blockquote><p><span>Pagination returns large datasets in smaller pages instead of sending ALL results in one response.</span></p></blockquote><p><span>The client asks for a slice and gets a pointer to the next one.</span></p><ul><li><p><strong><span>Offset pagination</span></strong><span> takes a page number &amp; size, then skips ahead.</span></p></li><li><p><strong><span>Cursor pagination</span></strong><span> hands back an opaque marker that says where you stopped, and you pass it back to continue.</span></p></li></ul><p><span>Both return the rows plus enough information to fetch the following page&#8230;Your database, your network, and the client&#8217;s memory will thank you.</span></p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!h4TT!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1a993449-4bee-4446-8804-a90f9ca138fc_1717x916.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!h4TT!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1a993449-4bee-4446-8804-a90f9ca138fc_1717x916.png 424w, https://substackcdn.com/image/fetch/$s_!h4TT!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1a993449-4bee-4446-8804-a90f9ca138fc_1717x916.png 848w, https://substackcdn.com/image/fetch/$s_!h4TT!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1a993449-4bee-4446-8804-a90f9ca138fc_1717x916.png 1272w, https://substackcdn.com/image/fetch/$s_!h4TT!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1a993449-4bee-4446-8804-a90f9ca138fc_1717x916.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!h4TT!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1a993449-4bee-4446-8804-a90f9ca138fc_1717x916.png" width="1456" height="777" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/1a993449-4bee-4446-8804-a90f9ca138fc_1717x916.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:777,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!h4TT!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1a993449-4bee-4446-8804-a90f9ca138fc_1717x916.png 424w, https://substackcdn.com/image/fetch/$s_!h4TT!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1a993449-4bee-4446-8804-a90f9ca138fc_1717x916.png 848w, https://substackcdn.com/image/fetch/$s_!h4TT!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1a993449-4bee-4446-8804-a90f9ca138fc_1717x916.png 1272w, https://substackcdn.com/image/fetch/$s_!h4TT!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1a993449-4bee-4446-8804-a90f9ca138fc_1717x916.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 buttonBase-GK1x3M"><svg aria-hidden="true" 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" class="icon-noB79L"><g><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 buttonBase-GK1x3M"><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 icon-noB79L"><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><h3><strong><span>Analogy</span></strong></h3><p><span>A book with a bookmark.</span></p><p><span>Nobody reads a thousand pages in one sitting. You read twenty, slide the ribbon in, and close the cover. Tomorrow you open straight to the ribbon rather than counting pages from the front.</span></p><h3><strong><span>Tradeoff</span></strong></h3><p><span>Offset pagination </span><em><span>drifts</span></em><span>&#8230;Insert a row while somebody reads page two, and they see a duplicate on page three.</span></p><p><span>Cursor pagination gives up the ability to jump anywhere except forward &amp; back.</span></p><p><span>So use cursors for feeds &amp; offsets for admin tables.</span></p><h3><strong><span>Why it matters</span></strong></h3><p><span>Every list endpoint, every feed, and every export.</span></p><p><span>Stripe, GitHub, and Slack all publish cursor-based APIs. Pair it with Filtering and Sorting, which decide what lands on the page before you slice it.</span></p><h4 style="text-align: center;"><strong>&#167;</strong></h4><div class="callout-block" data-callout="true"><p style="text-align: center;"><em><strong><span data-color="#3a7bf9" style="color: rgb(58, 123, 249);">Reminder: this is a teaser of the subscriber-only newsletter, exclusive to my golden members.</span></strong></em></p><p>When you upgrade, you&#8217;ll get:</p><ul><li><p><strong>High-level architecture of real-world systems.</strong></p></li><li><p>Deep dive into how popular real-world systems work.</p></li><li><p><strong>How real-world systems handle scale, reliability &amp; performance.</strong></p></li></ul><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://newsletter.systemdesign.one/subscribe&quot;,&quot;text&quot;:&quot;Unlock Full Access&quot;,&quot;action&quot;:null,&quot;class&quot;:&quot;button-wrapper&quot;}" data-component-name="ButtonCreateButton"><a class="button primary button-wrapper" href="https://newsletter.systemdesign.one/subscribe"><span>Unlock Full Access</span></a></p><p>(If this newsletter has helped you become a better software engineer, consider subscribing to support my work.)</p></div><h4 style="text-align: center;"><strong>&#167;</strong></h4><h2><strong><span>8. Status Codes</span></strong></h2>
      <p>
          <a href="https://newsletter.systemdesign.one/p/api-concepts-every-software-engineer-should-know">
              Read more
          </a>
      </p>
   ]]></content:encoded></item><item><title><![CDATA[How to create a good LLM judge]]></title><description><![CDATA[#183: Build a judge from expert examples and measure the mistakes it makes]]></description><link>https://newsletter.systemdesign.one/p/how-to-build-llm-judge</link><guid isPermaLink="false">https://newsletter.systemdesign.one/p/how-to-build-llm-judge</guid><dc:creator><![CDATA[Hamel Husain]]></dc:creator><pubDate>Wed, 30 Sep 2026 12:10:40 GMT</pubDate><enclosure url="https://substack-post-media.s3.amazonaws.com/public/images/262dde06-f927-400d-ac1f-661006c82d30_1280x720.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<div class="callout-block" data-callout="true"><h3><a href="https://blog.jetbrains.com/blog/2026/09/22/introducing-jetbrains-air/"><span data-color="#3a7bf9" style="color: rgb(58, 123, 249);">We are in the middle of the agentic coding era, please take advantage of it (Partner)</span></a></h3><p>Coding agents are changing what it means to be a software engineer.</p><p>Typing code on a screen used to be a big part of the job. But now AI agents can handle more of that work.</p><p>The pattern of technological change is familiar:</p><p><em>The mechanical part of work gets automated &amp; human role moves up a layer.</em></p><p>For software engineers, I think it means 3 things:</p><ol><li><p><em>You need to know what good looks like.</em></p><p>An agent can create a feature, fix a bug, and/or refactor code. But if you don&#8217;t know what good implementation looks like, you cannot tell whether the work should ship. The faster agents write code, the more your judgment matters.</p></li><li><p><em>You need to learn how to manage multiple agents.</em></p><p>One developer can already give different tasks to different coding agents. That changes the job. You become responsible for:</p><ul><li><p>giving context to agents,</p></li><li><p>directing their work,</p></li><li><p>checking results.</p></li></ul></li><li><p><em>You need a way to control this across the company.</em></p><p>Imagine all engineers in your company working this way&#8230;You need to know:</p><ul><li><p>which &#8220;agents&#8221; people use,</p></li><li><p>what they&#8217;re doing &amp; what they cost,</p></li><li><p>what happens when something goes wrong.</p></li></ul></li></ol><p>This is why I&#8217;m genuinely excited about JetBrains Air.</p><p>It gives you an environment for directing multiple coding agents &amp; reviewing their work. So you can delegate more coding work without losing visibility/control.</p><p>Plus...</p><ul><li><p>JetBrains Air Teams lets you coordinate software delivery workflows across engineers &amp; agents. So engineering teams can manage agentic work across the development process.</p></li><li><p>JetBrains Air Governance gives organizations policies, visibility, auditability &amp; cost management. So they can control how agents get used &amp; maintain accountability for what ships.</p></li></ul><p>And this works in a world where engineers use different agents &amp; models.</p><p>i.e., you don&#8217;t have to bet everything on one provider.</p><p><strong><a href="https://blog.jetbrains.com/blog/2026/09/22/introducing-jetbrains-air/"><mark data-color="rgb(255, 255, 0)" style="background-color: rgb(255, 255, 0); color: rgb(0, 0, 0);">Read more about JetBrains Air &#187;</mark></a></strong></p></div><h4 style="text-align: center;"><strong>&#167;</strong></h4><p><span>Many AI outputs require subjective/domain-specific judgment.</span></p><p><span>A useful support response or a faithful summary is hard to grade with fixed rules in code</span><a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-1" href="#footnote-1" target="_self">1</a><span>. People have to read &amp; interpret these outputs. So repeating that review across many outputs takes time.</span></p><p><span>To reduce this review work, you can ask a large language model (</span><strong><span>LLM</span></strong><span>) to evaluate another model&#8217;s output. This use of a model is called </span><em><span>LLM-as-a-judge</span></em><span>. You give the judge the output &amp; your evaluation criteria. It returns a decision, often with an explanation. This ability to automate subjective checks makes LLM-as-a-judge a &#8220;workhorse&#8221; in evals.</span></p><p><span>Onward.</span></p><h4 style="text-align: center;"><strong>&#167;</strong></h4><p>I want to introduce <strong><a href="https://hamel.dev/">Hamel Husain</a></strong> as a guest author.</p><p>Hamel writes about AI evaluations and teaches the <strong><a href="https://maven.com/parlance-labs/evals?promoCode=SYSTEMDESIGNONE-C7">AI Evals course</a></strong> with Shreya Shankar. In this newsletter, he explains how to build an LLM judge and check its decisions against human labels.</p><h4 style="text-align: center;"><strong>&#167;</strong></h4><p><em>Here&#8217;s what&#8217;s inside this newsletter:</em></p><ul><li><p><strong>A high judge score can still hide a broken evaluator.</strong> Why a judge that looks accurate could completely miss the failures you actually care about.</p></li><li><p><strong>Your human labels become the standard.</strong> The decisions, critiques &amp; rubrics that determine what your LLM judge should call Pass or Fail.</p></li><li><p><strong>The examples your judge sees change its decisions.</strong> Why some examples belong inside the prompt, while others must stay hidden until the final test.</p></li><li><p><strong>One number won&#8217;t tell you whether your judge works.</strong> The measurements that reveal how often it misses real failures &amp; incorrectly flags good outputs.</p></li><li><p><strong>Your judge gets stale as your AI product changes.</strong> What happens to your evals when models, user behavior &amp; evaluation criteria change over time.</p></li><li><p><strong>A 6-step process takes you from real failures to a validated LLM judge.</strong> The complete framework for choosing what to evaluate, defining the human standard, building the judge &amp; checking whether you can trust its decisions.</p></li></ul><p></p><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://newsletter.systemdesign.one/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"><span data-color="#3a7bf9" style="color: rgb(58, 123, 249);">Get my system design playbook for FREE on newsletter signup:</span></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><ul><li><p><em><a href="https://newsletter.systemdesign.one/p/how-to-build-llm-judge/?action=share">Share this letter</a> &amp; I&#8217;ll send you some rewards for the referrals.</em></p></li></ul><h4 style="text-align: center;"><strong>&#167;</strong></h4><p><span>The judge can work alongside code-based checks:</span></p><ul><li><p><span>Use code for checks with clear rules, such as whether an output follows the required format.</span></p></li><li><p><span>Use the judge for decisions that depend on meaning/context.</span></p></li></ul><p><span>For example, code can check whether a support response contains the words </span><em><span>&#8220;I am sorry.&#8221;</span></em></p><p><span>An LLM judge can assess whether the response addresses the customer&#8217;s frustration. Give the judge examples of acceptable responses so it can apply your support team&#8217;s standards.</span></p><p><span>Also code can check whether an answer includes a source link.</span></p><p><span>An LLM judge can compare the answer with the source to check whether the source supports the claim. Give the judge the source text so it has the evidence it needs.</span></p><p><span>For either task, the judge can make mistakes.</span></p><p><span>Before you rely on it, test whether its decisions match human judgments.</span></p><p><span>Even high agreement can hide these mistakes. If an error occurs in 5% of examples, a judge that always predicts Pass still has 95% agreement while detecting none of the errors.</span></p><p><span>To avoid this false confidence, measure whether the judge catches the failures that matter.</span></p><p><span>This newsletter starts with finding those failures and defining the human standard. It then shows how to build a judge prompt &amp; test its decisions against that standard</span><a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-2" href="#footnote-2" target="_self">2</a><span>.</span></p><h4 style="text-align: center;"><strong>&#167;</strong></h4><h2><strong><span>1. Choose a failure worth judging</span></strong></h2><p><span>When you start building evals, it is tempting to use a metric</span><a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-3" href="#footnote-3" target="_self">3</a><span> someone else has already written.</span></p><p><span>Eval libraries offer ready-made scores for qualities such as helpfulness and coherence. You can run them on your outputs and get a score before deciding what a good result means for your product.</span></p><p><span>These metrics measure abstract qualities that may not matter for your use case.</span></p><p><span>Good scores on them do not mean your system works. For example, an answer might receive a high helpfulness score even though its sources do not support its claims</span><a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-4" href="#footnote-4" target="_self">4</a><span>. You need a check for this specific failure.</span></p><p><span>Generic scores</span><a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-5" href="#footnote-5" target="_self">5</a><span> can still help you choose outputs to review&#8230;</span></p><p><span>For example, sort outputs by helpfulness &amp; read some low-scoring examples. You may find a recurring problem worth checking. Read the outputs yourself to decide whether there is a failure and describe it. Keep some random examples in each review batch so you can find problems the generic score misses.</span></p><p><span>To decide which specific failures to check, review actual interactions and write notes about each problem. Then group similar problems into categories. This process is called </span><strong><span>error analysis</span></strong><a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-6" href="#footnote-6" target="_self">6</a><span>. Error analysis helps you decide what evals to write in the first place.</span></p><p><span>To understand an incorrect answer, you may need to see what happened before it.</span></p><p><span>Review the complete record of the user session, called a </span><strong><span>trace</span></strong><span>. It includes the user&#8217;s request &amp; the model&#8217;s response, along with any tool calls and their results.</span></p><p><span>For example, several answers may include sources that do not support their claims. Group these cases under one failure category, such as &#8220;unsupported claims.&#8221; You can then decide whether that failure needs an automated check.</span></p><p><span>To find these patterns:</span></p><ol><li><p><span>Gather about 100 traces that cover </span><em><span>different</span></em><span> users &amp; workflows.</span></p></li><li><p><span>Then review at least 30 traces yourself.</span></p></li><li><p><span>As you read, write free-text notes about anything that seems &#8220;wrong&#8221; from the user&#8217;s perspective.</span></p></li></ol><p><span>Do this initial review before reading an agent&#8217;s suggestions.</span></p><p><span>The agent may lack the product context you use to judge a good user experience. Its suggestions can direct your attention toward the problems it recognizes, causing you to miss failures it does not recognize.</span></p><p><span>After reviewing the first 30 traces, group similar failures and count the number in each category. Use your notes to ask the agent to search the remaining pool for similar examples. Review every suggestion yourself.</span></p><p><span>Continue until new traces stop revealing types of failure or changing your categories</span><a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-7" href="#footnote-7" target="_self">7</a><span>.</span></p><p><span>The counts help you choose which failures to address first. For each failure, decide whether to fix it directly or build an automated check, often called an evaluator/eval.</span></p><p><span>Focus automated evaluators on failures that persist after fixing your prompts.</span></p><p><span>Teams sometimes discover their LLM doesn&#8217;t meet preferences they never specified, such as wanting short responses or a particular format.</span></p><p><span>Fix these obvious gaps first</span><a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-8" href="#footnote-8" target="_self">8</a><span>.</span></p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!in2i!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa48d8d10-7221-45dc-a9d3-c6091e13a89e_1792x1008.jpeg" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!in2i!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa48d8d10-7221-45dc-a9d3-c6091e13a89e_1792x1008.jpeg 424w, https://substackcdn.com/image/fetch/$s_!in2i!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa48d8d10-7221-45dc-a9d3-c6091e13a89e_1792x1008.jpeg 848w, https://substackcdn.com/image/fetch/$s_!in2i!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa48d8d10-7221-45dc-a9d3-c6091e13a89e_1792x1008.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!in2i!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa48d8d10-7221-45dc-a9d3-c6091e13a89e_1792x1008.jpeg 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!in2i!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa48d8d10-7221-45dc-a9d3-c6091e13a89e_1792x1008.jpeg" width="1456" height="819" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/a48d8d10-7221-45dc-a9d3-c6091e13a89e_1792x1008.jpeg&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:819,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:306826,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/jpeg&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://newsletter.systemdesign.one/i/216784604?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa48d8d10-7221-45dc-a9d3-c6091e13a89e_1792x1008.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_!in2i!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa48d8d10-7221-45dc-a9d3-c6091e13a89e_1792x1008.jpeg 424w, https://substackcdn.com/image/fetch/$s_!in2i!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa48d8d10-7221-45dc-a9d3-c6091e13a89e_1792x1008.jpeg 848w, https://substackcdn.com/image/fetch/$s_!in2i!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa48d8d10-7221-45dc-a9d3-c6091e13a89e_1792x1008.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!in2i!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa48d8d10-7221-45dc-a9d3-c6091e13a89e_1792x1008.jpeg 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 buttonBase-GK1x3M"><svg aria-hidden="true" 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" class="icon-noB79L"><g><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 buttonBase-GK1x3M"><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 icon-noB79L"><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>Only build expensive evaluators for problems you&#8217;ll iterate on repeatedly.</em></figcaption></figure></div><p><span>Plus, choose the simplest check that can detect the failure.</span></p><p><span>For example, you can run generated code to check whether it produces the expected result. Use an LLM judge when the check requires human judgment.</span></p><p><span>An LLM judge needs labeled examples and ongoing maintenance</span><a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-9" href="#footnote-9" target="_self">9</a><span>.</span></p><p><span>Before you can automate this judgment, you need a consistent human standard&#8230;</span></p><h4 style="text-align: center;"><strong>&#167;</strong></h4><h2><strong><span>2. Establish the human standard</span></strong></h2><p><span>After choosing a failure to evaluate, you need to decide which outputs should &#8220;pass&#8221;.</span></p><p><span>People can disagree about whether the same output is acceptable. To establish a consistent standard, find the person who understands what a good result looks like for your product. A customer service director might be the right expert for a support assistant. An educational tool may need a teacher/curriculum developer.</span></p><p><span>For a small team, choose </span><em><span>one</span></em><span> domain expert to make final decisions about quality.</span></p><p><span>This reduces the work of coordinating several reviewers &amp; resolving conflicting labels. The expert can incorporate input and feedback from others, but they drive the process. You then have a consistent standard to use when building and testing the judge.</span></p><p><span>The expert&#8217;s critiques also help uncover expectations people have not yet put into words. Use those critiques to define what the judge should check. If you are an independent developer with the relevant expertise, you can fill this role yourself.</span></p><p><span>Give the expert the information they need to evaluate each interaction.</span></p><p><span>That includes the user&#8217;s request &amp; the model&#8217;s response. Depending on the task, they may also need results from tools or relevant information about the user. Present the relevant evidence together so they can review it without switching between several systems</span><a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-10" href="#footnote-10" target="_self">10</a><span>.</span></p><h3><strong><span>Use Pass and Fail, with a critique</span></strong></h3><p><span>The expert needs a way to record each decision.</span></p><p><span>A 1-to-5 rating may seem useful for capturing degrees of quality. But the difference between adjacent points, like 3 versus 4, is often subjective and inconsistent across people labeling the outputs.</span></p><p><span>People can also default to middle values to avoid making a hard decision. Ask the expert to mark each example as </span><code>Pass</code><span> or </span><code>Fail</code><span> for the specific problem you are checking.</span></p><p><span>An evaluation with two possible labels is called </span><em><span>binary</span></em><span>.</span></p><p><span>Binary evaluations force clearer thinking &amp; more consistent labeling. Besides the pass/fail decision, the domain expert should write a critique explaining their reasoning.</span></p><p><span>Use the same </span><code>Pass</code><span> or </span><code>Fail</code><span> outcomes for the judge. Each decision should answer one specific question about the output. A critique explains the decision; a middle score can leave it unclear whether the output is acceptable.</span></p><p><span>The critique identifies what caused the output to pass or fail and records the expectations the judge needs to follow.</span></p><p><span>You can still measure gradual improvement.</span></p><p><span>For example, you can track whether each expected fact appears in an answer. An answer that includes four of five expected facts passes four specific checks</span><a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-11" href="#footnote-11" target="_self">11</a><span>.</span></p><h3><strong><span>Expect your criteria to change</span></strong></h3><p><span>Your evaluation criteria can change as you review outputs &amp; discover expectations you hadn&#8217;t considered. (Shreya Shankar &amp; her colleagues call this &#8220;criteria drift</span><a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-12" href="#footnote-12" target="_self">12</a><span>.&#8221;)</span></p><p><span>Reviewing the judge&#8217;s critiques can help the expert notice inconsistencies in how they evaluate edge cases.</span></p><p><span>If several people label examples, check whether they apply the same standard&#8230;</span></p><p><span>Have these annotators label the same examples independently before they discuss them. Measure agreement and collect the cases where their labels differ. Discuss the rules for deciding Pass or Fail. These written rules are your rubric.</span></p><p><span>Update the rubric with a definition or example that covers the disputed case. Then relabel affected examples. If the annotators still disagree, assign a domain expert to make the final decision and record the reason</span><a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-13" href="#footnote-13" target="_self">13</a><span>.</span></p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!5zF9!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff7f3fe73-2735-413c-afd8-c06247f0a9b6_1200x1500.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!5zF9!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff7f3fe73-2735-413c-afd8-c06247f0a9b6_1200x1500.png 424w, https://substackcdn.com/image/fetch/$s_!5zF9!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff7f3fe73-2735-413c-afd8-c06247f0a9b6_1200x1500.png 848w, https://substackcdn.com/image/fetch/$s_!5zF9!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff7f3fe73-2735-413c-afd8-c06247f0a9b6_1200x1500.png 1272w, https://substackcdn.com/image/fetch/$s_!5zF9!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff7f3fe73-2735-413c-afd8-c06247f0a9b6_1200x1500.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!5zF9!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff7f3fe73-2735-413c-afd8-c06247f0a9b6_1200x1500.png" width="1200" height="1500" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/f7f3fe73-2735-413c-afd8-c06247f0a9b6_1200x1500.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1500,&quot;width&quot;:1200,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!5zF9!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff7f3fe73-2735-413c-afd8-c06247f0a9b6_1200x1500.png 424w, https://substackcdn.com/image/fetch/$s_!5zF9!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff7f3fe73-2735-413c-afd8-c06247f0a9b6_1200x1500.png 848w, https://substackcdn.com/image/fetch/$s_!5zF9!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff7f3fe73-2735-413c-afd8-c06247f0a9b6_1200x1500.png 1272w, https://substackcdn.com/image/fetch/$s_!5zF9!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff7f3fe73-2735-413c-afd8-c06247f0a9b6_1200x1500.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 buttonBase-GK1x3M"><svg aria-hidden="true" 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" class="icon-noB79L"><g><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 buttonBase-GK1x3M"><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 icon-noB79L"><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 style="text-align: center;"><em><span>Start with binary labels to understand what &#8220;bad&#8221; looks like.</span></em></p><p><span>The expert&#8217;s labels &amp; critiques give you the material for the judge&#8217;s prompt.</span></p><h4 style="text-align: center;"><strong>&#167;</strong></h4><div class="captioned-button-wrap" data-attrs="{&quot;url&quot;:&quot;https://newsletter.systemdesign.one/p/how-to-build-llm-judge?utm_source=substack&utm_medium=email&utm_content=share&action=share&quot;,&quot;text&quot;:&quot;Share&quot;}" data-component-name="CaptionedButtonToDOM"><div class="preamble"><p class="cta-caption"><em><span data-color="#3a7bf9" style="color: rgb(58, 123, 249);">Get 1+ referral &amp; I&#8217;ll send you my Leetcode Master Template!</span></em></p></div><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://newsletter.systemdesign.one/p/how-to-build-llm-judge?utm_source=substack&utm_medium=email&utm_content=share&action=share&quot;,&quot;text&quot;:&quot;Share&quot;}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://newsletter.systemdesign.one/p/how-to-build-llm-judge?utm_source=substack&utm_medium=email&utm_content=share&action=share"><span>Share</span></a></p></div><h4 style="text-align: center;"><strong>&#167;</strong></h4><h2><strong><span>3. Write a prompt from expert examples</span></strong></h2><p><span>Use the expert&#8217;s critiques &amp; evaluation rules to write the judge&#8217;s prompt.</span></p><p><span>Include labeled examples</span><a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-14" href="#footnote-14" target="_self">14</a><span> showing how to apply the rules to actual outputs.</span></p><p><span>Consider an assistant that turns a user&#8217;s request into a query for searching application data. The judge checks whether the generated query answers the request.</span></p><p><span>A user asks, </span><em><span>&#8220;show me slowest trace.&#8221;</span></em></p><p><span>In this example, a trace records the steps an application takes to handle a request. The generated query found a maximum duration but didn&#8217;t group the data by each trace&#8217;s identifier.</span></p><p><span>It returned a duration without identifying the slowest trace</span><a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-15" href="#footnote-15" target="_self">15</a><span>.</span></p><p><span>This shortened prompt includes the query &amp; the expert&#8217;s critique.</span></p><p><span>Replace the placeholders with your application&#8217;s query-language information &amp; evaluation guidelines</span><a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-16" href="#footnote-16" target="_self">16</a><span>.</span></p><div class="highlighted_code_block" data-attrs="{&quot;language&quot;:&quot;plaintext&quot;,&quot;nodeId&quot;:&quot;9f96fb06-6fd6-4a5b-92fb-2903c9648d4c&quot;}" data-component-name="HighlightedCodeBlockToDOM"><pre class="shiki"><code class="language-plaintext">You are a query evaluator.
Evaluate whether the generated query answers the user&#8217;s request.

Here is information about the query language:
{{query_language_info}}

Here are the evaluation guidelines:
{{guidelines}}

Example evaluation:
&lt;nlq&gt;show me slowest trace&lt;/nlq&gt;

&lt;query&gt;
{
  &#8220;calculations&#8221;: [{&#8221;column&#8221;: &#8220;duration_ms&#8221;, &#8220;op&#8221;: &#8220;MAX&#8221;}],
  &#8220;orders&#8221;: [{&#8221;column&#8221;: &#8220;duration_ms&#8221;, &#8220;op&#8221;: &#8220;MAX&#8221;,
              &#8220;order&#8221;: &#8220;descending&#8221;}],
  &#8220;limit&#8221;: 1
}
&lt;/query&gt;

&lt;critique&gt;
{
  &#8220;critique&#8221;: &#8220;While the query attempts to find the slowest trace
  using MAX(duration_ms) and ordering correctly, it fails to group
  by trace.trace_id. Without this grouping, the query only shows
  the MAX(duration_ms) measurement over time, not the actual
  slowest trace.&#8221;,
  &#8220;outcome&#8221;: &#8220;Fail&#8221;
}
&lt;/critique&gt;

For the following query, write a critique explaining your decision.
Then provide a Pass or Fail judgment in the same format as above.

&lt;nlq&gt;{{user_input}}&lt;/nlq&gt;
&lt;query&gt;{{generated_query}}&lt;/query&gt;</code></pre></div><p><span>Include clear Pass examples alongside Fail examples to show the distinctions in your rubric.</span></p><p><span>Examples included in a prompt are often called &#8220;few-shot examples.&#8221;</span></p><p><span>Keep separate examples for testing the judge (described in the next section).</span></p><p><span>Keep each judge focused on one type of failure. Use separate judges for unrelated failures so you can see which behavior needs fixing</span><a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-17" href="#footnote-17" target="_self">17</a><span>.</span></p><p><span>To check whether the prompt captures the expert&#8217;s judgment, compare their decisions on the same queries.</span></p><p><span>Put each user request and generated query in a spreadsheet with the judge&#8217;s critique and decision. Ask the expert to add their own critique and decision.</span></p><p><span>Use the disagreements to improve the prompt</span><a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-18" href="#footnote-18" target="_self">18</a><span>.</span></p><h3><strong><span>Give the judge the evidence it needs</span></strong></h3><p><span>Some disagreements come from missing evidence.</span></p><p><span>To check a claim against a database, the judge needs the database result alongside the model&#8217;s answer. Your examples should contain the same information you use to evaluate.</span></p><p><span>Give each judge only the parts of the trace relevant to the failure it checks. Extra context can make its decisions </span><em><span>less</span></em><span> accurate.</span></p><p><span>Test your choices by comparing the judge&#8217;s decisions with human labels. Then, inspect disagreements to see whether the judge lacked necessary evidence or was distracted by irrelevant information.</span></p><p><span>Remove one piece of information at a time and check how the results change against human labels. If performance stays the same/improves, you may be able to leave it out.</span></p><p><span>Long-running agents can produce traces longer than the judge can read in one request. In those cases, consider giving the judge a tool to search for the parts it needs. Add this only when necessary, because it introduces more complexity &amp; cost</span><a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-19" href="#footnote-19" target="_self">19</a><span>.</span></p><p><span>You still need to check the judge on examples you did not use to develop its prompt.</span></p><h4 style="text-align: center;"><strong>&#167;</strong></h4><div class="captioned-button-wrap" data-attrs="{&quot;url&quot;:&quot;https://newsletter.systemdesign.one/p/how-to-build-llm-judge?utm_source=substack&utm_medium=email&utm_content=share&action=share&quot;,&quot;text&quot;:&quot;Share&quot;}" data-component-name="CaptionedButtonToDOM"><div class="preamble"><p class="cta-caption"><em><span data-color="#3a7bf9" style="color: rgb(58, 123, 249);">Get 2+ referrals &amp; I&#8217;ll send you my Interview Mistakes to Avoid PDF!</span></em></p></div><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://newsletter.systemdesign.one/p/how-to-build-llm-judge?utm_source=substack&utm_medium=email&utm_content=share&action=share&quot;,&quot;text&quot;:&quot;Share&quot;}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://newsletter.systemdesign.one/p/how-to-build-llm-judge?utm_source=substack&utm_medium=email&utm_content=share&action=share"><span>Share</span></a></p></div><h4 style="text-align: center;"><strong>&#167;</strong></h4><h2><strong><span>4. Check whether the judge catches failures</span></strong></h2><p><span>A convincing critique can contain an incorrect decision.</span></p><p><span>Before relying on the judge, check how often its decisions match your domain expert. This check is called </span><strong><span>validation</span></strong><span>.</span></p><p><span>Run the judge on labeled examples you kept out of the prompt &amp; inspect the mistakes</span><a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-20" href="#footnote-20" target="_self">20</a><span>.</span></p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!Y7Mh!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd82ee754-56fa-4e0f-8429-9a34563ad2cc_668x659.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!Y7Mh!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd82ee754-56fa-4e0f-8429-9a34563ad2cc_668x659.png 424w, https://substackcdn.com/image/fetch/$s_!Y7Mh!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd82ee754-56fa-4e0f-8429-9a34563ad2cc_668x659.png 848w, https://substackcdn.com/image/fetch/$s_!Y7Mh!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd82ee754-56fa-4e0f-8429-9a34563ad2cc_668x659.png 1272w, https://substackcdn.com/image/fetch/$s_!Y7Mh!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd82ee754-56fa-4e0f-8429-9a34563ad2cc_668x659.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!Y7Mh!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd82ee754-56fa-4e0f-8429-9a34563ad2cc_668x659.png" width="668" height="659" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/d82ee754-56fa-4e0f-8429-9a34563ad2cc_668x659.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:659,&quot;width&quot;:668,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;A monkey hiding when asked how the team can trust its LLM judge.&quot;,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="A monkey hiding when asked how the team can trust its LLM judge." title="A monkey hiding when asked how the team can trust its LLM judge." srcset="https://substackcdn.com/image/fetch/$s_!Y7Mh!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd82ee754-56fa-4e0f-8429-9a34563ad2cc_668x659.png 424w, https://substackcdn.com/image/fetch/$s_!Y7Mh!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd82ee754-56fa-4e0f-8429-9a34563ad2cc_668x659.png 848w, https://substackcdn.com/image/fetch/$s_!Y7Mh!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd82ee754-56fa-4e0f-8429-9a34563ad2cc_668x659.png 1272w, https://substackcdn.com/image/fetch/$s_!Y7Mh!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd82ee754-56fa-4e0f-8429-9a34563ad2cc_668x659.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 buttonBase-GK1x3M"><svg aria-hidden="true" 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" class="icon-noB79L"><g><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 buttonBase-GK1x3M"><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 icon-noB79L"><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>Show how often the judge misses failures and flags acceptable outputs.</em></figcaption></figure></div><h3><strong><span>Separate prompt development from the final test</span></strong></h3><p><span>Repeated changes make a prompt work well on examples you use to develop it.</span></p><p><span>You also need to know how it performs on new examples&#8230; so keep a separate group for the final test.</span></p><p><span>The first 30 traces help you discover failures.</span></p><p><span>Yet testing the </span><em><span>judge</span></em><span> requires more labeled examples. Plan to label 100 to 200 examples for each type of failure. Reuse labeled traces from error discovery when they match that failure, then collect more until you reach that range. Include enough Pass &amp; Fail examples to measure how well the judge recognizes each.</span></p><p><span>Split the labeled examples before you start revising the judge prompt</span><a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-21" href="#footnote-21" target="_self">21</a><span>:</span></p><ul><li><p><span>Training set contains examples you may put in the prompt. Here, &#8220;training&#8221; means choosing prompt examples. You do not change the model itself. Choose clear Pass and Fail examples with useful critiques.</span></p></li><li><p><span>The development set (dev set) is where you compare the judge with human labels while refining the prompt. Keep these examples out of the prompt.</span></p></li><li><p><span>Test set stays hidden until you finish revising the prompt. Freeze the prompt and run the judge on the test set once. Use the result as your final estimate of the judge&#8217;s performance.</span></p></li></ul><p><span>Use 10 to 20 percent for train examples</span><a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-22" href="#footnote-22" target="_self">22</a><span> you may put in the prompt.</span></p><p><span>Use 40 to 45 percent for dev while refining the judge. Reserve the remaining 40 to 45 percent for one final test. The number of Pass and Fail examples is more useful than the percentage alone. Aim for 30 to 50 Pass examples and 30 to 50 Fail examples in both dev and test when possible.</span></p><p><span>A total of 100 examples cannot meet those targets for both dev &amp; test. Collect more when you need better estimates, especially when failures are rare</span><a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-23" href="#footnote-23" target="_self">23</a><span>.</span></p><p><span>On the dev set, read the disagreements. Check for missing rules or evidence. Clarify ambiguous examples and correct any mistaken human labels. Run the judge on the dev set again after each revision.</span></p><p><span>If you revise the prompt after seeing test results, those examples have become part of development. Reserve new examples for the next final check.</span></p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!hKvn!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F83913cdb-b5c2-4aa1-a7dc-4543a44665ad_1200x1500.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!hKvn!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F83913cdb-b5c2-4aa1-a7dc-4543a44665ad_1200x1500.png 424w, https://substackcdn.com/image/fetch/$s_!hKvn!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F83913cdb-b5c2-4aa1-a7dc-4543a44665ad_1200x1500.png 848w, https://substackcdn.com/image/fetch/$s_!hKvn!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F83913cdb-b5c2-4aa1-a7dc-4543a44665ad_1200x1500.png 1272w, https://substackcdn.com/image/fetch/$s_!hKvn!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F83913cdb-b5c2-4aa1-a7dc-4543a44665ad_1200x1500.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!hKvn!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F83913cdb-b5c2-4aa1-a7dc-4543a44665ad_1200x1500.png" width="1200" height="1500" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/83913cdb-b5c2-4aa1-a7dc-4543a44665ad_1200x1500.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1500,&quot;width&quot;:1200,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!hKvn!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F83913cdb-b5c2-4aa1-a7dc-4543a44665ad_1200x1500.png 424w, https://substackcdn.com/image/fetch/$s_!hKvn!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F83913cdb-b5c2-4aa1-a7dc-4543a44665ad_1200x1500.png 848w, https://substackcdn.com/image/fetch/$s_!hKvn!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F83913cdb-b5c2-4aa1-a7dc-4543a44665ad_1200x1500.png 1272w, https://substackcdn.com/image/fetch/$s_!hKvn!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F83913cdb-b5c2-4aa1-a7dc-4543a44665ad_1200x1500.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 buttonBase-GK1x3M"><svg aria-hidden="true" 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" class="icon-noB79L"><g><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 buttonBase-GK1x3M"><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 icon-noB79L"><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 style="text-align: center;"><em><span>The &gt;90% target shown here is an example. Set targets based on the cost of missed failures and false alarms in your application.</span></em></p><h3><strong><span>Measure failures and passes separately</span></strong></h3><p><span>The judge can miss a failure or incorrectly mark an acceptable output as Fail.</span></p><p><span>Measure these mistakes separately. Count Fail as a positive result because a failure is what you are trying to detect. Measure:</span></p><ul><li><p><span>True positive rate (</span><strong><span>TPR</span></strong><span>) is the fraction of human-labeled failures that the judge correctly marks Fail. This is also called </span><em><span>recall for failures</span></em><span>.</span></p></li><li><p><span>True negative rate (</span><strong><span>TNR</span></strong><span>) is the fraction of human-labeled passes that the judge correctly marks Pass.</span></p></li></ul><p><span>Suppose your test set contains 50 human-labeled failures and 50 human-labeled passes. These numbers illustrate the calculation.</span></p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!S_PV!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1f2445e2-5574-42c7-93d7-89ed02dcecb6_1800x700.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!S_PV!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1f2445e2-5574-42c7-93d7-89ed02dcecb6_1800x700.png 424w, https://substackcdn.com/image/fetch/$s_!S_PV!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1f2445e2-5574-42c7-93d7-89ed02dcecb6_1800x700.png 848w, https://substackcdn.com/image/fetch/$s_!S_PV!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1f2445e2-5574-42c7-93d7-89ed02dcecb6_1800x700.png 1272w, https://substackcdn.com/image/fetch/$s_!S_PV!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1f2445e2-5574-42c7-93d7-89ed02dcecb6_1800x700.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!S_PV!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1f2445e2-5574-42c7-93d7-89ed02dcecb6_1800x700.png" width="1456" height="566" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/1f2445e2-5574-42c7-93d7-89ed02dcecb6_1800x700.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:566,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!S_PV!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1f2445e2-5574-42c7-93d7-89ed02dcecb6_1800x700.png 424w, https://substackcdn.com/image/fetch/$s_!S_PV!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1f2445e2-5574-42c7-93d7-89ed02dcecb6_1800x700.png 848w, https://substackcdn.com/image/fetch/$s_!S_PV!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1f2445e2-5574-42c7-93d7-89ed02dcecb6_1800x700.png 1272w, https://substackcdn.com/image/fetch/$s_!S_PV!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1f2445e2-5574-42c7-93d7-89ed02dcecb6_1800x700.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 buttonBase-GK1x3M"><svg aria-hidden="true" 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" class="icon-noB79L"><g><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 buttonBase-GK1x3M"><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 icon-noB79L"><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><span>The judge catches 45 of 50 failures, so TPR is 90%.</span></p><p><span>It correctly passes 40 of 50 acceptable outputs, so TNR is 80%.</span></p><p><span>The judge from the opening, which always predicts Pass, has a TPR of 0% despite its 95% accuracy.</span></p><p><span>Report the counts alongside the rates.</span></p><p><span>A result based on a handful of failures gives you little evidence about performance on future failures. When using these rates to make decisions, include a range that accounts for uncertainty from testing only a sample.</span></p><p><span>If people review the outputs the judge flags, measure precision too. It answers, </span><em><span>&#8220;Of the examples flagged Fail, how many were failures according to the human?&#8221;</span></em><span> In the illustrative table, that is 45 out of 55, or about 82%. Precision also depends on how common failures are. A test set with equal numbers of passes and failures may produce a different precision from what you&#8217;ll see with real users</span><a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-24" href="#footnote-24" target="_self">24</a><span>.</span></p><p><span>Your acceptable error rates depend on how you use the judge. Report TPR &amp; TNR separately.</span></p><p><span>Use these same tests to compare the models you could use as your judge.</span></p><h4 style="text-align: center;"><strong>&#167;</strong></h4><h2><strong><span>5. Choose the model using human labels</span></strong></h2><p><span>I like to use the most powerful model I can afford within my budget for cost &amp; response time.</span></p><p><span>This budget might be different than my primary model, depending on the number of examples I need to score.</span></p><p><span>Using the same model is usually fine because the judge is doing a different task than your main LLM. The judges I recommend make specific Pass or Fail decisions.</span></p><p><span>Compare the judge with human labels</span><a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-25" href="#footnote-25" target="_self">25</a><span> to check whether it works</span><a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-26" href="#footnote-26" target="_self">26</a><span>.</span></p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!02yr!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F162cc046-43eb-46a5-b9a3-1ca85f94ab59_809x500.jpeg" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!02yr!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F162cc046-43eb-46a5-b9a3-1ca85f94ab59_809x500.jpeg 424w, https://substackcdn.com/image/fetch/$s_!02yr!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F162cc046-43eb-46a5-b9a3-1ca85f94ab59_809x500.jpeg 848w, https://substackcdn.com/image/fetch/$s_!02yr!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F162cc046-43eb-46a5-b9a3-1ca85f94ab59_809x500.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!02yr!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F162cc046-43eb-46a5-b9a3-1ca85f94ab59_809x500.jpeg 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!02yr!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F162cc046-43eb-46a5-b9a3-1ca85f94ab59_809x500.jpeg" width="809" height="500" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/162cc046-43eb-46a5-b9a3-1ca85f94ab59_809x500.jpeg&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:500,&quot;width&quot;:809,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;An unvalidated LLM judge awards a medal to an LLM output.&quot;,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="An unvalidated LLM judge awards a medal to an LLM output." title="An unvalidated LLM judge awards a medal to an LLM output." srcset="https://substackcdn.com/image/fetch/$s_!02yr!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F162cc046-43eb-46a5-b9a3-1ca85f94ab59_809x500.jpeg 424w, https://substackcdn.com/image/fetch/$s_!02yr!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F162cc046-43eb-46a5-b9a3-1ca85f94ab59_809x500.jpeg 848w, https://substackcdn.com/image/fetch/$s_!02yr!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F162cc046-43eb-46a5-b9a3-1ca85f94ab59_809x500.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!02yr!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F162cc046-43eb-46a5-b9a3-1ca85f94ab59_809x500.jpeg 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 buttonBase-GK1x3M"><svg aria-hidden="true" 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" class="icon-noB79L"><g><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 buttonBase-GK1x3M"><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 icon-noB79L"><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 style="text-align: center;"><em><span>Check the judge against human labels, even when it uses a different model.</span></em></p><p><span>If the judge disagrees too often with human labels, inspect examples and prompt before trying another model.</span></p><p><span>You can optimize for cost later once you&#8217;ve established reliable evaluation criteria.</span></p><p><span>If prompt changes are not enough, you might consider further training the judge on labeled examples. This is called </span><em><span>fine-tuning</span></em><span>.</span></p><p><span>I prefer </span><em><span>not</span></em><span> to fine-tune LLM judges. I&#8217;d rather spend the effort fine-tuning the actual LLM instead</span><a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-27" href="#footnote-27" target="_self">27</a><span>.</span></p><h3><strong><span>What about TypeSafe&#8217;s Jev?</span></strong></h3><p><a href="https://typesafe.ai/"><span>TypeSafe&#8217;s Jev</span></a><span> has been very popular recently.</span></p><p><span>You may be wondering how it fits into this process. Jev returns decisions with probabilities, which makes it a useful example of how the same evaluation approach applies to different models.</span></p><p><span>An LLM judge is ultimately a &#8220;classifier&#8221;.</span></p><p><span>A classifier assigns an input to a category. In this newsletter, the input is an output you want to evaluate, and the categories are Pass and Fail. Choosing between two categories makes this a binary classifier.</span></p><p><span>You can use any approach you want to make those decisions, including Jev.</span></p><p><span>Validate the classifier against human labels so you know how well it works. Compare candidates on the same examples and measure TPR and TNR. You can then make a deliberate tradeoff between the mistakes each classifier makes and what it costs to run. For example, you might accept more missed failures for a lower cost, if those failures are inexpensive to fix.</span></p><p><span>Once the judge meets your requirements, keep checking it as your application changes.</span></p><h4 style="text-align: center;"><strong>&#167;</strong></h4><div class="captioned-button-wrap" data-attrs="{&quot;url&quot;:&quot;https://newsletter.systemdesign.one/p/how-to-build-llm-judge?utm_source=substack&utm_medium=email&utm_content=share&action=share&quot;,&quot;text&quot;:&quot;Share&quot;}" data-component-name="CaptionedButtonToDOM"><div class="preamble"><p class="cta-caption"><em><span data-color="#3a7bf9" style="color: rgb(58, 123, 249);">Get 3+ referrals &amp; I&#8217;ll send you Popular Interview Questions PDF!</span></em></p></div><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://newsletter.systemdesign.one/p/how-to-build-llm-judge?utm_source=substack&utm_medium=email&utm_content=share&action=share&quot;,&quot;text&quot;:&quot;Share&quot;}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://newsletter.systemdesign.one/p/how-to-build-llm-judge?utm_source=substack&utm_medium=email&utm_content=share&action=share"><span>Share</span></a></p></div><h4 style="text-align: center;"><strong>&#167;</strong></h4><h2><strong><span>6. Keep the judge useful</span></strong></h2><p><span>Changes to your application can produce outputs absent from the examples used to test the judge</span><a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-28" href="#footnote-28" target="_self">28</a><span>.</span></p><p><span>So continue to check the judge against human labels as you use it to review new interactions. Read the failures it identifies to decide what to fix in your application.</span></p><p><span>I conduct this human review at regular intervals and whenever something material changes. For example, if I update a model, I&#8217;ll rerun the process. Your product&#8217;s criteria can also change as you see more outputs. Update the rubric and relabel affected examples when that happens.</span></p><p><span>Have the expert review a sample that reflects the interactions your users have. Give extra attention to cases where the judge is least reliable.</span></p><p><span>For example, if I find an error, I&#8217;ll search for more examples I think might trigger the same error. However, I also do a bit of random sampling. Use the random sample to estimate how often users encounter errors.</span></p><p><span>Eval datasets naturally get stale as your product and users change. Review new interactions to find problems and update your examples or reference answers</span><a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-29" href="#footnote-29" target="_self">29</a><span>.</span></p><p><span>As your eval set changes, its scores may no longer be directly comparable with older scores. Track what changed before interpreting a higher or lower pass rate.</span></p><h4 style="text-align: center;"><strong>&#167;</strong></h4><h2><strong><span>Before you rely on the judge</span></strong></h2><p><span>Check these points before using the judge&#8217;s scores to make product decisions:</span></p><ul><li><p><span>Choose a specific failure you have observed in real outputs.</span></p></li><li><p><span>Have a domain expert label examples Pass or Fail and explain each decision.</span></p></li><li><p><span>Build the prompt from those rules and examples. Keep separate examples for the final test.</span></p></li><li><p><span>Measure how often the judge catches failures and accepts good outputs. Report the counts with the rates.</span></p></li><li><p><span>Repeat human review when your application or evaluation criteria change.</span></p></li></ul><p><span>If the judge misses too many failures or flags too many acceptable outputs, review the disagreements before using its scores.</span></p><h4 style="text-align: center;"><strong>&#167;</strong></h4><p><span>Thanks to </span><strong><a href="https://maven.com/parlance-labs/evals?promoCode=SYSTEMDESIGNONE-C7"><span>Hamel</span></a></strong><span> for writing this newsletter.</span></p><p><span>Read his </span><a href="https://hamel.dev/blog/posts/llm-judge/"><span>LLM judge guide</span></a><span> and </span><a href="https://hamel.dev/blog/posts/evals-faq/"><span>Evals FAQ</span></a><span> for more examples. He teaches the </span><a href="https://maven.com/parlance-labs/evals?promoCode=SYSTEMDESIGNONE-C7"><span>AI Evals course</span></a><span> with Shreya Shankar.</span></p><div><hr></div><p>If you find this newsletter valuable, share it with a friend, and subscribe if you haven&#8217;t already. There are <a href="http://newsletter.systemdesign.one/subscribe?group=true">group discounts</a>, <a href="http://newsletter.systemdesign.one/subscribe?gift=true">gift options</a>, and <a href="https://newsletter.systemdesign.one/leaderboard">referral rewards</a> available.</p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://newsletter.systemdesign.one/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe now&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://newsletter.systemdesign.one/subscribe?"><span>Subscribe now</span></a></p><div><hr></div><div class="captioned-image-container"><figure><a class="image-link image2" target="_blank" href="https://www.linkedin.com/in/nk-systemdesign-one/" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!68aQ!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe4eab3a0-fda8-4df8-b651-0f976b223e9a_320x320.png 424w, https://substackcdn.com/image/fetch/$s_!68aQ!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe4eab3a0-fda8-4df8-b651-0f976b223e9a_320x320.png 848w, https://substackcdn.com/image/fetch/$s_!68aQ!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe4eab3a0-fda8-4df8-b651-0f976b223e9a_320x320.png 1272w, https://substackcdn.com/image/fetch/$s_!68aQ!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe4eab3a0-fda8-4df8-b651-0f976b223e9a_320x320.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!68aQ!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe4eab3a0-fda8-4df8-b651-0f976b223e9a_320x320.png" width="160" height="160" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/e4eab3a0-fda8-4df8-b651-0f976b223e9a_320x320.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:320,&quot;width&quot;:320,&quot;resizeWidth&quot;:160,&quot;bytes&quot;:121414,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:&quot;https://www.linkedin.com/in/nk-systemdesign-one/&quot;,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://newsletter.systemdesign.one/i/136161496?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe4eab3a0-fda8-4df8-b651-0f976b223e9a_320x320.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_!68aQ!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe4eab3a0-fda8-4df8-b651-0f976b223e9a_320x320.png 424w, https://substackcdn.com/image/fetch/$s_!68aQ!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe4eab3a0-fda8-4df8-b651-0f976b223e9a_320x320.png 848w, https://substackcdn.com/image/fetch/$s_!68aQ!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe4eab3a0-fda8-4df8-b651-0f976b223e9a_320x320.png 1272w, https://substackcdn.com/image/fetch/$s_!68aQ!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe4eab3a0-fda8-4df8-b651-0f976b223e9a_320x320.png 1456w" sizes="100vw" loading="lazy"></picture><div></div></div></a><figcaption class="image-caption"><strong>Find me elsewhere: <a href="https://www.linkedin.com/in/nk-systemdesign-one/">LinkedIn</a> | <a href="https://x.com/intent/follow?screen_name=systemdesignone">Twitter</a> | <a href="https://www.instagram.com/systemdesignone/">Instagram</a></strong></figcaption></figure></div><div><hr></div><p>Thank you for supporting this newsletter.</p><p>You are now 250,001+ readers strong, very close to 251k. Let&#8217;s try to get 251k readers by 7 October. Consider sharing this letter with your friends and get rewards.</p><p>Y&#8217;all are the best.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!6oWl!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2e739087-a910-4643-be36-997b6dd5b4af_800x500.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!6oWl!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2e739087-a910-4643-be36-997b6dd5b4af_800x500.png 424w, https://substackcdn.com/image/fetch/$s_!6oWl!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2e739087-a910-4643-be36-997b6dd5b4af_800x500.png 848w, https://substackcdn.com/image/fetch/$s_!6oWl!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2e739087-a910-4643-be36-997b6dd5b4af_800x500.png 1272w, https://substackcdn.com/image/fetch/$s_!6oWl!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2e739087-a910-4643-be36-997b6dd5b4af_800x500.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!6oWl!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2e739087-a910-4643-be36-997b6dd5b4af_800x500.png" width="590" height="368.75" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/2e739087-a910-4643-be36-997b6dd5b4af_800x500.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:500,&quot;width&quot;:800,&quot;resizeWidth&quot;:590,&quot;bytes&quot;:87878,&quot;alt&quot;:&quot;system design newsletter&quot;,&quot;title&quot;:&quot;system design newsletter&quot;,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://newsletter.systemdesign.one/i/163380418?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2e739087-a910-4643-be36-997b6dd5b4af_800x500.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="system design newsletter" title="system design newsletter" srcset="https://substackcdn.com/image/fetch/$s_!6oWl!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2e739087-a910-4643-be36-997b6dd5b4af_800x500.png 424w, https://substackcdn.com/image/fetch/$s_!6oWl!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2e739087-a910-4643-be36-997b6dd5b4af_800x500.png 848w, https://substackcdn.com/image/fetch/$s_!6oWl!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2e739087-a910-4643-be36-997b6dd5b4af_800x500.png 1272w, https://substackcdn.com/image/fetch/$s_!6oWl!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2e739087-a910-4643-be36-997b6dd5b4af_800x500.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 buttonBase-GK1x3M"><svg aria-hidden="true" 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" class="icon-noB79L"><g><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 buttonBase-GK1x3M"><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 icon-noB79L"><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 class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://newsletter.systemdesign.one/p/how-to-build-llm-judge?utm_source=substack&utm_medium=email&utm_content=share&action=share&quot;,&quot;text&quot;:&quot;Share&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://newsletter.systemdesign.one/p/how-to-build-llm-judge?utm_source=substack&utm_medium=email&utm_content=share&action=share"><span>Share</span></a></p><div class="footnote" data-component-name="FootnoteToDOM"><a id="footnote-1" href="#footnote-anchor-1" class="footnote-number" contenteditable="false" target="_self">1</a><div class="footnote-content"><p><strong>Code</strong> means traditional software logic written with explicit rules.</p></div></div><div class="footnote" data-component-name="FootnoteToDOM"><a id="footnote-2" href="#footnote-anchor-2" class="footnote-number" contenteditable="false" target="_self">2</a><div class="footnote-content"><p>Hamel Husain, <a href="https://hamel.dev/blog/posts/llm-judge/">Using LLM-as-a-Judge for Evaluation</a>. The query prompt is shortened and generalized, with its outcome label changed to Fail.</p></div></div><div class="footnote" data-component-name="FootnoteToDOM"><a id="footnote-3" href="#footnote-anchor-3" class="footnote-number" contenteditable="false" target="_self">3</a><div class="footnote-content"><p>A<strong> metric</strong> measures some quality of an AI output and turns it into a <strong>score/result</strong>.</p><ul><li><p><strong>Helpfulness:</strong> How useful is the answer?</p></li><li><p><strong>Coherence:</strong> Does the answer make sense?</p></li><li><p><strong>Faithfulness:</strong> Does the answer stay supported by the provided source?</p></li><li><p><strong>Relevance:</strong> Does the answer address the question?</p></li></ul></div></div><div class="footnote" data-component-name="FootnoteToDOM"><a id="footnote-4" href="#footnote-anchor-4" class="footnote-number" contenteditable="false" target="_self">4</a><div class="footnote-content"><p>Because <strong>&#8220;helpfulness&#8221; and &#8220;source support&#8221; measure different properties</strong>.</p><p>Imagine the user asks:</p><blockquote><p><em>&#8220;Why did our database latency increase?&#8221;</em></p></blockquote><p>AI answers:</p><blockquote><p><em>&#8220;The latency increased because traffic doubled during the deployment. Adding read replicas would reduce the load.&#8221;</em></p></blockquote><p>That answer could look clear, relevant, and actionable. A generic <strong>helpfulness evaluator</strong> could therefore give it a high score.</p><p>But provided source only says:</p><blockquote><p><em>&#8220;Database latency increased from 50 ms to 120 ms.&#8221;</em></p></blockquote><p>The source says nothing about traffic doubling or read replicas. AI invented the explanation.</p><p>So you could have:</p><div class="highlighted_code_block" data-attrs="{&quot;language&quot;:&quot;plaintext&quot;,&quot;nodeId&quot;:&quot;7427f06f-7aa3-41b8-bb63-9ff6a008b3d2&quot;}" data-component-name="HighlightedCodeBlockToDOM"><pre class="shiki"><code class="language-plaintext">Helpfulness check &#8594; Pass
The response appears useful.

Source-support check &#8594; Fail
The source does not support the response&#8217;s claims.</code></pre></div></div></div><div class="footnote" data-component-name="FootnoteToDOM"><a id="footnote-5" href="#footnote-anchor-5" class="footnote-number" contenteditable="false" target="_self">5</a><div class="footnote-content"><p>Think of a generic score as a <em>filter that helps you decide what to inspect first.</em></p><p>Say you have 1,000 AI responses. A helpfulness score marks 50 of them as low quality.</p><p>Read some of those 50 yourself. You could notice the same failure several times, such as answers that ignore part of the user&#8217;s question. Now you have found a specific problem worth checking with an eval.</p><p>But the helpfulness score could miss other problems. So also review some random responses to discover failures the score did not catch.</p></div></div><div class="footnote" data-component-name="FootnoteToDOM"><a id="footnote-6" href="#footnote-anchor-6" class="footnote-number" contenteditable="false" target="_self">6</a><div class="footnote-content"><p>Imagine you have an AI customer support agent. You review 100 real conversations and write down every problem you see:</p><ul><li><p>8 responses gave the wrong refund policy.</p></li><li><p>5 responses ignored part of the customer&#8217;s question.</p></li><li><p>4 responses invented information.</p></li><li><p>3 responses were too long.</p></li></ul><p>You then group similar problems into categories such as wrong policy, incomplete answer, and unsupported claims.</p><p>This process is <strong>error analysis</strong>.</p><p>It tells you which problems actually occur in your AI system. You then create <strong>evals</strong> to detect the important problems automatically.</p><p>So the flow is:</p><div class="highlighted_code_block" data-attrs="{&quot;language&quot;:&quot;plaintext&quot;,&quot;nodeId&quot;:&quot;4d9d8cf1-b3aa-4f2e-a819-a05b8b24574f&quot;}" data-component-name="HighlightedCodeBlockToDOM"><pre class="shiki"><code class="language-plaintext">Review real interactions &#8594; find problems &#8594; group similar problems &#8594; create evals for those failures.</code></pre></div></div></div><div class="footnote" data-component-name="FootnoteToDOM"><a id="footnote-7" href="#footnote-anchor-7" class="footnote-number" contenteditable="false" target="_self">7</a><div class="footnote-content"><p>Hamel Husain, <a href="https://hamel.dev/blog/posts/evals-faq/why-is-error-analysis-so-important-in-llm-evals-and-how-is-it-performed.html">Why error analysis is important and how to perform it</a>.</p></div></div><div class="footnote" data-component-name="FootnoteToDOM"><a id="footnote-8" href="#footnote-anchor-8" class="footnote-number" contenteditable="false" target="_self">8</a><div class="footnote-content"><p>TLDR--Choose a failure worth judging (Personal notes from Neo):</p><ul><li><p>Start with real failures, rather than generic metrics, such as helpfulness or coherence.</p></li><li><p>Review real traces &amp; use error analysis to group recurring problems into failure categories.</p></li><li><p>Start with about 100 traces and manually review at least 30 before using an agent to help find similar failures.</p></li><li><p>Prioritize failures by how often they occur. Fix obvious prompt problems first.</p></li><li><p>Build an automated eval only for important failures that persist and require repeated checking.</p></li></ul></div></div><div class="footnote" data-component-name="FootnoteToDOM"><a id="footnote-9" href="#footnote-anchor-9" class="footnote-number" contenteditable="false" target="_self">9</a><div class="footnote-content"><p>Hamel Husain, <a href="https://hamel.dev/blog/posts/evals-faq/should-i-build-automated-evaluators-for-every-failure-mode-i-find.html">Should I build automated evaluators for every failure mode?</a>.</p></div></div><div class="footnote" data-component-name="FootnoteToDOM"><a id="footnote-10" href="#footnote-anchor-10" class="footnote-number" contenteditable="false" target="_self">10</a><div class="footnote-content"><p>TLDR--Establish the human standard (Personal notes from Neo):</p><ul><li><p>Choose one domain expert to define what good output looks like &amp; make final quality decisions.</p></li><li><p>Use binary Pass/Fail labels for each specific failure, plus a critique explaining the decision.</p></li><li><p>Turn the expert&#8217;s decisions and critiques into a rubric the LLM judge should follow.</p></li><li><p>Expect criteria drift as you discover new cases. Update the rubric and relabel affected examples.</p></li><li><p>If annotators disagree, discuss the cases, refine the rubric, and let the domain expert make the final decision.</p></li></ul></div></div><div class="footnote" data-component-name="FootnoteToDOM"><a id="footnote-11" href="#footnote-anchor-11" class="footnote-number" contenteditable="false" target="_self">11</a><div class="footnote-content"><p>Hamel Husain, <a href="https://hamel.dev/blog/posts/evals-faq/why-do-you-recommend-binary-passfail-evaluations-instead-of-1-5-ratings-likert-scales.html">Why use binary evaluations instead of 1-to-5 ratings?</a>.</p></div></div><div class="footnote" data-component-name="FootnoteToDOM"><a id="footnote-12" href="#footnote-anchor-12" class="footnote-number" contenteditable="false" target="_self">12</a><div class="footnote-content"><p>Hamel Husain, <a href="https://hamel.dev/blog/posts/field-guide/">A field guide to rapidly improving AI products</a>, discussing Shreya Shankar and colleagues' research on criteria drift.</p></div></div><div class="footnote" data-component-name="FootnoteToDOM"><a id="footnote-13" href="#footnote-anchor-13" class="footnote-number" contenteditable="false" target="_self">13</a><div class="footnote-content"><p>Hamel Husain, <a href="https://hamel.dev/blog/posts/evals-faq/how-many-people-should-annotate-my-llm-outputs.html">How many people should annotate outputs?</a>.</p></div></div><div class="footnote" data-component-name="FootnoteToDOM"><a id="footnote-14" href="#footnote-anchor-14" class="footnote-number" contenteditable="false" target="_self">14</a><div class="footnote-content"><p>Think of the <strong>judge&#8217;s prompt</strong> as an instruction manual for the LLM judge.</p><ul><li><p><strong>Evaluation rules:</strong> The rules that define what counts as Pass or Fail.</p><ul><li><p>Example: &#8220;The generated query must answer the user&#8217;s full request.&#8221;</p></li><li><p>Example: &#8220;If the query misses required information, mark it Fail.&#8221;</p></li></ul></li><li><p><strong>Labeled examples:</strong> Real examples where a human expert has already decided the correct result.</p><ul><li><p>User asks: &#8220;Show me the slowest trace.&#8221;</p></li><li><p>Generated query fails to identify the trace.</p></li><li><p>Human label: Fail</p></li><li><p>Critique: &#8220;The query finds the maximum duration but does not identify which trace had it.&#8221;</p></li></ul></li></ul><p>The LLM judge learns from both:</p><div class="highlighted_code_block" data-attrs="{&quot;language&quot;:&quot;plaintext&quot;,&quot;nodeId&quot;:&quot;01b83dbd-de14-4e41-869f-a7f12338134d&quot;}" data-component-name="HighlightedCodeBlockToDOM"><pre class="shiki"><code class="language-plaintext">Evaluation rules = what to look for
Labeled examples = what those rules look like in practice</code></pre></div></div></div><div class="footnote" data-component-name="FootnoteToDOM"><a id="footnote-15" href="#footnote-anchor-15" class="footnote-number" contenteditable="false" target="_self">15</a><div class="footnote-content"><p>Imagine you have an AI assistant that converts plain English into database queries.</p><p>You ask:</p><blockquote><p><em>&#8220;Show me the slowest trace.&#8221;</em></p></blockquote><p>A <strong>trace</strong> is the record of everything an application did while handling one request. Each trace has an ID and a duration.</p><p>Suppose the data looks like this:</p><pre><code><code>Trace A &#8594; 2 seconds
Trace B &#8594; 8 seconds
Trace C &#8594; 4 seconds</code></code></pre><p>The correct answer should identify:</p><blockquote><p>Trace B &#8594; 8 seconds</p></blockquote><p>But the generated query only calculates:</p><blockquote><p>Maximum duration &#8594; 8 seconds</p></blockquote><p>It does not return Trace B.</p><p>So the query found the longest duration, but it failed to answer which trace was the slowest. The LLM judge should therefore mark the query Fail.</p></div></div><div class="footnote" data-component-name="FootnoteToDOM"><a id="footnote-16" href="#footnote-anchor-16" class="footnote-number" contenteditable="false" target="_self">16</a><div class="footnote-content"><p>Hamel Husain, <a href="https://hamel.dev/blog/posts/llm-judge/">Using LLM-as-a-Judge for Evaluation</a>. The query prompt is shortened and generalized, with its outcome label changed to Fail.</p></div></div><div class="footnote" data-component-name="FootnoteToDOM"><a id="footnote-17" href="#footnote-anchor-17" class="footnote-number" contenteditable="false" target="_self">17</a><div class="footnote-content"><p>It means giving each LLM judge one specific job.</p><p>Suppose your AI customer-support agent has three possible failures:</p><ul><li><p><strong>Judge 1: Factual accuracy</strong> &#8594; Did the response contain incorrect information?</p></li><li><p><strong>Judge 2: Completeness</strong> &#8594; Did it answer the user&#8217;s full question?</p></li><li><p><strong>Judge 3: Source support</strong> &#8594; Does the provided source support the claims?</p></li></ul><p>Instead of asking one judge:</p><blockquote><p>&#8220;Is this response good overall?&#8221;</p></blockquote><p>you run three focused judges. Then you could get:</p><pre><code><code>Factual accuracy &#8594; Pass
Completeness &#8594; Fail
Source support &#8594; Pass</code></code></pre></div></div><div class="footnote" data-component-name="FootnoteToDOM"><a id="footnote-18" href="#footnote-anchor-18" class="footnote-number" contenteditable="false" target="_self">18</a><div class="footnote-content"><p>TLDR--Write a prompt from expert examples (Personal notes from Neo):</p><ul><li><p>Build the judge&#8217;s prompt from the expert&#8217;s evaluation rules, critiques &amp; labeled examples.</p></li><li><p>Include clear Pass &amp; Fail few-shot examples so the judge sees how to apply the rubric.</p></li><li><p>Keep each judge focused on one specific failure. Use separate judges for unrelated failures.</p></li><li><p>Compare the judge&#8217;s decisions with human labels &amp; use disagreements to improve the prompt.</p></li><li><p>Give the judge only the evidence it needs. Remove irrelevant context that could hurt accuracy.</p></li><li><p>Test the final judge on new examples you did not use to develop its prompt.</p></li></ul></div></div><div class="footnote" data-component-name="FootnoteToDOM"><a id="footnote-19" href="#footnote-anchor-19" class="footnote-number" contenteditable="false" target="_self">19</a><div class="footnote-content"><p>Hamel Husain, <a href="https://hamel.dev/blog/posts/evals-faq/how-much-of-a-trace-should-i-give-an-llm-judge.html">How much context should I give an LLM judge?</a>.</p></div></div><div class="footnote" data-component-name="FootnoteToDOM"><a id="footnote-20" href="#footnote-anchor-20" class="footnote-number" contenteditable="false" target="_self">20</a><div class="footnote-content"><p>TLDR--Check whether the judge catches failures (Personal notes from Neo):</p><ul><li><p>Validate the judge by comparing its decisions with human-labeled examples.</p></li><li><p>Split labeled examples into training, dev &amp; test sets before you start refining the prompt.</p></li><li><p>Use the training set for prompt examples, the dev set to improve the prompt &amp; the hidden test set for the final evaluation.</p></li><li><p>Measure failures &amp; passes separately with true positive rate (TPR) &amp; true negative rate (TNR). Add precision when you care about how many flagged outputs are real failures.</p></li><li><p>Inspect disagreements on the dev set to find missing rules, missing evidence &amp; incorrect human labels.</p></li><li><p>Keep the test set untouched. If you use its results to change the prompt, create a new test set for the next final evaluation.</p></li><li><p>Report sample counts alongside the metrics &amp; choose acceptable error rates based on the cost of missed failures and false alarms.</p></li></ul></div></div><div class="footnote" data-component-name="FootnoteToDOM"><a id="footnote-21" href="#footnote-anchor-21" class="footnote-number" contenteditable="false" target="_self">21</a><div class="footnote-content"><p>Think of it like studying for an exam. You split your labeled examples into three groups:</p><ul><li><p><strong>Training set = examples you study from</strong></p><ul><li><p>Put some of these Pass/Fail examples directly in the judge&#8217;s prompt.</p></li><li><p>They teach the judge what good and bad outputs look like.</p></li><li><p>You are not training the LLM itself.</p></li></ul></li><li><p><strong>Development set = practice exam</strong></p><ul><li><p>Run the judge on these examples.</p></li><li><p>Compare its answers with the correct human labels.</p></li><li><p>When it makes mistakes, improve the prompt and try again.</p></li><li><p>Never put these examples into the prompt.</p></li></ul></li><li><p><strong>Test set = final exam</strong></p><ul><li><p>Keep these examples hidden while you improve the prompt.</p></li><li><p>Once you finish, freeze the prompt and run it on the test set.</p></li><li><p>This tells you how well the judge performs on unseen examples.</p></li></ul></li></ul><p>So the workflow is:</p><div class="highlighted_code_block" data-attrs="{&quot;language&quot;:&quot;plaintext&quot;,&quot;nodeId&quot;:&quot;381e9b92-8831-4e92-9398-9ff72c6bbfa4&quot;}" data-component-name="HighlightedCodeBlockToDOM"><pre class="shiki"><code class="language-plaintext">Training set &#8594; build prompt &#8594; Dev set &#8594; improve prompt &#8594; Test set &#8594; measure final performance.</code></pre></div></div></div><div class="footnote" data-component-name="FootnoteToDOM"><a id="footnote-22" href="#footnote-anchor-22" class="footnote-number" contenteditable="false" target="_self">22</a><div class="footnote-content"><p>It means the percentage of your total collection of human-labeled examples for that specific failure.</p><p>For example, suppose you have 200 labeled examples:</p><ul><li><p><strong>10&#8211;20% training set:</strong> 20&#8211;40 examples used to help build the judge prompt.</p></li><li><p><strong>40&#8211;45% dev set:</strong> 80&#8211;90 examples used to test and improve the prompt.</p></li><li><p><strong>40&#8211;45% test set:</strong> 80&#8211;90 examples kept hidden for the final evaluation.</p></li></ul><p>So if you choose 10/45/45:</p><div class="highlighted_code_block" data-attrs="{&quot;language&quot;:&quot;plaintext&quot;,&quot;nodeId&quot;:&quot;24289ea3-7e75-4899-abee-a37897577e7b&quot;}" data-component-name="HighlightedCodeBlockToDOM"><pre class="shiki"><code class="language-plaintext">200 total labeled examples &#8594; 20 train + 90 dev + 90 test</code></pre></div></div></div><div class="footnote" data-component-name="FootnoteToDOM"><a id="footnote-23" href="#footnote-anchor-23" class="footnote-number" contenteditable="false" target="_self">23</a><div class="footnote-content"><p>Hamel Husain, <a href="https://hamel.dev/blog/posts/evals-faq/how-many-examples-do-i-need-for-an-eval.html">How many examples do I need for an eval?</a>.</p></div></div><div class="footnote" data-component-name="FootnoteToDOM"><a id="footnote-24" href="#footnote-anchor-24" class="footnote-number" contenteditable="false" target="_self">24</a><div class="footnote-content"><p>Hamel Husain, <a href="https://hamel.dev/blog/posts/revenge/">The revenge of the data scientist</a> and the validation section of his <a href="https://hamel.dev/blog/posts/llm-judge/#how-do-you-validate-an-llm-judge-against-human-labels">LLM judge guide</a>. The 100-example table is illustrative arithmetic.</p></div></div><div class="footnote" data-component-name="FootnoteToDOM"><a id="footnote-25" href="#footnote-anchor-25" class="footnote-number" contenteditable="false" target="_self">25</a><div class="footnote-content"><p>Hamel Husain, <a href="https://hamel.dev/blog/posts/evals-faq/can-i-use-the-same-model-for-both-the-main-task-and-evaluation.html">Can I use the same model for the task and evaluation?</a>.</p></div></div><div class="footnote" data-component-name="FootnoteToDOM"><a id="footnote-26" href="#footnote-anchor-26" class="footnote-number" contenteditable="false" target="_self">26</a><div class="footnote-content"><p>TLDR--Choose the model using human labels (Personal notes from Neo):</p><ul><li><p>Start with the most powerful judge model your cost &amp; response-time budget allows.</p></li><li><p>Validate every judge against the same human-labeled examples, even if you use a different model from your main LLM.</p></li><li><p>If the judge disagrees too often with humans, inspect the prompt &amp; examples before switching models.</p></li><li><p>Compare judge models using TPR &amp; TNR, then balance accuracy, cost &amp; response time.</p></li><li><p>Avoid fine-tuning the judge unless prompt improvements fail. Prioritize improving the main LLM instead.</p></li><li><p>Treat the judge in this guide as a binary classifier: it classifies each output as Pass or Fail.</p></li><li><p>Jev fits the same process. Validate its decisions against human labels &amp; compare its errors and cost with other judge models.</p></li></ul></div></div><div class="footnote" data-component-name="FootnoteToDOM"><a id="footnote-27" href="#footnote-anchor-27" class="footnote-number" contenteditable="false" target="_self">27</a><div class="footnote-content"><p>Hamel Husain, <a href="https://hamel.dev/blog/posts/llm-judge/">Using LLM-as-a-Judge for Evaluation</a>. The query prompt is shortened and generalized, with its outcome label changed to Fail.</p></div></div><div class="footnote" data-component-name="FootnoteToDOM"><a id="footnote-28" href="#footnote-anchor-28" class="footnote-number" contenteditable="false" target="_self">28</a><div class="footnote-content"><p>TLDR--Keep the judge useful (Personal notes from Neo):</p><ul><li><p>Keep validating the judge against human labels as your application changes.</p></li><li><p>Rerun human reviews after major changes, such as switching the model.</p></li><li><p>Update the rubric &amp; relabel affected examples when your evaluation criteria change.</p></li><li><p>Review real user interactions, with extra attention to cases where the judge performs poorly.</p></li><li><p>Use targeted examples to investigate known errors &amp; random samples to discover unexpected ones.</p></li><li><p>Refresh stale eval datasets with new interactions, examples &amp; reference answers.</p></li><li><p>Track changes to your eval set because newer scores may not be directly comparable with older scores.</p></li></ul></div></div><div class="footnote" data-component-name="FootnoteToDOM"><a id="footnote-29" href="#footnote-anchor-29" class="footnote-number" contenteditable="false" target="_self">29</a><div class="footnote-content"><p>Hamel Husain, <a href="https://hamel.dev/blog/posts/evals-faq/what-should-i-do-when-my-gold-eval-dataset-becomes-stale.html">What should I do when my eval dataset becomes stale?</a></p></div></div>]]></content:encoded></item><item><title><![CDATA[Realtime AI Agent - A Deep Dive]]></title><description><![CDATA[#182: Infrastructure layer behind realtime agents]]></description><link>https://newsletter.systemdesign.one/p/event-driven-ai-agent-architecture</link><guid isPermaLink="false">https://newsletter.systemdesign.one/p/event-driven-ai-agent-architecture</guid><dc:creator><![CDATA[Neo Kim]]></dc:creator><pubDate>Mon, 28 Sep 2026 16:05:47 GMT</pubDate><enclosure url="https://substack-post-media.s3.amazonaws.com/public/images/d649188d-e900-4a3a-8875-d924ee083787_1280x720.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p></p><div class="callout-block" data-callout="true"><p><span>I&#8217;m happy to partner with </span><strong><a href="https://link.svix.com/system-01">Svix</a></strong><span> on this newsletter.</span></p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://link.svix.com/system-01" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!v-ZP!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fde8a87d9-0b90-4a74-857c-be37bba398f2_2000x1047.png 424w, https://substackcdn.com/image/fetch/$s_!v-ZP!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fde8a87d9-0b90-4a74-857c-be37bba398f2_2000x1047.png 848w, https://substackcdn.com/image/fetch/$s_!v-ZP!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fde8a87d9-0b90-4a74-857c-be37bba398f2_2000x1047.png 1272w, https://substackcdn.com/image/fetch/$s_!v-ZP!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fde8a87d9-0b90-4a74-857c-be37bba398f2_2000x1047.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!v-ZP!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fde8a87d9-0b90-4a74-857c-be37bba398f2_2000x1047.png" width="1456" height="762" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/de8a87d9-0b90-4a74-857c-be37bba398f2_2000x1047.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:762,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:212365,&quot;alt&quot;:&quot;&quot;,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:&quot;https://link.svix.com/system-01&quot;,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:&quot;https://newsletter.systemdesign.one/i/211217193?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fde8a87d9-0b90-4a74-857c-be37bba398f2_2000x1047.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" title="" srcset="https://substackcdn.com/image/fetch/$s_!v-ZP!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fde8a87d9-0b90-4a74-857c-be37bba398f2_2000x1047.png 424w, https://substackcdn.com/image/fetch/$s_!v-ZP!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fde8a87d9-0b90-4a74-857c-be37bba398f2_2000x1047.png 848w, https://substackcdn.com/image/fetch/$s_!v-ZP!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fde8a87d9-0b90-4a74-857c-be37bba398f2_2000x1047.png 1272w, https://substackcdn.com/image/fetch/$s_!v-ZP!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fde8a87d9-0b90-4a74-857c-be37bba398f2_2000x1047.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 buttonBase-GK1x3M"><svg aria-hidden="true" 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" class="icon-noB79L"><g><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 buttonBase-GK1x3M"><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 icon-noB79L"><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>Agents are killing your apps with compounding polling across workflows.</p><p>Your customers want their agent workflows to be efficient, so you&#8217;re losing deals if you don&#8217;t make them event-driven. Webhooks solve this issue, but implementing them is harder than it looks.</p><p>If you homebrewed your webhooks and are getting pinged at 4 in the morning for failed deliveries, this is for you.</p><p><strong><a href="https://link.svix.com/system-01">Svix</a></strong> handles everything: retries, idempotency, security, and compliance. Qualified startups get $12,000 in free credits.</p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://link.svix.com/system-01&quot;,&quot;text&quot;:&quot;Get started for free&quot;,&quot;action&quot;:null,&quot;class&quot;:&quot;button-wrapper&quot;}" data-component-name="ButtonCreateButton"><a class="button primary button-wrapper" href="https://link.svix.com/system-01"><span>Get started for free</span></a></p></div><p><span>If you&#8217;ve used an AI agent</span><a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-1" href="#footnote-1" target="_self">1</a><span>, you&#8217;d have noticed how much it can do on its own&#8230;</span></p><p><span>Give it a task; it calls a few tools, then keeps going without you guiding every step.</span></p><p><span>But agents still are NOT good at one thing: </span><em><span>waiting</span></em><span>.</span></p><p><span>An agent would wait for someone to approve a request, a payment to go through, a deployment to finish, or a customer to reply. The agent has done its part, but what it&#8217;s waiting for might happen seconds later or not until tomorrow&#8230;</span></p><p><span>It could keep checking for an update every few seconds, but this&#8217;d become &#8220;wasteful&#8221; pretty quickly. i.e., the agent is still doing nothing except asking whether anything has changed.</span></p><p><span>A better approach is to let the system send an event when the change actually occurs. So the agent does not need to keep asking &amp; continues the workflow when the event arrives.</span></p><p><span>This is where &#8220;webhooks</span><a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-2" href="#footnote-2" target="_self">2</a><span>&#8221; become useful.</span></p><p><span>It lets one system notify another when something happens, and it's been running behind many apps you use daily, long before AI agents needed it.</span></p><p><span>Now apply that to everything an agent would wait on: payments, deployments, customer replies, or human approval.</span></p><p><span>Plus, handling one of these events is easy. Yet handling thousands of them reliably across different customers &amp; external systems gets </span>extremely <span>HARD&#8230;</span></p><p><span>In this newsletter, we&#8217;ll use </span><strong><a href="https://link.svix.com/system-01"><span>Svix</span></a></strong><span> as a case study &amp;</span> look at how it <span>solves this problem.</span></p><p><span>(</span><a href="https://link.svix.com/system-01">Svix</a><span> is a webhook infrastructure platform for reliable event delivery.)</span></p><h4 style="text-align: center;"><strong>&#167;</strong></h4><p></p><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://newsletter.systemdesign.one/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"><span data-color="#3a7bf9" style="color: rgb(58, 123, 249);">Get my system design playbook for FREE on newsletter signup:</span></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><ul><li><p><em><a href="https://newsletter.systemdesign.one/p/event-driven-ai-agent-architecture/?action=share">Share this letter</a> &amp; I&#8217;ll send you some rewards for the referrals.</em></p></li></ul><p><span>Onward.</span></p><h4 style="text-align: center;"><strong>&#167;</strong></h4><h2><span>What Is a Real-Time AI Agent</span></h2><p><span>What changes with a real-time agent is not how it </span><em><span>thinks</span></em><span>, but what it </span><em><span>hears</span></em><span>.</span></p><p><span>Let&#8217;s start with what an agent needs before getting into real-time&#8230;</span></p><h3><span>Agent Fundamentals</span></h3><p><span>Agents (real-time or not) run on these same parts:</span></p><ul><li><p><span>A Large Language Model</span><a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-3" href="#footnote-3" target="_self">3</a><span> (</span><strong><span>LLM</span></strong><span>) does the actual reasoning.</span></p></li><li><p><span>A decision loop</span><a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-4" href="#footnote-4" target="_self">4</a><span> lets it plan a step, take it, check the result, and decide what comes next.</span></p></li><li><p><span>Tools &amp; integrations let it act beyond generating text, such as sending requests, running commands, and/or calling APIs.</span></p></li><li><p><span>State tracks where it is in a task, so it doesn&#8217;t lose the thread halfway through.</span></p></li></ul><p><span>Without these pieces, you&#8217;re getting closer to a simple model response than an agent that can carry out a task.</span></p><p><span>Real-time is the layer on top of this&#8230;</span></p><h3><span>What Makes an Agent Real-Time</span></h3><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!51EX!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F15c77d33-c1b8-4ea0-897e-3e03657da311_1536x1024.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!51EX!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F15c77d33-c1b8-4ea0-897e-3e03657da311_1536x1024.png 424w, https://substackcdn.com/image/fetch/$s_!51EX!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F15c77d33-c1b8-4ea0-897e-3e03657da311_1536x1024.png 848w, https://substackcdn.com/image/fetch/$s_!51EX!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F15c77d33-c1b8-4ea0-897e-3e03657da311_1536x1024.png 1272w, https://substackcdn.com/image/fetch/$s_!51EX!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F15c77d33-c1b8-4ea0-897e-3e03657da311_1536x1024.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!51EX!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F15c77d33-c1b8-4ea0-897e-3e03657da311_1536x1024.png" width="1456" height="971" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/15c77d33-c1b8-4ea0-897e-3e03657da311_1536x1024.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:971,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!51EX!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F15c77d33-c1b8-4ea0-897e-3e03657da311_1536x1024.png 424w, https://substackcdn.com/image/fetch/$s_!51EX!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F15c77d33-c1b8-4ea0-897e-3e03657da311_1536x1024.png 848w, https://substackcdn.com/image/fetch/$s_!51EX!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F15c77d33-c1b8-4ea0-897e-3e03657da311_1536x1024.png 1272w, https://substackcdn.com/image/fetch/$s_!51EX!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F15c77d33-c1b8-4ea0-897e-3e03657da311_1536x1024.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 buttonBase-GK1x3M"><svg aria-hidden="true" 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" class="icon-noB79L"><g><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 buttonBase-GK1x3M"><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 icon-noB79L"><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><span>A typical agent workflow starts when you give it a task.</span></p><p><span>It works through steps, uses whatever tools it needs &amp; eventually finishes&#8230;</span></p><p>With a real-time agent, the work doesn&#8217;t end there. An external event could arrive after the original run ends, and the agent needs to resume the workflow when it does.</p><p><span>A payment could clear somewhere in the background a few minutes after the agent finished its original task. Instead of waiting for you to come back &amp; tell it, the agent could receive the event</span><a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-5" href="#footnote-5" target="_self">5</a><span> and continue the workflow on its own.</span></p><p><span>It can pick a workflow back up without another prompt from you. Nobody needs to open a new chat/type anything. An agent does the asking instead.</span></p><p><span>And it can act on something arriving well after the original task ended. The original agent run might already be complete by the time the event arrives, </span>and the agent still has to do something with it.</p><p><span>Also this brings up &#8220;latency&#8221;&#8230;</span></p><p><span>A real-time agent is NOT necessarily instant.</span></p><p><span>Latency occurs at several points in the workflow:</span></p><ul><li><p>Network adds some delay,</p></li><li><p>Model takes time to reason,</p></li><li><p><span>Tools &amp; external APIs take time to respond.</span></p></li></ul><p><span>So when we talk about a real-time agent, we&#8217;re really talking about keeping the entire path &#8220;responsive&#8221;, not just getting a fast response from the model.</span></p><p><span>If you put these together, a real-time agent isn&#8217;t just running one job well. It&#8217;s also sitting ready for whatever comes in later, on somebody&#8217;s schedule.</span></p><p><span>Now let&#8217;s look at how these pieces actually work together inside the agent&#8230;</span></p><h4 style="text-align: center;"><strong>&#167;</strong></h4><h2><span>Real-Time AI Agent Architecture</span></h2><p><span>A real-time agent is not one piece of code that does everything.</span></p><p><span>Instead, it&#8217;s a handful of layers, each with a different job&#8230;</span></p><p><span>The model handles the reasoning, deciding what to do next based on what it currently knows. Everything else in the agent supports this decision. It takes in input, takes action, and catches external events as they happen.</span></p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!de_i!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0759f6ae-6a0d-4d1e-9270-0a521d42e79e_1536x1024.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!de_i!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0759f6ae-6a0d-4d1e-9270-0a521d42e79e_1536x1024.png 424w, https://substackcdn.com/image/fetch/$s_!de_i!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0759f6ae-6a0d-4d1e-9270-0a521d42e79e_1536x1024.png 848w, https://substackcdn.com/image/fetch/$s_!de_i!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0759f6ae-6a0d-4d1e-9270-0a521d42e79e_1536x1024.png 1272w, https://substackcdn.com/image/fetch/$s_!de_i!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0759f6ae-6a0d-4d1e-9270-0a521d42e79e_1536x1024.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!de_i!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0759f6ae-6a0d-4d1e-9270-0a521d42e79e_1536x1024.png" width="1456" height="971" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/0759f6ae-6a0d-4d1e-9270-0a521d42e79e_1536x1024.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:971,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!de_i!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0759f6ae-6a0d-4d1e-9270-0a521d42e79e_1536x1024.png 424w, https://substackcdn.com/image/fetch/$s_!de_i!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0759f6ae-6a0d-4d1e-9270-0a521d42e79e_1536x1024.png 848w, https://substackcdn.com/image/fetch/$s_!de_i!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0759f6ae-6a0d-4d1e-9270-0a521d42e79e_1536x1024.png 1272w, https://substackcdn.com/image/fetch/$s_!de_i!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0759f6ae-6a0d-4d1e-9270-0a521d42e79e_1536x1024.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 buttonBase-GK1x3M"><svg aria-hidden="true" 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" class="icon-noB79L"><g><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 buttonBase-GK1x3M"><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 icon-noB79L"><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><span>Here&#8217;s what each layer does:</span></p><ul><li><p><strong>Interaction</strong>: Receives input from you/another system.</p></li><li><p><strong>Agent &amp; reasoning</strong>: Runs the model &amp; its decision loop.</p></li><li><p><strong>Tool &amp; integration</strong>: Performs actions on external systems.</p></li><li><p><strong>Event delivery</strong>: Brings external events into agent workflow.</p></li></ul><p>The<em> agent &amp; reasoning</em><span> layer runs the model and its decision loop.</span></p><p><span>The other layers support it by bringing in input, carrying out actions &amp; delivering external events.</span></p><h3><span>Synchronous vs Asynchronous Workflows</span></h3><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!jOgK!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdc66837c-39dd-4cf6-8282-566823cd16a9_1536x1024.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!jOgK!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdc66837c-39dd-4cf6-8282-566823cd16a9_1536x1024.png 424w, https://substackcdn.com/image/fetch/$s_!jOgK!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdc66837c-39dd-4cf6-8282-566823cd16a9_1536x1024.png 848w, https://substackcdn.com/image/fetch/$s_!jOgK!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdc66837c-39dd-4cf6-8282-566823cd16a9_1536x1024.png 1272w, https://substackcdn.com/image/fetch/$s_!jOgK!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdc66837c-39dd-4cf6-8282-566823cd16a9_1536x1024.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!jOgK!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdc66837c-39dd-4cf6-8282-566823cd16a9_1536x1024.png" width="1456" height="971" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/dc66837c-39dd-4cf6-8282-566823cd16a9_1536x1024.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:971,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!jOgK!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdc66837c-39dd-4cf6-8282-566823cd16a9_1536x1024.png 424w, https://substackcdn.com/image/fetch/$s_!jOgK!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdc66837c-39dd-4cf6-8282-566823cd16a9_1536x1024.png 848w, https://substackcdn.com/image/fetch/$s_!jOgK!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdc66837c-39dd-4cf6-8282-566823cd16a9_1536x1024.png 1272w, https://substackcdn.com/image/fetch/$s_!jOgK!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdc66837c-39dd-4cf6-8282-566823cd16a9_1536x1024.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 buttonBase-GK1x3M"><svg aria-hidden="true" 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" class="icon-noB79L"><g><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 buttonBase-GK1x3M"><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 icon-noB79L"><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><span>Some operations finish immediately&#8230;</span></p><p><span>Ask to look up an order status &amp; tool call returns the result within the same run.</span></p><p><span>Other operations don't finish right away&#8230;</span></p><p><span>Processing a file could take a minute. A payment can take a few seconds to clear, sometimes longer. An approval can sit unread for two days.</span></p><p><span>Synchronous operations return their result within the same run, so the agent could use it right away. Asynchronous operations don&#8217;t, and the workflow needs to continue once the result becomes available later.</span></p><p><span>When the result becomes available, the event gets delivered to the application, which then updates/resumes the agent&#8217;s workflow.</span></p><p><span>Let&#8217;s see how the event actually reaches the agent in the first place&#8230;</span></p><h4 style="text-align: center;"><strong>&#167;</strong></h4><div class="captioned-button-wrap" data-attrs="{&quot;url&quot;:&quot;https://newsletter.systemdesign.one/p/event-driven-ai-agent-architecture?utm_source=substack&utm_medium=email&utm_content=share&action=share&quot;,&quot;text&quot;:&quot;Share&quot;}" data-component-name="CaptionedButtonToDOM"><div class="preamble"><p class="cta-caption"><em><span data-color="#3a7bf9" style="color: rgb(58, 123, 249);">Get 1+ referral &amp; I&#8217;ll send you my Leetcode Master Template!</span></em></p></div><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://newsletter.systemdesign.one/p/event-driven-ai-agent-architecture?utm_source=substack&utm_medium=email&utm_content=share&action=share&quot;,&quot;text&quot;:&quot;Share&quot;}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://newsletter.systemdesign.one/p/event-driven-ai-agent-architecture?utm_source=substack&utm_medium=email&utm_content=share&action=share"><span>Share</span></a></p></div><h4 style="text-align: center;"><strong>&#167;</strong></h4><h2><span>How Real-Time AI Agents Connect to External Systems</span></h2><p><span>When an agent needs to react to something happening in another system, a webhook is one of the simplest ways to get the event to it.</span></p><p><span>One system notifies another when something happens. i.e., the receiving side does not need to check for changes repeatedly.</span></p><p><span>Webhooks are built for &#8220;discrete&#8221; events, not continuous streams of data.</span></p><p><span>A payment clearing counts as one. So does a build finishing or an approval landing in someone&#8217;s inbox. This is exactly the kind of event an agent needs to hear about to move a workflow forward.</span></p><p><span>The idea is simple, but it helps to see what actually happens when one of these events gets sent.</span></p><p><span>So let&#8217;s look at how webhooks work...</span></p><h3><span>How Webhooks Work</span></h3><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!p3md!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1a14d944-e5a4-4c45-a203-525878857658_1536x1024.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!p3md!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1a14d944-e5a4-4c45-a203-525878857658_1536x1024.png 424w, https://substackcdn.com/image/fetch/$s_!p3md!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1a14d944-e5a4-4c45-a203-525878857658_1536x1024.png 848w, https://substackcdn.com/image/fetch/$s_!p3md!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1a14d944-e5a4-4c45-a203-525878857658_1536x1024.png 1272w, https://substackcdn.com/image/fetch/$s_!p3md!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1a14d944-e5a4-4c45-a203-525878857658_1536x1024.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!p3md!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1a14d944-e5a4-4c45-a203-525878857658_1536x1024.png" width="1456" height="971" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/1a14d944-e5a4-4c45-a203-525878857658_1536x1024.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:971,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!p3md!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1a14d944-e5a4-4c45-a203-525878857658_1536x1024.png 424w, https://substackcdn.com/image/fetch/$s_!p3md!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1a14d944-e5a4-4c45-a203-525878857658_1536x1024.png 848w, https://substackcdn.com/image/fetch/$s_!p3md!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1a14d944-e5a4-4c45-a203-525878857658_1536x1024.png 1272w, https://substackcdn.com/image/fetch/$s_!p3md!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1a14d944-e5a4-4c45-a203-525878857658_1536x1024.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 buttonBase-GK1x3M"><svg aria-hidden="true" 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" class="icon-noB79L"><g><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 buttonBase-GK1x3M"><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 icon-noB79L"><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><span>Here&#8217;s how:</span></p><ol><li><p><span>An event occurs in the source system.</span></p></li><li><p><span>Source sends an HTTP POST to a configured endpoint.</span></p></li><li><p><span>The receiving application verifies the event &amp; triggers the appropriate workflow.</span></p></li><li><p><span>Sender records</span><a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-6" href="#footnote-6" target="_self">6</a><span> whether delivery succeeded/failed.</span></p></li></ol><p><span>Four steps, each depending on the last.</span></p><p><span>If you skip verification, anyone can send a fake event to the endpoint. Or if you skip recording the result, a failed delivery </span><em><span>disappears</span></em><span> without anybody noticing.</span></p><p><span>Webhooks work well for individual events, but real-time systems also deal with continuous </span>information <span>streams.</span></p><h3><span>Streaming vs Webhooks</span></h3><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!kogF!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff334ed7d-aa8c-4259-af31-369e00dcd303_1501x644.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!kogF!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff334ed7d-aa8c-4259-af31-369e00dcd303_1501x644.png 424w, https://substackcdn.com/image/fetch/$s_!kogF!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff334ed7d-aa8c-4259-af31-369e00dcd303_1501x644.png 848w, https://substackcdn.com/image/fetch/$s_!kogF!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff334ed7d-aa8c-4259-af31-369e00dcd303_1501x644.png 1272w, https://substackcdn.com/image/fetch/$s_!kogF!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff334ed7d-aa8c-4259-af31-369e00dcd303_1501x644.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!kogF!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff334ed7d-aa8c-4259-af31-369e00dcd303_1501x644.png" width="1456" height="625" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/f334ed7d-aa8c-4259-af31-369e00dcd303_1501x644.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:625,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!kogF!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff334ed7d-aa8c-4259-af31-369e00dcd303_1501x644.png 424w, https://substackcdn.com/image/fetch/$s_!kogF!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff334ed7d-aa8c-4259-af31-369e00dcd303_1501x644.png 848w, https://substackcdn.com/image/fetch/$s_!kogF!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff334ed7d-aa8c-4259-af31-369e00dcd303_1501x644.png 1272w, https://substackcdn.com/image/fetch/$s_!kogF!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff334ed7d-aa8c-4259-af31-369e00dcd303_1501x644.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 buttonBase-GK1x3M"><svg aria-hidden="true" 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" class="icon-noB79L"><g><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 buttonBase-GK1x3M"><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 icon-noB79L"><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><span>Real-time systems typically handle information in 2 ways:</span></p><ul><li><p><span>It keeps flowing continuously,</span></p></li><li><p><span>Or it gets sent when a specific event happens.</span></p></li></ul><p><em><span>Streaming</span></em><span> is useful when information needs to keep flowing.</span></p><p><span>A voice conversation, a live transcript, or an agent response generated token by token all need a connection that can keep data flowing.</span></p><p><em><span>Webhooks</span></em><span> solve a different problem.</span></p><p><span>They&#8217;re useful when something happens outside the agent, and the agent needs to know about it. The event happens once, and the system sends a notification instead of making the agent keep checking.</span></p><p><span>For real-time AI agents, both matter.</span></p><ul><li><p><span>Streaming keeps the user interaction responsive.</span></p></li><li><p><span>Webhooks handle everything happening around the agent that needs a response later.</span></p></li></ul><p><span>As the number of events and external systems grows, delivering those events reliably becomes hard.</span></p><p><span>Someone has to handle failed requests, retries, duplicate deliveries, and track what was delivered &amp; what wasn&#8217;t.</span></p><p><a href="https://link.svix.com/system-01"><span>Svix</span></a><span> handles this part of the stack&#8230;It provides the infrastructure for delivering webhook events to external systems, while the application stays focused on the agent itself.</span></p><p><span>Let&#8217;s understand the challenges of running webhook infrastructure reliably&#8230;</span></p><h4 style="text-align: center;"><strong>&#167;</strong></h4><div class="captioned-button-wrap" data-attrs="{&quot;url&quot;:&quot;https://newsletter.systemdesign.one/p/event-driven-ai-agent-architecture?utm_source=substack&utm_medium=email&utm_content=share&action=share&quot;,&quot;text&quot;:&quot;Share&quot;}" data-component-name="CaptionedButtonToDOM"><div class="preamble"><p class="cta-caption"><em><span data-color="#3a7bf9" style="color: rgb(58, 123, 249);">Get 2+ referrals &amp; I&#8217;ll send you my Interview Mistakes to Avoid PDF!</span></em></p></div><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://newsletter.systemdesign.one/p/event-driven-ai-agent-architecture?utm_source=substack&utm_medium=email&utm_content=share&action=share&quot;,&quot;text&quot;:&quot;Share&quot;}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://newsletter.systemdesign.one/p/event-driven-ai-agent-architecture?utm_source=substack&utm_medium=email&utm_content=share&action=share"><span>Share</span></a></p></div><h4 style="text-align: center;"><strong>&#167;</strong></h4><h2><span>Challenges of Building Real-Time AI Agents</span></h2><p><span>A webhook integration usually works fine in testing&#8230;</span></p><p><span>You send an event, watch it arrive &amp; everything looks good, so you move on.</span></p><p><span>Once you put it into production, things change. Servers go down mid-deploy, networks drop packets for reasons that aren&#8217;t always obvious, and traffic suddenly comes in bursts instead of at a steady rate.</span></p><p><span>None of these things are unusual in production, but they expose problems that you simply don&#8217;t see when you&#8217;re testing with a handful of events.</span></p><p><span>Most of the problems fall into a few recurring areas.</span></p><p><span>Let&#8217;s dive in!</span></p><h3><span>1. Reliable Delivery</span></h3><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!ks37!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F77cb39ca-5ea0-4f22-9ccd-1e067463e919_1536x1024.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!ks37!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F77cb39ca-5ea0-4f22-9ccd-1e067463e919_1536x1024.png 424w, https://substackcdn.com/image/fetch/$s_!ks37!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F77cb39ca-5ea0-4f22-9ccd-1e067463e919_1536x1024.png 848w, https://substackcdn.com/image/fetch/$s_!ks37!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F77cb39ca-5ea0-4f22-9ccd-1e067463e919_1536x1024.png 1272w, https://substackcdn.com/image/fetch/$s_!ks37!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F77cb39ca-5ea0-4f22-9ccd-1e067463e919_1536x1024.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!ks37!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F77cb39ca-5ea0-4f22-9ccd-1e067463e919_1536x1024.png" width="1456" height="971" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/77cb39ca-5ea0-4f22-9ccd-1e067463e919_1536x1024.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:971,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!ks37!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F77cb39ca-5ea0-4f22-9ccd-1e067463e919_1536x1024.png 424w, https://substackcdn.com/image/fetch/$s_!ks37!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F77cb39ca-5ea0-4f22-9ccd-1e067463e919_1536x1024.png 848w, https://substackcdn.com/image/fetch/$s_!ks37!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F77cb39ca-5ea0-4f22-9ccd-1e067463e919_1536x1024.png 1272w, https://substackcdn.com/image/fetch/$s_!ks37!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F77cb39ca-5ea0-4f22-9ccd-1e067463e919_1536x1024.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 buttonBase-GK1x3M"><svg aria-hidden="true" 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" class="icon-noB79L"><g><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 buttonBase-GK1x3M"><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 icon-noB79L"><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><span>An endpoint could go down during a production deploy&#8230;A webhook sent during that window then has nowhere to go.</span></p><p><span>You send it once and give up, and the event is gone. Whatever depended on it--an agent waiting to continue a workflow, or a customer expecting a receipt--never finds out anything happened at all.</span></p><p><span>Retries handle this; not by hammering the same failing endpoint over &amp; over.</span></p><p><span>Each attempt waits a little longer than the last, giving a struggling server time to recover before getting hit again. The event itself needs to sit somewhere durable while all this plays out too, so a crash on the sending side doesn&#8217;t erase it along the way.</span></p><p><span>And if every retry eventually runs out, the event needs somewhere to land instead of vanishing without a trace.</span></p><h3><span>2. Security and Verification</span></h3><p><span>Anyone who has the webhook endpoint&#8217;s URL could send a request.</span></p><p><span>Nothing about the endpoint itself tells the difference between a real event &amp; someone typing </span><code>curl</code><span> commands.</span></p><p><span>This is why legitimate events get signed before they&#8217;re sent. The receiving side checks the signature</span><a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-7" href="#footnote-7" target="_self">7</a><span>. A mismatch rejects the event, thus preventing forged events. A timestamp on the request helps prevent an old, legitimate request from being captured &amp; resent later. Also signing secret needs to be managed &amp; rotated over time without breaking existing endpoints.</span></p><p><span>One risk lies on the sending side instead&#8230;</span></p><p><span>Sending a webhook means requesting a URL provided by someone else. An unchecked URL could point somewhere it should not, such as an internal system instead of a real customer endpoint.</span></p><p><span>Guarding against it matters as much as verifying what comes in.</span></p><h3><span>3. Idempotency and Duplicate Events</span></h3><p><span>Occasionally, an agent does everything right &amp; still sees the same event twice.</span></p><p><span>It is NOT a bug. A delivery succeeds at the receiving end, but the confirmation gets lost on its way back to the sender. The sender has no way to know the event actually landed, so it tries again, and the same event arrives twice.</span></p><p><span>For most systems, a duplicate log entry is harmless.</span></p><p><span>Yet for an agent taking real action, it isn&#8217;t. Processing the same payment confirmation twice can mean sending a receipt twice, or worse, acting on the same instruction twice. A stable ID attached to every event, unchanged across every retry, lets the consumer tell the difference.</span></p><p><span>See the same ID again, skip it &amp; move on.</span></p><h3><span>4. Backpressure, Traffic Bursts, and Isolation</span></h3><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!8eZP!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1fc83393-c7c8-4bc9-b516-3f162c2b13f2_1481x618.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!8eZP!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1fc83393-c7c8-4bc9-b516-3f162c2b13f2_1481x618.png 424w, https://substackcdn.com/image/fetch/$s_!8eZP!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1fc83393-c7c8-4bc9-b516-3f162c2b13f2_1481x618.png 848w, https://substackcdn.com/image/fetch/$s_!8eZP!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1fc83393-c7c8-4bc9-b516-3f162c2b13f2_1481x618.png 1272w, https://substackcdn.com/image/fetch/$s_!8eZP!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1fc83393-c7c8-4bc9-b516-3f162c2b13f2_1481x618.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!8eZP!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1fc83393-c7c8-4bc9-b516-3f162c2b13f2_1481x618.png" width="1456" height="608" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/1fc83393-c7c8-4bc9-b516-3f162c2b13f2_1481x618.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:608,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!8eZP!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1fc83393-c7c8-4bc9-b516-3f162c2b13f2_1481x618.png 424w, https://substackcdn.com/image/fetch/$s_!8eZP!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1fc83393-c7c8-4bc9-b516-3f162c2b13f2_1481x618.png 848w, https://substackcdn.com/image/fetch/$s_!8eZP!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1fc83393-c7c8-4bc9-b516-3f162c2b13f2_1481x618.png 1272w, https://substackcdn.com/image/fetch/$s_!8eZP!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1fc83393-c7c8-4bc9-b516-3f162c2b13f2_1481x618.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 buttonBase-GK1x3M"><svg aria-hidden="true" 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" class="icon-noB79L"><g><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 buttonBase-GK1x3M"><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 icon-noB79L"><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><span>Two hundred events landing over an </span><em><span>hour</span></em><span> looks nothing like two hundred events landing in the same </span><em><span>second</span></em><span>.</span></p><p>Agents create this kind of burst when they run many tasks in parallel.</p><p>An agent could start 200 tasks at once. If many finish around the same time, they could generate a burst of completion events instead of a steady stream.</p><p>A slow-responding endpoint quickly becomes a bottleneck.</p><p><span>Deliveries pile up, and the backlog can spread into the rest of the system. Throttling</span><a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-8" href="#footnote-8" target="_self">8</a><span> keeps this contained by limiting how fast events go out to any one destination.</span></p><p><span>Plus, isolating each endpoint from the others matters just as much, so a single customer&#8217;s bad day never becomes everyone else&#8217;s.</span></p><h3><span>5. Event Ordering</span></h3><p><span>Two letters mailed on the same morning don&#8217;t always arrive in the order they were sent&#8230;One gets held up somewhere, and the other doesn&#8217;t.</span></p><p><span>Webhook events work the same way.</span></p><p><span>Update a subscription, then cancel it a moment later. The update event might fail and get retried while the cancellation goes through immediately. The cancellation shows up first. An agent would assume events always arrive in </span><em><span>order</span></em><span>. If an update arrives late, it&#8217;ll process it last and believe a canceled subscription is still active.</span></p><p><span>Consumers shouldn&#8217;t assume events will always arrive in order.</span></p><p><span>Handling this well means checking each event&#8217;s timestamp/version number before acting. This is safer than trusting the order in which events arrive. When strict ordering matters, you can enforce it by controlling how events get processed.</span></p><p><span>This could add latency &amp; delay later events.</span></p><h3><span>6. Observability and Recovery</span></h3><p><em><span>When a customer says an agent never responded to their approval, what&#8217;s the actual answer?</span></em></p><p><span>Without logging, there isn&#8217;t one. Nobody can say whether the event got sent, whether it arrived, or what happened after. A working system tracks every delivery attempt, the response it got, and each endpoint's current status.</span></p><p><span>This turns a vague complaint into something checkable, an exact record of when an event went out, what came back, and how many times it was retried. And once whatever broke gets fixed, replay</span><a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-9" href="#footnote-9" target="_self">9</a><span> sends the same event again, closing the gap instead of leaving it there permanently.</span></p><p><span>Delivery, security, duplicates, bursts, ordering, visibility (and so on) need someone to solve each of these. You can build them yourself or use existing standards and infrastructure to handle the pieces you don&#8217;t want to own.</span></p><p><span>Let&#8217;s look at what a production-ready webhook needs to provide&#8230;</span></p><h4 style="text-align: center;"><strong>&#167;</strong></h4><div class="callout-block" data-callout="true"><h3><a href="https://link.svix.com/system-01">We are in the middle of the agentic AI era, please take advantage of it</a></h3><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://link.svix.com/system-01" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!v-ZP!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fde8a87d9-0b90-4a74-857c-be37bba398f2_2000x1047.png 424w, https://substackcdn.com/image/fetch/$s_!v-ZP!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fde8a87d9-0b90-4a74-857c-be37bba398f2_2000x1047.png 848w, https://substackcdn.com/image/fetch/$s_!v-ZP!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fde8a87d9-0b90-4a74-857c-be37bba398f2_2000x1047.png 1272w, https://substackcdn.com/image/fetch/$s_!v-ZP!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fde8a87d9-0b90-4a74-857c-be37bba398f2_2000x1047.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!v-ZP!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fde8a87d9-0b90-4a74-857c-be37bba398f2_2000x1047.png" width="1456" height="762" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/de8a87d9-0b90-4a74-857c-be37bba398f2_2000x1047.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:762,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:212365,&quot;alt&quot;:&quot;&quot;,&quot;title&quot;:&quot;&quot;,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:&quot;https://link.svix.com/system-01&quot;,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://newsletter.systemdesign.one/i/211217193?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fde8a87d9-0b90-4a74-857c-be37bba398f2_2000x1047.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" title="" srcset="https://substackcdn.com/image/fetch/$s_!v-ZP!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fde8a87d9-0b90-4a74-857c-be37bba398f2_2000x1047.png 424w, https://substackcdn.com/image/fetch/$s_!v-ZP!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fde8a87d9-0b90-4a74-857c-be37bba398f2_2000x1047.png 848w, https://substackcdn.com/image/fetch/$s_!v-ZP!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fde8a87d9-0b90-4a74-857c-be37bba398f2_2000x1047.png 1272w, https://substackcdn.com/image/fetch/$s_!v-ZP!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fde8a87d9-0b90-4a74-857c-be37bba398f2_2000x1047.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 buttonBase-GK1x3M"><svg aria-hidden="true" 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" class="icon-noB79L"><g><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 buttonBase-GK1x3M"><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 icon-noB79L"><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>Agents can crush your app with compounding latency across workflows.</p><p>Your customers expect fast, efficient agent workflows. But if your agents keep polling for updates, you risk losing deals. Webhooks make workflows event-driven, but building reliable webhook infrastructure gets complicated fast.</p><p>If your homegrown webhooks have you waking up at 4 AM to fix failed deliveries, there&#8217;s a better way.</p><p><strong><a href="https://link.svix.com/system-01">Svix</a></strong> handles retries, idempotency, security &amp; compliance for you.</p><p><em>Qualified startups get $12,000 in free credits.</em></p><p><strong><a href="https://link.svix.com/system-01"><mark data-color="#ffff00" style="background-color: rgb(255, 255, 0); color: rgb(0, 0, 0);">Get started for free &#187;</mark></a></strong></p></div><h4 style="text-align: center;"><strong>&#167;</strong></h4><h2><span>What Real-Time AI Agents Need to Stay Reliable</span></h2><p><span>You still need to handle all these problems when you put a real-time agent into production.</span></p><p><span>You need a consistent way to identify events, verify their source, and make sure old requests can&#8217;t be reused.</span></p><p><span>This is where standard webhooks help. It gives you a common way to handle the security and verification side of webhook delivery, instead of having to define your own format and rules.</span></p><p><span>Let&#8217;s start with how a webhook gets identified &amp; verified...</span></p><h3><span>Webhook Identity and Signatures</span></h3><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!ExL3!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffcda41ef-068f-4848-994e-433864bda036_1534x557.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!ExL3!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffcda41ef-068f-4848-994e-433864bda036_1534x557.png 424w, https://substackcdn.com/image/fetch/$s_!ExL3!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffcda41ef-068f-4848-994e-433864bda036_1534x557.png 848w, https://substackcdn.com/image/fetch/$s_!ExL3!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffcda41ef-068f-4848-994e-433864bda036_1534x557.png 1272w, https://substackcdn.com/image/fetch/$s_!ExL3!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffcda41ef-068f-4848-994e-433864bda036_1534x557.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!ExL3!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffcda41ef-068f-4848-994e-433864bda036_1534x557.png" width="1456" height="529" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/fcda41ef-068f-4848-994e-433864bda036_1534x557.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:529,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!ExL3!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffcda41ef-068f-4848-994e-433864bda036_1534x557.png 424w, https://substackcdn.com/image/fetch/$s_!ExL3!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffcda41ef-068f-4848-994e-433864bda036_1534x557.png 848w, https://substackcdn.com/image/fetch/$s_!ExL3!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffcda41ef-068f-4848-994e-433864bda036_1534x557.png 1272w, https://substackcdn.com/image/fetch/$s_!ExL3!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffcda41ef-068f-4848-994e-433864bda036_1534x557.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 buttonBase-GK1x3M"><svg aria-hidden="true" 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" class="icon-noB79L"><g><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 buttonBase-GK1x3M"><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 icon-noB79L"><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><span>Every webhook carries a unique message ID, a timestamp showing when it was sent, and a signature that verifies its authenticity.</span></p><p><span>The signature itself uses </span><code>HMAC-SHA256</code><a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-10" href="#footnote-10" target="_self">10</a><span>.</span></p><p><span>It runs over the ID, timestamp, and raw payload</span><a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-11" href="#footnote-11" target="_self">11</a><span> together, using a secret known only to the sender and receiver. If you change even one character in the payload, then the signature no longer matches.</span></p><p><span>A receiver uses the same verification logic for any provider following the standard.</span></p><p><span>For an agent workflow, this means the application could verify an event before allowing it to trigger another action.</span></p><h3><span>Replay Protection and Key Rotation</span></h3><p><span>A valid signature proves a request came from the sender&#8230;yet it doesn&#8217;t prove the request is new&#8230;</span></p><p><span>Without a timestamp check, someone who captures a real request could resend it days later, and the signature would still pass. The receiver could enforce an acceptable timestamp window</span><a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-12" href="#footnote-12" target="_self">12</a><span>. This ensures a captured request eventually stops being usable.</span></p><p><span>Also secrets need to change occasionally, and a receiver still verifying against the old one shouldn&#8217;t break during the transition. The spec supports multiple signatures during secret rotation. This lets a receiver verify requests using either the old/new secret during the rotation window.</span></p><p><span>For an agent workflow, this matters when an event could trigger an action.</span></p><p><span>An old signed request shouldn&#8217;t be accepted as a new event just because its signature is still valid.</span></p><h3><span>Standardized Webhook Format</span></h3><p><span>A provider following the standard uses the </span><em><span>same</span></em><span> headers &amp; signing format.</span></p><p><span>Consumers could use one verification implementation across providers.</span></p><p><span>This is what makes interoperability</span><a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-13" href="#footnote-13" target="_self">13</a><span> possible. A team building a receiver can use one verification path for events from different providers. There is no need to write custom logic for each one.</span></p><p><span>Following the spec doesn&#8217;t remove the need for infrastructure behind it, though. Something still has to run the queues, retries, and delivery logic day to day.</span></p><p><span>Let&#8217;s look at how </span><a href="https://link.svix.com/system-01"><span>Svix</span></a><span> puts them into practice &amp; handles the infrastructure behind real-time AI agent events...</span></p><h4 style="text-align: center;"><strong>&#167;</strong></h4><h2><span>Svix: Platform That Connects AI Agents to Outside World</span></h2><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!cH6K!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe94941a8-2285-46e3-86a8-e6c73335141c_1536x577.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!cH6K!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe94941a8-2285-46e3-86a8-e6c73335141c_1536x577.png 424w, https://substackcdn.com/image/fetch/$s_!cH6K!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe94941a8-2285-46e3-86a8-e6c73335141c_1536x577.png 848w, https://substackcdn.com/image/fetch/$s_!cH6K!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe94941a8-2285-46e3-86a8-e6c73335141c_1536x577.png 1272w, https://substackcdn.com/image/fetch/$s_!cH6K!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe94941a8-2285-46e3-86a8-e6c73335141c_1536x577.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!cH6K!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe94941a8-2285-46e3-86a8-e6c73335141c_1536x577.png" width="1456" height="547" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/e94941a8-2285-46e3-86a8-e6c73335141c_1536x577.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:547,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!cH6K!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe94941a8-2285-46e3-86a8-e6c73335141c_1536x577.png 424w, https://substackcdn.com/image/fetch/$s_!cH6K!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe94941a8-2285-46e3-86a8-e6c73335141c_1536x577.png 848w, https://substackcdn.com/image/fetch/$s_!cH6K!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe94941a8-2285-46e3-86a8-e6c73335141c_1536x577.png 1272w, https://substackcdn.com/image/fetch/$s_!cH6K!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe94941a8-2285-46e3-86a8-e6c73335141c_1536x577.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 buttonBase-GK1x3M"><svg aria-hidden="true" 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" class="icon-noB79L"><g><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 buttonBase-GK1x3M"><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 icon-noB79L"><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><span>Every piece covered so far, including retries, signing, replay, ordering, and observability, has to actually run somewhere. None of it is optional once real customers depend on your agent reacting to real events.</span></p><p><a href="https://link.svix.com/system-01"><span>Svix</span></a><span> is built to be this somewhere.</span></p><p><span>Your application decides when something happened &amp; creates the event.</span></p><p><span>Svix handles delivery, including retries, security, and everything needed to get it to the right place reliably.</span></p><h3><span>How Svix Models Webhooks</span></h3><p><span>Svix tracks these for each webhook it sends</span><a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-14" href="#footnote-14" target="_self">14</a><span>:</span></p><ul><li><p><span>Application: customer/tenant on your platform.</span></p></li><li><p><span>Endpoint: actual URL to which you&#8217;re sending the event.</span></p></li><li><p><span>Message: event itself.</span></p></li><li><p><span>Event type: kind of event, such as a payment clearing or a task finishing, and determines which endpoints receive it.</span></p></li></ul><p><span>An application could have many endpoints&#8230;One event can reach several destinations, and you can use event-type subscriptions to control which events an endpoint receives.</span></p><h3><span>How an Event Moves Through Svix</span></h3><p><span>There are two ways events move through a real-time agent system</span><a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-15" href="#footnote-15" target="_self">15</a><span>:</span></p><h4><span>1. O</span>utbound events</h4><p><span>The agent or application produces an event when something happens.</span></p><p><span>This could be a tool call finishing or a workflow reaching a new state. The application sends that event to Svix through the API, and Svix delivers it to the configured downstream endpoints.</span></p><h4>2. Inbound events</h4><p><span>Something happens in an external system, and it sends an event back to the application.</span></p><p><span>Svix Ingest</span><a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-16" href="#footnote-16" target="_self">16</a><span> receives incoming webhooks. The application then processes the event and decides what the agent should do next. This could mean starting a new workflow or continuing one that was waiting for that event.</span></p><p><span>In both cases, the delivery happens separately from the agent&#8217;s main workflow.</span></p><p><span>The application doesn&#8217;t need to keep a connection open while the event is being delivered. It can keep the workflow state &amp; handle the event when it arrives.</span></p><h3><span>Queues, Workers, and Storage</span></h3><p><span>Behind the scenes, events go into a queue</span><a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-17" href="#footnote-17" target="_self">17</a><span> before they're delivered.</span></p><p><span>Once Svix accepts the event, separate workers handle delivery instead of making your application wait for it to finish.</span></p><p><span>The message &amp; its delivery state are stored along the way. This means a temporary problem at the destination doesn&#8217;t make the event disappear. You can retry or recover the delivery without keeping the original request open.</span></p><p><span>For an agent workflow that suddenly produces a hundred events at once, this matters.</span></p><p><span>Your application can hand those events to Svix without waiting for every downstream request to finish, while the delivery system works through them independently.</span></p><h3><span>How to implement Svix</span></h3><p><span>There are a couple of ways to get events into Svix</span><a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-18" href="#footnote-18" target="_self">18</a><span>:</span></p><p><span>The simplest approach is to send them directly from your application whenever something happens. If you already have your own event system and/or queue, you don&#8217;t have to replace it. You could have the system forward the events to Svix when they&#8217;re ready to be delivered.</span></p><p><span>From there, you can create the applications, endpoints, and event types you need through the Svix API. The application represents the customer/tenant; endpoints define where their events should go, and event types describe the kinds of events they could receive.</span></p><p><span>Also you could give customers control over their own webhook setup through the Svix Application Portal. So they manage their endpoints and inspect delivery activity themselves, rather than coming back to your team every time something needs to change.</span></p><h3><span>Reliable Delivery</span></h3><p><span>The normal delivery path is straightforward when the destination is &#8220;healthy&#8221;&#8230;The harder part happens when it is not&#8230;</span></p><p><span>An endpoint could be down during a deployment, take too long to respond, or start returning errors for a while. </span><a href="https://link.svix.com/system-01"><span>Svix</span></a><span> retries failed deliveries with backoff, giving the endpoint some time to recover instead of repeatedly sending requests at full speed.</span></p><p><span>If an endpoint keeps failing after retries are exhausted, you can recover the delivery once the underlying problem gets fixed.</span></p><h3><span>Security and Outbound Delivery</span></h3><p><span>Every event Svix sends gets signed&#8230;</span></p><p><span>So the receiving application could verify the webhook actually came from the expected sender &amp; has not been changed in transit. Also Svix includes a timestamp with the request. This could be checked along with the signature to prevent an old, valid request from being captured &amp; replayed later.</span></p><p><span>Signing secrets need to be changed from time to time as well.</span></p><p><span>Svix supports secret rotation by signing deliveries with both the old and new secret for 24 hours, thus giving endpoints time to switch to the new secret without interrupting delivery.</span></p><p><span>Also there is a risk on the other side of the connection.</span></p><p><span>Svix is making outbound requests to URLs provided by your customers, so those URLs can&#8217;t simply be trusted to point wherever they claim. Svix includes protections against server-side request forgery (</span><strong><span>SSRF</span></strong><a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-19" href="#footnote-19" target="_self">19</a><span>).</span></p><p><span>This helps prevent a webhook endpoint from reaching internal services or other destinations it shouldn&#8217;t be access</span><a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-20" href="#footnote-20" target="_self">20</a><span>.</span></p><h3><span>Observability and Scaling</span></h3><p><span>When a delivery fails, knowing that it failed is only the first part.</span></p><p><span>You also need to see what was sent, when it was sent, what the endpoint returned, and whether another attempt was made. Svix keeps a record of delivery attempts and their results, making it easier to see which endpoints are working &amp; which ones need attention.</span></p><p><span>As the number of events &amp; endpoints grow, some systems also need more control over how those events are delivered.</span></p><p><span>Svix supports ordered delivery when event order matters, throttling when a particular endpoint shouldn&#8217;t receive events too quickly, and payload transformations when different consumers need the same event in a different format.</span></p><p><span>Plus, it supports multi-region delivery for setups with regional or data residency</span><a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-21" href="#footnote-21" target="_self">21</a><span> requirements. These aren&#8217;t things every agent needs, but they become useful when the same event infrastructure has to serve larger or more distributed systems</span><a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-22" href="#footnote-22" target="_self">22</a><span>.</span></p><h4 style="text-align: center;"><strong>&#167;</strong></h4><div class="captioned-button-wrap" data-attrs="{&quot;url&quot;:&quot;https://newsletter.systemdesign.one/p/event-driven-ai-agent-architecture?utm_source=substack&utm_medium=email&utm_content=share&action=share&quot;,&quot;text&quot;:&quot;Share&quot;}" data-component-name="CaptionedButtonToDOM"><div class="preamble"><p class="cta-caption"><em><span data-color="#3a7bf9" style="color: rgb(58, 123, 249);">Get 3+ referrals &amp; I&#8217;ll send you Popular Interview Questions PDF!</span></em></p></div><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://newsletter.systemdesign.one/p/event-driven-ai-agent-architecture?utm_source=substack&utm_medium=email&utm_content=share&action=share&quot;,&quot;text&quot;:&quot;Share&quot;}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://newsletter.systemdesign.one/p/event-driven-ai-agent-architecture?utm_source=substack&utm_medium=email&utm_content=share&action=share"><span>Share</span></a></p></div><h4 style="text-align: center;"><strong>&#167;</strong></h4><h2><span>How Realtime AI Agents Handle Events and Actions</span></h2><p>Let&#8217;s look at what happens on the agent&#8217;s side once one of these events arrives&#8230;</p><h3><span>Tool Calling and Asynchronous Actions</span></h3><p><span>The model does not actually run the tool; your application does</span><a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-23" href="#footnote-23" target="_self">23</a><span>.</span></p><p><span>It decides which one to call &amp; what to pass into it. Most of the time, the result comes back before the model finishes forming its next sentence.</span></p><p><span>It isn&#8217;t always this quick, though&#8230;</span></p><p><span>Waiting on a slow third-party API or generating something heavy like a video can take minutes instead of seconds. And the application cannot keep the connection open for the entire process.</span></p><p><span>Once the result is ready, a completion event can tell the application to continue the workflow. The application can use the workflow/run ID stored with the agent&#8217;s state to find the right workflow and resume where it left off.</span></p><p><span>This event still needs reliable delivery to arrive successfully.</span></p><p><span>It uses the same durable delivery and retry logic covered earlier, but the trigger is a finished tool call instead of an external webhook.</span></p><h3><span>Agent Workflows and External Events</span></h3><p><span>An agent can also have workflows that depend on something happening outside its own application.</span></p><p><span>It might start a task and then wait for an external event before it can continue. Instead of constantly checking for updates, the agent can wait for that event and continue when it arrives.</span></p><p><span>For example, a coding agent might be waiting for an update to an issue before it can continue. Once that update arrives, the application can use the event to decide what the agent should do next.</span></p><p><span>Svix Ingest handles the incoming side of the workflow.</span></p><p><span>External systems send their webhooks to Ingest, which receives and verifies them before passing them to the application. The application can then use the event to start or continue the agent&#8217;s workflow.</span></p><p><span>As an agent works with more external systems, one place to handle incoming events means you don&#8217;t need separate webhook handling for each integration.</span></p><h3><span>Human-in-the-Loop Agents</span></h3><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!zQTd!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F360d4718-36b3-43c9-bcec-fd93db488dcb_1774x450.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!zQTd!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F360d4718-36b3-43c9-bcec-fd93db488dcb_1774x450.png 424w, https://substackcdn.com/image/fetch/$s_!zQTd!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F360d4718-36b3-43c9-bcec-fd93db488dcb_1774x450.png 848w, https://substackcdn.com/image/fetch/$s_!zQTd!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F360d4718-36b3-43c9-bcec-fd93db488dcb_1774x450.png 1272w, https://substackcdn.com/image/fetch/$s_!zQTd!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F360d4718-36b3-43c9-bcec-fd93db488dcb_1774x450.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!zQTd!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F360d4718-36b3-43c9-bcec-fd93db488dcb_1774x450.png" width="1456" height="369" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/360d4718-36b3-43c9-bcec-fd93db488dcb_1774x450.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:369,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!zQTd!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F360d4718-36b3-43c9-bcec-fd93db488dcb_1774x450.png 424w, https://substackcdn.com/image/fetch/$s_!zQTd!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F360d4718-36b3-43c9-bcec-fd93db488dcb_1774x450.png 848w, https://substackcdn.com/image/fetch/$s_!zQTd!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F360d4718-36b3-43c9-bcec-fd93db488dcb_1774x450.png 1272w, https://substackcdn.com/image/fetch/$s_!zQTd!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F360d4718-36b3-43c9-bcec-fd93db488dcb_1774x450.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 buttonBase-GK1x3M"><svg aria-hidden="true" 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" class="icon-noB79L"><g><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 buttonBase-GK1x3M"><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 icon-noB79L"><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><span>Some decisions genuinely need a person behind them, not just an agent&#8217;s best guess</span><a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-24" href="#footnote-24" target="_self">24</a><span>.</span></p><p><span>Say an agent drafts a refund &amp; needs someone to sign off before it actually goes out. It sends an event asking for approval and delivers it wherever the approver already works. This could be a Slack channel, an internal dashboard, or whatever&#8217;s already set up. The approval might not come for a day.</span></p><p><span>Once it does, the response comes back as an event too, and the workflow picks up right where it left off. Svix handles the delivery side by retrying failed deliveries and keeping a record of each attempt.</span></p><p><span>This means an approval sitting for a day doesn&#8217;t quietly vanish in transit.</span></p><h3><span>Local and Ephemeral Agents</span></h3><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!QNiA!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F324fd38b-dcaf-4b15-b81f-f8cae6df73b6_1536x1024.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!QNiA!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F324fd38b-dcaf-4b15-b81f-f8cae6df73b6_1536x1024.png 424w, https://substackcdn.com/image/fetch/$s_!QNiA!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F324fd38b-dcaf-4b15-b81f-f8cae6df73b6_1536x1024.png 848w, https://substackcdn.com/image/fetch/$s_!QNiA!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F324fd38b-dcaf-4b15-b81f-f8cae6df73b6_1536x1024.png 1272w, https://substackcdn.com/image/fetch/$s_!QNiA!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F324fd38b-dcaf-4b15-b81f-f8cae6df73b6_1536x1024.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!QNiA!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F324fd38b-dcaf-4b15-b81f-f8cae6df73b6_1536x1024.png" width="1456" height="971" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/324fd38b-dcaf-4b15-b81f-f8cae6df73b6_1536x1024.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:971,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!QNiA!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F324fd38b-dcaf-4b15-b81f-f8cae6df73b6_1536x1024.png 424w, https://substackcdn.com/image/fetch/$s_!QNiA!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F324fd38b-dcaf-4b15-b81f-f8cae6df73b6_1536x1024.png 848w, https://substackcdn.com/image/fetch/$s_!QNiA!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F324fd38b-dcaf-4b15-b81f-f8cae6df73b6_1536x1024.png 1272w, https://substackcdn.com/image/fetch/$s_!QNiA!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F324fd38b-dcaf-4b15-b81f-f8cae6df73b6_1536x1024.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 buttonBase-GK1x3M"><svg aria-hidden="true" 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" class="icon-noB79L"><g><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 buttonBase-GK1x3M"><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 icon-noB79L"><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><span>Not every agent has a public URL sitting around waiting for traffic.</span></p><p><span>One running on somebody&#8217;s laptop, or spun up for a single task and torn down right after, usually has no stable endpoint for a provider to send a webhook to. Setting one up just for this rarely makes sense &amp; sometimes isn&#8217;t even possible depending on where the agent runs.</span></p><p><span>Polling gives the agent another option.</span></p><p><span>Events arrive through Ingest, but the agent retrieves them when it connects instead of exposing a public webhook endpoint. It reaches out on its own schedule, using an existing outbound connection.</span></p><p><span>And it pulls whatever is waiting instead of needing somewhere for events to land</span><a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-25" href="#footnote-25" target="_self">25</a><span>.</span></p><h3><span>Designing Events for Agents</span></h3><p><span>Most of what an agent does internally never needs to become an event</span><a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-26" href="#footnote-26" target="_self">26</a><span>.</span></p><p><span>Whether a task actually finishes or an approval is requested matters more than every small decision along the way.</span></p><p><span>Naming matters here too:</span></p><p><code>agent.task.completed</code><span> tells anyone downstream exactly what happened. Something vague doesn&#8217;t, and now whoever&#8217;s consuming it is guessing. Svix keeps these event types in a catalog, so people integrating with your application can see which events are available &amp; what they represent.</span></p><p><span>Keep the payload limited to what a consumer actually needs. Version it if the shape changes, so existing consumers keep working.</span></p><p><span>All of this can be built by hand. At some point, though, it stops being a quick addition and turns into its own piece of infrastructure to maintain.</span></p><p><span>Let&#8217;s see how much of this infrastructure you actually want to own, and how much makes more sense to buy&#8230;</span></p><h4 style="text-align: center;"><strong>&#167;</strong></h4><h2><span>Build vs Buy for Realtime Agent Infrastructure</span></h2><p><span>Building a webhook endpoint yourself is not hard when it&#8217;s just your own systems talking to each other</span><a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-27" href="#footnote-27" target="_self">27</a><span>.</span></p><p><span>One service sends a request, another receives it, and if something breaks, you notice &amp; fix it. Yet once a customer is on the other end of this connection, the requirements start to change. Now they&#8217;re the ones who notice when a delivery fails, and they have no visibility into why or how to fix it.</span></p><p><span>A bug you&#8217;d normally get to eventually becomes a support ticket showing up today.</span></p><p><span>Handling a webhook for something internal is a tiny problem.</span></p><p><span>But handling it for a customer, reliably and at scale, is a much bigger problem. It&#8217;s worth being honest about which problem you&#8217;re actually solving before picking a path. The decision isn&#8217;t really about whether you can write a webhook endpoint.</span></p><p><span>It&#8217;s about how much of the surrounding infrastructure you want to own and maintain.</span></p><h3><span>Build Path</span></h3><p><span>Building your own makes sense in a few specific situations:</span></p><ul><li><p><span>Event volume is low, and only a handful of internal systems ever receive anything.</span></p></li><li><p><span>Requirements are specialized enough for no general-purpose tool to genuinely fit.</span></p></li><li><p><span>Reliability concerns, retries, durability, and observability are already handled by infrastructure you&#8217;re running for other reasons.</span></p></li><li><p><span>Webhook infrastructure itself is part of the core product you&#8217;re building, not something supporting it.</span></p></li></ul><p><span>None of these are edge cases nobody hits&#8230;Plenty of people genuinely sit in this exact spot, at least for a while.</span></p><h3><span>When Buying Makes Sense</span></h3><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!Vdgk!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4ac9fa14-02df-4089-9387-8b6d630aa438_1536x1024.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!Vdgk!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4ac9fa14-02df-4089-9387-8b6d630aa438_1536x1024.png 424w, https://substackcdn.com/image/fetch/$s_!Vdgk!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4ac9fa14-02df-4089-9387-8b6d630aa438_1536x1024.png 848w, https://substackcdn.com/image/fetch/$s_!Vdgk!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4ac9fa14-02df-4089-9387-8b6d630aa438_1536x1024.png 1272w, https://substackcdn.com/image/fetch/$s_!Vdgk!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4ac9fa14-02df-4089-9387-8b6d630aa438_1536x1024.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!Vdgk!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4ac9fa14-02df-4089-9387-8b6d630aa438_1536x1024.png" width="1456" height="971" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/4ac9fa14-02df-4089-9387-8b6d630aa438_1536x1024.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:971,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!Vdgk!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4ac9fa14-02df-4089-9387-8b6d630aa438_1536x1024.png 424w, https://substackcdn.com/image/fetch/$s_!Vdgk!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4ac9fa14-02df-4089-9387-8b6d630aa438_1536x1024.png 848w, https://substackcdn.com/image/fetch/$s_!Vdgk!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4ac9fa14-02df-4089-9387-8b6d630aa438_1536x1024.png 1272w, https://substackcdn.com/image/fetch/$s_!Vdgk!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4ac9fa14-02df-4089-9387-8b6d630aa438_1536x1024.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 buttonBase-GK1x3M"><svg aria-hidden="true" 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" class="icon-noB79L"><g><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 buttonBase-GK1x3M"><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 icon-noB79L"><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><span>A simple webhook is enough for a small internal setup.</span></p><p><span>The need for managed infrastructure comes when those events become part of a customer-facing product &amp; you need more control over delivery:</span></p><ul><li><p><span>Customers receive these webhooks, not just an internal system.</span></p></li><li><p><span>Endpoints and integrations multiply past what&#8217;s easy to track by hand.</span></p></li><li><p><span>Reliability &amp; observability stop being nice extras and start being expected.</span></p></li><li><p><span>Engineering time spent maintaining webhook infrastructure is time not spent on your actual product.</span></p></li></ul><p><span>As the number of customers and integrations grows, so does the amount of infrastructure around each one.</span></p><p><span>Each customer has its own endpoint and delivery requirements. Also you need to handle delivery failures &amp; ensure events arrive reliably.</span></p><p><span>The first webhook endpoint is easy to build.</span></p><p><span>But the work piles up when you add retries, security, replay, observability, and a customer-facing portal. The challenge grows as you keep all those pieces working together. This cost doesn&#8217;t show up on day one. It shows up gradually, as more customers sign up and more reliability work gets pushed down the backlog.</span></p><p><span>It looks like nice-to-have work and never quite gets done.</span></p><p><span>Whichever path fits, the underlying job doesn&#8217;t change. Something still has to ensure an event actually reaches the agent when it&#8217;s supposed to.</span></p><h4 style="text-align: center;"><strong>&#167;</strong></h4><h2><span>Closing Thoughts</span></h2><p><span>A real-time agent feels almost ordinary once everything works.</span></p><p><span>It just seems to know what to do next, picking a workflow back up the moment something changes, with no one having to nudge it along.</span></p><p><span>But beneath that smoothness runs an entire delivery system quietly in the background. Every piece covered here exists to ensure an event reaches the agent every single time. No one needs to think about the machinery behind it.</span></p><p><span>At this point, you should have a clear picture of what&#8217;s actually holding this together:</span></p><ul><li><p><span>Webhooks are the mechanism, notifying the agent the moment something happens instead of making it check over and over</span></p></li><li><p><span>Reliable delivery, security, idempotency, ordering, and observability are what turn a single HTTP request into something production can actually depend on</span></p></li><li><p><span>Standard webhooks give senders and receivers a shared way to identify and verify events, instead of every provider inventing its own format.</span></p></li><li><p><span>Svix runs this entire delivery layer, so building an agent doesn&#8217;t also mean building a second system just to keep it connected to the world around it.</span></p></li></ul><p><span>Once you see it laid out this way, a real-time agent stops looking like one clever piece of code&#8230; It&#8217;s a model wired into a delivery system built specifically to make sure nothing it&#8217;s waiting on ever slips through.</span></p><p><span>Agents will only take on more of this over time.</span></p><p><span>They will wait for more things to happen outside the conversation. They will also react to more of them with nobody watching. And the more an agent takes on, the more its reliability depends on one thing nobody notices until it breaks.</span></p><p><span>The events it waits for must actually show up.</span></p><h4 style="text-align: center;"><strong>&#167;</strong></h4><div class="callout-block" data-callout="true"><h2><a href="https://link.svix.com/system-01">Make your agents realtime</a></h2><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://link.svix.com/system-01" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!v-ZP!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fde8a87d9-0b90-4a74-857c-be37bba398f2_2000x1047.png 424w, https://substackcdn.com/image/fetch/$s_!v-ZP!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fde8a87d9-0b90-4a74-857c-be37bba398f2_2000x1047.png 848w, https://substackcdn.com/image/fetch/$s_!v-ZP!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fde8a87d9-0b90-4a74-857c-be37bba398f2_2000x1047.png 1272w, https://substackcdn.com/image/fetch/$s_!v-ZP!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fde8a87d9-0b90-4a74-857c-be37bba398f2_2000x1047.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!v-ZP!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fde8a87d9-0b90-4a74-857c-be37bba398f2_2000x1047.png" width="1456" height="762" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/de8a87d9-0b90-4a74-857c-be37bba398f2_2000x1047.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:762,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:212365,&quot;alt&quot;:&quot;&quot;,&quot;title&quot;:&quot;&quot;,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:&quot;https://link.svix.com/system-01&quot;,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://newsletter.systemdesign.one/i/211217193?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fde8a87d9-0b90-4a74-857c-be37bba398f2_2000x1047.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" title="" srcset="https://substackcdn.com/image/fetch/$s_!v-ZP!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fde8a87d9-0b90-4a74-857c-be37bba398f2_2000x1047.png 424w, https://substackcdn.com/image/fetch/$s_!v-ZP!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fde8a87d9-0b90-4a74-857c-be37bba398f2_2000x1047.png 848w, https://substackcdn.com/image/fetch/$s_!v-ZP!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fde8a87d9-0b90-4a74-857c-be37bba398f2_2000x1047.png 1272w, https://substackcdn.com/image/fetch/$s_!v-ZP!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fde8a87d9-0b90-4a74-857c-be37bba398f2_2000x1047.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 buttonBase-GK1x3M"><svg aria-hidden="true" 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" class="icon-noB79L"><g><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 buttonBase-GK1x3M"><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 icon-noB79L"><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>Slow agent workflows kill the user experience &amp; can cost you deals.</p><p>Polling adds latency at every step. Webhooks let your agents react to events as they happen, but building reliable webhook infrastructure means dealing with retries, failed deliveries, security &amp; compliance.</p><p>If your homegrown webhooks keep breaking and waking you up at 4 AM, <strong><a href="https://link.svix.com/system-01">Svix</a></strong> handles the hard parts for you.</p><p>Retries, idempotency, security &amp; compliance are built in.</p><p>Qualified startups get <strong>$</strong>12,000 in free credits.</p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://link.svix.com/system-01&quot;,&quot;text&quot;:&quot;Get started for free&quot;,&quot;action&quot;:null,&quot;class&quot;:&quot;button-wrapper&quot;}" data-component-name="ButtonCreateButton"><a class="button primary button-wrapper" href="https://link.svix.com/system-01"><span>Get started for free</span></a></p></div><div><hr></div><p>If you find this newsletter valuable, share it with a friend, and subscribe if you haven&#8217;t already. There are <a href="http://newsletter.systemdesign.one/subscribe?group=true">group discounts</a>, <a href="http://newsletter.systemdesign.one/subscribe?gift=true">gift options</a> &amp; <a href="https://newsletter.systemdesign.one/leaderboard">referral rewards</a> available.</p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://newsletter.systemdesign.one/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe now&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://newsletter.systemdesign.one/subscribe?"><span>Subscribe now</span></a></p><div><hr></div><div class="captioned-image-container"><figure><a class="image-link image2" target="_blank" href="https://www.linkedin.com/in/nk-systemdesign-one/" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!68aQ!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe4eab3a0-fda8-4df8-b651-0f976b223e9a_320x320.png 424w, https://substackcdn.com/image/fetch/$s_!68aQ!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe4eab3a0-fda8-4df8-b651-0f976b223e9a_320x320.png 848w, https://substackcdn.com/image/fetch/$s_!68aQ!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe4eab3a0-fda8-4df8-b651-0f976b223e9a_320x320.png 1272w, https://substackcdn.com/image/fetch/$s_!68aQ!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe4eab3a0-fda8-4df8-b651-0f976b223e9a_320x320.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!68aQ!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe4eab3a0-fda8-4df8-b651-0f976b223e9a_320x320.png" width="160" height="160" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/e4eab3a0-fda8-4df8-b651-0f976b223e9a_320x320.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:320,&quot;width&quot;:320,&quot;resizeWidth&quot;:160,&quot;bytes&quot;:121414,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:&quot;https://www.linkedin.com/in/nk-systemdesign-one/&quot;,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://newsletter.systemdesign.one/i/136161496?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe4eab3a0-fda8-4df8-b651-0f976b223e9a_320x320.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_!68aQ!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe4eab3a0-fda8-4df8-b651-0f976b223e9a_320x320.png 424w, https://substackcdn.com/image/fetch/$s_!68aQ!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe4eab3a0-fda8-4df8-b651-0f976b223e9a_320x320.png 848w, https://substackcdn.com/image/fetch/$s_!68aQ!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe4eab3a0-fda8-4df8-b651-0f976b223e9a_320x320.png 1272w, https://substackcdn.com/image/fetch/$s_!68aQ!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe4eab3a0-fda8-4df8-b651-0f976b223e9a_320x320.png 1456w" sizes="100vw" loading="lazy"></picture><div></div></div></a><figcaption class="image-caption"><strong>Find me elsewhere: <a href="https://www.linkedin.com/in/nk-systemdesign-one/">LinkedIn</a> | <a href="https://x.com/intent/follow?screen_name=systemdesignone">Twitter</a> | <a href="https://www.instagram.com/systemdesignone/">Instagram</a></strong></figcaption></figure></div><div><hr></div><p><strong>Want to reach 250K+ tech professionals at scale? </strong>&#128240;</p><p>If your company wants to reach 250K+ tech professionals, <a href="https://newsletter.systemdesign.one/p/sponsorship">advertise with me</a>.</p><div><hr></div><p>Thank you for supporting this newsletter.</p><p>You are now 250,001+ readers strong, very close to 251k. Let&#8217;s try to get 251k readers by 7 October. Consider sharing this letter with your friends &amp; get rewards.</p><p>Y&#8217;all are the best.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!6oWl!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2e739087-a910-4643-be36-997b6dd5b4af_800x500.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!6oWl!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2e739087-a910-4643-be36-997b6dd5b4af_800x500.png 424w, https://substackcdn.com/image/fetch/$s_!6oWl!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2e739087-a910-4643-be36-997b6dd5b4af_800x500.png 848w, https://substackcdn.com/image/fetch/$s_!6oWl!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2e739087-a910-4643-be36-997b6dd5b4af_800x500.png 1272w, https://substackcdn.com/image/fetch/$s_!6oWl!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2e739087-a910-4643-be36-997b6dd5b4af_800x500.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!6oWl!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2e739087-a910-4643-be36-997b6dd5b4af_800x500.png" width="590" height="368.75" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/2e739087-a910-4643-be36-997b6dd5b4af_800x500.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:500,&quot;width&quot;:800,&quot;resizeWidth&quot;:590,&quot;bytes&quot;:87878,&quot;alt&quot;:&quot;system design newsletter&quot;,&quot;title&quot;:&quot;system design newsletter&quot;,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://newsletter.systemdesign.one/i/163380418?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2e739087-a910-4643-be36-997b6dd5b4af_800x500.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="system design newsletter" title="system design newsletter" srcset="https://substackcdn.com/image/fetch/$s_!6oWl!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2e739087-a910-4643-be36-997b6dd5b4af_800x500.png 424w, https://substackcdn.com/image/fetch/$s_!6oWl!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2e739087-a910-4643-be36-997b6dd5b4af_800x500.png 848w, https://substackcdn.com/image/fetch/$s_!6oWl!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2e739087-a910-4643-be36-997b6dd5b4af_800x500.png 1272w, https://substackcdn.com/image/fetch/$s_!6oWl!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2e739087-a910-4643-be36-997b6dd5b4af_800x500.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 buttonBase-GK1x3M"><svg aria-hidden="true" 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" class="icon-noB79L"><g><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 buttonBase-GK1x3M"><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 icon-noB79L"><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 class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://newsletter.systemdesign.one/p/event-driven-ai-agent-architecture?utm_source=substack&utm_medium=email&utm_content=share&action=share&quot;,&quot;text&quot;:&quot;Share&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://newsletter.systemdesign.one/p/event-driven-ai-agent-architecture?utm_source=substack&utm_medium=email&utm_content=share&action=share"><span>Share</span></a></p><div class="footnote" data-component-name="FootnoteToDOM"><a id="footnote-1" href="#footnote-anchor-1" class="footnote-number" contenteditable="false" target="_self">1</a><div class="footnote-content"><p>An AI agent is a system that uses an AI model to reason about a task, decide what to do, and take actions through tools and/or external systems to achieve a goal. </p><p>You ask it something, and it doesn&#8217;t just answer once and stop. It reasons through the problem, decides what to do next, and keeps going until the task actually gets done. Along the way, it can call tools, read files, hit an API, or whatever the job needs.</p></div></div><div class="footnote" data-component-name="FootnoteToDOM"><a id="footnote-2" href="#footnote-anchor-2" class="footnote-number" contenteditable="false" target="_self">2</a><div class="footnote-content"><p>A mechanism that allows one system to automatically send an HTTP request to another system when a specific event happens, instead of requiring the source-receiving system to repeatedly check for changes.</p></div></div><div class="footnote" data-component-name="FootnoteToDOM"><a id="footnote-3" href="#footnote-anchor-3" class="footnote-number" contenteditable="false" target="_self">3</a><div class="footnote-content"><p>An AI model trained on large amounts of data that can understand and generate text. In AI agents, LLMs are used to reason about a task and decide what to do next.</p></div></div><div class="footnote" data-component-name="FootnoteToDOM"><a id="footnote-4" href="#footnote-anchor-4" class="footnote-number" contenteditable="false" target="_self">4</a><div class="footnote-content"><p>The repeated process an AI agent uses to decide what to do, perform an action, examine the result, and decide what to do next.</p></div></div><div class="footnote" data-component-name="FootnoteToDOM"><a id="footnote-5" href="#footnote-anchor-5" class="footnote-number" contenteditable="false" target="_self">5</a><div class="footnote-content"><p>A signal that something has happened, which can trigger an application or agent to take action without someone having to ask it again.</p></div></div><div class="footnote" data-component-name="FootnoteToDOM"><a id="footnote-6" href="#footnote-anchor-6" class="footnote-number" contenteditable="false" target="_self">6</a><div class="footnote-content"><p>The sender uses the HTTP response status to determine whether the delivery attempt succeeded or failed.</p></div></div><div class="footnote" data-component-name="FootnoteToDOM"><a id="footnote-7" href="#footnote-anchor-7" class="footnote-number" contenteditable="false" target="_self">7</a><div class="footnote-content"><p>A cryptographic value attached to a message that allows the receiver to verify that it came from the expected sender and was not modified.</p></div></div><div class="footnote" data-component-name="FootnoteToDOM"><a id="footnote-8" href="#footnote-anchor-8" class="footnote-number" contenteditable="false" target="_self">8</a><div class="footnote-content"><p>Throttling means limiting how fast requests or events are sent to a destination.</p><p>For example, suppose your system suddenly has 1,000 webhook events ready to send, but the receiving endpoint can safely handle only 100 requests per second.</p><p>Without throttling:</p><p><code>1,000 events &#8594; sent immediately &#8594; endpoint may overload</code></p><p>With throttling:</p><p><code>1,000 events &#8594; max 100/sec &#8594; endpoint</code></p><p>The remaining events wait and get delivered as capacity becomes available.</p></div></div><div class="footnote" data-component-name="FootnoteToDOM"><a id="footnote-9" href="#footnote-anchor-9" class="footnote-number" contenteditable="false" target="_self">9</a><div class="footnote-content"><p>The process of sending a previously delivered event again, usually to retry processing it after a failure or other issue has been fixed.</p></div></div><div class="footnote" data-component-name="FootnoteToDOM"><a id="footnote-10" href="#footnote-anchor-10" class="footnote-number" contenteditable="false" target="_self">10</a><div class="footnote-content"><p>A method for creating a cryptographic signature using a shared secret and the SHA-256 hashing algorithm. It allows the receiver to verify that a message came from someone who knows the shared secret and was not modified.</p></div></div><div class="footnote" data-component-name="FootnoteToDOM"><a id="footnote-11" href="#footnote-anchor-11" class="footnote-number" contenteditable="false" target="_self">11</a><div class="footnote-content"><p>The exact original data sent in a request before it is parsed, reformatted, or otherwise modified by the receiving application.</p></div></div><div class="footnote" data-component-name="FootnoteToDOM"><a id="footnote-12" href="#footnote-anchor-12" class="footnote-number" contenteditable="false" target="_self">12</a><div class="footnote-content"><p>An allowed period around the time a webhook was sent during which the receiver will accept the request. Requests outside this period can be rejected to reduce the risk of replay attacks.</p></div></div><div class="footnote" data-component-name="FootnoteToDOM"><a id="footnote-13" href="#footnote-anchor-13" class="footnote-number" contenteditable="false" target="_self">13</a><div class="footnote-content"><p>The ability of different systems or services to work together using shared standards or interfaces.</p></div></div><div class="footnote" data-component-name="FootnoteToDOM"><a id="footnote-14" href="#footnote-anchor-14" class="footnote-number" contenteditable="false" target="_self">14</a><div class="footnote-content"><p>Think of Svix like a mail delivery system for events.</p><p>Suppose your AI agent finishes a task and needs to notify a customer.</p><ul><li><p>Application = Who gets the mail<br>Usually represents a customer or tenant.<br>Example: <code>Acme</code></p></li><li><p>Endpoint = Where to send it<br>The customer&#8217;s webhook URL.<br>Example: <code>https://acme.com/webhooks</code></p></li><li><p>Message = What happened<br>The actual event and its data.<br>Example: <code>Task #123 finished</code></p></li><li><p>Event type = What kind of thing happened<br>A label describing the event.<br>Example: <code>agent.task.completed</code></p></li></ul><p>The event type also helps control which endpoints should receive which events.</p><ul><li><p><code>Acme</code> &#8594; Application</p></li><li><p><code>https://acme.com/webhooks</code> &#8594; Endpoint</p></li><li><p><code>Task #123 finished</code> &#8594; Message</p></li><li><p><code>agent.task.completed</code> &#8594; Event type</p></li></ul><p>Svix needs to know who should receive the event, where to send it, what happened, and what type of event it is.</p></div></div><div class="footnote" data-component-name="FootnoteToDOM"><a id="footnote-15" href="#footnote-anchor-15" class="footnote-number" contenteditable="false" target="_self">15</a><div class="footnote-content"><ul><li><p><strong>Outbound:</strong> Agent does something &#8594; app sends an event to Svix &#8594; Svix delivers it to other systems.</p></li><li><p><strong>Inbound:</strong> Something happens in another system &#8594; Svix Ingest receives the event &#8594; app gives it to the agent &#8594; agent starts or continues its work.</p></li><li><p><strong>Why this helps:</strong> The agent doesn&#8217;t need to wait with a connection open. The app saves the workflow state and continues when the event arrives.</p></li></ul></div></div><div class="footnote" data-component-name="FootnoteToDOM"><a id="footnote-16" href="#footnote-anchor-16" class="footnote-number" contenteditable="false" target="_self">16</a><div class="footnote-content"><p>A Svix component for receiving incoming webhook events from external providers before they are passed into the application.</p></div></div><div class="footnote" data-component-name="FootnoteToDOM"><a id="footnote-17" href="#footnote-anchor-17" class="footnote-number" contenteditable="false" target="_self">17</a><div class="footnote-content"><p>Think of Svix like a delivery service with a waiting line:</p><ul><li><p><strong>Queue:</strong> Events wait here until they&#8217;re ready to be delivered.</p></li><li><p><strong>Workers:</strong> Pick events from the queue &amp; send them to the correct endpoints.</p></li><li><p><strong>Storage:</strong> Keeps the event and delivery status so they aren&#8217;t lost if something fails.</p></li><li><p><strong>Why it matters:</strong> Your app gives Svix the events and continues working. It doesn&#8217;t have to wait for every webhook to be delivered.</p></li><li><p><strong>If delivery fails:</strong> The event is still available, so delivery can be retried.</p></li></ul><div class="highlighted_code_block" data-attrs="{&quot;language&quot;:&quot;plaintext&quot;,&quot;nodeId&quot;:&quot;6b21577b-9e1c-49ea-821b-7c18e72b24f6&quot;}" data-component-name="HighlightedCodeBlockToDOM"><pre class="shiki"><code class="language-plaintext">App &#8594; Svix queue &#8594; Worker &#8594; Customer endpoint</code></pre></div><p>i.e., your app hands off the delivery work and moves on.</p></div></div><div class="footnote" data-component-name="FootnoteToDOM"><a id="footnote-18" href="#footnote-anchor-18" class="footnote-number" contenteditable="false" target="_self">18</a><div class="footnote-content"><ul><li><p><strong>Send events to Svix:</strong> Your app sends an event to Svix when something happens.</p></li><li><p><strong>Already have a queue?</strong> Keep it. Your queue can send events to Svix when they&#8217;re ready.</p></li><li><p><strong>Application:</strong> Usually represents your customer or tenant.</p></li><li><p><strong>Endpoint:</strong> The URL where that customer&#8217;s events should go.</p></li><li><p><strong>Event type:</strong> Describes what happened, such as <code>agent.task.completed</code>.</p></li><li><p><strong>Application Portal:</strong> Lets customers add/manage their own webhook endpoints and check deliveries.</p></li></ul><div class="highlighted_code_block" data-attrs="{&quot;language&quot;:&quot;plaintext&quot;,&quot;nodeId&quot;:&quot;829919b2-631e-4a49-99a2-393f3c052a5a&quot;}" data-component-name="HighlightedCodeBlockToDOM"><pre class="shiki"><code class="language-plaintext">Your app &#8594; Svix &#8594; Customer&#8217;s endpoint</code></pre></div><p>Svix handles the webhook delivery infrastructure for you.</p></div></div><div class="footnote" data-component-name="FootnoteToDOM"><a id="footnote-19" href="#footnote-anchor-19" class="footnote-number" contenteditable="false" target="_self">19</a><div class="footnote-content"><p><strong>SSRF</strong> = Server-Side Request Forgery.</p><ul><li><p>A customer gives Svix a webhook URL.</p></li><li><p>Svix&#8217;s server sends HTTP requests to that URL.</p></li><li><p>A malicious customer could provide a URL pointing to a private/internal service instead of a legitimate webhook endpoint.</p></li><li><p>If Svix blindly sends the request, the attacker could use Svix to reach systems they couldn&#8217;t access directly.</p></li></ul><p>For example:</p><p><code>Attacker &#8594; malicious webhook URL &#8594; Svix server &#8594; private internal service</code></p><p>So SSRF protection checks/restricts where the server is allowed to send requests.</p><blockquote><p>A security vulnerability where an attacker tricks a server into making requests to URLs or internal services that the attacker normally wouldn't be able to access.</p></blockquote></div></div><div class="footnote" data-component-name="FootnoteToDOM"><a id="footnote-20" href="#footnote-anchor-20" class="footnote-number" contenteditable="false" target="_self">20</a><div class="footnote-content"><ul><li><p><strong>Signature:</strong> Proves the webhook came from the expected sender &amp; wasn&#8217;t changed.</p></li><li><p><strong>Timestamp:</strong> Helps stop attackers from capturing a valid webhook &amp; sending it again later.</p></li><li><p><strong>Secret rotation:</strong> Lets you replace an old signing secret with a new one without breaking webhook delivery.</p></li><li><p><strong>SSRF protection:</strong> Stops malicious webhook URLs from making Svix access private/restricted systems.</p></li></ul><p>TLDR: Svix protects both the webhook receiver and the system sending the webhook.</p></div></div><div class="footnote" data-component-name="FootnoteToDOM"><a id="footnote-21" href="#footnote-anchor-21" class="footnote-number" contenteditable="false" target="_self">21</a><div class="footnote-content"><p>The requirement or practice of storing data within a specific geographic region or country, often because of legal, regulatory, or organizational requirements.</p></div></div><div class="footnote" data-component-name="FootnoteToDOM"><a id="footnote-22" href="#footnote-anchor-22" class="footnote-number" contenteditable="false" target="_self">22</a><div class="footnote-content"><ul><li><p><strong>Delivery logs:</strong> Show what Svix sent, when it sent it, what response came back, and whether it retried.</p></li><li><p><strong>Ordered delivery:</strong> Keeps events in the correct order when order matters.</p></li><li><p><strong>Throttling:</strong> Limits how quickly events are sent to an endpoint so it doesn&#8217;t get overwhelmed.</p></li><li><p><strong>Payload transformations:</strong> Changes an event&#8217;s format when different systems need different formats.</p></li><li><p><strong>Multi-region delivery:</strong> Helps deliver events across different geographic regions when needed.</p></li></ul><p>TLDR: Svix helps you see what happens to your webhooks and control how they&#8217;re delivered as your system grows.</p></div></div><div class="footnote" data-component-name="FootnoteToDOM"><a id="footnote-23" href="#footnote-anchor-23" class="footnote-number" contenteditable="false" target="_self">23</a><div class="footnote-content"><ul><li><p><strong>Model chooses the tool:</strong> It decides what tool to use and what information to send it.</p></li><li><p><strong>Application runs the tool:</strong> The application actually executes the tool call.</p></li><li><p><strong>Fast task:</strong> The result comes back quickly, and the agent continues.</p></li><li><p><strong>Slow task:</strong> Something like video generation could take minutes, so the workflow waits for the result.</p></li><li><p><strong>Completion event:</strong> When the task finishes, an event tells the application the result is ready.</p></li><li><p><strong>Resume:</strong> The application finds the saved workflow using its ID and continues the agent from where it stopped.</p></li></ul><div class="highlighted_code_block" data-attrs="{&quot;language&quot;:&quot;plaintext&quot;,&quot;nodeId&quot;:&quot;7932170d-8269-45e7-a9e2-3661c980db03&quot;}" data-component-name="HighlightedCodeBlockToDOM"><pre class="shiki"><code class="language-plaintext">Agent &#8594; Start task &#8594; Wait &#8594; Completion event &#8594; Resume agent</code></pre></div></div></div><div class="footnote" data-component-name="FootnoteToDOM"><a id="footnote-24" href="#footnote-anchor-24" class="footnote-number" contenteditable="false" target="_self">24</a><div class="footnote-content"><ul><li><p><strong>Agent needs approval:</strong> Some actions are too important for the agent to decide alone.</p></li><li><p><strong>Agent asks a human:</strong> For example, it asks someone to approve a refund.</p></li><li><p><strong>Agent waits:</strong> The approval could take minutes, hours, or even a day.</p></li><li><p><strong>Human responds:</strong> The approval comes back as an event.</p></li><li><p><strong>Agent continues:</strong> The workflow resumes from where it stopped.</p></li><li><p><strong>Svix handles delivery:</strong> It retries failed webhook deliveries and tracks delivery attempts.</p></li></ul><div class="highlighted_code_block" data-attrs="{&quot;language&quot;:&quot;plaintext&quot;,&quot;nodeId&quot;:&quot;af73141f-5acc-4c65-87d8-eac04a2999ab&quot;}" data-component-name="HighlightedCodeBlockToDOM"><pre class="shiki"><code class="language-plaintext">Agent &#8594; Ask for approval &#8594; Human decides &#8594; Approval event &#8594; Agent continues</code></pre></div><p>Svix is not inherently required for human-in-the-loop agents. You need it only if the approval workflow uses webhooks/events that need reliable delivery.</p><p>For your refund example, Svix could help in 2 places:</p><p><strong>1. Sending the approval request out</strong></p><p><code>Agent &#8594; Your app &#8594; Svix &#8594; Approval system</code></p><p>Svix makes sure the webhook reaches the external system. If delivery fails temporarily, Svix retries it.</p><p><strong>2. Receiving the approval back</strong></p><p>If you use Svix Ingest:</p><p><code>Approval system &#8594; Svix Ingest &#8594; Your app &#8594; Agent resumes</code></p><p>Svix Ingest receives the webhook &amp; reliably forwards it to your application.</p><p>So Svix&#8217;s job is event delivery, not approval logic. Your application still decides:</p><ul><li><p>when human approval is required</p></li><li><p>what the human is allowed to approve</p></li><li><p>how to save the paused workflow</p></li><li><p>what the agent does after approval</p></li></ul></div></div><div class="footnote" data-component-name="FootnoteToDOM"><a id="footnote-25" href="#footnote-anchor-25" class="footnote-number" contenteditable="false" target="_self">25</a><div class="footnote-content"><ul><li><p><strong>Problem:</strong> Some agents run on a laptop or exist only for a short time, so they don&#8217;t have a public URL where webhooks can reach them.</p></li><li><p><strong>External event happens:</strong> Event is received by Svix Ingest.</p></li><li><p><strong>Event waits:</strong> The local agent doesn&#8217;t need to be online when the event arrives.</p></li><li><p><strong>Agent checks for events:</strong> When the agent is ready, it connects outward to Svix &amp; retrieves the events waiting for it.</p></li><li><p><strong>Why this helps:</strong> You don&#8217;t need to expose your laptop or temporary agent to the internet with a public webhook endpoint.</p></li></ul><p>TLDR</p><div class="highlighted_code_block" data-attrs="{&quot;language&quot;:&quot;plaintext&quot;,&quot;nodeId&quot;:&quot;52eb7af1-323b-429b-b8d7-ade717404261&quot;}" data-component-name="HighlightedCodeBlockToDOM"><pre class="shiki"><code class="language-plaintext">External system &#8594; Svix Ingest &#8594; Event waits &#8594; Local agent retrieves it</code></pre></div><p>instead of:</p><div class="highlighted_code_block" data-attrs="{&quot;language&quot;:&quot;plaintext&quot;,&quot;nodeId&quot;:&quot;ef0eaaee-d0ad-401a-9aab-aee47e560ac3&quot;}" data-component-name="HighlightedCodeBlockToDOM"><pre class="shiki"><code class="language-plaintext">External system &#8594; Public URL on your laptop &#8594; Agent</code></pre></div></div></div><div class="footnote" data-component-name="FootnoteToDOM"><a id="footnote-26" href="#footnote-anchor-26" class="footnote-number" contenteditable="false" target="_self">26</a><div class="footnote-content"><ul><li><p><strong>Don&#8217;t create events for everything:</strong> Only important changes need events, such as a task finishing or approval being requested.</p></li><li><p><strong>Use clear names:</strong> <code>agent.task.completed</code> clearly tells other systems what happened.</p></li><li><p><strong>Event catalog:</strong> Svix keeps a list of available event types so consumers know what events they can receive.</p></li><li><p><strong>Keep payloads small:</strong> Send only the data the receiving system needs.</p></li><li><p><strong>Version changes:</strong> If you change the event format, use versions so existing integrations don&#8217;t break.</p></li></ul></div></div><div class="footnote" data-component-name="FootnoteToDOM"><a id="footnote-27" href="#footnote-anchor-27" class="footnote-number" contenteditable="false" target="_self">27</a><div class="footnote-content"><ul><li><p><strong>Internal webhooks are simpler:</strong> If both systems belong to you, you control both sides and can fix problems yourself.</p></li><li><p><strong>Customer webhooks are harder:</strong> Failed deliveries affect customers, so reliability matters much more.</p></li><li><p><strong>More infrastructure is needed:</strong> You may need retries, security, delivery logs, monitoring, and tools to recover failed events.</p></li><li><p><strong>Build:</strong> You create and maintain all of this infrastructure yourself.</p></li><li><p><strong>Buy:</strong> A webhook platform such as Svix handles much of the delivery infrastructure for you.</p></li></ul></div></div>]]></content:encoded></item><item><title><![CDATA[Spec Driven Development - A Deep Dive]]></title><description><![CDATA[#181: How AI Agents Build Enterprise Software at Scale]]></description><link>https://newsletter.systemdesign.one/p/spec-driven-development-ai-agents</link><guid isPermaLink="false">https://newsletter.systemdesign.one/p/spec-driven-development-ai-agents</guid><dc:creator><![CDATA[Neo Kim]]></dc:creator><pubDate>Sun, 27 Sep 2026 10:41:00 GMT</pubDate><enclosure url="https://substack-post-media.s3.amazonaws.com/public/images/ee0924ba-6cd0-4ba9-b4af-376acd499583_1280x720.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p></p><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://newsletter.systemdesign.one/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"><span data-color="#3a7bf9" style="color: rgb(58, 123, 249);">Get my system design playbook for FREE on newsletter signup:</span></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><ul><li><p><em><a href="https://newsletter.systemdesign.one/p/spec-driven-development-ai-agents/?action=share">Share this letter</a> &amp; I&#8217;ll send you some rewards for the referrals.</em></p></li></ul><div><hr></div><p>AI agents can write code&#8230;</p><p>But enterprise software is where things get HARD.</p><p>Imagine you ask an AI agent to move task notifications to a new system while preserving users&#8217; existing notification preferences.</p><p>The AI agent writes code, runs tests&#8230;everything &#8220;passes&#8221;.</p><p>But a user who turned off email notifications now receives an email when someone assigns them a task.</p><p>The code passes tests, but it does NOT <em>behave</em> the way you want.</p><p>A simple fix is to give the AI agent<a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-1" href="#footnote-1" target="_self">1</a> a <em>better</em> prompt:</p><div class="highlighted_code_block" data-attrs="{&quot;language&quot;:&quot;plaintext&quot;,&quot;nodeId&quot;:&quot;a85e344d-480e-4511-a6b2-9f1eebc379c0&quot;}" data-component-name="HighlightedCodeBlockToDOM"><pre class="shiki"><code class="language-plaintext">- Keep current email behavior intact.
- Preserve existing notification preferences.
- Do not change unrelated notification flows.</code></pre></div><p>But a prompt has its limitations&#8230;</p><p>As the codebase gets bigger &amp; agent takes on extra work, it creates 3 new <em>serious problems</em>:</p><h4>1. Understand the existing system</h4><p>A prompt describes what you want.</p><p>But it does NOT automatically explain how an existing system works. The agent must understand the architecture, dependencies, business logic, feature flags, APIs, data models &amp; old behavior in the codebase (across repos).</p><p>Without this context, the agent would make a locally &#8220;correct change&#8221; that <em>breaks</em> something elsewhere&#8230;</p><h4>2. Build the right change</h4><p>If you add extra prompt instructions, the request becomes extremely difficult to manage.</p><p>The agent must then keep track of scope, constraints, edge cases, success criteria, &amp; dependencies across the entire task. While a vague/incomplete instruction can quietly turn into a wrong implementation.</p><p>This could multiply the mistake across many files and/or tasks&#8230;</p><h4>3. Trust autonomous work</h4><p>Agent autonomy = more work you trust it with.</p><p>The agent would read more code, call more tools<a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-2" href="#footnote-2" target="_self">2</a>, change more files, and run longer workflows. So you need controls on what it can access, what it can change, where it runs, how its output gets checked, and where a human must approve the work.</p><p>Yet a &#8220;longer prompt&#8221; does NOT solve any of these problems!&#8230;</p><h4 style="text-align: center;"><strong>&#167;</strong></h4><h2>Spec-Driven Development</h2><p>Spec-Driven Development (<strong>SDD</strong>) is a software development approach in which a specification defines intended behavior and guides planning, implementation &amp; validation.</p><p>i.e., you define &#8220;expected&#8221; behavior, scope, constraints &amp; success criteria <em>before</em> the agent starts to run.</p><p>Enterprise Agentic Software Development Lifecycle (Agentic <strong>SDLC</strong>) needs the exact same foundation:</p><ul><li><p>Full system context,</p></li><li><p>Clear specification,</p></li><li><p>Validation against intended result.</p></li></ul><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!5FMg!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8381b55e-b382-45cc-9a90-a1542044de9b_800x450.gif" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!5FMg!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8381b55e-b382-45cc-9a90-a1542044de9b_800x450.gif 424w, https://substackcdn.com/image/fetch/$s_!5FMg!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8381b55e-b382-45cc-9a90-a1542044de9b_800x450.gif 848w, https://substackcdn.com/image/fetch/$s_!5FMg!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8381b55e-b382-45cc-9a90-a1542044de9b_800x450.gif 1272w, https://substackcdn.com/image/fetch/$s_!5FMg!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8381b55e-b382-45cc-9a90-a1542044de9b_800x450.gif 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!5FMg!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8381b55e-b382-45cc-9a90-a1542044de9b_800x450.gif" width="800" height="450" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/8381b55e-b382-45cc-9a90-a1542044de9b_800x450.gif&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:450,&quot;width&quot;:800,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:897095,&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://newsletter.systemdesign.one/i/214186337?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8381b55e-b382-45cc-9a90-a1542044de9b_800x450.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_!5FMg!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8381b55e-b382-45cc-9a90-a1542044de9b_800x450.gif 424w, https://substackcdn.com/image/fetch/$s_!5FMg!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8381b55e-b382-45cc-9a90-a1542044de9b_800x450.gif 848w, https://substackcdn.com/image/fetch/$s_!5FMg!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8381b55e-b382-45cc-9a90-a1542044de9b_800x450.gif 1272w, https://substackcdn.com/image/fetch/$s_!5FMg!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8381b55e-b382-45cc-9a90-a1542044de9b_800x450.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 buttonBase-GK1x3M"><svg aria-hidden="true" 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" class="icon-noB79L"><g><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 buttonBase-GK1x3M"><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 icon-noB79L"><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">SDD keeps intent connected to implementation.</figcaption></figure></div><p>I&#8217;ll use <strong><a href="https://blitzy.com/">Blitzy</a></strong> as the case study for this newsletter&#8230;</p><p>It&#8217;s an autonomous software development platform for the enterprise that turns what you want to build into a structured plan, then autonomously executes &amp; validates it.</p><p>i.e., you provide the requirements and intent, then review key decisions.</p><p><a href="https://blitzy.com/sandbox?utm_medium=paid_media&amp;utm_source=newsletter_systemdesign&amp;utm_campaign=sandbox">Blitzy</a> combines them with codebase context, creates the plan, executes the work with AI agents &amp; validates the result.</p><p>Let&#8217;s dive in!</p><h3>How Specification Guides Development</h3><p>Here are 3 roles<a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-3" href="#footnote-3" target="_self">3</a> a specification plays in the software development lifecycle:</p><ul><li><p><strong>Spec-first:</strong> You write the specification before implementation begins, so you know what to build.</p></li><li><p><strong>Spec-anchored:</strong> You keep the specification connected to the software after implementation so it can guide future changes.</p></li><li><p><strong>Spec-as-source:</strong> You treat the specification as the human-edited source from which you can generate and/or regenerate downstream implementation artifacts (plans, tasks, tests).</p></li></ul><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!1S7Y!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7f5245c9-16ad-4841-a5d0-cee0f47b7037_1672x941.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!1S7Y!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7f5245c9-16ad-4841-a5d0-cee0f47b7037_1672x941.png 424w, https://substackcdn.com/image/fetch/$s_!1S7Y!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7f5245c9-16ad-4841-a5d0-cee0f47b7037_1672x941.png 848w, https://substackcdn.com/image/fetch/$s_!1S7Y!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7f5245c9-16ad-4841-a5d0-cee0f47b7037_1672x941.png 1272w, https://substackcdn.com/image/fetch/$s_!1S7Y!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7f5245c9-16ad-4841-a5d0-cee0f47b7037_1672x941.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!1S7Y!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7f5245c9-16ad-4841-a5d0-cee0f47b7037_1672x941.png" width="1456" height="819" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/7f5245c9-16ad-4841-a5d0-cee0f47b7037_1672x941.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:819,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;&quot;,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" title="" srcset="https://substackcdn.com/image/fetch/$s_!1S7Y!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7f5245c9-16ad-4841-a5d0-cee0f47b7037_1672x941.png 424w, https://substackcdn.com/image/fetch/$s_!1S7Y!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7f5245c9-16ad-4841-a5d0-cee0f47b7037_1672x941.png 848w, https://substackcdn.com/image/fetch/$s_!1S7Y!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7f5245c9-16ad-4841-a5d0-cee0f47b7037_1672x941.png 1272w, https://substackcdn.com/image/fetch/$s_!1S7Y!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7f5245c9-16ad-4841-a5d0-cee0f47b7037_1672x941.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 buttonBase-GK1x3M"><svg aria-hidden="true" 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" class="icon-noB79L"><g><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 buttonBase-GK1x3M"><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 icon-noB79L"><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">A specification can guide development in three different ways.</figcaption></figure></div><p>Now let&#8217;s see how SDD<a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-4" href="#footnote-4" target="_self">4</a> applies to our <em>notification system</em>&#8230;</p><p>You want to move task notifications to a new notification system. The request defines the goal, but the expected behavior still needs to be <em>explicit</em>.</p><p>So you define a specification:</p><ul><li><p><strong>Objective:</strong> Move task notifications to a new system.</p></li><li><p><strong>Scope:</strong> Move task-assignment &amp; task comment notifications. But leave billing notifications unchanged.</p></li><li><p><strong>Requirements:</strong> Preserve existing notification preferences &amp; delivery timing. And continue using the existing email service.</p></li><li><p><strong>Expected behavior:</strong> Check the user&#8217;s preferences before sending notifications. If email is enabled, queue an email through the new delivery path.</p></li><li><p><strong>Edge cases:</strong> Define what happens if delivery fails/assignee no longer belongs to the project.</p></li><li><p><strong>Acceptance criteria:</strong> Task notifications use the new system while existing user preferences continue to work correctly.</p></li></ul><p><a href="https://blitzy.com/sandbox?utm_medium=paid_media&amp;utm_source=newsletter_systemdesign&amp;utm_campaign=sandbox">Blitzy</a> combines these requirements with its understanding<a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-5" href="#footnote-5" target="_self">5</a> of the application across repositories.</p><p>Then it uses requirements &amp; codebase context to create an Agent Action Plan (<strong>AAP</strong><a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-6" href="#footnote-6" target="_self">6</a>).</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!glEO!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F09f7bc00-0572-49b9-9002-6b3d1a47a92c_800x450.gif" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!glEO!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F09f7bc00-0572-49b9-9002-6b3d1a47a92c_800x450.gif 424w, https://substackcdn.com/image/fetch/$s_!glEO!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F09f7bc00-0572-49b9-9002-6b3d1a47a92c_800x450.gif 848w, https://substackcdn.com/image/fetch/$s_!glEO!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F09f7bc00-0572-49b9-9002-6b3d1a47a92c_800x450.gif 1272w, https://substackcdn.com/image/fetch/$s_!glEO!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F09f7bc00-0572-49b9-9002-6b3d1a47a92c_800x450.gif 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!glEO!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F09f7bc00-0572-49b9-9002-6b3d1a47a92c_800x450.gif" width="800" height="450" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/09f7bc00-0572-49b9-9002-6b3d1a47a92c_800x450.gif&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:450,&quot;width&quot;:800,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:1696981,&quot;alt&quot;:&quot;&quot;,&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://newsletter.systemdesign.one/i/214186337?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F09f7bc00-0572-49b9-9002-6b3d1a47a92c_800x450.gif&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" title="" srcset="https://substackcdn.com/image/fetch/$s_!glEO!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F09f7bc00-0572-49b9-9002-6b3d1a47a92c_800x450.gif 424w, https://substackcdn.com/image/fetch/$s_!glEO!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F09f7bc00-0572-49b9-9002-6b3d1a47a92c_800x450.gif 848w, https://substackcdn.com/image/fetch/$s_!glEO!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F09f7bc00-0572-49b9-9002-6b3d1a47a92c_800x450.gif 1272w, https://substackcdn.com/image/fetch/$s_!glEO!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F09f7bc00-0572-49b9-9002-6b3d1a47a92c_800x450.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 buttonBase-GK1x3M"><svg aria-hidden="true" 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" class="icon-noB79L"><g><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 buttonBase-GK1x3M"><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 icon-noB79L"><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">Requirements + system context &#8594; Agent Action Plan.</figcaption></figure></div><p>(We&#8217;ll learn how AAP works later&#8230;)</p><h3>Project Rules vs Generation Prompts</h3><p>A specification defines the change itself.</p><p>Yet agents need project-level instructions<a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-7" href="#footnote-7" target="_self">7</a> on how to do the work&#8230;</p><p>Blitzy separates these concerns through Rules &amp; Generation prompts:</p><ul><li><p><strong>Rules:</strong> Project-wide instructions that apply whenever the agent works on the codebase, such as code style, testing &amp; security requirements.</p></li><li><p><strong>Generation prompt:</strong> Instructions for a specific change, such as its objective, scope, constraints, technical requirements &amp; success criteria.</p></li></ul><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!aZN1!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F00deb66f-b2bf-44e4-8679-7df82002b8b1_800x450.gif" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!aZN1!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F00deb66f-b2bf-44e4-8679-7df82002b8b1_800x450.gif 424w, https://substackcdn.com/image/fetch/$s_!aZN1!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F00deb66f-b2bf-44e4-8679-7df82002b8b1_800x450.gif 848w, https://substackcdn.com/image/fetch/$s_!aZN1!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F00deb66f-b2bf-44e4-8679-7df82002b8b1_800x450.gif 1272w, https://substackcdn.com/image/fetch/$s_!aZN1!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F00deb66f-b2bf-44e4-8679-7df82002b8b1_800x450.gif 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!aZN1!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F00deb66f-b2bf-44e4-8679-7df82002b8b1_800x450.gif" width="800" height="450" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/00deb66f-b2bf-44e4-8679-7df82002b8b1_800x450.gif&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:450,&quot;width&quot;:800,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:3667328,&quot;alt&quot;:&quot;&quot;,&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://newsletter.systemdesign.one/i/214186337?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F00deb66f-b2bf-44e4-8679-7df82002b8b1_800x450.gif&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" title="" srcset="https://substackcdn.com/image/fetch/$s_!aZN1!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F00deb66f-b2bf-44e4-8679-7df82002b8b1_800x450.gif 424w, https://substackcdn.com/image/fetch/$s_!aZN1!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F00deb66f-b2bf-44e4-8679-7df82002b8b1_800x450.gif 848w, https://substackcdn.com/image/fetch/$s_!aZN1!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F00deb66f-b2bf-44e4-8679-7df82002b8b1_800x450.gif 1272w, https://substackcdn.com/image/fetch/$s_!aZN1!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F00deb66f-b2bf-44e4-8679-7df82002b8b1_800x450.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 buttonBase-GK1x3M"><svg aria-hidden="true" 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" class="icon-noB79L"><g><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 buttonBase-GK1x3M"><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 icon-noB79L"><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">Rules = reusable project-level instructions; Generation prompt = specific change to implement.</figcaption></figure></div><p>Here&#8217;s an example<a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-8" href="#footnote-8" target="_self">8</a>:</p><div class="highlighted_code_block" data-attrs="{&quot;language&quot;:&quot;plaintext&quot;,&quot;nodeId&quot;:&quot;b7865833-efbe-4b2e-9243-e7f903d8dbfe&quot;}" data-component-name="HighlightedCodeBlockToDOM"><pre class="shiki"><code class="language-plaintext">Rule:
Every new piece of business logic must include tests.

Generation prompt:
Move task notifications to the new system while preserving
existing notification behavior and user preferences.</code></pre></div><h3>Requirements Clarification</h3><p>A BAD assumption gets exponentially <em>expensive</em> the further it travels&#8230;</p><p>An <em>unclear</em> requirement is easier to fix while the specification is still being edited. Otherwise, the agent would fill those gaps with &#8220;assumptions&#8221; and carry them into the plan &amp; implementation.</p><p>So you should look for these details:</p><ul><li><p>Who will use the feature,</p></li><li><p>How system should handle failures,</p></li><li><p>What falls inside &amp; outside the scope,</p></li><li><p>Which existing services should change,</p></li><li><p>What must remain backward compatible.</p></li></ul><p>This lets you separate unknowns from assumptions:</p><ul><li><p><strong>Unknown:</strong> You&#8217;re missing information to make a decision.</p></li><li><p><strong>Assumption:</strong> You make a guess because information is missing.</p></li></ul><p>Here&#8217;s a simple clarification process for you to follow:</p><ol><li><p>Draft the specification.</p></li><li><p>Identify missing/ambiguous requirements.</p></li><li><p>Resolve &amp; update the specification.</p></li><li><p>Review the updated specification.</p></li></ol><p>This process gives the agent clear requirements before it creates the implementation plan&#8230;</p><h4 style="text-align: center;"><strong>&#167;</strong></h4><div class="captioned-button-wrap" data-attrs="{&quot;url&quot;:&quot;https://newsletter.systemdesign.one/p/spec-driven-development-ai-agents?utm_source=substack&utm_medium=email&utm_content=share&action=share&quot;,&quot;text&quot;:&quot;Share&quot;}" data-component-name="CaptionedButtonToDOM"><div class="preamble"><p class="cta-caption"><em><span data-color="#3a7bf9" style="color: rgb(58, 123, 249);">Get 1+ referral &amp; I&#8217;ll send you my Leetcode Master Template!</span></em></p></div><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://newsletter.systemdesign.one/p/spec-driven-development-ai-agents?utm_source=substack&utm_medium=email&utm_content=share&action=share&quot;,&quot;text&quot;:&quot;Share&quot;}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://newsletter.systemdesign.one/p/spec-driven-development-ai-agents?utm_source=substack&utm_medium=email&utm_content=share&action=share"><span>Share</span></a></p></div><h4 style="text-align: center;"><strong>&#167;</strong></h4><h2>1. Understand the Existing System</h2><p>The agent must first understand how the <em>existing</em> system works&#8230;</p><p>i.e., it needs the correct &#8220;system context<a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-9" href="#footnote-9" target="_self">9</a>&#8221;.</p><p>This is where Blitzy&#8217;s <em>Dynamic</em> <em>Knowledge Graph</em> becomes helpful.</p><p>It gives agents a global, dynamic understanding of the application across repositories&#8230; this includes architecture, dependencies &amp; code relationships.</p><p>Here&#8217;s how it works:</p><h3>Full System Context</h3><p>Imagine the <em>specification</em> says:</p><div class="highlighted_code_block" data-attrs="{&quot;language&quot;:&quot;plaintext&quot;,&quot;nodeId&quot;:&quot;6d31569e-cb86-4f82-9cc8-44247723bde1&quot;}" data-component-name="HighlightedCodeBlockToDOM"><pre class="shiki"><code class="language-plaintext">Task assignment should generate an in-app notification
for the assignee, unless the user has disabled that
notification type in their preferences.</code></pre></div><p>So the agent needs to find:</p><ul><li><p>Which components generate notifications</p></li><li><p>Where the system stores user preferences</p></li><li><p>Where the system handles task assignments</p></li><li><p>What depends on the current notification flow</p></li><li><p>Which services &amp; APIs connect these components</p></li></ul><p>&#8230; before changing the code.</p><p>And this becomes extremely HARD in large, complex existing<a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-10" href="#footnote-10" target="_self">10</a> codebases with many repos. Relevant logic could span services, background jobs, event listeners, feature flags, data models &amp; outdated documentation.</p><p>A larger context window is NOT enough&#8230; AI agent needs to identify &amp; retrieve parts of the codebase relevant to the requested change.</p><p><em>Here&#8217;s how Blitzy builds system-level understanding to solve this problem:</em></p><ol><li><p><strong>Analyze codebase:</strong> Blitzy analyzes code across multiple repositories to identify architecture, code patterns, terminology &amp; dependencies. (You can also exclude files &amp; directories with <code>.blitzyignore</code>.)</p></li><li><p><strong>Build a dynamic knowledge graph:</strong> Blitzy maps relationships across the codebase (relationships that span repos), including control flow, call graphs, inheritance hierarchies &amp; module dependencies.</p></li><li><p><strong>Generate a Technical Specification</strong><a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-11" href="#footnote-11" target="_self">11</a><strong>:</strong> Blitzy creates a current view of the codebase. This includes its architecture, dependencies, patterns &amp; domain terminology.</p></li></ol><p>The result is a global, dynamic understanding of the application that Blitzy&#8217;s agents can reference when planning, executing &amp; validating changes&#8230;</p><h3>Code Relationships</h3><p>Retrieval-Augmented Generation (<strong>RAG</strong>) retrieves relevant information &amp; adds it to the model&#8217;s context.</p><p>In a <em>codebase</em>, finding relevant files &amp; components is useful, but the agent also needs to understand how they connect!..</p><p>Consider the notification system that sends an email when someone gets assigned a task&#8230; Retrieval would find<a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-12" href="#footnote-12" target="_self">12</a>:</p><ul><li><p><code>Preferences</code></p></li><li><p><code>TaskAssignment</code></p></li><li><p><code>NotificationService</code></p></li></ul><p>You could represent their relationships using a <em><strong>dynamic</strong></em> <em><strong>knowledge graph</strong></em><a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-13" href="#footnote-13" target="_self">13</a>:</p><blockquote><p><em>Dynamic Knowledge graph</em><a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-14" href="#footnote-14" target="_self">14</a><em> maps code components &amp; relationships such as calls, dependencies, inheritance, and control flow.</em></p></blockquote><p>Let&#8217;s look at how GraphRAG uses these relationships to retrieve context&#8230;</p><h4>Graph Retrieval-Augmented Generation</h4><p>&#8220;Relationships&#8221; become extremely useful when a single change affects <em>several parts</em> of the codebase.</p><p>Graph <span>Retrieval-Augmented Generation (</span><strong><span>GraphRAG</span></strong><span>) uses a graph to retrieve context based on the relationships between pieces of information</span>.</p><p>A traditional RAG would retrieve the relevant components&#8230;Each of them relevant on its own&#8230;</p><p>But graph-based retrieval shows &#8220;how they connect&#8221;.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!aluC!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fadc2ed92-d1f7-463e-aa4d-bcac4eab43af_1774x887.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!aluC!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fadc2ed92-d1f7-463e-aa4d-bcac4eab43af_1774x887.png 424w, https://substackcdn.com/image/fetch/$s_!aluC!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fadc2ed92-d1f7-463e-aa4d-bcac4eab43af_1774x887.png 848w, https://substackcdn.com/image/fetch/$s_!aluC!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fadc2ed92-d1f7-463e-aa4d-bcac4eab43af_1774x887.png 1272w, https://substackcdn.com/image/fetch/$s_!aluC!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fadc2ed92-d1f7-463e-aa4d-bcac4eab43af_1774x887.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!aluC!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fadc2ed92-d1f7-463e-aa4d-bcac4eab43af_1774x887.png" width="1456" height="728" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/adc2ed92-d1f7-463e-aa4d-bcac4eab43af_1774x887.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:728,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!aluC!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fadc2ed92-d1f7-463e-aa4d-bcac4eab43af_1774x887.png 424w, https://substackcdn.com/image/fetch/$s_!aluC!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fadc2ed92-d1f7-463e-aa4d-bcac4eab43af_1774x887.png 848w, https://substackcdn.com/image/fetch/$s_!aluC!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fadc2ed92-d1f7-463e-aa4d-bcac4eab43af_1774x887.png 1272w, https://substackcdn.com/image/fetch/$s_!aluC!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fadc2ed92-d1f7-463e-aa4d-bcac4eab43af_1774x887.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 buttonBase-GK1x3M"><svg aria-hidden="true" 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" class="icon-noB79L"><g><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 buttonBase-GK1x3M"><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 icon-noB79L"><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"><span>RAG retrieves similar chunks; GraphRAG retrieves connected context.</span></figcaption></figure></div><p>If the agent needs to change what happens when <em>&#8220;someone gets assigned a task&#8221;</em>, the graph could help it understand<a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-15" href="#footnote-15" target="_self">15</a>:</p><ul><li><p>What data it involves</p></li><li><p>Which components call each other</p></li><li><p>Which events flow through the system</p></li><li><p>Which downstream components it affects</p></li></ul><p>In an enterprise codebase with thousands of files across many repositories, finding these connections one file at a time is extremely HARD&#8230;</p><p>A graph gives the agent a simpler way to navigate the codebase &amp; retrieve the context<a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-16" href="#footnote-16" target="_self">16</a> it needs.</p><h4>Change Impact Analysis</h4><p>Finding the correct code is only one part of the problem&#8230;</p><p>The agent must also understand the <em>impact</em><a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-17" href="#footnote-17" target="_self">17</a><em> of changing it</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_!Iq_6!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7ec02ba0-716a-481a-88f6-ee21ad74ff6a_800x450.gif" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!Iq_6!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7ec02ba0-716a-481a-88f6-ee21ad74ff6a_800x450.gif 424w, https://substackcdn.com/image/fetch/$s_!Iq_6!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7ec02ba0-716a-481a-88f6-ee21ad74ff6a_800x450.gif 848w, https://substackcdn.com/image/fetch/$s_!Iq_6!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7ec02ba0-716a-481a-88f6-ee21ad74ff6a_800x450.gif 1272w, https://substackcdn.com/image/fetch/$s_!Iq_6!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7ec02ba0-716a-481a-88f6-ee21ad74ff6a_800x450.gif 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!Iq_6!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7ec02ba0-716a-481a-88f6-ee21ad74ff6a_800x450.gif" width="800" height="450" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/7ec02ba0-716a-481a-88f6-ee21ad74ff6a_800x450.gif&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:450,&quot;width&quot;:800,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:790798,&quot;alt&quot;:&quot;&quot;,&quot;title&quot;:&quot;&quot;,&quot;type&quot;:&quot;image/gif&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://newsletter.systemdesign.one/i/214186337?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7ec02ba0-716a-481a-88f6-ee21ad74ff6a_800x450.gif&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" title="" srcset="https://substackcdn.com/image/fetch/$s_!Iq_6!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7ec02ba0-716a-481a-88f6-ee21ad74ff6a_800x450.gif 424w, https://substackcdn.com/image/fetch/$s_!Iq_6!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7ec02ba0-716a-481a-88f6-ee21ad74ff6a_800x450.gif 848w, https://substackcdn.com/image/fetch/$s_!Iq_6!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7ec02ba0-716a-481a-88f6-ee21ad74ff6a_800x450.gif 1272w, https://substackcdn.com/image/fetch/$s_!Iq_6!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7ec02ba0-716a-481a-88f6-ee21ad74ff6a_800x450.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 buttonBase-GK1x3M"><svg aria-hidden="true" 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" class="icon-noB79L"><g><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 buttonBase-GK1x3M"><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 icon-noB79L"><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">Retrieve the context that matters to the change.</figcaption></figure></div><p>Blitzy&#8217;s agents traverse Blitzy&#8217;s Dynamic Knowledge Graph in 2 directions:</p><ul><li><p><strong>Forward traversal</strong><a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-18" href="#footnote-18" target="_self">18</a><strong>:</strong> Starts from a function/component &amp; follows the call graph outward to understand what happens downstream.</p></li><li><p><strong>Reverse traversal</strong><a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-19" href="#footnote-19" target="_self">19</a><strong>:</strong> Moves backward through the graph to find which parts of the system call depend on a function/component.</p></li></ul><p>If the agent needs to change <code>NotificationService</code>, it can traverse forward to see what <code>NotificationService</code> calls and backward to see what calls/depends on <code>NotificationService</code>.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!3HDl!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1c552063-cacf-42b6-b009-1958f9dcda35_800x450.gif" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!3HDl!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1c552063-cacf-42b6-b009-1958f9dcda35_800x450.gif 424w, https://substackcdn.com/image/fetch/$s_!3HDl!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1c552063-cacf-42b6-b009-1958f9dcda35_800x450.gif 848w, https://substackcdn.com/image/fetch/$s_!3HDl!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1c552063-cacf-42b6-b009-1958f9dcda35_800x450.gif 1272w, https://substackcdn.com/image/fetch/$s_!3HDl!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1c552063-cacf-42b6-b009-1958f9dcda35_800x450.gif 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!3HDl!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1c552063-cacf-42b6-b009-1958f9dcda35_800x450.gif" width="800" height="450" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/1c552063-cacf-42b6-b009-1958f9dcda35_800x450.gif&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:450,&quot;width&quot;:800,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:1098511,&quot;alt&quot;:&quot;&quot;,&quot;title&quot;:&quot;&quot;,&quot;type&quot;:&quot;image/gif&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://newsletter.systemdesign.one/i/214186337?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1c552063-cacf-42b6-b009-1958f9dcda35_800x450.gif&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" title="" srcset="https://substackcdn.com/image/fetch/$s_!3HDl!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1c552063-cacf-42b6-b009-1958f9dcda35_800x450.gif 424w, https://substackcdn.com/image/fetch/$s_!3HDl!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1c552063-cacf-42b6-b009-1958f9dcda35_800x450.gif 848w, https://substackcdn.com/image/fetch/$s_!3HDl!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1c552063-cacf-42b6-b009-1958f9dcda35_800x450.gif 1272w, https://substackcdn.com/image/fetch/$s_!3HDl!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1c552063-cacf-42b6-b009-1958f9dcda35_800x450.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 buttonBase-GK1x3M"><svg aria-hidden="true" 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" class="icon-noB79L"><g><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 buttonBase-GK1x3M"><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 icon-noB79L"><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">Traverse both directions to understand change impact.</figcaption></figure></div><p>The key is understanding how the pieces connect, NOT just what exists.</p><h4 style="text-align: center;"><strong>&#167;</strong></h4><div class="captioned-button-wrap" data-attrs="{&quot;url&quot;:&quot;https://newsletter.systemdesign.one/p/spec-driven-development-ai-agents?utm_source=substack&utm_medium=email&utm_content=share&action=share&quot;,&quot;text&quot;:&quot;Share&quot;}" data-component-name="CaptionedButtonToDOM"><div class="preamble"><p class="cta-caption"><em><span data-color="#3a7bf9" style="color: rgb(58, 123, 249);">Get 2+ referrals &amp; I&#8217;ll send you my Interview Mistakes to Avoid PDF!</span></em></p></div><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://newsletter.systemdesign.one/p/spec-driven-development-ai-agents?utm_source=substack&utm_medium=email&utm_content=share&action=share&quot;,&quot;text&quot;:&quot;Share&quot;}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://newsletter.systemdesign.one/p/spec-driven-development-ai-agents?utm_source=substack&utm_medium=email&utm_content=share&action=share"><span>Share</span></a></p></div><h4 style="text-align: center;"><strong>&#167;</strong></h4><h2>2. Build the Right Change</h2><p>The AI agent now needs to determine how to make the changes correctly...</p><p>i.e., it needs an &#8220;implementation plan&#8221;.</p><p><em>Ready for the best part?</em></p><h3>Agent Action Plan</h3><p>One BIG change can be broken into tiny tasks &amp; dependencies.</p><p>For notification system migration:</p><ul><li><p>Update the data model,</p></li><li><p>Update the delivery flow,</p></li><li><p>Integrate with task events,</p></li></ul><p>&#8230; and so on.</p><p><a href="https://blitzy.com/sandbox?utm_medium=paid_media&amp;utm_source=newsletter_systemdesign&amp;utm_campaign=sandbox">Blitzy</a> handles this with an Agent Action Plan<a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-20" href="#footnote-20" target="_self">20</a> (<strong>AAP</strong>).</p><p>It uses the generation request &amp; global codebase context from its Dynamic Knowledge Graph to construct the AAP. The Dynamic Knowledge Graph helps map dependencies &amp; analyze the impact of the proposed change before execution begins.</p><p>Blitzy then algorithmically sequences the work from the AAP based on those <em>dependencies</em>. This helps agents execute the required work in a &#8220;logical order&#8221;.</p><p>You can then review &amp; edit AAP before code generation begins.</p><p>This provides a checkpoint to catch incorrect assumptions, missing dependencies, and/or unnecessary changes before they become code.</p><h3>Scope and Blast Radius</h3><p>AAP defines what the agent should &amp; should NOT change.</p><p><em>Blast radius</em> describes which parts of the system a change/failure would affect. For example, changing <code>NotificationService</code> could affect every component that depends on it.</p><p>The specification can set scope boundaries<a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-21" href="#footnote-21" target="_self">21</a> for:</p><ul><li><p>Services,</p></li><li><p>Infrastructure,</p></li><li><p>Files &amp; directories,</p></li><li><p>Components that must remain unchanged.</p></li></ul><p>Blitzy supports these boundaries through generation requests &amp; repository exclusions.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!fy2Z!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1bad10d9-4265-4809-a469-6e36423a81d5_800x450.gif" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!fy2Z!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1bad10d9-4265-4809-a469-6e36423a81d5_800x450.gif 424w, https://substackcdn.com/image/fetch/$s_!fy2Z!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1bad10d9-4265-4809-a469-6e36423a81d5_800x450.gif 848w, https://substackcdn.com/image/fetch/$s_!fy2Z!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1bad10d9-4265-4809-a469-6e36423a81d5_800x450.gif 1272w, https://substackcdn.com/image/fetch/$s_!fy2Z!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1bad10d9-4265-4809-a469-6e36423a81d5_800x450.gif 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!fy2Z!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1bad10d9-4265-4809-a469-6e36423a81d5_800x450.gif" width="800" height="450" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/1bad10d9-4265-4809-a469-6e36423a81d5_800x450.gif&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:450,&quot;width&quot;:800,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:992217,&quot;alt&quot;:&quot;&quot;,&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://newsletter.systemdesign.one/i/214186337?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1bad10d9-4265-4809-a469-6e36423a81d5_800x450.gif&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" title="" srcset="https://substackcdn.com/image/fetch/$s_!fy2Z!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1bad10d9-4265-4809-a469-6e36423a81d5_800x450.gif 424w, https://substackcdn.com/image/fetch/$s_!fy2Z!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1bad10d9-4265-4809-a469-6e36423a81d5_800x450.gif 848w, https://substackcdn.com/image/fetch/$s_!fy2Z!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1bad10d9-4265-4809-a469-6e36423a81d5_800x450.gif 1272w, https://substackcdn.com/image/fetch/$s_!fy2Z!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1bad10d9-4265-4809-a469-6e36423a81d5_800x450.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 buttonBase-GK1x3M"><svg aria-hidden="true" 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" class="icon-noB79L"><g><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 buttonBase-GK1x3M"><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 icon-noB79L"><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">Blast radius shows which parts of the system a change would affect.</figcaption></figure></div><p>This helps keep the implementation within its intended scope&#8230;</p><h3>How Blitzy Agents Execute the Plan</h3><p>Once AAP is approved, Blitzy&#8217;s agents execute the planned work&#8230;</p><p>For a BIG change, Blitzy uses AAP to <em>sequence</em> work based on &#8220;task dependencies&#8221;.</p><p>Then independent tasks run in parallel, while dependent tasks wait until their prerequisites finish&#8230;</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!Znbw!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbb339c78-9666-4681-8cb1-8ec6ec25df27_800x450.gif" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!Znbw!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbb339c78-9666-4681-8cb1-8ec6ec25df27_800x450.gif 424w, https://substackcdn.com/image/fetch/$s_!Znbw!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbb339c78-9666-4681-8cb1-8ec6ec25df27_800x450.gif 848w, https://substackcdn.com/image/fetch/$s_!Znbw!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbb339c78-9666-4681-8cb1-8ec6ec25df27_800x450.gif 1272w, https://substackcdn.com/image/fetch/$s_!Znbw!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbb339c78-9666-4681-8cb1-8ec6ec25df27_800x450.gif 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!Znbw!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbb339c78-9666-4681-8cb1-8ec6ec25df27_800x450.gif" width="800" height="450" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/bb339c78-9666-4681-8cb1-8ec6ec25df27_800x450.gif&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:450,&quot;width&quot;:800,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:2219213,&quot;alt&quot;:&quot;&quot;,&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://newsletter.systemdesign.one/i/214186337?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbb339c78-9666-4681-8cb1-8ec6ec25df27_800x450.gif&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" title="" srcset="https://substackcdn.com/image/fetch/$s_!Znbw!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbb339c78-9666-4681-8cb1-8ec6ec25df27_800x450.gif 424w, https://substackcdn.com/image/fetch/$s_!Znbw!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbb339c78-9666-4681-8cb1-8ec6ec25df27_800x450.gif 848w, https://substackcdn.com/image/fetch/$s_!Znbw!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbb339c78-9666-4681-8cb1-8ec6ec25df27_800x450.gif 1272w, https://substackcdn.com/image/fetch/$s_!Znbw!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbb339c78-9666-4681-8cb1-8ec6ec25df27_800x450.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 buttonBase-GK1x3M"><svg aria-hidden="true" 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" class="icon-noB79L"><g><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 buttonBase-GK1x3M"><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 icon-noB79L"><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">Run independent work in parallel. Respect task dependencies.</figcaption></figure></div><p>Each agent needs the context &amp; tools relevant to its task.</p><p>Also, agents need to stay aligned with requirements &amp; codebase context so their changes work together across repositories.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!C6KY!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F05a68c6b-4baf-40bf-8500-72a60330331d_1672x941.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!C6KY!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F05a68c6b-4baf-40bf-8500-72a60330331d_1672x941.png 424w, https://substackcdn.com/image/fetch/$s_!C6KY!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F05a68c6b-4baf-40bf-8500-72a60330331d_1672x941.png 848w, https://substackcdn.com/image/fetch/$s_!C6KY!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F05a68c6b-4baf-40bf-8500-72a60330331d_1672x941.png 1272w, https://substackcdn.com/image/fetch/$s_!C6KY!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F05a68c6b-4baf-40bf-8500-72a60330331d_1672x941.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!C6KY!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F05a68c6b-4baf-40bf-8500-72a60330331d_1672x941.png" width="1456" height="819" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/05a68c6b-4baf-40bf-8500-72a60330331d_1672x941.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:819,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:820028,&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://newsletter.systemdesign.one/i/214186337?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F05a68c6b-4baf-40bf-8500-72a60330331d_1672x941.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_!C6KY!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F05a68c6b-4baf-40bf-8500-72a60330331d_1672x941.png 424w, https://substackcdn.com/image/fetch/$s_!C6KY!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F05a68c6b-4baf-40bf-8500-72a60330331d_1672x941.png 848w, https://substackcdn.com/image/fetch/$s_!C6KY!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F05a68c6b-4baf-40bf-8500-72a60330331d_1672x941.png 1272w, https://substackcdn.com/image/fetch/$s_!C6KY!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F05a68c6b-4baf-40bf-8500-72a60330331d_1672x941.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 buttonBase-GK1x3M"><svg aria-hidden="true" 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" class="icon-noB79L"><g><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 buttonBase-GK1x3M"><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 icon-noB79L"><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">An orchestrator distributes work across agents, manages dependencies &amp; combines results for validation.</figcaption></figure></div><p>Blitzy&#8217;s orchestration layer coordinates<a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-22" href="#footnote-22" target="_self">22</a> specialized agents across architecture, implementation, testing, debugging, validation &amp; integration.</p><p>The resulting changes then get combined &amp; checked as a complete implementation<a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-23" href="#footnote-23" target="_self">23</a>.</p><h3>Verification and Validation</h3><p><span>AI agent can implement the plan, pass tests, but still&nbsp;</span><em><span>miss</span></em><span>&nbsp;a &#8220;requirement.&#8221;</span></p><p>So the result needs to be checked against technical requirements &amp; intended use:</p><ul><li><p><strong>Verification:</strong> Check if implementation conforms to its defined requirements.</p></li><li><p><strong>Validation:</strong> Check if resulting software satisfies its intended use &amp; user needs.</p></li></ul><p>Testing can occur at different levels:</p><ul><li><p><strong>Unit tests:</strong> Check individual components.</p></li><li><p><strong>Integration tests:</strong> Check whether components work together.</p></li><li><p><strong>End-to-end tests:</strong> Check complete workflows.</p></li><li><p><strong>Acceptance tests:</strong> Check whether software meets defined requirements &amp; user/business needs.</p></li></ul><p>But automated tests only catch behaviors they actually check&#8230;</p><p>An extra review is needed to identify missing requirements and/or problems outside test coverage&#8230;</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!7D-g!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fee63f36f-f6f5-454d-a58a-f86d87aba77e_1672x941.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!7D-g!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fee63f36f-f6f5-454d-a58a-f86d87aba77e_1672x941.png 424w, https://substackcdn.com/image/fetch/$s_!7D-g!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fee63f36f-f6f5-454d-a58a-f86d87aba77e_1672x941.png 848w, https://substackcdn.com/image/fetch/$s_!7D-g!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fee63f36f-f6f5-454d-a58a-f86d87aba77e_1672x941.png 1272w, https://substackcdn.com/image/fetch/$s_!7D-g!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fee63f36f-f6f5-454d-a58a-f86d87aba77e_1672x941.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!7D-g!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fee63f36f-f6f5-454d-a58a-f86d87aba77e_1672x941.png" width="1456" height="819" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/ee63f36f-f6f5-454d-a58a-f86d87aba77e_1672x941.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:819,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;&quot;,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" title="" srcset="https://substackcdn.com/image/fetch/$s_!7D-g!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fee63f36f-f6f5-454d-a58a-f86d87aba77e_1672x941.png 424w, https://substackcdn.com/image/fetch/$s_!7D-g!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fee63f36f-f6f5-454d-a58a-f86d87aba77e_1672x941.png 848w, https://substackcdn.com/image/fetch/$s_!7D-g!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fee63f36f-f6f5-454d-a58a-f86d87aba77e_1672x941.png 1272w, https://substackcdn.com/image/fetch/$s_!7D-g!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fee63f36f-f6f5-454d-a58a-f86d87aba77e_1672x941.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 buttonBase-GK1x3M"><svg aria-hidden="true" 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" class="icon-noB79L"><g><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 buttonBase-GK1x3M"><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 icon-noB79L"><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">Verification checks conformance to requirements, while validation checks whether software meets its intended use.</figcaption></figure></div><p>Blitzy combines human oversight with automated validation throughout the development process:</p><ul><li><p><strong>AAP review</strong><a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-24" href="#footnote-24" target="_self">24</a><strong>:</strong> You review implementation plan before code generation begins.</p></li><li><p><strong>Automated validation</strong><a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-25" href="#footnote-25" target="_self">25</a><strong>:</strong> Blitzy checks generated code using signals such as builds, tests, benchmarks &amp; CI checks<a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-26" href="#footnote-26" target="_self">26</a>.</p></li><li><p><strong>Project Guide &amp; code review:</strong> Blitzy generates a Project Guide<a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-27" href="#footnote-27" target="_self">27</a> with each pull request. This shows what got built, which requirements were addressed, and what work remains. <mark data-color="#ffe599" style="background-color: rgb(255, 229, 153); color: rgb(0, 0, 0);">PR Review</mark> then organizes changes into logical groups, explains why Blitzy made each change alongside the diff &amp; surfaces relevant testing and QA results. This helps you review what changed, why it changed &amp; how it was validated before deciding whether to merge.</p></li></ul><p>i.e., passing tests alone is NOT enough&#8230;</p><p>The final implementation should be reviewed against the original requirements, scope &amp; expected behavior.</p><h3>Drift Check</h3><p>As agents implement changes, code can <em>drift</em> from the original specification&#8230;</p><p><a href="https://blitzy.com/sandbox?utm_medium=paid_media&amp;utm_source=newsletter_systemdesign&amp;utm_campaign=sandbox">Blitzy</a> prevents this drift during execution by orchestrating spec-adherence agents that continuously check generated work against approved requirements. It validates outputs at multiple levels, from individual files through end-to-end testing.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!dM0k!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F083dccbc-fe64-4839-9588-8fe2fbd10e53_1672x941.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!dM0k!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F083dccbc-fe64-4839-9588-8fe2fbd10e53_1672x941.png 424w, https://substackcdn.com/image/fetch/$s_!dM0k!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F083dccbc-fe64-4839-9588-8fe2fbd10e53_1672x941.png 848w, https://substackcdn.com/image/fetch/$s_!dM0k!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F083dccbc-fe64-4839-9588-8fe2fbd10e53_1672x941.png 1272w, https://substackcdn.com/image/fetch/$s_!dM0k!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F083dccbc-fe64-4839-9588-8fe2fbd10e53_1672x941.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!dM0k!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F083dccbc-fe64-4839-9588-8fe2fbd10e53_1672x941.png" width="1456" height="819" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/083dccbc-fe64-4839-9588-8fe2fbd10e53_1672x941.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:819,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;&quot;,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" title="" srcset="https://substackcdn.com/image/fetch/$s_!dM0k!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F083dccbc-fe64-4839-9588-8fe2fbd10e53_1672x941.png 424w, https://substackcdn.com/image/fetch/$s_!dM0k!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F083dccbc-fe64-4839-9588-8fe2fbd10e53_1672x941.png 848w, https://substackcdn.com/image/fetch/$s_!dM0k!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F083dccbc-fe64-4839-9588-8fe2fbd10e53_1672x941.png 1272w, https://substackcdn.com/image/fetch/$s_!dM0k!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F083dccbc-fe64-4839-9588-8fe2fbd10e53_1672x941.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 buttonBase-GK1x3M"><svg aria-hidden="true" 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" class="icon-noB79L"><g><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 buttonBase-GK1x3M"><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 icon-noB79L"><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">Compare what you approved with what Blitzy built.</figcaption></figure></div><p>This approach helps to find:</p><ul><li><p>Incomplete work,</p></li><li><p>Missing requirements,</p></li><li><p>Changes outside agreed scope,</p></li><li><p>Remaining work that needs attention.</p></li></ul><p>You make the final merge decision.</p><p>You review &amp; test the generated changes, identify remaining gaps, and decide whether to merge the pull request or request extra changes.</p><h4 style="text-align: center;"><strong>&#167;</strong></h4><div class="captioned-button-wrap" data-attrs="{&quot;url&quot;:&quot;https://newsletter.systemdesign.one/p/spec-driven-development-ai-agents?utm_source=substack&utm_medium=email&utm_content=share&action=share&quot;,&quot;text&quot;:&quot;Share&quot;}" data-component-name="CaptionedButtonToDOM"><div class="preamble"><p class="cta-caption"><em><span data-color="#3a7bf9" style="color: rgb(58, 123, 249);">Get 3+ referrals &amp; I&#8217;ll send you Popular Interview Questions PDF!</span></em></p></div><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://newsletter.systemdesign.one/p/spec-driven-development-ai-agents?utm_source=substack&utm_medium=email&utm_content=share&action=share&quot;,&quot;text&quot;:&quot;Share&quot;}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://newsletter.systemdesign.one/p/spec-driven-development-ai-agents?utm_source=substack&utm_medium=email&utm_content=share&action=share"><span>Share</span></a></p></div><h4 style="text-align: center;"><strong>&#167;</strong></h4><h2>3. Autonomous Work</h2><p>As AI agents take on more work autonomously, you need to control what they can access, what actions they can take &amp; when humans should step in.</p><p>Onward.</p><h3>Security and Governance</h3><p>Start with permissions:</p><ul><li><p><strong>Repository access:</strong> Limit which code agent can access.</p></li><li><p><strong>Tool access:</strong> Limit which tools &amp; operations it can use.</p></li><li><p><strong>Network access:</strong> Limit which external systems it can reach.</p></li><li><p><strong>Least privilege:</strong> Give AI agent only the permissions required for its task.</p></li></ul><p>The agent also needs to distinguish trusted instructions from <em>retrieved</em> content&#8230;</p><p>Code, comments &amp; documentation can contain instruction-like text. So treat retrieved content as data, and NOT trusted instructions. This reduces prompt injection<a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-28" href="#footnote-28" target="_self">28</a> risk.</p><p>Plus controls must continue after deployment<a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-29" href="#footnote-29" target="_self">29</a>&#8230; Monitoring helps detect <em>unexpected</em> behavior that only appears in production.</p><p><em>Blitzy applies several enterprise controls across its development workflow:</em></p><ul><li><p><strong>Data security:</strong> Customer data is encrypted in transit &amp; at rest. Customer code is not used for model training/stored directly.</p></li><li><p><strong>Isolated execution:</strong> Code generation runs in an air-gapped environment with an inbound-only VPC architecture<a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-30" href="#footnote-30" target="_self">30</a>.</p></li><li><p><strong>Deployment options:</strong> Blitzy supports cloud, VPC, black-box VPC, on-premises &amp; black-box on-premises deployments.</p></li><li><p><strong>Human review:</strong> You review the Technical Specification, approve the AAP before code generation &amp; review generated changes before merge.</p></li><li><p><strong>QA:</strong> Multiple QA agents review generated work before delivery. Customers perform their own QA &amp; security testing before deployment.</p></li><li><p><strong>Compliance:</strong> Blitzy maintains SOC 2 Type II compliance &amp; ISO 27001 certification<a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-31" href="#footnote-31" target="_self">31</a>.</p></li></ul><p>These controls put boundaries around what autonomous agents can access, execute &amp; ship&#8230;</p><h3>Human Oversight</h3><p>Human oversight defines when people need to review/intervene.</p><p>Here are two popular approaches:</p><ul><li><p><strong>Human-in-the-loop:</strong> A person must participate at specific decision points before the agent can continue.</p></li><li><p><strong><span>Human-on-the-loop:</span></strong><span>&nbsp;The agent operates more </span><em><span>autonomously</span></em><span> while a person supervises the process &amp; intervenes if necessary.</span></p></li></ul><p>A development workflow can use both&#8230;</p><p>You review specifications, approve the plan, review security-sensitive changes, &amp; make the final release decision.</p><p><em>Blitzy uses human review at key stages:</em></p><ul><li><p>Its Agent Action Plan creates a review point before code generation.</p></li><li><p>After generation, automated checks use tests, benchmarks, builds, and other signals to assess the result.</p></li></ul><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!Fhwl!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0b665c79-1a78-4d3c-8deb-734e845ff040_1672x941.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!Fhwl!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0b665c79-1a78-4d3c-8deb-734e845ff040_1672x941.png 424w, https://substackcdn.com/image/fetch/$s_!Fhwl!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0b665c79-1a78-4d3c-8deb-734e845ff040_1672x941.png 848w, https://substackcdn.com/image/fetch/$s_!Fhwl!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0b665c79-1a78-4d3c-8deb-734e845ff040_1672x941.png 1272w, https://substackcdn.com/image/fetch/$s_!Fhwl!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0b665c79-1a78-4d3c-8deb-734e845ff040_1672x941.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!Fhwl!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0b665c79-1a78-4d3c-8deb-734e845ff040_1672x941.png" width="1456" height="819" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/0b665c79-1a78-4d3c-8deb-734e845ff040_1672x941.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:819,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;&quot;,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" title="" srcset="https://substackcdn.com/image/fetch/$s_!Fhwl!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0b665c79-1a78-4d3c-8deb-734e845ff040_1672x941.png 424w, https://substackcdn.com/image/fetch/$s_!Fhwl!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0b665c79-1a78-4d3c-8deb-734e845ff040_1672x941.png 848w, https://substackcdn.com/image/fetch/$s_!Fhwl!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0b665c79-1a78-4d3c-8deb-734e845ff040_1672x941.png 1272w, https://substackcdn.com/image/fetch/$s_!Fhwl!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0b665c79-1a78-4d3c-8deb-734e845ff040_1672x941.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 buttonBase-GK1x3M"><svg aria-hidden="true" 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" class="icon-noB79L"><g><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 buttonBase-GK1x3M"><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 icon-noB79L"><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">As risk increases, agent autonomy decreases &amp; human oversight increases.</figcaption></figure></div><p>Yet some changes need closer review because mistakes can have massive consequences:</p><ul><li><p>External system integrations</p></li><li><p>Data persistence &amp; migrations</p></li><li><p>Regulatory/contractual business logic</p></li><li><p>Authentication &amp; session management</p></li></ul><p>These areas benefit from review by engineers, architects and/or domain experts who understand the relevant system &amp; requirements.</p><h4 style="text-align: center;"><strong>&#167;</strong></h4><h2>Blitzy SDD Workflow</h2><p>You&#8217;ve now seen the key parts of the SDD workflow.</p><p><em>But how does Blitzy bring them together into one development process?</em></p><p>Here&#8217;s how:</p><ol><li><p><strong>Codebase Onboarding:</strong> Blitzy analyzes the existing codebase across multiple repositories &amp; builds a dynamic Knowledge Graph of its architecture, dependencies &amp; relationships.</p></li><li><p><strong>Technical Specification:</strong> Blitzy generates a living Technical Specification to give you a view of its understanding of the existing codebase across repositories.</p></li><li><p><strong>Requirements:</strong> You write a generation prompt to describe what you want to build/change in Blitzy&#8217;s Workspace. You define the objective, scope, technical requirements, constraints &amp; success criteria &amp; attach supporting files when needed. </p></li><li><p><strong>Agent Action Plan:</strong> Blitzy combines the generation request with <em>global</em> codebase context to create an AAP. This defines the implementation approach, scope, dependencies &amp; required code changes.</p></li><li><p><strong>Plan review:</strong> You review, edit &amp; approve AAP before code generation.</p></li><li><p><strong>Multi-agent execution:</strong> Blitzy orchestrates specialized AI agents across different models to implement the plan. The agents work on different parts of the project.</p></li><li><p><strong>Validation:</strong> Blitzy orchestrates spec-adherence agents during execution &amp; validates outputs at multiple levels, from individual files through end-to-end testing.</p></li><li><p><strong>Review handoff:</strong> Blitzy delivers the generated changes with a Project Guide that explains what was built &amp; what work remains.</p></li><li><p><strong><span>Human review:</span></strong><span>&nbsp;You review the results, perform any remaining tasks based on the next step guide &amp; decide whether the pull request reaches production.</span></p></li></ol><p>Thus the requirements remain connected to the implementation throughout the workflow&#8230; and help to prevent the original intent from getting lost&#8230;</p><h4 style="text-align: center;"><strong>&#167;</strong></h4><h2><span>Final Thoughts</span></h2><p>Blitzy shows what an SDD workflow can enable: <em>AI agents can take on enterprise software changes while you keep control of the outcome.</em></p><p>Blitzy connects these steps through codebase understanding, Agent Action Plans, multi-agent execution, validation &amp; review.</p><p>You can reuse these ideas to build AI agents&#8230;</p><p>But implementing them at enterprise scale is hard. This is why I loved using Blitzy<a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-32" href="#footnote-32" target="_self">32</a>, and you should try it too.</p><div class="callout-block" data-callout="true"><p>Eligible organizations can try Blitzy at no cost with up to 1M lines of code reverse-engineered, 25K lines of code forward-engineered, and built-in Proactive Insights to identify and prioritize risks across the software estate.</p><p><strong><a href="https://blitzy.com/sandbox?utm_medium=paid_media&amp;utm_source=newsletter_systemdesign&amp;utm_campaign=sandbox">Try Blitzy on your codebase &#187;</a></strong></p></div><p>Thank you for reading.</p><p>&#8211; Neo</p><div><hr></div><p>If you find this newsletter valuable, share it with a friend and subscribe if you haven&#8217;t already. There are <a href="http://newsletter.systemdesign.one/subscribe?group=true">group discounts</a>, <a href="http://newsletter.systemdesign.one/subscribe?gift=true">gift options</a>, and <a href="https://newsletter.systemdesign.one/leaderboard">referral rewards</a> available.</p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://newsletter.systemdesign.one/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe now&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://newsletter.systemdesign.one/subscribe?"><span>Subscribe now</span></a></p><div><hr></div><div class="captioned-image-container"><figure><a class="image-link image2" target="_blank" href="https://www.linkedin.com/in/nk-systemdesign-one/" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!68aQ!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe4eab3a0-fda8-4df8-b651-0f976b223e9a_320x320.png 424w, https://substackcdn.com/image/fetch/$s_!68aQ!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe4eab3a0-fda8-4df8-b651-0f976b223e9a_320x320.png 848w, https://substackcdn.com/image/fetch/$s_!68aQ!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe4eab3a0-fda8-4df8-b651-0f976b223e9a_320x320.png 1272w, https://substackcdn.com/image/fetch/$s_!68aQ!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe4eab3a0-fda8-4df8-b651-0f976b223e9a_320x320.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!68aQ!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe4eab3a0-fda8-4df8-b651-0f976b223e9a_320x320.png" width="160" height="160" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/e4eab3a0-fda8-4df8-b651-0f976b223e9a_320x320.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:320,&quot;width&quot;:320,&quot;resizeWidth&quot;:160,&quot;bytes&quot;:121414,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:&quot;https://www.linkedin.com/in/nk-systemdesign-one/&quot;,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://newsletter.systemdesign.one/i/136161496?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe4eab3a0-fda8-4df8-b651-0f976b223e9a_320x320.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_!68aQ!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe4eab3a0-fda8-4df8-b651-0f976b223e9a_320x320.png 424w, https://substackcdn.com/image/fetch/$s_!68aQ!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe4eab3a0-fda8-4df8-b651-0f976b223e9a_320x320.png 848w, https://substackcdn.com/image/fetch/$s_!68aQ!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe4eab3a0-fda8-4df8-b651-0f976b223e9a_320x320.png 1272w, https://substackcdn.com/image/fetch/$s_!68aQ!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe4eab3a0-fda8-4df8-b651-0f976b223e9a_320x320.png 1456w" sizes="100vw" loading="lazy"></picture><div></div></div></a><figcaption class="image-caption"><strong>Find me on <a href="https://www.linkedin.com/in/nk-systemdesign-one/">LinkedIn</a> | <a href="https://x.com/intent/follow?screen_name=systemdesignone">Twitter</a> | <a href="https://www.instagram.com/systemdesignone/">Instagram</a></strong></figcaption></figure></div><div><hr></div><p><strong>Want to reach 250K+ tech professionals at scale? </strong>&#128240;</p><p>If your company wants to reach 250K+ tech professionals, <a href="https://newsletter.systemdesign.one/p/sponsorship">advertise with me</a>.</p><div><hr></div><p>Thank you for supporting this newsletter.</p><p>You are now 250,001+ readers strong, very close to 251k. Let&#8217;s try to get 251k readers by 29 September. Consider sharing this letter with your friends and get rewards.</p><p>Y&#8217;all are the best.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!6oWl!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2e739087-a910-4643-be36-997b6dd5b4af_800x500.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!6oWl!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2e739087-a910-4643-be36-997b6dd5b4af_800x500.png 424w, https://substackcdn.com/image/fetch/$s_!6oWl!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2e739087-a910-4643-be36-997b6dd5b4af_800x500.png 848w, https://substackcdn.com/image/fetch/$s_!6oWl!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2e739087-a910-4643-be36-997b6dd5b4af_800x500.png 1272w, https://substackcdn.com/image/fetch/$s_!6oWl!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2e739087-a910-4643-be36-997b6dd5b4af_800x500.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!6oWl!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2e739087-a910-4643-be36-997b6dd5b4af_800x500.png" width="590" height="368.75" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/2e739087-a910-4643-be36-997b6dd5b4af_800x500.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:500,&quot;width&quot;:800,&quot;resizeWidth&quot;:590,&quot;bytes&quot;:87878,&quot;alt&quot;:&quot;system design newsletter&quot;,&quot;title&quot;:&quot;system design newsletter&quot;,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://newsletter.systemdesign.one/i/163380418?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2e739087-a910-4643-be36-997b6dd5b4af_800x500.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="system design newsletter" title="system design newsletter" srcset="https://substackcdn.com/image/fetch/$s_!6oWl!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2e739087-a910-4643-be36-997b6dd5b4af_800x500.png 424w, https://substackcdn.com/image/fetch/$s_!6oWl!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2e739087-a910-4643-be36-997b6dd5b4af_800x500.png 848w, https://substackcdn.com/image/fetch/$s_!6oWl!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2e739087-a910-4643-be36-997b6dd5b4af_800x500.png 1272w, https://substackcdn.com/image/fetch/$s_!6oWl!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2e739087-a910-4643-be36-997b6dd5b4af_800x500.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 buttonBase-GK1x3M"><svg aria-hidden="true" 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" class="icon-noB79L"><g><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 buttonBase-GK1x3M"><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 icon-noB79L"><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 class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://newsletter.systemdesign.one/p/spec-driven-development-ai-agents?utm_source=substack&utm_medium=email&utm_content=share&action=share&quot;,&quot;text&quot;:&quot;Share&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://newsletter.systemdesign.one/p/spec-driven-development-ai-agents?utm_source=substack&utm_medium=email&utm_content=share&action=share"><span>Share</span></a></p><div><hr></div><h3>References</h3><ul><li><p><a href="https://docs.blitzy.com/introduction">Blitzy - Introduction - Blitzy Documentation</a></p></li><li><p><a href="https://docs.blitzy.com/project-lifecycle/tech-spec-review">Blitzy - Tech Spec Review - Blitzy Documentation</a></p></li><li><p><a href="https://docs.blitzy.com/project-lifecycle/aap-review">Blitzy - AAP Review - Blitzy Documentation</a></p></li><li><p><a href="https://arxiv.org/abs/2005.11401">Lewis, Patrick, et al. - Retrieval-Augmented Generation for Knowledge-Intensive NLP Tasks - arXiv:2005.11401</a></p></li><li><p><a href="https://github.com/github/spec-kit/blob/main/spec-driven.md">GitHub Spec Kit - Spec-Driven Development - GitHub</a></p></li><li><p><a href="https://github.github.io/spec-kit/reference/overview.html">GitHub Spec Kit - Reference - GitHub Pages</a></p></li><li><p><a href="https://www.microsoft.com/en-us/research/blog/graphrag-unlocking-llm-discovery-on-narrative-private-data/">Microsoft Research - GraphRAG: Unlocking LLM Discovery on Narrative Private Data - Microsoft</a></p></li><li><p><a href="https://genai.owasp.org/llm-top-10/">OWASP GenAI Security Project - OWASP Top 10 for LLM Applications 2025 - OWASP</a></p></li><li><p><a href="https://genai.owasp.org/resource/owasp-top-10-for-agentic-applications-for-2026/">OWASP GenAI Security Project - OWASP Top 10 for Agentic Applications 2026 - OWASP</a></p></li><li><p><a href="https://blitzy.com/security">Blitzy - Security - Trusted AI Software - Blitzy</a></p></li><li><p><a href="https://docs.blitzy.com/prompt-engineering/generation">Blitzy - Generation - Blitzy Documentation</a></p></li><li><p><a href="https://docs.blitzy.com/prompt-engineering/validation-checklist">Blitzy - Validation Checklist - Blitzy Documentation</a></p></li><li><p><a href="https://docs.blitzy.com/project-lifecycle/project-guide-review">Blitzy - Project Guide Review - Blitzy Documentation</a></p></li><li><p><a href="https://github.com/github/spec-kit/blob/main/.specify/memory/constitution.md">GitHub Spec Kit - Constitution - GitHub</a></p></li><li><p><a href="https://github.com/github/spec-kit/blob/main/templates/commands/converge.md">GitHub Spec Kit - Converge Command - GitHub</a></p></li><li><p><a href="https://docs.blitzy.com/quickstart">Blitzy - Quickstart - Blitzy Documentation</a></p></li><li><p><a href="https://paper.blitzy.com/blitzy_system_2_ai_platform_topping_swe_bench_verified.pdf">Blitzy - System 2 AI Platform: Topping SWE-Bench Verified - Blitzy</a></p></li><li><p><a href="https://blitzy.com/blog/blitzy-scores-a-record-84-95-on-swe-bench-pro">Blitzy - Blitzy Scores a Record 84.95% on SWE-Bench Pro - Blitzy Blog</a></p></li><li><p><a href="https://www.cxotalk.com/episode/autonomous-software-development-at-enterprise-scale-inside-a-1-000-developer-pilot-with-blitzy">CXOTalk - Autonomous Software Development at Enterprise Scale: Inside a 1,000-Developer Pilot with Blitzy - Episode 918</a></p></li><li><p><a href="https://www.youtube.com/watch?v=FYwt9jKHFfc">YouTube - How Agentic SDLC Turned a 5-Month Project Into 5 Days with Brian Elliott and Tom Jackson</a></p></li><li><p><a href="https://blitzy.com/blog/taking-the-long-and-less-traveled-road-is-the-only-path-to-autonomy">Blitzy - Taking the Long and Less-Traveled Road Is the Only Path to Autonomy - Blitzy Blog</a></p></li><li><p><a href="https://www.tipranks.com/news/private-companies/blitzy-showcases-qad-case-study-highlighting-3x-5x-gains-in-software-development-velocity">TipRanks - Blitzy Showcases QAD Case Study Highlighting 3x-5x Gains in Software Development Velocity - TipRanks</a></p></li><li><p><a href="https://blitzy.com/blog/hello-world-the-blitzy-c-compiler-has-arrived">Blitzy - Hello World! The Blitzy C Compiler Has Arrived - Blitzy Blog</a></p></li><li><p><a href="https://blitzy.com/blog/a-quick-blitzy-chat-3-codebases-takes-on-prompting">Blitzy - A Quick Blitzy Chat: 3 Codebases Take on Prompting - Blitzy Blog</a></p></li><li><p><a href="https://github.com/github/spec-kit/blob/main/newsletters/2026-June.md">GitHub Spec Kit - June 2026 Newsletter</a></p></li><li><p><a href="https://arxiv.org/abs/2108.09293">Pearce, Hammond, et al. - Asleep at the Keyboard? Assessing the Security of GitHub Copilot&#8217;s Code Contributions - arXiv:2108.09293</a></p></li><li><p><a href="https://trust.blitzy.com/">Blitzy - Trust Center</a></p></li></ul><div class="footnote" data-component-name="FootnoteToDOM"><a id="footnote-1" href="#footnote-anchor-1" class="footnote-number" contenteditable="false" target="_self">1</a><div class="footnote-content"><p>An AI agent is a software system that uses an AI model to decide what actions to take, use tools &amp; execute multi-step tasks toward a goal.</p></div></div><div class="footnote" data-component-name="FootnoteToDOM"><a id="footnote-2" href="#footnote-anchor-2" class="footnote-number" contenteditable="false" target="_self">2</a><div class="footnote-content"><p>Tool: An external capability an AI agent can call to retrieve information or perform an action.</p></div></div><div class="footnote" data-component-name="FootnoteToDOM"><a id="footnote-3" href="#footnote-anchor-3" class="footnote-number" contenteditable="false" target="_self">3</a><div class="footnote-content"><p>Think of ordering a burger at a restaurant:</p><ul><li><p><strong>Spec-first:</strong> You place your order before the kitchen starts cooking.</p></li><li><p><strong>Spec-anchored:</strong> Your order remains the reference as the meal is prepared, and if the order changes.</p></li><li><p><strong>Spec-as-source:</strong> You change the order itself, and the kitchen uses the updated order to produce the meal again.</p></li></ul></div></div><div class="footnote" data-component-name="FootnoteToDOM"><a id="footnote-4" href="#footnote-anchor-4" class="footnote-number" contenteditable="false" target="_self">4</a><div class="footnote-content"><h4>What SDD Still Hasn&#8217;t Solved</h4><p>SDD gives engineering teams a structured way to move from requirements to implementation, but some practical questions remain:</p><ul><li><p><strong>How much autonomy should an agent have?</strong> A reversible, low-risk change may need less oversight. A change to a critical system may require tighter limits and more human review.</p></li><li><p><strong>How do specifications stay aligned with code?</strong> If the implementation changes, the specification needs to change with it. When they disagree, someone still has to decide which one reflects the intended behavior.</p></li><li><p><strong>How do you provide the right context?</strong> The information an agent needs can vary significantly from one task to another. Teams need reliable ways to provide and maintain that context.</p></li><li><p><strong>How do you know SDD is working?</strong> Possible measures include correctness, development time, rework, defects, and human review effort. The challenge is deciding which ones matter for a particular team.</p></li><li><p><strong>Who owns all of this?</strong> SDD adds work beyond writing code. Specifications, system context, validation, and governance must be maintained alongside implementation. How teams divide those responsibilities will shape how SDD works in practice.</p></li></ul></div></div><div class="footnote" data-component-name="FootnoteToDOM"><a id="footnote-5" href="#footnote-anchor-5" class="footnote-number" contenteditable="false" target="_self">5</a><div class="footnote-content"><p>The specification defines the behavior you want, but Blitzy also needs to understand the codebase it will change&#8230;</p><p>For an existing codebase, Blitzy first ingests the code &amp; builds a structured representation of its architecture, dependencies, and existing behavior. It also produces a living <strong>Technical Specification</strong> that gives you a reviewable view of its understanding of the system.</p><p>When you submit your requirements, Blitzy analyzes them against this codebase context.</p></div></div><div class="footnote" data-component-name="FootnoteToDOM"><a id="footnote-6" href="#footnote-anchor-6" class="footnote-number" contenteditable="false" target="_self">6</a><div class="footnote-content"><p><strong>Agent Action Plan (AAP)</strong> is Blitzy&#8217;s implementation blueprint that defines the code changes, dependencies, design decisions, and scope agents will follow during code generation.</p></div></div><div class="footnote" data-component-name="FootnoteToDOM"><a id="footnote-7" href="#footnote-anchor-7" class="footnote-number" contenteditable="false" target="_self">7</a><div class="footnote-content"><p>Project-level instructions are reusable rules that apply across the project, rather than requirements for one specific feature.</p></div></div><div class="footnote" data-component-name="FootnoteToDOM"><a id="footnote-8" href="#footnote-anchor-8" class="footnote-number" contenteditable="false" target="_self">8</a><div class="footnote-content"><p>For notification migration, the generation prompt could define which task events create notifications, who receives them, which channels deliver them, and how the existing notification flow should behave during the migration.</p></div></div><div class="footnote" data-component-name="FootnoteToDOM"><a id="footnote-9" href="#footnote-anchor-9" class="footnote-number" contenteditable="false" target="_self">9</a><div class="footnote-content"><p>Shows how the existing codebase works &amp; where the change fits.</p></div></div><div class="footnote" data-component-name="FootnoteToDOM"><a id="footnote-10" href="#footnote-anchor-10" class="footnote-number" contenteditable="false" target="_self">10</a><div class="footnote-content"><p>Brownfield development: the agent is working within an existing system rather than starting from scratch. You point an AI agent at your application&#8217;s repository (or repos).</p></div></div><div class="footnote" data-component-name="FootnoteToDOM"><a id="footnote-11" href="#footnote-anchor-11" class="footnote-number" contenteditable="false" target="_self">11</a><div class="footnote-content"><p>Blitzy uses this context to provide a queryable view of the codebase&#8217;s architecture, dependencies, patterns, and conventions.</p></div></div><div class="footnote" data-component-name="FootnoteToDOM"><a id="footnote-12" href="#footnote-anchor-12" class="footnote-number" contenteditable="false" target="_self">12</a><div class="footnote-content"><p>TaskAssignment triggers an event. Another component handles the event and calls NotificationService. That service triggers EmailWorker, which checks Preferences before sending the email.</p></div></div><div class="footnote" data-component-name="FootnoteToDOM"><a id="footnote-13" href="#footnote-anchor-13" class="footnote-number" contenteditable="false" target="_self">13</a><div class="footnote-content"><p>A knowledge graph represents both:</p><ul><li><p>What exists</p></li><li><p>How those things connect</p></li></ul></div></div><div class="footnote" data-component-name="FootnoteToDOM"><a id="footnote-14" href="#footnote-anchor-14" class="footnote-number" contenteditable="false" target="_self">14</a><div class="footnote-content"><p>This gives the AI agent something closer to a map of the codebase than a list of files.</p></div></div><div class="footnote" data-component-name="FootnoteToDOM"><a id="footnote-15" href="#footnote-anchor-15" class="footnote-number" contenteditable="false" target="_self">15</a><div class="footnote-content"><p>This helps the agent understand the impact of a change: If it changes <code>TaskAssignment</code>, it can find which downstream components might be affected.</p></div></div><div class="footnote" data-component-name="FootnoteToDOM"><a id="footnote-16" href="#footnote-anchor-16" class="footnote-number" contenteditable="false" target="_self">16</a><div class="footnote-content"><p>Relevant components and the relationships between them.</p></div></div><div class="footnote" data-component-name="FootnoteToDOM"><a id="footnote-17" href="#footnote-anchor-17" class="footnote-number" contenteditable="false" target="_self">17</a><div class="footnote-content"><p>A component can be relevant because it calls the code being changed, consumes an event it produces, shares the same data model, or relies on its current behavior. Finding these relationships means understanding how different parts of the codebase connect, not simply reading more files.</p></div></div><div class="footnote" data-component-name="FootnoteToDOM"><a id="footnote-18" href="#footnote-anchor-18" class="footnote-number" contenteditable="false" target="_self">18</a><div class="footnote-content"><p>Blitzy describes this as following an execution thread forward from a seed function.</p></div></div><div class="footnote" data-component-name="FootnoteToDOM"><a id="footnote-19" href="#footnote-anchor-19" class="footnote-number" contenteditable="false" target="_self">19</a><div class="footnote-content"><p>Blitzy describes this as useful for impact analysis.</p></div></div><div class="footnote" data-component-name="FootnoteToDOM"><a id="footnote-20" href="#footnote-anchor-20" class="footnote-number" contenteditable="false" target="_self">20</a><div class="footnote-content"><p>Agent Action Plan (<strong>AAP</strong>) is Blitzy&#8217;s implementation plan for a development task.</p><p>It defines how Blitzy&#8217;s agents will implement the requested change, including relevant code changes, files, dependencies, design decisions, and scope.</p><ul><li><p>Generation request = what you want changed</p></li><li><p>AAP = how Blitzy plans to make that change</p></li></ul></div></div><div class="footnote" data-component-name="FootnoteToDOM"><a id="footnote-21" href="#footnote-anchor-21" class="footnote-number" contenteditable="false" target="_self">21</a><div class="footnote-content"><p>The specification can define what the agent can change &amp; what must remain untouched.</p></div></div><div class="footnote" data-component-name="FootnoteToDOM"><a id="footnote-22" href="#footnote-anchor-22" class="footnote-number" contenteditable="false" target="_self">22</a><div class="footnote-content"><p>The orchestration layer can dynamically plan, spawn, and coordinate specialized agents, while parallelizing the Agent Action Plan into workstreams covering architecture, implementation, testing, debugging, validation, and integration.</p></div></div><div class="footnote" data-component-name="FootnoteToDOM"><a id="footnote-23" href="#footnote-anchor-23" class="footnote-number" contenteditable="false" target="_self">23</a><div class="footnote-content"><h4>Real-World Example: BCC</h4><p>Blitzy built <em>BCC, a Rust-based C compiler</em>, with 229,983 lines of Rust across 129 source files and 14 SIMD headers. The project coordinated <strong>3,600+ agents across 127 files</strong> and produced <strong>2,271 passing tests</strong>.</p><p>The example shows Blitzy&#8217;s multi-agent approach at project scale: agents work across different parts of the codebase, and testing validates the combined implementation.</p></div></div><div class="footnote" data-component-name="FootnoteToDOM"><a id="footnote-24" href="#footnote-anchor-24" class="footnote-number" contenteditable="false" target="_self">24</a><div class="footnote-content"><p><strong>AAP review:</strong> Before code generation, you review the plan for requirement coverage, scope, dependencies, design decisions, edge cases, and expected changes. An incomplete AAP can lead to incomplete code.</p></div></div><div class="footnote" data-component-name="FootnoteToDOM"><a id="footnote-25" href="#footnote-anchor-25" class="footnote-number" contenteditable="false" target="_self">25</a><div class="footnote-content"><p><strong>Build &amp; test:</strong> After code generation, you build &amp; test changes to verify the implementation behaves as described, rather than only checking whether the code compiles.</p></div></div><div class="footnote" data-component-name="FootnoteToDOM"><a id="footnote-26" href="#footnote-anchor-26" class="footnote-number" contenteditable="false" target="_self">26</a><div class="footnote-content"><p>CI checks: Automated Continuous Integration checks that verify code changes build, pass tests &amp; meet quality rules before they&#8217;re merged.</p></div></div><div class="footnote" data-component-name="FootnoteToDOM"><a id="footnote-27" href="#footnote-anchor-27" class="footnote-number" contenteditable="false" target="_self">27</a><div class="footnote-content"><p>The Project Guide makes this comparison more structured.</p></div></div><div class="footnote" data-component-name="FootnoteToDOM"><a id="footnote-28" href="#footnote-anchor-28" class="footnote-number" contenteditable="false" target="_self">28</a><div class="footnote-content"><p><strong>Prompt injection:</strong> Malicious or untrusted content that tries to manipulate an AI agent into following unintended instructions.</p></div></div><div class="footnote" data-component-name="FootnoteToDOM"><a id="footnote-29" href="#footnote-anchor-29" class="footnote-number" contenteditable="false" target="_self">29</a><div class="footnote-content"><p>NIST describes post-deployment monitoring as important for checking whether AI systems continue to operate as expected and for identifying unforeseen outputs and consequences.</p></div></div><div class="footnote" data-component-name="FootnoteToDOM"><a id="footnote-30" href="#footnote-anchor-30" class="footnote-number" contenteditable="false" target="_self">30</a><div class="footnote-content"><p><strong>Inbound-only Virtual Private Cloud (VPC) architecture:</strong> Your system can receive approved incoming connections, but it cannot freely connect out to the internet or external systems.</p></div></div><div class="footnote" data-component-name="FootnoteToDOM"><a id="footnote-31" href="#footnote-anchor-31" class="footnote-number" contenteditable="false" target="_self">31</a><div class="footnote-content"><ul><li><p><strong>SOC 2 Type II compliance:</strong> Shows a company&#8217;s security controls have been independently audited and found to operate effectively over a period of time.</p></li><li><p><strong>International Organization for Standardization (ISO) 27001 certification:</strong> Shows a company follows an independently audited standard for managing information security.</p></li></ul></div></div><div class="footnote" data-component-name="FootnoteToDOM"><a id="footnote-32" href="#footnote-anchor-32" class="footnote-number" contenteditable="false" target="_self">32</a><div class="footnote-content"><p><em>Thanks to Blitzy for partnering on this newsletter and sharing highly valuable information.</em></p></div></div>]]></content:encoded></item><item><title><![CDATA[One Claude Is Not Enough. I Spawned an AI Team and Let It Manage Itself]]></title><description><![CDATA[#180: Part 3 - Claude Code 24/7]]></description><link>https://newsletter.systemdesign.one/p/claude-code-subagents-vs-agent-teams</link><guid isPermaLink="false">https://newsletter.systemdesign.one/p/claude-code-subagents-vs-agent-teams</guid><dc:creator><![CDATA[Neo Kim]]></dc:creator><pubDate>Mon, 21 Sep 2026 12:29:22 GMT</pubDate><enclosure url="https://substack-post-media.s3.amazonaws.com/public/images/e7e98f34-9872-4671-916d-7c56936ae656_1280x720.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p></p><p></p><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://newsletter.systemdesign.one/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"><span data-color="#3a7bf9" style="color: rgb(58, 123, 249);">Get my system design playbook for FREE on newsletter signup:</span></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><ul><li><p><em><a href="https://newsletter.systemdesign.one/p/claude-code-subagents-vs-agent-teams/?action=share">Share this letter</a> &amp; I&#8217;ll send you some rewards for the referrals.</em></p></li></ul><div><hr></div><p><span>You paste your prompt into Claude Code and wait for the answer.</span></p><p><span>i.e., one agent gets one task &amp; you wait for it to finish.</span></p><p><span>But what if your task is more complicated than this?</span></p><p><span>Let&#8217;s say you&#8217;re building a feature that needs both backend &amp; frontend code, connected to each other.</span></p><p><em><span>Did you know you can assign multiple agents with different instructions &amp; have them work in parallel?</span></em></p><p><span>Let&#8217;s get started with the fundamentals&#8230;</span></p><h4 style="text-align: center;"><strong>&#167;</strong></h4><div class="callout-block" data-callout="true"><h3><strong><a href="https://getunblocked.com/events/how-to-stop-babysitting-your-agents-sep-23/?utm_source=systemdesign&amp;utm_medium=email&amp;utm_campaign=primary">[Webinar] How to stop babysitting your agents (Partner)</a></strong></h3><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://getunblocked.com/events/how-to-stop-babysitting-your-agents-sep-23/?utm_source=systemdesign&amp;utm_medium=email&amp;utm_campaign=primary" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!CmS3!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2da6f38b-7eb4-4472-9cb3-3935462ae703_1600x900.png 424w, https://substackcdn.com/image/fetch/$s_!CmS3!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2da6f38b-7eb4-4472-9cb3-3935462ae703_1600x900.png 848w, https://substackcdn.com/image/fetch/$s_!CmS3!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2da6f38b-7eb4-4472-9cb3-3935462ae703_1600x900.png 1272w, https://substackcdn.com/image/fetch/$s_!CmS3!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2da6f38b-7eb4-4472-9cb3-3935462ae703_1600x900.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!CmS3!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2da6f38b-7eb4-4472-9cb3-3935462ae703_1600x900.png" width="1456" height="819" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/2da6f38b-7eb4-4472-9cb3-3935462ae703_1600x900.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:819,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:1099878,&quot;alt&quot;:&quot;&quot;,&quot;title&quot;:&quot;&quot;,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:&quot;https://getunblocked.com/events/how-to-stop-babysitting-your-agents-sep-23/?utm_source=systemdesign&amp;utm_medium=email&amp;utm_campaign=primary&quot;,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:&quot;https://newsletter.systemdesign.one/i/215411410?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2da6f38b-7eb4-4472-9cb3-3935462ae703_1600x900.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" title="" srcset="https://substackcdn.com/image/fetch/$s_!CmS3!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2da6f38b-7eb4-4472-9cb3-3935462ae703_1600x900.png 424w, https://substackcdn.com/image/fetch/$s_!CmS3!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2da6f38b-7eb4-4472-9cb3-3935462ae703_1600x900.png 848w, https://substackcdn.com/image/fetch/$s_!CmS3!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2da6f38b-7eb4-4472-9cb3-3935462ae703_1600x900.png 1272w, https://substackcdn.com/image/fetch/$s_!CmS3!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2da6f38b-7eb4-4472-9cb3-3935462ae703_1600x900.png 1456w" sizes="100vw" loading="lazy" 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 buttonBase-GK1x3M"><svg aria-hidden="true" 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" class="icon-noB79L"><g><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 buttonBase-GK1x3M"><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 icon-noB79L"><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>Agents can generate code. Getting it right for your system, team conventions, and past decisions is the hard part. You end up wasting time and tokens in correction loops.</p><p>More MCPs give agents access to information but not understanding. The teams pulling ahead use a context layer to give agents exactly what they need.</p><p><strong><a href="https://getunblocked.com/events/how-to-stop-babysitting-your-agents-sep-23/?utm_source=systemdesign&amp;utm_medium=email&amp;utm_campaign=primary">Join live on Sep 23 (FREE)</a></strong> to see:</p><ul><li><p>Where teams get stuck on the AI maturity curve</p></li><li><p>How a context layer solves for quality, efficiency, and cost</p></li><li><p>Live demo: the same coding task with and without a context layer</p></li></ul><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://getunblocked.com/events/how-to-stop-babysitting-your-agents-sep-23/?utm_source=systemdesign&amp;utm_medium=email&amp;utm_campaign=primary&quot;,&quot;text&quot;:&quot;Register now&quot;,&quot;action&quot;:null,&quot;class&quot;:&quot;button-wrapper&quot;}" data-component-name="ButtonCreateButton"><a class="button primary button-wrapper" href="https://getunblocked.com/events/how-to-stop-babysitting-your-agents-sep-23/?utm_source=systemdesign&amp;utm_medium=email&amp;utm_campaign=primary"><span>Register now</span></a></p><p><em>(Thanks to <a href="https://getunblocked.com/events/how-to-stop-babysitting-your-agents-sep-23/?utm_source=systemdesign&amp;utm_medium=email&amp;utm_campaign=primary">Unblocked</a> for partnering on this newsletter.)</em></p></div><h4 style="text-align: center;"><strong>&#167;</strong></h4><p>I want to introduce <strong><a href="https://www.learnwithmeai.com/welcome">Gencay</a></strong> as the guest author.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://www.learnwithmeai.com/welcome" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!i2sU!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F79774ca3-8968-45f9-bb13-fb23bc404b4f_1442x668.png 424w, https://substackcdn.com/image/fetch/$s_!i2sU!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F79774ca3-8968-45f9-bb13-fb23bc404b4f_1442x668.png 848w, https://substackcdn.com/image/fetch/$s_!i2sU!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F79774ca3-8968-45f9-bb13-fb23bc404b4f_1442x668.png 1272w, https://substackcdn.com/image/fetch/$s_!i2sU!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F79774ca3-8968-45f9-bb13-fb23bc404b4f_1442x668.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!i2sU!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F79774ca3-8968-45f9-bb13-fb23bc404b4f_1442x668.png" width="1442" height="668" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/79774ca3-8968-45f9-bb13-fb23bc404b4f_1442x668.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:668,&quot;width&quot;:1442,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;&quot;,&quot;title&quot;:&quot;&quot;,&quot;type&quot;:null,&quot;href&quot;:&quot;https://www.learnwithmeai.com/welcome&quot;,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" title="" srcset="https://substackcdn.com/image/fetch/$s_!i2sU!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F79774ca3-8968-45f9-bb13-fb23bc404b4f_1442x668.png 424w, https://substackcdn.com/image/fetch/$s_!i2sU!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F79774ca3-8968-45f9-bb13-fb23bc404b4f_1442x668.png 848w, https://substackcdn.com/image/fetch/$s_!i2sU!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F79774ca3-8968-45f9-bb13-fb23bc404b4f_1442x668.png 1272w, https://substackcdn.com/image/fetch/$s_!i2sU!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F79774ca3-8968-45f9-bb13-fb23bc404b4f_1442x668.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 buttonBase-GK1x3M"><svg aria-hidden="true" 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" class="icon-noB79L"><g><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 buttonBase-GK1x3M"><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 icon-noB79L"><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>He has been building with AI since ChatGPT first shipped in 2022.</p><p>For years, he built for clients on Upwork: 7,300+ hours of it.</p><p>Now he builds in the open and shares every piece of it on <strong><a href="https://www.learnwithmeai.com/welcome">LearnAIWithMe</a></strong>, every Monday, Wednesday &amp; Friday.</p><p>Not just theory for its own sake. One real build at a time, from idea to running system.</p><h4 style="text-align: center;"><strong>&#167;</strong></h4><p><em>Here&#8217;s what you&#8217;ll find inside this newsletter:</em></p><ul><li><p><strong>The two ways to run more than one Claude at once.</strong> Subagents and agent teams, and why they solve different kinds of problems.</p></li><li><p><strong>What a subagent actually gives you.</strong> An isolated worker with its own context window, plus the report-back model that keeps your main session clean and your token cost low.</p></li><li><p><strong>Why agent teams cost more, and when that&#8217;s worth it.</strong> The tradeoffs around token usage, coordination, and when tasks with real handoffs justify a full team instead of parallel subagents.</p></li><li><p><strong>What changes when agents need to share the same repo.</strong> Git worktrees, a shared CLAUDE.md as the coordination layer, and the enforcement that keeps three agents from stepping on each other&#8217;s files.</p></li><li><p><strong>Where hooks and the Writer/Reviewer pattern fit in.</strong> What they catch, when they fire, and how they compare with relying on CLAUDE.md alone when you need work validated automatically.</p></li></ul><p></p><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://newsletter.systemdesign.one/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"><em><span data-color="#3a7bf9" style="color: rgb(58, 123, 249);">Golden members get all letters like these!&#8230;</span></em></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><h4 style="text-align: center;"><strong>&#167;</strong></h4><h2><span>Subagents, isolated workers</span></h2><p><span>A subagent</span><a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-1" href="#footnote-1" target="_self">1</a><span> is a second Claude, with its own context window, its own limits, and its own set of instructions</span><a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-2" href="#footnote-2" target="_self">2</a><span>.</span></p><p><span>It works independently &amp; returns the results. You can create it when you have a side task and/or when you want more than one specified Claude working in parallel.</span></p><p><span>Let&#8217;s say you&#8217;ll test your website, and you want to check two different things at once. One subagent tests </span><em><span>&#8220;AI Labs,&#8221;</span></em><span> and another tests </span><em><span>&#8220;AI Academy&#8221; </span></em><span>Page.</span></p><p><span>They run in parallel, each in its own window, and you read two short reports instead of one long mess.</span></p><p><span>Let me show you my website;</span> I improve its pages often.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!PPNh!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7f1a19d0-cd5b-4bb1-9fc4-2208418c4bca_2048x1078.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!PPNh!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7f1a19d0-cd5b-4bb1-9fc4-2208418c4bca_2048x1078.png 424w, https://substackcdn.com/image/fetch/$s_!PPNh!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7f1a19d0-cd5b-4bb1-9fc4-2208418c4bca_2048x1078.png 848w, https://substackcdn.com/image/fetch/$s_!PPNh!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7f1a19d0-cd5b-4bb1-9fc4-2208418c4bca_2048x1078.png 1272w, https://substackcdn.com/image/fetch/$s_!PPNh!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7f1a19d0-cd5b-4bb1-9fc4-2208418c4bca_2048x1078.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!PPNh!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7f1a19d0-cd5b-4bb1-9fc4-2208418c4bca_2048x1078.png" width="1456" height="766" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/7f1a19d0-cd5b-4bb1-9fc4-2208418c4bca_2048x1078.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:766,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!PPNh!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7f1a19d0-cd5b-4bb1-9fc4-2208418c4bca_2048x1078.png 424w, https://substackcdn.com/image/fetch/$s_!PPNh!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7f1a19d0-cd5b-4bb1-9fc4-2208418c4bca_2048x1078.png 848w, https://substackcdn.com/image/fetch/$s_!PPNh!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7f1a19d0-cd5b-4bb1-9fc4-2208418c4bca_2048x1078.png 1272w, https://substackcdn.com/image/fetch/$s_!PPNh!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7f1a19d0-cd5b-4bb1-9fc4-2208418c4bca_2048x1078.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 buttonBase-GK1x3M"><svg aria-hidden="true" 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" class="icon-noB79L"><g><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 buttonBase-GK1x3M"><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 icon-noB79L"><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><span>So after every change, I assign two agents, one to each page, using this prompt.</span></p><div class="highlighted_code_block" data-attrs="{&quot;language&quot;:&quot;plaintext&quot;,&quot;nodeId&quot;:&quot;a9b074a2-6f60-4ff2-9556-ebb2275e1d30&quot;}" data-component-name="HighlightedCodeBlockToDOM"><pre class="shiki"><code class="language-plaintext">Create two subagents and run them in parallel.

One opens the AI Labs page in Chrome and reports layout or console problems,
the other does the same for AI Academy, and each reports its issues separately.</code></pre></div><p><span>After pasting the prompt, it assigns two agents that run in parallel.</span></p><div class="captioned-image-container"><figure><div class="image-link image2" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!lZK_!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa74c4ef9-742f-4b55-bca3-136c87f5a89a_2048x216.png 424w, https://substackcdn.com/image/fetch/$s_!lZK_!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa74c4ef9-742f-4b55-bca3-136c87f5a89a_2048x216.png 848w, https://substackcdn.com/image/fetch/$s_!lZK_!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa74c4ef9-742f-4b55-bca3-136c87f5a89a_2048x216.png 1272w, https://substackcdn.com/image/fetch/$s_!lZK_!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa74c4ef9-742f-4b55-bca3-136c87f5a89a_2048x216.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!lZK_!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa74c4ef9-742f-4b55-bca3-136c87f5a89a_2048x216.png" width="1456" height="154" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/a74c4ef9-742f-4b55-bca3-136c87f5a89a_2048x216.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:154,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!lZK_!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa74c4ef9-742f-4b55-bca3-136c87f5a89a_2048x216.png 424w, https://substackcdn.com/image/fetch/$s_!lZK_!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa74c4ef9-742f-4b55-bca3-136c87f5a89a_2048x216.png 848w, https://substackcdn.com/image/fetch/$s_!lZK_!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa74c4ef9-742f-4b55-bca3-136c87f5a89a_2048x216.png 1272w, https://substackcdn.com/image/fetch/$s_!lZK_!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa74c4ef9-742f-4b55-bca3-136c87f5a89a_2048x216.png 1456w" sizes="100vw" loading="lazy"></picture><div></div></div></div></figure></div><p><span>They're testing websites as we speak.</span></p><p><span>They took screenshots, found issues, and solved them.</span></p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!kPXD!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F956369e2-1221-4320-bb88-e2f7d39897a6_2048x760.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!kPXD!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F956369e2-1221-4320-bb88-e2f7d39897a6_2048x760.png 424w, https://substackcdn.com/image/fetch/$s_!kPXD!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F956369e2-1221-4320-bb88-e2f7d39897a6_2048x760.png 848w, https://substackcdn.com/image/fetch/$s_!kPXD!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F956369e2-1221-4320-bb88-e2f7d39897a6_2048x760.png 1272w, https://substackcdn.com/image/fetch/$s_!kPXD!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F956369e2-1221-4320-bb88-e2f7d39897a6_2048x760.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!kPXD!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F956369e2-1221-4320-bb88-e2f7d39897a6_2048x760.png" width="1456" height="540" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/956369e2-1221-4320-bb88-e2f7d39897a6_2048x760.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:540,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!kPXD!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F956369e2-1221-4320-bb88-e2f7d39897a6_2048x760.png 424w, https://substackcdn.com/image/fetch/$s_!kPXD!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F956369e2-1221-4320-bb88-e2f7d39897a6_2048x760.png 848w, https://substackcdn.com/image/fetch/$s_!kPXD!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F956369e2-1221-4320-bb88-e2f7d39897a6_2048x760.png 1272w, https://substackcdn.com/image/fetch/$s_!kPXD!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F956369e2-1221-4320-bb88-e2f7d39897a6_2048x760.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 buttonBase-GK1x3M"><svg aria-hidden="true" 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" class="icon-noB79L"><g><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 buttonBase-GK1x3M"><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 icon-noB79L"><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><span>Here is the final report:</span></p><div class="captioned-image-container"><figure><div class="image-link image2" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!1YDa!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdd343d43-0ac6-4142-a6f5-897414066ba8_2048x427.png 424w, https://substackcdn.com/image/fetch/$s_!1YDa!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdd343d43-0ac6-4142-a6f5-897414066ba8_2048x427.png 848w, https://substackcdn.com/image/fetch/$s_!1YDa!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdd343d43-0ac6-4142-a6f5-897414066ba8_2048x427.png 1272w, https://substackcdn.com/image/fetch/$s_!1YDa!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdd343d43-0ac6-4142-a6f5-897414066ba8_2048x427.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!1YDa!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdd343d43-0ac6-4142-a6f5-897414066ba8_2048x427.png" width="1456" height="304" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/dd343d43-0ac6-4142-a6f5-897414066ba8_2048x427.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:304,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!1YDa!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdd343d43-0ac6-4142-a6f5-897414066ba8_2048x427.png 424w, https://substackcdn.com/image/fetch/$s_!1YDa!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdd343d43-0ac6-4142-a6f5-897414066ba8_2048x427.png 848w, https://substackcdn.com/image/fetch/$s_!1YDa!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdd343d43-0ac6-4142-a6f5-897414066ba8_2048x427.png 1272w, https://substackcdn.com/image/fetch/$s_!1YDa!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdd343d43-0ac6-4142-a6f5-897414066ba8_2048x427.png 1456w" sizes="100vw" loading="lazy"></picture><div></div></div></div></figure></div><p><span>I approved the fixes.</span></p><p><span>But what if I want these agents to work in sequence and pass their work to one another? Then I should use </span><em><span>agent orchestration</span></em><span>&#8230;</span></p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://newsletter.systemdesign.one/p/claude-code-subagents-vs-agent-teams?utm_source=substack&utm_medium=email&utm_content=share&action=share&quot;,&quot;text&quot;:&quot;Share&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://newsletter.systemdesign.one/p/claude-code-subagents-vs-agent-teams?utm_source=substack&utm_medium=email&utm_content=share&action=share"><span>Share</span></a></p><h4 style="text-align: center;"><strong>&#167;</strong></h4><h2><span>Agent Orchestration</span></h2><p><span>Agent orchestration</span><a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-3" href="#footnote-3" target="_self">3</a><span> turns separate Claudes into a team.</span></p><p><span>It turns your Claude into the team, spawns teammates, hands out tasks, and collects the results. And here teammates talk to each other, share tasks, and pass work.</span></p><p><span>Agent teams</span><a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-4" href="#footnote-4" target="_self">4</a><span> are experimental and off by default.</span></p><p><span>So if you have not enabled them yet, just tell Claude:</span></p><div class="highlighted_code_block" data-attrs="{&quot;language&quot;:&quot;plaintext&quot;,&quot;nodeId&quot;:&quot;64542ed3-a798-4270-827a-1f7b5385fcd8&quot;}" data-component-name="HighlightedCodeBlockToDOM"><pre class="shiki"><code class="language-plaintext">Add CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS=1 to my settings.json

if it is not set already, then confirm it is active.</code></pre></div><p><span>After you paste the prompt, Claude asks for your approval to change the file; once you approve it, you can use Claude agent orchestration.</span></p><p><span>Let&#8217;s create one, and a fun one:</span></p><p><span>Boids</span><a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-5" href="#footnote-5" target="_self">5</a><span> is the classic flocking algorithm, where three simple rules make hundreds of dots move like a flock of birds. One teammate researches the rules, the second verifies every claim, and the third builds only from what survives.</span></p><p><span>Paste this prompt:</span></p><div class="highlighted_code_block" data-attrs="{&quot;language&quot;:&quot;plaintext&quot;,&quot;nodeId&quot;:&quot;70c01651-4bc8-4ca7-b139-b270376a6bb5&quot;}" data-component-name="HighlightedCodeBlockToDOM"><pre class="shiki"><code class="language-plaintext">Spawn three teammates working in sequence.

The first researches the boids flocking algorithm
and its three rules from the original sources,
and writes the findings to findings.md.

The second waits,
verifies every claim in the file against the sources,
and marks each one as confirmed or wrong.

The third waits for the review,
then builds a single HTML page where hundreds of boids flock live on screen,
using only the confirmed.</code></pre></div><p><span>Now, Claude assigns the researcher agent first.</span></p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!fbCN!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd50ac037-7a73-49c4-826a-9cf8c990ed53_1614x1396.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!fbCN!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd50ac037-7a73-49c4-826a-9cf8c990ed53_1614x1396.png 424w, https://substackcdn.com/image/fetch/$s_!fbCN!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd50ac037-7a73-49c4-826a-9cf8c990ed53_1614x1396.png 848w, https://substackcdn.com/image/fetch/$s_!fbCN!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd50ac037-7a73-49c4-826a-9cf8c990ed53_1614x1396.png 1272w, https://substackcdn.com/image/fetch/$s_!fbCN!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd50ac037-7a73-49c4-826a-9cf8c990ed53_1614x1396.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!fbCN!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd50ac037-7a73-49c4-826a-9cf8c990ed53_1614x1396.png" width="1456" height="1259" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/d50ac037-7a73-49c4-826a-9cf8c990ed53_1614x1396.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1259,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!fbCN!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd50ac037-7a73-49c4-826a-9cf8c990ed53_1614x1396.png 424w, https://substackcdn.com/image/fetch/$s_!fbCN!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd50ac037-7a73-49c4-826a-9cf8c990ed53_1614x1396.png 848w, https://substackcdn.com/image/fetch/$s_!fbCN!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd50ac037-7a73-49c4-826a-9cf8c990ed53_1614x1396.png 1272w, https://substackcdn.com/image/fetch/$s_!fbCN!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd50ac037-7a73-49c4-826a-9cf8c990ed53_1614x1396.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 buttonBase-GK1x3M"><svg aria-hidden="true" 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" class="icon-noB79L"><g><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 buttonBase-GK1x3M"><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 icon-noB79L"><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><span>After approving it, I clicked </span><em><span>&#8220;Research boids algorithm,&#8221;</span></em><span> and it opened a side tab showing this agent&#8217;s instructions.</span></p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!AkWP!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4512897a-bcc5-4a5a-ac34-dac8dce8fb4e_2048x1009.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!AkWP!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4512897a-bcc5-4a5a-ac34-dac8dce8fb4e_2048x1009.png 424w, https://substackcdn.com/image/fetch/$s_!AkWP!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4512897a-bcc5-4a5a-ac34-dac8dce8fb4e_2048x1009.png 848w, https://substackcdn.com/image/fetch/$s_!AkWP!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4512897a-bcc5-4a5a-ac34-dac8dce8fb4e_2048x1009.png 1272w, https://substackcdn.com/image/fetch/$s_!AkWP!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4512897a-bcc5-4a5a-ac34-dac8dce8fb4e_2048x1009.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!AkWP!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4512897a-bcc5-4a5a-ac34-dac8dce8fb4e_2048x1009.png" width="1456" height="717" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/4512897a-bcc5-4a5a-ac34-dac8dce8fb4e_2048x1009.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:717,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!AkWP!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4512897a-bcc5-4a5a-ac34-dac8dce8fb4e_2048x1009.png 424w, https://substackcdn.com/image/fetch/$s_!AkWP!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4512897a-bcc5-4a5a-ac34-dac8dce8fb4e_2048x1009.png 848w, https://substackcdn.com/image/fetch/$s_!AkWP!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4512897a-bcc5-4a5a-ac34-dac8dce8fb4e_2048x1009.png 1272w, https://substackcdn.com/image/fetch/$s_!AkWP!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4512897a-bcc5-4a5a-ac34-dac8dce8fb4e_2048x1009.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 buttonBase-GK1x3M"><svg aria-hidden="true" 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" class="icon-noB79L"><g><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 buttonBase-GK1x3M"><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 icon-noB79L"><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><span>If you click on </span><em><span>&#8220;Browsed the web, used a tool&#8221;,</span></em><span> it&#8217;ll show you the progress.</span></p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!dpM7!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd899e409-d1a0-450b-b562-4dd379e0091b_2048x1725.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!dpM7!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd899e409-d1a0-450b-b562-4dd379e0091b_2048x1725.png 424w, https://substackcdn.com/image/fetch/$s_!dpM7!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd899e409-d1a0-450b-b562-4dd379e0091b_2048x1725.png 848w, https://substackcdn.com/image/fetch/$s_!dpM7!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd899e409-d1a0-450b-b562-4dd379e0091b_2048x1725.png 1272w, https://substackcdn.com/image/fetch/$s_!dpM7!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd899e409-d1a0-450b-b562-4dd379e0091b_2048x1725.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!dpM7!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd899e409-d1a0-450b-b562-4dd379e0091b_2048x1725.png" width="1456" height="1226" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/d899e409-d1a0-450b-b562-4dd379e0091b_2048x1725.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1226,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!dpM7!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd899e409-d1a0-450b-b562-4dd379e0091b_2048x1725.png 424w, https://substackcdn.com/image/fetch/$s_!dpM7!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd899e409-d1a0-450b-b562-4dd379e0091b_2048x1725.png 848w, https://substackcdn.com/image/fetch/$s_!dpM7!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd899e409-d1a0-450b-b562-4dd379e0091b_2048x1725.png 1272w, https://substackcdn.com/image/fetch/$s_!dpM7!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd899e409-d1a0-450b-b562-4dd379e0091b_2048x1725.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 buttonBase-GK1x3M"><svg aria-hidden="true" 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" class="icon-noB79L"><g><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 buttonBase-GK1x3M"><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 icon-noB79L"><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><span>Step 1 is finished, and the research file is being created.</span></p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!Xw9r!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3cf361a7-5a18-4e53-ac63-a11ada4e06dd_2048x1741.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!Xw9r!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3cf361a7-5a18-4e53-ac63-a11ada4e06dd_2048x1741.png 424w, https://substackcdn.com/image/fetch/$s_!Xw9r!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3cf361a7-5a18-4e53-ac63-a11ada4e06dd_2048x1741.png 848w, https://substackcdn.com/image/fetch/$s_!Xw9r!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3cf361a7-5a18-4e53-ac63-a11ada4e06dd_2048x1741.png 1272w, https://substackcdn.com/image/fetch/$s_!Xw9r!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3cf361a7-5a18-4e53-ac63-a11ada4e06dd_2048x1741.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!Xw9r!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3cf361a7-5a18-4e53-ac63-a11ada4e06dd_2048x1741.png" width="1456" height="1238" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/3cf361a7-5a18-4e53-ac63-a11ada4e06dd_2048x1741.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1238,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!Xw9r!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3cf361a7-5a18-4e53-ac63-a11ada4e06dd_2048x1741.png 424w, https://substackcdn.com/image/fetch/$s_!Xw9r!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3cf361a7-5a18-4e53-ac63-a11ada4e06dd_2048x1741.png 848w, https://substackcdn.com/image/fetch/$s_!Xw9r!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3cf361a7-5a18-4e53-ac63-a11ada4e06dd_2048x1741.png 1272w, https://substackcdn.com/image/fetch/$s_!Xw9r!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3cf361a7-5a18-4e53-ac63-a11ada4e06dd_2048x1741.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 buttonBase-GK1x3M"><svg aria-hidden="true" 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" class="icon-noB79L"><g><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 buttonBase-GK1x3M"><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 icon-noB79L"><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><span>And next, the verifier starts working&#8230;</span></p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!Jetp!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F329c1f0b-8b75-4299-bfe2-a3d1aa21c98b_2048x1741.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!Jetp!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F329c1f0b-8b75-4299-bfe2-a3d1aa21c98b_2048x1741.png 424w, https://substackcdn.com/image/fetch/$s_!Jetp!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F329c1f0b-8b75-4299-bfe2-a3d1aa21c98b_2048x1741.png 848w, https://substackcdn.com/image/fetch/$s_!Jetp!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F329c1f0b-8b75-4299-bfe2-a3d1aa21c98b_2048x1741.png 1272w, https://substackcdn.com/image/fetch/$s_!Jetp!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F329c1f0b-8b75-4299-bfe2-a3d1aa21c98b_2048x1741.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!Jetp!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F329c1f0b-8b75-4299-bfe2-a3d1aa21c98b_2048x1741.png" width="1456" height="1238" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/329c1f0b-8b75-4299-bfe2-a3d1aa21c98b_2048x1741.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1238,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!Jetp!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F329c1f0b-8b75-4299-bfe2-a3d1aa21c98b_2048x1741.png 424w, https://substackcdn.com/image/fetch/$s_!Jetp!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F329c1f0b-8b75-4299-bfe2-a3d1aa21c98b_2048x1741.png 848w, https://substackcdn.com/image/fetch/$s_!Jetp!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F329c1f0b-8b75-4299-bfe2-a3d1aa21c98b_2048x1741.png 1272w, https://substackcdn.com/image/fetch/$s_!Jetp!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F329c1f0b-8b75-4299-bfe2-a3d1aa21c98b_2048x1741.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 buttonBase-GK1x3M"><svg aria-hidden="true" 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" class="icon-noB79L"><g><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 buttonBase-GK1x3M"><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 icon-noB79L"><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><span>Now the builder starts building the app&#8230;</span></p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!CMVC!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0aed62c1-6731-4559-84a2-801296e01f04_2048x1741.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!CMVC!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0aed62c1-6731-4559-84a2-801296e01f04_2048x1741.png 424w, https://substackcdn.com/image/fetch/$s_!CMVC!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0aed62c1-6731-4559-84a2-801296e01f04_2048x1741.png 848w, https://substackcdn.com/image/fetch/$s_!CMVC!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0aed62c1-6731-4559-84a2-801296e01f04_2048x1741.png 1272w, https://substackcdn.com/image/fetch/$s_!CMVC!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0aed62c1-6731-4559-84a2-801296e01f04_2048x1741.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!CMVC!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0aed62c1-6731-4559-84a2-801296e01f04_2048x1741.png" width="1456" height="1238" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/0aed62c1-6731-4559-84a2-801296e01f04_2048x1741.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1238,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!CMVC!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0aed62c1-6731-4559-84a2-801296e01f04_2048x1741.png 424w, https://substackcdn.com/image/fetch/$s_!CMVC!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0aed62c1-6731-4559-84a2-801296e01f04_2048x1741.png 848w, https://substackcdn.com/image/fetch/$s_!CMVC!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0aed62c1-6731-4559-84a2-801296e01f04_2048x1741.png 1272w, https://substackcdn.com/image/fetch/$s_!CMVC!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0aed62c1-6731-4559-84a2-801296e01f04_2048x1741.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 buttonBase-GK1x3M"><svg aria-hidden="true" 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" class="icon-noB79L"><g><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 buttonBase-GK1x3M"><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 icon-noB79L"><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><span>Here is the full version of this website, visualizing the boids flocking algorithm:</span></p><div class="native-video-embed" data-component-name="VideoPlaceholder" data-attrs="{&quot;mediaUploadId&quot;:&quot;1586eb33-a98b-4e09-aaa9-621a44316d41&quot;,&quot;duration&quot;:null}"></div><h4 style="text-align: center;"><strong>&#167;</strong></h4><div class="callout-block" data-callout="true"><p style="text-align: center;"><em><strong><span data-color="#3a7bf9" style="color: rgb(58, 123, 249);">Reminder: this is a teaser of the subscriber-only newsletter, exclusive to my golden members.</span></strong></em></p><p>When you upgrade, you&#8217;ll get:</p><ul><li><p><strong>A complete Claude Code setup, from your first session to a fully automated one.</strong></p></li><li><p>Deep dives into how MCP, subagents, agent orchestration &amp; hooks actually work inside Claude Code.</p></li><li><p><strong>How real Claude Code projects handle context, scale &amp; running without you.</strong></p></li></ul><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://newsletter.systemdesign.one/subscribe&quot;,&quot;text&quot;:&quot;Unlock Full Access&quot;,&quot;action&quot;:null,&quot;class&quot;:&quot;button-wrapper&quot;}" data-component-name="ButtonCreateButton"><a class="button primary button-wrapper" href="https://newsletter.systemdesign.one/subscribe"><span>Unlock Full Access</span></a></p><p>(If this newsletter has helped you become a better software engineer, consider subscribing to support my work.)</p></div><h4 style="text-align: center;"><strong>&#167;</strong></h4><h2><span>Subagents vs orchestration</span></h2>
      <p>
          <a href="https://newsletter.systemdesign.one/p/claude-code-subagents-vs-agent-teams">
              Read more
          </a>
      </p>
   ]]></content:encoded></item><item><title><![CDATA[AI Evals, Guardrails & Security - A Deep Dive]]></title><description><![CDATA[#179: Part 6 - Generative AI Masterclass]]></description><link>https://newsletter.systemdesign.one/p/llm-evaluation-and-guardrails</link><guid isPermaLink="false">https://newsletter.systemdesign.one/p/llm-evaluation-and-guardrails</guid><dc:creator><![CDATA[Neo Kim]]></dc:creator><pubDate>Sat, 19 Sep 2026 11:41:41 GMT</pubDate><enclosure url="https://substack-post-media.s3.amazonaws.com/public/images/00a6dd0d-f07e-41e3-85ce-bb09294ebd80_1280x720.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p></p><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://newsletter.systemdesign.one/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"><span data-color="#3a7bf9" style="color: rgb(58, 123, 249);">Get my system design playbook for FREE on newsletter signup:</span></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><ul><li><p><em><a href="https://newsletter.systemdesign.one/p/llm-evaluation-and-guardrails/?action=share">Share this letter</a> &amp; I&#8217;ll send you some rewards for the referrals.</em></p></li></ul><div><hr></div><p><span>Getting an AI system to work takes about ten minutes with a model API.</span></p><p><span>Yet knowing whether it still works after the next prompt change, model update, and/or retrieval tweak</span><a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-1" href="#footnote-1" target="_self">1</a><span> takes months of engineering that most teams never do. A chat assistant has no built-in way to detect that its answers got worse. A RAG pipeline cannot tell you that fixing one edge case broke five others. An agent cannot stop a poisoned document from steering its next action.</span></p><p><span>The system runs&#8230; But whether it runs &#8220;correctly&#8221; is a separate question.</span></p><p><span>That question has 4 parts:</span></p><ol><li><p><em><span>Can you measure quality repeatably before deployment?</span></em></p></li><li><p><em><span>Can you stop a bad request before it reaches the model?</span></em></p></li><li><p><em><span>Can you reconstruct what happened when something goes wrong?</span></em></p></li><li><p><em><span>Can you prove system meets the obligations</span></em><a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-2" href="#footnote-2" target="_self">2</a><em><span> your deployment carries?</span></em></p></li></ol><p><span>Evaluation, guardrails, security &amp; observability each handle one of those parts.</span></p><p><span>Onward.</span></p><h4 style="text-align: center;"><strong>&#167;</strong></h4><div class="callout-block" data-callout="true"><h4>I&#8217;m happy to partner with <strong><a href="https://inngest.link/jtH41MP">Inngest</a></strong> on this newsletter.</h4><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://inngest.link/jtH41MP" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!i9Kg!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1e7c0083-b0b6-4069-af0c-afdaf57a25ec_1200x675.png 424w, https://substackcdn.com/image/fetch/$s_!i9Kg!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1e7c0083-b0b6-4069-af0c-afdaf57a25ec_1200x675.png 848w, https://substackcdn.com/image/fetch/$s_!i9Kg!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1e7c0083-b0b6-4069-af0c-afdaf57a25ec_1200x675.png 1272w, https://substackcdn.com/image/fetch/$s_!i9Kg!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1e7c0083-b0b6-4069-af0c-afdaf57a25ec_1200x675.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!i9Kg!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1e7c0083-b0b6-4069-af0c-afdaf57a25ec_1200x675.png" width="1200" height="675" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/1e7c0083-b0b6-4069-af0c-afdaf57a25ec_1200x675.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:675,&quot;width&quot;:1200,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;&quot;,&quot;title&quot;:&quot;&quot;,&quot;type&quot;:null,&quot;href&quot;:&quot;https://inngest.link/jtH41MP&quot;,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" title="" srcset="https://substackcdn.com/image/fetch/$s_!i9Kg!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1e7c0083-b0b6-4069-af0c-afdaf57a25ec_1200x675.png 424w, https://substackcdn.com/image/fetch/$s_!i9Kg!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1e7c0083-b0b6-4069-af0c-afdaf57a25ec_1200x675.png 848w, https://substackcdn.com/image/fetch/$s_!i9Kg!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1e7c0083-b0b6-4069-af0c-afdaf57a25ec_1200x675.png 1272w, https://substackcdn.com/image/fetch/$s_!i9Kg!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1e7c0083-b0b6-4069-af0c-afdaf57a25ec_1200x675.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 buttonBase-GK1x3M"><svg aria-hidden="true" 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" class="icon-noB79L"><g><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 buttonBase-GK1x3M"><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 icon-noB79L"><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 few weeks back, I wrote a deep dive on how to build AI agents that can recover from failures without starting over.</p><p><strong><a href="https://newsletter.systemdesign.one/p/durable-ai-agents">Read my guide to durable AI agents &#8594;</a></strong></p><p>Agents, like all of us, often need to recover from failure. But they shouldn&#8217;t start from scratch.</p><p>Inngest&#8217;s durable execution checkpoints your agents every step of the way.</p><p>So your agents can pick up where they left off and avoid doubling up on token &amp; compute spend.</p><p><a href="https://inngest.link/jtH41MP">Inngest</a> offers a generous free tier and a sleek local dev server for testing.</p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://inngest.link/jtH41MP&quot;,&quot;text&quot;:&quot;Build durably with Inngest&quot;,&quot;action&quot;:null,&quot;class&quot;:&quot;button-wrapper&quot;}" data-component-name="ButtonCreateButton"><a class="button primary button-wrapper" href="https://inngest.link/jtH41MP"><span>Build durably with Inngest</span></a></p></div><h4 style="text-align: center;"><strong>&#167;</strong></h4><div class="captioned-image-container"><figure><a class="image-link image2" target="_blank" href="https://www.youtube.com/@whatsai?sub_confirmation=1" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!Cu_b!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F14cb8599-59a4-4587-932c-fd09ddd0a595_1100x220.png 424w, https://substackcdn.com/image/fetch/$s_!Cu_b!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F14cb8599-59a4-4587-932c-fd09ddd0a595_1100x220.png 848w, https://substackcdn.com/image/fetch/$s_!Cu_b!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F14cb8599-59a4-4587-932c-fd09ddd0a595_1100x220.png 1272w, https://substackcdn.com/image/fetch/$s_!Cu_b!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F14cb8599-59a4-4587-932c-fd09ddd0a595_1100x220.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!Cu_b!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F14cb8599-59a4-4587-932c-fd09ddd0a595_1100x220.png" width="1100" height="220" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/14cb8599-59a4-4587-932c-fd09ddd0a595_1100x220.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:220,&quot;width&quot;:1100,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:&quot;https://www.youtube.com/@whatsai?sub_confirmation=1&quot;,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!Cu_b!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F14cb8599-59a4-4587-932c-fd09ddd0a595_1100x220.png 424w, https://substackcdn.com/image/fetch/$s_!Cu_b!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F14cb8599-59a4-4587-932c-fd09ddd0a595_1100x220.png 848w, https://substackcdn.com/image/fetch/$s_!Cu_b!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F14cb8599-59a4-4587-932c-fd09ddd0a595_1100x220.png 1272w, https://substackcdn.com/image/fetch/$s_!Cu_b!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F14cb8599-59a4-4587-932c-fd09ddd0a595_1100x220.png 1456w" sizes="100vw" loading="lazy"></picture><div></div></div></a></figure></div><p><span>I want to introduce </span><a href="https://louisbouchard.substack.com/"><span>Louis-Fran&#231;ois Bouchard</span></a><span> as a guest author.</span></p><p><span>He&#8217;s a best-selling author (</span><a href="https://amzn.to/4bqYU9b"><span>Building LLMs for Production</span></a><span>), the co-founder of </span><a href="https://academy.towardsai.net/?ref=1f9b29"><span>Towards AI</span></a><span>, and the creator of the YouTube Channel, </span><a href="https://www.youtube.com/@whatsai?sub_confirmation=1"><span>What&#8217;s AI</span></a><span>, where he helps people understand AI and learn how to apply it in the real world. Through his development work with clients, content, teaching, AI training programs, and the new Mentorship program at&nbsp;</span><a href="https://academy.towardsai.net/?ref=1f9b29">Towards AI Academy</a><span>, Louis focuses on making AI practical for builders, engineers, and curious learners alike.</span></p><p><span>At Towards AI, he and his team train AI engineers through courses and mentorship built for every stage, from beginner to advanced. That educational mission and the real-world experience building for his clients are exactly why I wanted him in this newsletter series.</span></p><h4 style="text-align: center;"><strong>&#167;</strong></h4><p><em><strong>Here&#8217;s what you&#8217;ll find inside this newsletter:</strong></em></p><ul><li><p><strong>Why an AI system working is different from knowing it still works.</strong> The trust layer around your application, and how evaluation, guardrails, security, and observability work together.</p></li><li><p><strong>How to measure AI quality before shipping a change.</strong> Golden test sets, grader hierarchies, LLM-as-Judge, regression testing, and the metrics that change across RAG, tools, agents, and multimodal systems.</p></li><li><p><strong>How to protect an AI system while it is running.</strong> Input and output guardrails, tool permissions, prompt-injection defenses, data poisoning, agent security, and red teaming.</p></li><li><p><strong>What you need to record when something goes wrong.</strong> End-to-end traces, safe logging, drift detection, alerts, and the feedback loop that turns production failures into future regression tests.</p></li><li><p><strong>How to build an evaluation process around your own failures.</strong> Error analysis, failure taxonomies, metric stacks, validity gates, and controlled experiments for deciding whether a prompt, model, or retrieval change is ready to ship.</p></li></ul><p></p><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://newsletter.systemdesign.one/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"><span data-color="#3a7bf9" style="color: rgb(58, 123, 249);">Golden members get all letters like these!&#8230;</span></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><h4 style="text-align: center;"><strong>&#167;</strong></h4><h2><span>Why You Cannot Skip This Layer</span></h2><p><span>You can ship without evaluation, guardrails, or tracing&#8230;</span></p><p><span>But you </span><em><span>lose</span></em><span> the ability to tell whether the system still works once its prompts, models, data &amp; users start changing&#8230;</span></p><p><span>Here are five properties of these systems that make that guarantee </span><em><span>impossible</span></em><span> without a dedicated infrastructure:</span></p><ul><li><p><strong><span>The system is non-deterministic.</span></strong><span> The same input produces different outputs on different runs, so an exact assertion cannot distinguish a valid rephrasing from a regression.</span></p></li><li><p><strong><span>Its mistakes look like correct answers.</span></strong><span> A wrong answer arrives as fluently as a right one. Surface quality does not indicate correctness.</span></p></li><li><p><strong><span>Its regressions are silent.</span></strong><span> A prompt change that fixes one case can break five others. Without a repeatable suite, this trade gets never reported.</span></p></li><li><p><strong><span>Its inputs are not all trustworthy.</span></strong><span> Instructions can arrive inside a retrieved document, a fetched web page, or a tool result and steer the model. There is no complete fix, only layered mitigation.</span></p></li><li><p><strong><span>Its legal exposure depends on deployment.</span></strong><span> Duties attach to personal data, generated media, and high-risk decisions based on how the system gets used, not which model powers it.</span></p></li></ul><p><span>How much of this layer to </span><em><span>build</span></em><span> depends on what the &#8220;system&#8221; decides, not on how many people use it.</span></p><p><span>An internal meeting-note helper would need a small test set &amp; basic tracing. Yet an internal hiring screen needs much stronger controls, because a wrong answer affects someone&#8217;s career.</span></p><h4 style="text-align: center;"><strong>&#167;</strong></h4><h2><span>Target System Design</span></h2><p><span>The trust layer has four components, each handling a different stage of the system lifecycle:</span></p><ul><li><p><strong><span>Evaluation</span></strong><span> grades the system before deployment, answering whether the current version is good enough to ship.</span></p></li><li><p><strong><span>Guardrails</span></strong><span> check every request &amp; response at runtime.</span></p></li><li><p><strong><span>Observability</span></strong><span> records what happened in production &amp; feeds failures back into the evaluation set.</span></p></li><li><p><strong><span>Security</span></strong><span> cuts across all three &amp; defends against external attackers.</span></p></li></ul><p><span>For these four to work together, the system needs a golden test set, repeatable offline grading, runtime checks</span><a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-3" href="#footnote-3" target="_self">3</a><span> with explicit latency budgets, and end-to-end traces that include guardrail decisions.</span></p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!lGpx!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9eaf4884-2b8f-41d7-9590-f94e70d86aff_2048x1079.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!lGpx!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9eaf4884-2b8f-41d7-9590-f94e70d86aff_2048x1079.png 424w, https://substackcdn.com/image/fetch/$s_!lGpx!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9eaf4884-2b8f-41d7-9590-f94e70d86aff_2048x1079.png 848w, https://substackcdn.com/image/fetch/$s_!lGpx!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9eaf4884-2b8f-41d7-9590-f94e70d86aff_2048x1079.png 1272w, https://substackcdn.com/image/fetch/$s_!lGpx!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9eaf4884-2b8f-41d7-9590-f94e70d86aff_2048x1079.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!lGpx!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9eaf4884-2b8f-41d7-9590-f94e70d86aff_2048x1079.png" width="1456" height="767" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/9eaf4884-2b8f-41d7-9590-f94e70d86aff_2048x1079.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:767,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;&quot;,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" title="" srcset="https://substackcdn.com/image/fetch/$s_!lGpx!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9eaf4884-2b8f-41d7-9590-f94e70d86aff_2048x1079.png 424w, https://substackcdn.com/image/fetch/$s_!lGpx!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9eaf4884-2b8f-41d7-9590-f94e70d86aff_2048x1079.png 848w, https://substackcdn.com/image/fetch/$s_!lGpx!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9eaf4884-2b8f-41d7-9590-f94e70d86aff_2048x1079.png 1272w, https://substackcdn.com/image/fetch/$s_!lGpx!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9eaf4884-2b8f-41d7-9590-f94e70d86aff_2048x1079.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 buttonBase-GK1x3M"><svg aria-hidden="true" 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" class="icon-noB79L"><g><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 buttonBase-GK1x3M"><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 icon-noB79L"><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">Evaluation gates releases before deployment, guardrails protect each request at runtime, security constrains actions, and tracing records the entire system.</figcaption></figure></div><p><span>The evaluation pipeline also runs in CI, so a quality regression blocks the merge in the same way a failing test does&#8230;</span></p><p><span>This newsletter covers the architecture and how to use it&#8230;</span></p><p><span>All four components assume you can already tell a good answer from a bad one.</span></p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://newsletter.systemdesign.one/p/llm-evaluation-and-guardrails?utm_source=substack&utm_medium=email&utm_content=share&action=share&quot;,&quot;text&quot;:&quot;Share&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://newsletter.systemdesign.one/p/llm-evaluation-and-guardrails?utm_source=substack&utm_medium=email&utm_content=share&action=share"><span>Share</span></a></p><h4 style="text-align: center;"><strong>&#167;</strong></h4><h2><span>Part 1: Evaluation</span></h2><p>Different AI systems need different metrics.</p><p>A RAG system needs retrieval and faithfulness checks, while an agent needs tool-use and outcome checks.</p><p>A trust layer brings these metrics into one repeatable evaluation stack that answers one question:<em> is the system still good after the latest change?</em></p><h3><span>Why Evaluation Has No Assert Statement</span></h3><p><span>In software testing, a correct output is a known value.</span></p><p><span>In an AI system, </span><em><span>&#8220;is this answer good?&#8221;</span></em><span> depends on who is asking and which standard applies. The same answer can be correct by one rubric</span><a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-4" href="#footnote-4" target="_self">4</a><span> and unhelpful by another, so evaluation cannot be reduced to an equality check.</span></p><p><span>The way through is to match the grader to the question, a principle we&#8217;ll call the </span><strong><span>grader hierarchy</span></strong><span>:</span></p><ul><li><p><span>When a correct answer exists, use a deterministic check: Does the JSON parse against the schema? Does the tool call carry valid arguments? Does the code run? Does the response come back under the latency cap?</span></p></li><li><p><span>Where quality is subjective, use a rubric or an LLM grader.</span></p></li><li><p><span>Where the stakes are high, use human review.</span></p></li></ul><p><span>The organizing rule across all three is to use the &#8220;cheapest&#8221; grader that catches the </span><em><span>failure</span></em><span> you care about.</span></p><h3><span>From Vibe Checks to Numbers</span></h3><p><strong><span>Vibe checking</span></strong><span> is the informal starting point: </span><em><span>try prompts, read outputs, form an impression.</span></em></p><p><span>It&#8217;s useful for discovering failures, but an impression cannot compare versions and/or isolate which change moved the result.</span></p><p>Public benchmarks help you choose a starting model&#8230; But they cannot tell you how well it would perform in your specific domain or edge cases.</p><p>A LinkedIn bot<a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-5" href="#footnote-5" target="_self">5</a> could correctly tell someone they were a terrible fit for a job. But the user needed to know which skills they lacked &amp; how to improve. A correct answer is still a BAD answer if it does not help the user.</p><p><span>The numbers therefore have to come from a test set built around your own product.</span></p><h3><span>Golden Test Sets That Stay Honest</span></h3><p>A golden test set gives you a fixed collection of cases for evaluating your AI system.</p><p>Start with 20 to 50 cases from real failures, then grow the set to around 50 to 100.</p><p>Also split the cases into three groups:</p><ul><li><p><strong>In-scope:</strong> Questions the system should answer.</p></li><li><p><strong>Out-of-scope:</strong> Questions the system should refuse.</p></li><li><p><strong>Adversarial:</strong> Questions designed to break the system.</p></li></ul><p>You can start with synthetic cases generated from your own data.</p><p>Then replace them with real user queries as you collect production traffic, with a domain expert defining the expected behavior for each case.</p><p>Each test case should include the input, expected behavior and/or key points to check, supporting evidence, and prompt &amp; data versions. Review each case for outdated assumptions and broken references before treating it as ground truth.</p><p>Plus a golden test set needs maintenance:</p><ul><li><p><strong>Refresh stale cases:</strong> Add failures &amp; queries from production as the product changes.</p></li><li><p><strong>Keep a holdout set:</strong> If you repeatedly tune prompts against the same tests, you can overfit to them. Keep some cases hidden from the tuning process.</p></li></ul><p>Think of the holdout set as the <em>final exam</em>: you practice with one set of problems, then test yourself on questions you have not seen before.</p><h3><span>Offline and Online Evaluation</span></h3><p><span>Running the golden set before deployment is </span><strong><span>offline evaluation</span></strong><span>.</span></p><p><span>Every version answers the same questions under the same conditions, so the numbers are comparable across versions.</span></p><p><strong><span>Online evaluation</span></strong><span> measures the live system on real traffic, using A/B tests, thumbs up &amp; down, regeneration rate, and citation clicks.</span></p><p><span>Each catches what the other misses:</span></p><ul><li><p><span>Offline catches regressions </span><em><span>before</span></em><span> users see them, but only on the questions you thought to include.</span></p></li><li><p><span>Online catches the cases your test set never imagined, but only </span><em><span>after</span></em><span> real users have hit them.</span></p></li></ul><p><span>Production systems run both&#8230;</span></p><p><span>Some online signals need no grader, since a click, a thumbs-down, or a regeneration is the judgment itself. Offline scoring of anything subjective still runs through an LLM grader, and the grader needs calibrating before its scores mean anything.</span></p><h3><span>LLM-as-Judge, Calibrated</span></h3><p>A large language model (<strong>LLM</strong>)-as-Judge uses a model to grade AI outputs against a written rubric. To make those grades useful, choose a clear grading format.</p><p>For most evaluations:</p><ul><li><p><strong>Use pass/fail:</strong> Define one clear criterion for each check. Numeric scores such as 1 to 5 are harder to calibrate because the boundary between scores could be unclear.</p></li><li><p><strong>Generate the critique first:</strong> Ask the judge to explain its assessment before returning the verdict. This reduces the chance the explanation simply justifies a verdict chosen first.</p></li><li><p><strong>Use pairwise grading for subjective comparisons:</strong> When pass/ fail is too restrictive, ask the judge to compare two answers rather than assign an absolute score.</p></li><li><p><strong>Grade outcomes for multi-step tasks:</strong> Check each required subgoal separately. Inspect the agent&#8217;s trajectory only when a subgoal fails. Different paths could still produce equally valid results.</p></li></ul><p>So choose the format that produces the <em>strongest</em> agreement with your human evaluations.</p><p>Three biases need active mitigation:</p><ul><li><p><strong>Position bias:</strong> The judge favors the answer it reads first. So swap the answer order across runs &amp; average the results.</p></li><li><p><strong>Self-preference:</strong> A model favors outputs that match its own writing style. So use a different model family for the judge than the model you evaluate.</p></li><li><p><strong>Verbosity bias:</strong> Longer answers score higher than equally good shorter answers. So include length-matched pairs in your calibration set.</p></li></ul><p>Calibration is not optional&#8230;</p><p>Before you trust the judge, run it on 30 to 50 human-labeled examples. Compare its verdicts with the human labels &amp; compute agreement. Keep the judge blind to which system version produced each output.</p><p>Use one portion of the labeled examples to shape the rubric, then validate it on a held-out portion. Thirty to fifty labels are enough to start using the judge, but not enough to treat its scores as ground truth<a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-6" href="#footnote-6" target="_self">6</a>.</p><p>Pick the <em>cheapest</em> model that passes calibration.</p><p>For a judge, consistency matters more than raw capability. Judge inference is cheap; collecting reliable human labels is the real cost.</p><h3><span>Metric Stack</span></h3><p>The metrics you need depend on the components inside your system.</p><p>Each component adds its own evaluation layer, so you measure only what applies.</p><p>A single model call forms the base layer&#8230; Measure:</p><ul><li><p><strong>Correctness:</strong> Did the model produce the right answer?</p></li><li><p><strong>Format compliance:</strong> Did the output follow the required structure?</p></li></ul><p>Retrieval-augmented generation (<strong>RAG</strong>) adds retrieval metrics:</p><ul><li><p><strong>Hit rate:</strong> Did at least one relevant chunk appear in the top K retrieved results?</p></li><li><p><strong>Mean Reciprocal Rank </strong>(<strong>MRR</strong>)<strong>:</strong> How high did the first relevant result rank? Higher positions receive higher scores.</p></li><li><p><strong>Context precision:</strong> How much of the retrieved context was relevant?</p></li><li><p><strong>Context recall:</strong> How much of the relevant information did retrieval find?</p></li><li><p><strong>Faithfulness:</strong> Did the answer stay supported by the retrieved context?</p></li><li><p><strong>Response relevance:</strong> Did the answer address the user&#8217;s question?</p></li></ul><p>These metrics show whether RAG retrieved the right information, ranked it well, and used it to produce a relevant, supported answer.</p><p><strong>Tool use</strong> adds another check: <em>did the model call the correct tool with the correct arguments?</em> This is a &#8220;deterministic&#8221; check, so it belongs in the cheapest tier of the grader hierarchy.</p><p><strong>Agents</strong> need outcome-first evaluation&#8230; So grade the state the agent left behind:</p><ul><li><p><em>Did the refund get issued?</em></p></li><li><p><em>Did the file get written?</em></p></li><li><p><em>Did the test pass?</em></p></li></ul><p>Path-based grading penalizes valid alternative solutions and marks down agents that still reach the correct outcome<a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-7" href="#footnote-7" target="_self">7</a>.</p><p>Also use trajectory metrics to diagnose failures:</p><ul><li><p><strong>Step efficiency:</strong> How many steps did the agent need?</p></li><li><p><strong>Loop detection:</strong> Did the agent repeat the same actions without making progress?</p></li><li><p><strong>Tokens per task:</strong> How many tokens did the agent spend to complete the task?</p></li></ul><p>These metrics help explain a <em>bad</em> outcome&#8230;Yet they should not serve as release gates.</p><ul><li><p><strong>Media generation</strong> adds prompt adherence, identity preservation, artifact rates, and unsafe content rates<a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-8" href="#footnote-8" target="_self">8</a>.</p></li><li><p><strong>Voice systems</strong> add first-audio latency &amp; interruption success.</p></li></ul><blockquote><p>The rule of thumb: start with the base evaluation layer, then add metrics for each component your system uses.</p></blockquote><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!RgIo!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fccbef582-e5f9-4294-8fd2-c7f551e2e485_2048x1055.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!RgIo!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fccbef582-e5f9-4294-8fd2-c7f551e2e485_2048x1055.png 424w, https://substackcdn.com/image/fetch/$s_!RgIo!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fccbef582-e5f9-4294-8fd2-c7f551e2e485_2048x1055.png 848w, https://substackcdn.com/image/fetch/$s_!RgIo!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fccbef582-e5f9-4294-8fd2-c7f551e2e485_2048x1055.png 1272w, https://substackcdn.com/image/fetch/$s_!RgIo!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fccbef582-e5f9-4294-8fd2-c7f551e2e485_2048x1055.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!RgIo!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fccbef582-e5f9-4294-8fd2-c7f551e2e485_2048x1055.png" width="1456" height="750" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/ccbef582-e5f9-4294-8fd2-c7f551e2e485_2048x1055.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:750,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!RgIo!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fccbef582-e5f9-4294-8fd2-c7f551e2e485_2048x1055.png 424w, https://substackcdn.com/image/fetch/$s_!RgIo!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fccbef582-e5f9-4294-8fd2-c7f551e2e485_2048x1055.png 848w, https://substackcdn.com/image/fetch/$s_!RgIo!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fccbef582-e5f9-4294-8fd2-c7f551e2e485_2048x1055.png 1272w, https://substackcdn.com/image/fetch/$s_!RgIo!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fccbef582-e5f9-4294-8fd2-c7f551e2e485_2048x1055.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 buttonBase-GK1x3M"><svg aria-hidden="true" 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" class="icon-noB79L"><g><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 buttonBase-GK1x3M"><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 icon-noB79L"><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">Evaluation metrics should match the components a system actually uses, expanding from basic response quality to retrieval, tool, agent, and media-specific behavior.</figcaption></figure></div><p></p><h3><span>Evaluation as CI</span></h3><p>The metric stack defines what to measure.</p><p>Continuous integration (<strong>CI</strong>) determines <em>when</em> to measure it.</p><p>Run the evaluation suite like unit tests:</p><ol><li><p>Change the prompt/model.</p></li><li><p>Run the same evaluation suite.</p></li><li><p>Generate a scorecard.</p></li><li><p>Block the merge if critical scores fall below your release thresholds.</p></li></ol><p>Use two evaluation suites for different goals:</p><ul><li><p><strong>Regression suite:</strong> Contains cases the system already handles correctly. Its pass rate should stay near 100%. A failed case = new version broke something the previous version handled correctly.</p></li><li><p><strong>Capability suite:</strong> Contains hard cases near limits of the system&#8217;s current abilities. Its pass rate should stay below 100%, so the suite continues to expose weaknesses &amp; measure improvements.</p></li></ul><p>As the system improves, more capability tests pass.</p><p>Anthropic calls the point where nearly all tests pass <strong>eval saturation</strong>. Once a suite approaches this ceiling, add harder tasks so the evaluation continues to reveal meaningful differences between system versions.</p><p>Two rules keep the evaluation gate reliable:</p><h4>1. Build most test cases from observed failures </h4><p>Twenty cases from real production traces often represent actual system risks better than 100 hypothetical questions written in advance.</p><p>Yet there are 2 exceptions:</p><ul><li><p><strong>Adversarial cases:</strong> Tests designed to expose attacks/unsafe behavior.</p></li><li><p><strong>Compliance cases:</strong> Tests for requirements the system must follow.</p></li></ul><p>Include these before an incident occurs&#8230; Waiting for a real security and/or compliance failure is too late&#8230;</p><h4>2. Run each evaluation suite three to five times per change</h4><p>Model outputs vary between runs, so a two-point drop in one run could be sampling noise.</p><p>Block a release when the drop persists across repeated runs rather than reacting to a single fluctuation&#8230;</p><p>Also repeated runs produce 2 useful <em>reliability</em> metrics:</p><ul><li><p><strong>pass@k:</strong> At least one of <em>k</em> attempts must succeed. Use this when a person reviews the result, and retries are acceptable.</p></li><li><p><strong>pass^k</strong><a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-9" href="#footnote-9" target="_self">9</a><strong>:</strong> All <em>k</em> attempts must succeed. &#964;-bench, Sierra&#8217;s benchmark for customer-service agent tasks, introduced this metric. Use it when an agent acts without supervision.</p></li></ul><p>If an unsupervised agent fails <em>10% of the time</em>, the probability of at least one failure across eight tasks is roughly <em>57%</em>.</p><p>A strong single-run score could therefore hide inconsistencies that make &#8220;unsupervised&#8221; deployment <em>unreliable</em>&#8230;</p><p>The evaluation harness measures performance on cases you anticipated &amp; tested.</p><p><em>Guardrails</em> cover another part of the problem by checking every input &amp; output at runtime&#8230;</p><h4 style="text-align: center;"><strong>&#167;</strong></h4><div class="callout-block" data-callout="true"><p style="text-align: center;"><em><strong><span data-color="#3a7bf9" style="color: rgb(58, 123, 249);">Reminder: this is a teaser of the subscriber-only newsletter series, exclusive to my golden members.</span></strong></em></p><p>When you upgrade, you&#8217;ll get:</p><ul><li><p><strong>Simple breakdown of real-world architectures</strong></p></li><li><p>Frameworks you can plug into your work or business</p></li><li><p><strong>Proven systems behind ChatGPT, Perplexity, and Copilot</strong></p></li></ul><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://newsletter.systemdesign.one/subscribe&quot;,&quot;text&quot;:&quot;Unlock Full Access&quot;,&quot;action&quot;:null,&quot;class&quot;:&quot;button-wrapper&quot;}" data-component-name="ButtonCreateButton"><a class="button primary button-wrapper" href="https://newsletter.systemdesign.one/subscribe"><span>Unlock Full Access</span></a></p><p><em>Ready for the best part?</em></p></div><h4 style="text-align: center;"><strong>&#167;</strong></h4><h2><span>Part 2: Guardrails</span></h2>
      <p>
          <a href="https://newsletter.systemdesign.one/p/llm-evaluation-and-guardrails">
              Read more
          </a>
      </p>
   ]]></content:encoded></item><item><title><![CDATA[Database Types - A Deep Dive]]></title><description><![CDATA[#178: Relational, document, key-value, and 13 others.]]></description><link>https://newsletter.systemdesign.one/p/types-of-databases-and-when-to-use-them</link><guid isPermaLink="false">https://newsletter.systemdesign.one/p/types-of-databases-and-when-to-use-them</guid><dc:creator><![CDATA[Neo Kim]]></dc:creator><pubDate>Thu, 17 Sep 2026 18:35:28 GMT</pubDate><enclosure url="https://substack-post-media.s3.amazonaws.com/public/images/66f502c9-0a6b-46ea-b5b5-7b900b3f7c4a_1280x720.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p></p><p></p><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://newsletter.systemdesign.one/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"><span data-color="#3a7bf9" style="color: rgb(58, 123, 249);">Get my system design playbook for FREE on newsletter signup:</span></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><ul><li><p><em><a href="https://newsletter.systemdesign.one/p/types-of-databases-and-when-to-use-them/?action=share">Share this letter</a> &amp; I&#8217;ll send you some rewards for the referrals.</em></p></li></ul><div><hr></div><p>Some of these are everyday databases, and some are quite specialized. ALL of them are super useful to software engineers building production systems.</p><p><span>Curious to know how many were new to you:</span></p><ol><li><p><span>Relational,</span></p></li><li><p><span>Document,</span></p></li><li><p><span>Key value,</span></p></li><li><p><span>Wide column,</span></p></li><li><p><span>Graph,</span></p></li><li><p><span>Time-series,</span></p></li><li><p><span>Geospatial,</span></p></li><li><p><span>Vector,</span></p></li><li><p><span>Search engine,</span></p></li><li><p><span>In-memory,</span></p></li><li><p><span>Distributed SQL,</span></p></li><li><p><span>Embedded,</span></p></li><li><p><span>Columnar,</span></p></li><li><p><span>Data lakehouse,</span></p></li><li><p><span>Object storage,</span></p></li><li><p><span>Ledger.</span></p></li></ol><p><span>For each, I&#8217;ll share:</span></p><ul><li><p><span>What it is &amp; how it works (in simple words),</span></p></li><li><p><span>A real-world analogy,</span></p></li><li><p><span>Tradeoffs,</span></p></li><li><p><span>Why it matters.</span></p></li></ul><p><span>Let&#8217;s go!</span></p><h4 style="text-align: center;"><strong>&#167;</strong></h4><h2><strong><a href="https://blitzy.com/sandbox?utm_medium=paid_media&amp;utm_source=newsletter_systemdesign&amp;utm_campaign=sandbox">Autonomous Software Development for the Enterprise (Partner)</a></strong></h2><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://blitzy.com/sandbox?utm_medium=paid_media&amp;utm_source=newsletter_systemdesign&amp;utm_campaign=sandbox" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!mEVd!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8f45b0bf-dbe2-424a-bdc1-a689977a6061_2048x1072.png 424w, https://substackcdn.com/image/fetch/$s_!mEVd!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8f45b0bf-dbe2-424a-bdc1-a689977a6061_2048x1072.png 848w, https://substackcdn.com/image/fetch/$s_!mEVd!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8f45b0bf-dbe2-424a-bdc1-a689977a6061_2048x1072.png 1272w, https://substackcdn.com/image/fetch/$s_!mEVd!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8f45b0bf-dbe2-424a-bdc1-a689977a6061_2048x1072.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!mEVd!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8f45b0bf-dbe2-424a-bdc1-a689977a6061_2048x1072.png" width="1456" height="762" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/8f45b0bf-dbe2-424a-bdc1-a689977a6061_2048x1072.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:762,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:2058069,&quot;alt&quot;:&quot;&quot;,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:&quot;https://blitzy.com/sandbox?utm_medium=paid_media&amp;utm_source=newsletter_systemdesign&amp;utm_campaign=sandbox&quot;,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://newsletter.systemdesign.one/i/214745547?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8f45b0bf-dbe2-424a-bdc1-a689977a6061_2048x1072.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" title="" srcset="https://substackcdn.com/image/fetch/$s_!mEVd!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8f45b0bf-dbe2-424a-bdc1-a689977a6061_2048x1072.png 424w, https://substackcdn.com/image/fetch/$s_!mEVd!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8f45b0bf-dbe2-424a-bdc1-a689977a6061_2048x1072.png 848w, https://substackcdn.com/image/fetch/$s_!mEVd!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8f45b0bf-dbe2-424a-bdc1-a689977a6061_2048x1072.png 1272w, https://substackcdn.com/image/fetch/$s_!mEVd!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8f45b0bf-dbe2-424a-bdc1-a689977a6061_2048x1072.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 buttonBase-GK1x3M"><svg aria-hidden="true" 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" class="icon-noB79L"><g><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 buttonBase-GK1x3M"><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 icon-noB79L"><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><a href="https://blitzy.com/sandbox?utm_medium=paid_media&amp;utm_source=newsletter_systemdesign&amp;utm_campaign=sandbox">Blitzy</a></strong> is built for large, complex software projects that other coding agents cannot handle: new feature development, large-scale refactors, scaled vulnerability remediation, and undocumented legacy systems.</p><p>Blitzy&#8217;s Sandbox lets engineers evaluate Blitzy on their own software estate, at their own pace. Eligible organizations can connect real applications, reverse-engineer up to 1 million lines of code, generate up to 25,000 lines of E2E tested code, and surface prioritized security vulnerabilities across their software estate.</p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://blitzy.com/sandbox?utm_medium=paid_media&amp;utm_source=newsletter_systemdesign&amp;utm_campaign=sandbox&quot;,&quot;text&quot;:&quot;Try Blitzy on your codebase&quot;,&quot;action&quot;:null,&quot;class&quot;:&quot;button-wrapper&quot;}" data-component-name="ButtonCreateButton"><a class="button primary button-wrapper" href="https://blitzy.com/sandbox?utm_medium=paid_media&amp;utm_source=newsletter_systemdesign&amp;utm_campaign=sandbox"><span>Try Blitzy on your codebase</span></a></p><p><em>(Thanks to <strong><a href="https://blitzy.com/sandbox?utm_medium=paid_media&amp;utm_source=newsletter_systemdesign&amp;utm_campaign=sandbox">Blitzy</a></strong> for partnering on this newsletter.)</em></p><h4 style="text-align: center;"><strong>&#167;</strong></h4><h2><strong><span>1. Relational</span></strong></h2><blockquote><p><span>A relational database stores data in tables of rows and columns, and links those tables through shared keys. Every row follows the same shape, and keys tie the tables together.</span></p></blockquote><p><span>You declare the shape upfront in Structured Query Language (</span><strong><span>SQL</span></strong><span>).</span></p><p><span>So a customer row carries an identifier, a name, and an email. Orders live in their own table and carry the customer identifier, and the database matches the two on that column in an operation called a </span><em><span>join</span></em><span>.</span></p><p><span>Transactions group several changes into one unit, so money moves between two accounts completely/both rows stay as they were. This guarantee is atomicity, consistency, isolation, and durability (</span><strong><span>ACID</span></strong><span>), and it is why banks and shops still run on these engines fifty years on. PostgreSQL also reaches beyond the model through extensions, adding geography and vector search to the same database.</span></p><p><span>One schema, one set of rules, and every application connecting to it gets the same answer.</span></p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!DN4n!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F84821d63-5266-45ce-93fb-f2da7ca37a67_1536x1024.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!DN4n!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F84821d63-5266-45ce-93fb-f2da7ca37a67_1536x1024.png 424w, https://substackcdn.com/image/fetch/$s_!DN4n!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F84821d63-5266-45ce-93fb-f2da7ca37a67_1536x1024.png 848w, https://substackcdn.com/image/fetch/$s_!DN4n!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F84821d63-5266-45ce-93fb-f2da7ca37a67_1536x1024.png 1272w, https://substackcdn.com/image/fetch/$s_!DN4n!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F84821d63-5266-45ce-93fb-f2da7ca37a67_1536x1024.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!DN4n!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F84821d63-5266-45ce-93fb-f2da7ca37a67_1536x1024.png" width="1456" height="971" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/84821d63-5266-45ce-93fb-f2da7ca37a67_1536x1024.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:971,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!DN4n!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F84821d63-5266-45ce-93fb-f2da7ca37a67_1536x1024.png 424w, https://substackcdn.com/image/fetch/$s_!DN4n!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F84821d63-5266-45ce-93fb-f2da7ca37a67_1536x1024.png 848w, https://substackcdn.com/image/fetch/$s_!DN4n!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F84821d63-5266-45ce-93fb-f2da7ca37a67_1536x1024.png 1272w, https://substackcdn.com/image/fetch/$s_!DN4n!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F84821d63-5266-45ce-93fb-f2da7ca37a67_1536x1024.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 buttonBase-GK1x3M"><svg aria-hidden="true" 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" class="icon-noB79L"><g><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 buttonBase-GK1x3M"><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 icon-noB79L"><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><h3><strong><span>Analogy</span></strong></h3><p><span>A warehouse with a strict intake form.</span></p><p><span>Every pallet carries the same label fields, so any driver finds any pallet by reading a code. Redesign the form, and you relabel the whole warehouse.</span></p><h3><strong><span>Tradeoff</span></strong></h3><p><span>Relational databases hand you correctness for free, with joins, constraints, and transactions built in.</span></p><p><span>But the fixed schema resists change, and adding a column to a large table can lock it while the change runs. Plus, write throughput hits a ceiling on one machine; lifting that ceiling means sharding by hand</span><a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-1" href="#footnote-1" target="_self">1</a><span>.</span></p><h3><strong><span>Why it matters</span></strong></h3><p><span>Orders, payments, inventory, users, and any data with real relationships.</span></p><p><span>PostgreSQL &amp; MySQL cover most of this ground. Pair it with in-memory caching and distributed SQL, which take over once reads and writes outgrow a single box.</span></p><h2><strong><span>2. Document</span></strong></h2><blockquote><p><span>A document database stores each record as one self-contained document, typically in JavaScript Object Notation (</span><strong><span>JSON</span></strong><span>).</span></p></blockquote><p><span>Two documents in the same collection</span><a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-2" href="#footnote-2" target="_self">2</a><span> can &#8220;differ&#8221;.</span></p><p><span>One product carries a shoe size, and the next carries a screen resolution &amp; a warranty period. The database keeps each one whole,,, so a single read returns the entire product with every nested field attached and no join runs.</span></p><p><span>Indexes still apply to any field/path you name, including nested fields and array elements, so queries stay fast as collections grow. MongoDB &amp; Couchbase lead here, and support transactions across several documents.</span></p><p><span>The freedom lives in the &#8220;schema&#8221;, and speed still comes from disciplined indexing.</span></p><p><span>Change the fields on one product and the rest of the collection carries on </span><em><span>unchanged</span></em><span>.</span></p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!SeG9!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb52d2317-bdd6-478a-bcab-3b04cce08f25_1536x1024.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!SeG9!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb52d2317-bdd6-478a-bcab-3b04cce08f25_1536x1024.png 424w, https://substackcdn.com/image/fetch/$s_!SeG9!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb52d2317-bdd6-478a-bcab-3b04cce08f25_1536x1024.png 848w, https://substackcdn.com/image/fetch/$s_!SeG9!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb52d2317-bdd6-478a-bcab-3b04cce08f25_1536x1024.png 1272w, https://substackcdn.com/image/fetch/$s_!SeG9!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb52d2317-bdd6-478a-bcab-3b04cce08f25_1536x1024.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!SeG9!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb52d2317-bdd6-478a-bcab-3b04cce08f25_1536x1024.png" width="1456" height="971" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/b52d2317-bdd6-478a-bcab-3b04cce08f25_1536x1024.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:971,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!SeG9!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb52d2317-bdd6-478a-bcab-3b04cce08f25_1536x1024.png 424w, https://substackcdn.com/image/fetch/$s_!SeG9!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb52d2317-bdd6-478a-bcab-3b04cce08f25_1536x1024.png 848w, https://substackcdn.com/image/fetch/$s_!SeG9!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb52d2317-bdd6-478a-bcab-3b04cce08f25_1536x1024.png 1272w, https://substackcdn.com/image/fetch/$s_!SeG9!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb52d2317-bdd6-478a-bcab-3b04cce08f25_1536x1024.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 buttonBase-GK1x3M"><svg aria-hidden="true" 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" class="icon-noB79L"><g><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 buttonBase-GK1x3M"><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 icon-noB79L"><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><h3><strong><span>Analogy</span></strong></h3><p><span>A filing cabinet of case folders.</span></p><p><span>Each folder holds every page for one case, so you answer any question about it by pulling one folder. Nobody checks whether two folders hold the same kind of pages.</span></p><h3><strong><span>Tradeoff</span></strong></h3><p><span>Document stores let each record carry its own shape&#8230; This suits data nobody can pin down in advance.</span></p><p><span>But copies of the same fact spread across documents and drift apart, and relationships between documents fall to your application code. With the schema left open, malformed records reach production quietly &amp; surface months later.</span></p><p><span>So validate the shape in the database, since the flexibility you want in year one becomes the mess you inherit in year three.</span></p><h3><strong><span>Why it matters</span></strong></h3><p><span>Catalogs, user profiles, content, and event payloads, where records vary, and you read them whole.</span></p><p><span>MongoDB and Couchbase are popular picks. Pair it with a search engine for text queries, or move to a key-value store when every read is by identifier anyway.</span></p><h2><strong><span>3. Key-value</span></strong></h2><blockquote><p><span>A key-value store saves a value under a unique key &amp; returns it in a single lookup. </span></p></blockquote><p><span>The &#8220;key&#8221; is the only way in</span><a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-3" href="#footnote-3" target="_self">3</a><span>.</span></p><p><span>Ask for one key and the store answers in one hop, with no scan &amp; no query planner in the way. The store hashes</span><a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-4" href="#footnote-4" target="_self">4</a><span> each key onto one node, so adding nodes splits the keyspace and lifts capacity in a straight line. Plus, many KV stores attach a time-to-live so cached entries expire on their own.</span></p><p><span>Redis &amp; DynamoDB dominate this space.</span></p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!VfIu!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc1e9666a-250c-4215-9e73-e81427a30e84_1536x1024.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!VfIu!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc1e9666a-250c-4215-9e73-e81427a30e84_1536x1024.png 424w, https://substackcdn.com/image/fetch/$s_!VfIu!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc1e9666a-250c-4215-9e73-e81427a30e84_1536x1024.png 848w, https://substackcdn.com/image/fetch/$s_!VfIu!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc1e9666a-250c-4215-9e73-e81427a30e84_1536x1024.png 1272w, https://substackcdn.com/image/fetch/$s_!VfIu!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc1e9666a-250c-4215-9e73-e81427a30e84_1536x1024.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!VfIu!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc1e9666a-250c-4215-9e73-e81427a30e84_1536x1024.png" width="1456" height="971" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/c1e9666a-250c-4215-9e73-e81427a30e84_1536x1024.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:971,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!VfIu!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc1e9666a-250c-4215-9e73-e81427a30e84_1536x1024.png 424w, https://substackcdn.com/image/fetch/$s_!VfIu!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc1e9666a-250c-4215-9e73-e81427a30e84_1536x1024.png 848w, https://substackcdn.com/image/fetch/$s_!VfIu!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc1e9666a-250c-4215-9e73-e81427a30e84_1536x1024.png 1272w, https://substackcdn.com/image/fetch/$s_!VfIu!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc1e9666a-250c-4215-9e73-e81427a30e84_1536x1024.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 buttonBase-GK1x3M"><svg aria-hidden="true" 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" class="icon-noB79L"><g><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 buttonBase-GK1x3M"><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 icon-noB79L"><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><h3><strong><span>Analogy</span></strong></h3><p><span>A coat check.</span></p><p><span>You hand over a coat and get a numbered ticket&#8230; the ticket brings the coat back in seconds. The attendant has no other way to find every brown coat in the room.</span></p><h3><strong><span>Tradeoff</span></strong></h3><p><span>Key-value stores give you the fastest read path &amp; scale by adding nodes.</span></p><p><span>But every lookup by something other than the key means a full pass over the data, and secondary indexes stay limited/absent. Also one &#8220;popular&#8221; key sends all its traffic to a single node, so a HOT key overloads one machine while the rest idle.</span></p><p><span>So design the key naming scheme</span><a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-5" href="#footnote-5" target="_self">5</a><span> before you write a line of code, because reworking it later means rewriting each caller.</span></p><h3><strong><span>Why it matters</span></strong></h3><p><span>Sessions, shopping carts, feature flags, and rate limit counters, where you know the identifier at read time&#8230;</span></p><p><span>Redis &amp; DynamoDB are the standards. Pair it with a relational database, which holds the truth, while the key-value</span><a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-6" href="#footnote-6" target="_self">6</a><span> store holds the fast copy.</span></p><h4 style="text-align: center;"><strong>&#167;</strong></h4><div class="captioned-button-wrap" data-attrs="{&quot;url&quot;:&quot;https://newsletter.systemdesign.one/p/types-of-databases-and-when-to-use-them?utm_source=substack&utm_medium=email&utm_content=share&action=share&quot;,&quot;text&quot;:&quot;Share&quot;}" data-component-name="CaptionedButtonToDOM"><div class="preamble"><p class="cta-caption"><em><span data-color="#3a7bf9" style="color: rgb(58, 123, 249);">If something resonated with you today, share this letter. Because one idea, one action, can change everything.</span></em></p></div><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://newsletter.systemdesign.one/p/types-of-databases-and-when-to-use-them?utm_source=substack&utm_medium=email&utm_content=share&action=share&quot;,&quot;text&quot;:&quot;Share&quot;}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://newsletter.systemdesign.one/p/types-of-databases-and-when-to-use-them?utm_source=substack&utm_medium=email&utm_content=share&action=share"><span>Share</span></a></p></div><h4 style="text-align: center;"><strong>&#167;</strong></h4><h2><strong><span>4. Wide-column</span></strong></h2><blockquote><p><span>A wide-column store spreads rows across many nodes &amp; each row holds only the columns it uses.</span></p></blockquote><p><span>The primary key does double duty</span><a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-7" href="#footnote-7" target="_self">7</a><span>:</span></p><ul><li><p><span>Its first part (</span><strong><span>partition key</span></strong><span>) decides which node stores the row.</span></p></li><li><p><span>Its second part (</span><strong><span>clustering key</span></strong><span>) decides the order of rows inside the partition.</span></p></li></ul><p><span>Pick both well &amp; a query reads one partition on one node&#8230; this is how wide column stores answer in milliseconds while holding petabytes.</span></p><p><span>Writes take a fast path too: they append to a commit log &amp; an in-memory table</span><a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-8" href="#footnote-8" target="_self">8</a><span> before flushing to sorted files on disk. So nothing seeks across the disk to update a row in place.</span></p><p><span>Get the key right &amp; a read touches only one node&#8230; Get it wrong &amp; it touches all of them&#8230;</span></p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!8avv!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1b306830-ed93-42da-a476-aed096d0dbcd_1536x1024.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!8avv!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1b306830-ed93-42da-a476-aed096d0dbcd_1536x1024.png 424w, https://substackcdn.com/image/fetch/$s_!8avv!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1b306830-ed93-42da-a476-aed096d0dbcd_1536x1024.png 848w, https://substackcdn.com/image/fetch/$s_!8avv!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1b306830-ed93-42da-a476-aed096d0dbcd_1536x1024.png 1272w, https://substackcdn.com/image/fetch/$s_!8avv!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1b306830-ed93-42da-a476-aed096d0dbcd_1536x1024.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!8avv!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1b306830-ed93-42da-a476-aed096d0dbcd_1536x1024.png" width="1456" height="971" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/1b306830-ed93-42da-a476-aed096d0dbcd_1536x1024.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:971,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!8avv!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1b306830-ed93-42da-a476-aed096d0dbcd_1536x1024.png 424w, https://substackcdn.com/image/fetch/$s_!8avv!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1b306830-ed93-42da-a476-aed096d0dbcd_1536x1024.png 848w, https://substackcdn.com/image/fetch/$s_!8avv!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1b306830-ed93-42da-a476-aed096d0dbcd_1536x1024.png 1272w, https://substackcdn.com/image/fetch/$s_!8avv!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1b306830-ed93-42da-a476-aed096d0dbcd_1536x1024.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 buttonBase-GK1x3M"><svg aria-hidden="true" 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" class="icon-noB79L"><g><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 buttonBase-GK1x3M"><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 icon-noB79L"><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><h3><strong><span>Analogy</span></strong></h3><p><span>A stadium with numbered gates&#8230;</span></p><p><span>Your ticket names the gate, so you walk straight in while sixty thousand people move at once. Arrive without a gate number, and you circle the building.</span></p><h3><strong><span>Tradeoff</span></strong></h3><p><span>Wide-column stores take write volumes</span><a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-9" href="#footnote-9" target="_self">9</a><span> no single machine survives, and they stay available while nodes fail.</span></p><p><span>But you model queries before you model data, so a question nobody anticipated needs a second table and a second copy</span><a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-10" href="#footnote-10" target="_self">10</a><span>. Plus, deletes leave markers</span><a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-11" href="#footnote-11" target="_self">11</a><span> behind until compaction clears them, and repair, compaction, &amp; node replacement are real operational work.</span></p><p><span>So write down every query you need before you design the key, since the model resists new questions later.</span></p><h3><strong><span>Why it matters</span></strong></h3><p><span>Message history, activity feeds, and device telemetry at write volumes one machine will never take&#8230;</span></p><p><span>Cassandra &amp; HBase lead here. Pair it with a time-series database,,, which gives you the same scale with far less modeling when the data is stamped with a time.</span></p><h2><strong><span>5. Graph</span></strong></h2><blockquote><p><span>A graph database stores data as nodes &amp; edges between them, then answers questions by walking those edges.</span></p></blockquote><p><span>The relationship gets stored</span><a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-12" href="#footnote-12" target="_self">12</a><span>, so following it costs almost nothing.</span></p><p><span>In a relational database, finding friends of your friends means joining a table to itself once per hop, and each hop multiplies the work. A graph database keeps a direct pointer from every node to its neighbors, so a hop is a pointer follow &amp; depth stops mattering</span><a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-13" href="#footnote-13" target="_self">13</a><span>.</span></p><p><span>Query languages like Cypher &amp; Gremlin let you describe the shape you want and the engine traces it.</span></p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!4MUK!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5ba54718-75a1-4ab1-8337-ac28867bd57a_1536x1024.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!4MUK!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5ba54718-75a1-4ab1-8337-ac28867bd57a_1536x1024.png 424w, https://substackcdn.com/image/fetch/$s_!4MUK!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5ba54718-75a1-4ab1-8337-ac28867bd57a_1536x1024.png 848w, https://substackcdn.com/image/fetch/$s_!4MUK!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5ba54718-75a1-4ab1-8337-ac28867bd57a_1536x1024.png 1272w, https://substackcdn.com/image/fetch/$s_!4MUK!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5ba54718-75a1-4ab1-8337-ac28867bd57a_1536x1024.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!4MUK!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5ba54718-75a1-4ab1-8337-ac28867bd57a_1536x1024.png" width="1456" height="971" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/5ba54718-75a1-4ab1-8337-ac28867bd57a_1536x1024.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:971,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!4MUK!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5ba54718-75a1-4ab1-8337-ac28867bd57a_1536x1024.png 424w, https://substackcdn.com/image/fetch/$s_!4MUK!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5ba54718-75a1-4ab1-8337-ac28867bd57a_1536x1024.png 848w, https://substackcdn.com/image/fetch/$s_!4MUK!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5ba54718-75a1-4ab1-8337-ac28867bd57a_1536x1024.png 1272w, https://substackcdn.com/image/fetch/$s_!4MUK!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5ba54718-75a1-4ab1-8337-ac28867bd57a_1536x1024.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 buttonBase-GK1x3M"><svg aria-hidden="true" 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" class="icon-noB79L"><g><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 buttonBase-GK1x3M"><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 icon-noB79L"><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><h3><strong><span>Analogy</span></strong></h3><p><span>An underground map&#8230;</span></p><p><span>You trace the route with your finger without reading a single timetable.</span></p><h3><strong><span>Tradeoff</span></strong></h3><p><span>Graph databases answer questions about connections, and the queries read like the question you asked.</span></p><p><span>But spreading a graph across machines is HARD, since edges cross partitions &amp; traversal then crosses the network</span><a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-14" href="#footnote-14" target="_self">14</a><span>. Also you need to learn a new query language, plus bulk analytics run slower here than in a columnar store.</span></p><p><span>So reach for a graph when the connections are the product.</span></p><h3><strong><span>Why it matters</span></strong></h3><p><span>Fraud rings, recommendations, social graphs, permission chains &amp; network topology.</span></p><p><span>Neo4j &amp; Amazon Neptune are popular picks.</span></p><p><span>Pair it with a relational database, which holds the records while the graph holds the links between them.</span></p><h2><strong><span>6. Time-series</span></strong></h2><blockquote><p><span>A time-series database</span><a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-15" href="#footnote-15" target="_self">15</a><span> stores measurements stamped with time &amp; organizes them by interval.</span></p></blockquote><p>Data typically arrives in time order &amp; old measurements rarely <em>change</em> afterward.</p><p>Each data point contains a timestamp, a value, and a few tags describing where it came from. New measurements get added to the latest chunk instead of updating old data across the disk,,, this makes writes much faster.</p><p>Measurements close together often look similar, so time-series databases can compress them heavily. Also retention rules automatically delete old data, while downsampling replaces detailed data with summaries. i.e., you could keep every measurement for a week, but only hourly averages for a year.</p><p><span>Old data shrinks and/or leaves on a schedule&#8230; so database stays within planned size.</span></p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!ahGR!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F81149100-f7ec-49c6-bb7c-9cf9aa28dbf0_1536x1024.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!ahGR!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F81149100-f7ec-49c6-bb7c-9cf9aa28dbf0_1536x1024.png 424w, https://substackcdn.com/image/fetch/$s_!ahGR!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F81149100-f7ec-49c6-bb7c-9cf9aa28dbf0_1536x1024.png 848w, https://substackcdn.com/image/fetch/$s_!ahGR!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F81149100-f7ec-49c6-bb7c-9cf9aa28dbf0_1536x1024.png 1272w, https://substackcdn.com/image/fetch/$s_!ahGR!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F81149100-f7ec-49c6-bb7c-9cf9aa28dbf0_1536x1024.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!ahGR!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F81149100-f7ec-49c6-bb7c-9cf9aa28dbf0_1536x1024.png" width="1456" height="971" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/81149100-f7ec-49c6-bb7c-9cf9aa28dbf0_1536x1024.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:971,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!ahGR!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F81149100-f7ec-49c6-bb7c-9cf9aa28dbf0_1536x1024.png 424w, https://substackcdn.com/image/fetch/$s_!ahGR!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F81149100-f7ec-49c6-bb7c-9cf9aa28dbf0_1536x1024.png 848w, https://substackcdn.com/image/fetch/$s_!ahGR!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F81149100-f7ec-49c6-bb7c-9cf9aa28dbf0_1536x1024.png 1272w, https://substackcdn.com/image/fetch/$s_!ahGR!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F81149100-f7ec-49c6-bb7c-9cf9aa28dbf0_1536x1024.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 buttonBase-GK1x3M"><svg aria-hidden="true" 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" class="icon-noB79L"><g><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 buttonBase-GK1x3M"><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 icon-noB79L"><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><h3><strong><span>Analogy</span></strong></h3><p><span>A ship&#8217;s logbook.</span></p><p><span>Each entry goes on the next line with the time beside it &amp; nobody erases yesterday.</span></p><h3><strong><span>Tradeoff</span></strong></h3><p><span>Time-series databases absorb millions of points a second &amp; answer range queries instantly.</span></p><p><span>But editing/deleting single points fights the design, so corrections are awkward. Tags with unbounded values, such as a user identifier on every reading, explode the index and exhaust memory</span><a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-16" href="#footnote-16" target="_self">16</a><span>.</span></p><p><span>So keep tag values few &amp; bounded.</span></p><h3><strong><span>Why it matters</span></strong></h3><p><span>Metrics, sensor readings, prices &amp; anything you plot against time.</span></p><p><span>InfluxDB, TimescaleDB, and Prometheus lead here.</span></p><p><span>Pair it with a columnar database, which handles long-term analysis once the raw points are rolled up.</span></p><h4 style="text-align: center;"><strong>&#167;</strong></h4><div class="callout-block" data-callout="true"><p style="text-align: center;"><em><strong><span data-color="#3a7bf9" style="color: rgb(58, 123, 249);">Reminder: this is a teaser of the subscriber-only newsletter, exclusive to my golden members.</span></strong></em></p><p>When you upgrade, you&#8217;ll get:</p><ul><li><p><strong>High-level architecture of real-world systems.</strong></p></li><li><p>Deep dive into how popular real-world systems work.</p></li><li><p><strong>How real-world systems handle scale, reliability, and performance.</strong></p></li></ul><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://newsletter.systemdesign.one/subscribe&quot;,&quot;text&quot;:&quot;Unlock Full Access&quot;,&quot;action&quot;:null,&quot;class&quot;:&quot;button-wrapper&quot;}" data-component-name="ButtonCreateButton"><a class="button primary button-wrapper" href="https://newsletter.systemdesign.one/subscribe"><span>Unlock Full Access</span></a></p><p>(If this newsletter has helped you become a better software engineer, consider subscribing to support my work.)</p></div><h4 style="text-align: center;"><strong>&#167;</strong></h4><h2><strong><span>7. Geospatial</span></strong></h2>
      <p>
          <a href="https://newsletter.systemdesign.one/p/types-of-databases-and-when-to-use-them">
              Read more
          </a>
      </p>
   ]]></content:encoded></item><item><title><![CDATA[You’re Probably Using Claude Code Wrong]]></title><description><![CDATA[#177: Part 2 - Claude Code 24/7]]></description><link>https://newsletter.systemdesign.one/p/claude-code-mcp-vs-cli</link><guid isPermaLink="false">https://newsletter.systemdesign.one/p/claude-code-mcp-vs-cli</guid><dc:creator><![CDATA[Gencay]]></dc:creator><pubDate>Mon, 14 Sep 2026 10:37:32 GMT</pubDate><enclosure url="https://substack-post-media.s3.amazonaws.com/public/images/ce05d4cb-4bbe-41c7-91b5-706362d14a54_1280x720.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p></p><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://newsletter.systemdesign.one/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"><em><span data-color="#3a7bf9" style="color: rgb(58, 123, 249);">Get my system design playbook for FREE on newsletter signup:</span></em></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><ul><li><p><em><a href="https://newsletter.systemdesign.one/p/claude-code-mcp-vs-cli/?action=share">Share this letter</a> &amp; I&#8217;ll send you some rewards for the referrals.</em></p></li></ul><div><hr></div><p><span>Claude Code is powerful from day one.</span></p><p><span>It reads your files, writes your code &amp; runs your commands.</span></p><p><span>But everything it touches lives on your machine. And the real work rarely stays there. Your issues sit on GitHub, your tasks wait on Slack, and your data lives in Postgres.</span></p><p><span>This is why the natural next step is to reach them. And Claude Code gives you four doors into them. MCP servers, CLIs, plugins, and slash commands.</span></p><p><span>Let&#8217;s get started!</span></p><h4 style="text-align: center;"><strong>&#167;</strong></h4><div class="callout-block" data-callout="true"><h3><a href="https://getunblocked.com/events/how-to-stop-babysitting-your-agents-sep-23/?utm_source=systemdesign&amp;utm_medium=email&amp;utm_campaign=primary">[Webinar] How to stop babysitting your agents (Partner)</a></h3><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://getunblocked.com/events/how-to-stop-babysitting-your-agents-sep-23/?utm_source=systemdesign&amp;utm_medium=email&amp;utm_campaign=primary" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!CmS3!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2da6f38b-7eb4-4472-9cb3-3935462ae703_1600x900.png 424w, https://substackcdn.com/image/fetch/$s_!CmS3!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2da6f38b-7eb4-4472-9cb3-3935462ae703_1600x900.png 848w, https://substackcdn.com/image/fetch/$s_!CmS3!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2da6f38b-7eb4-4472-9cb3-3935462ae703_1600x900.png 1272w, https://substackcdn.com/image/fetch/$s_!CmS3!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2da6f38b-7eb4-4472-9cb3-3935462ae703_1600x900.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!CmS3!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2da6f38b-7eb4-4472-9cb3-3935462ae703_1600x900.png" width="1456" height="819" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/2da6f38b-7eb4-4472-9cb3-3935462ae703_1600x900.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:819,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:1099878,&quot;alt&quot;:&quot;&quot;,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:&quot;https://getunblocked.com/events/how-to-stop-babysitting-your-agents-sep-23/?utm_source=systemdesign&amp;utm_medium=email&amp;utm_campaign=primary&quot;,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:&quot;https://newsletter.systemdesign.one/i/215411410?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2da6f38b-7eb4-4472-9cb3-3935462ae703_1600x900.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" title="" srcset="https://substackcdn.com/image/fetch/$s_!CmS3!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2da6f38b-7eb4-4472-9cb3-3935462ae703_1600x900.png 424w, https://substackcdn.com/image/fetch/$s_!CmS3!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2da6f38b-7eb4-4472-9cb3-3935462ae703_1600x900.png 848w, https://substackcdn.com/image/fetch/$s_!CmS3!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2da6f38b-7eb4-4472-9cb3-3935462ae703_1600x900.png 1272w, https://substackcdn.com/image/fetch/$s_!CmS3!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2da6f38b-7eb4-4472-9cb3-3935462ae703_1600x900.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 buttonBase-GK1x3M"><svg aria-hidden="true" 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" class="icon-noB79L"><g><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 buttonBase-GK1x3M"><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 icon-noB79L"><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>Agents can generate code. Getting it right for your system, team conventions, and past decisions is the hard part. You end up wasting time and tokens in correction loops.</p><p>More MCPs give agents access to information but not understanding. The teams pulling ahead use a context layer to give agents exactly what they need.</p><p><a href="https://getunblocked.com/events/how-to-stop-babysitting-your-agents-sep-23/?utm_source=systemdesign&amp;utm_medium=email&amp;utm_campaign=primary">Join live on Sep 23 (FREE)</a> to see:</p><ul><li><p>Where teams get stuck on the AI maturity curve</p></li><li><p>How a context layer solves for quality, efficiency, and cost</p></li><li><p>Live demo: the same coding task with and without a context layer</p></li></ul><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://getunblocked.com/events/how-to-stop-babysitting-your-agents-sep-23/?utm_source=systemdesign&amp;utm_medium=email&amp;utm_campaign=primary&quot;,&quot;text&quot;:&quot;Register now&quot;,&quot;action&quot;:null,&quot;class&quot;:&quot;button-wrapper&quot;}" data-component-name="ButtonCreateButton"><a class="button primary button-wrapper" href="https://getunblocked.com/events/how-to-stop-babysitting-your-agents-sep-23/?utm_source=systemdesign&amp;utm_medium=email&amp;utm_campaign=primary"><span>Register now</span></a></p><p><em>(Thanks to <a href="https://getunblocked.com/events/how-to-stop-babysitting-your-agents-sep-23/?utm_source=systemdesign&amp;utm_medium=email&amp;utm_campaign=primary">Unblocked</a> for partnering on this newsletter.)</em></p></div><h4 style="text-align: center;"><strong>&#167;</strong></h4><p>I want to introduce <strong><a href="https://www.learnwithmeai.com/welcome">Gencay</a></strong> as the guest author.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://www.learnwithmeai.com/welcome" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!i2sU!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F79774ca3-8968-45f9-bb13-fb23bc404b4f_1442x668.png 424w, https://substackcdn.com/image/fetch/$s_!i2sU!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F79774ca3-8968-45f9-bb13-fb23bc404b4f_1442x668.png 848w, https://substackcdn.com/image/fetch/$s_!i2sU!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F79774ca3-8968-45f9-bb13-fb23bc404b4f_1442x668.png 1272w, https://substackcdn.com/image/fetch/$s_!i2sU!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F79774ca3-8968-45f9-bb13-fb23bc404b4f_1442x668.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!i2sU!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F79774ca3-8968-45f9-bb13-fb23bc404b4f_1442x668.png" width="1442" height="668" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/79774ca3-8968-45f9-bb13-fb23bc404b4f_1442x668.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:668,&quot;width&quot;:1442,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;&quot;,&quot;title&quot;:&quot;&quot;,&quot;type&quot;:null,&quot;href&quot;:&quot;https://www.learnwithmeai.com/welcome&quot;,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" title="" srcset="https://substackcdn.com/image/fetch/$s_!i2sU!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F79774ca3-8968-45f9-bb13-fb23bc404b4f_1442x668.png 424w, https://substackcdn.com/image/fetch/$s_!i2sU!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F79774ca3-8968-45f9-bb13-fb23bc404b4f_1442x668.png 848w, https://substackcdn.com/image/fetch/$s_!i2sU!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F79774ca3-8968-45f9-bb13-fb23bc404b4f_1442x668.png 1272w, https://substackcdn.com/image/fetch/$s_!i2sU!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F79774ca3-8968-45f9-bb13-fb23bc404b4f_1442x668.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 buttonBase-GK1x3M"><svg aria-hidden="true" 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" class="icon-noB79L"><g><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 buttonBase-GK1x3M"><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 icon-noB79L"><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>He has been building with AI since ChatGPT first shipped in 2022.</p><p>For years, he built for clients on Upwork: 7,300+ hours of it.</p><p>Now he builds in the open and shares every piece of it on <strong><a href="https://www.learnwithmeai.com/welcome">LearnAIWithMe</a></strong>, every Monday, Wednesday &amp; Friday.</p><p>Not just theory for its own sake. One real build at a time, from idea to running system.</p><h4 style="text-align: center;"><strong>&#167;</strong></h4><p><em>Here&#8217;s what you&#8217;ll find inside this newsletter:</em></p><ul><li><p><strong>The four ways Claude Code can reach beyond your local machine.</strong> MCP servers, CLIs, plugins, and slash commands, and why they solve different kinds of problems.</p></li><li><p><strong>What MCP actually gives Claude Code access to.</strong> External apps, services, and data sources, plus the security risk that appears when you connect untrusted tools.</p></li><li><p><strong>Why CLIs can sometimes be a better choice than MCP.</strong> The tradeoffs around setup, token usage, reliability, and when a direct command-line connection makes more sense.</p></li><li><p><strong>What changes when Claude Code can use your browser.</strong> Browser automation, authenticated sessions, and a self-correcting workflow that can inspect a page, catch visual bugs, and keep iterating.</p></li><li><p><strong>Where plugins and slash commands fit into the picture.</strong> What they bundle, what they can trigger, and how they compare with MCPs and CLIs when you need to choose the right connection method.</p></li></ul><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://newsletter.systemdesign.one/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"><em><span data-color="#3a7bf9" style="color: rgb(58, 123, 249);">Golden members get full access to Claude Code 24/7!&#8230;</span></em></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><h4 style="text-align: center;"><strong>&#167;</strong></h4><h2><span>What MCP actually is</span></h2><p><span>Model Context Protocol (</span><strong>MCP</strong><a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-1" href="#footnote-1" target="_self">1</a>) <span>lets your AI (ChatGPT, Claude) connect to applications like Notion and/or Google Docs.</span></p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!MKpC!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe890c2fc-85cd-4759-9ae4-02f46b4554fb_1672x941.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!MKpC!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe890c2fc-85cd-4759-9ae4-02f46b4554fb_1672x941.png 424w, https://substackcdn.com/image/fetch/$s_!MKpC!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe890c2fc-85cd-4759-9ae4-02f46b4554fb_1672x941.png 848w, https://substackcdn.com/image/fetch/$s_!MKpC!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe890c2fc-85cd-4759-9ae4-02f46b4554fb_1672x941.png 1272w, https://substackcdn.com/image/fetch/$s_!MKpC!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe890c2fc-85cd-4759-9ae4-02f46b4554fb_1672x941.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!MKpC!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe890c2fc-85cd-4759-9ae4-02f46b4554fb_1672x941.png" width="1456" height="819" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/e890c2fc-85cd-4759-9ae4-02f46b4554fb_1672x941.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:819,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!MKpC!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe890c2fc-85cd-4759-9ae4-02f46b4554fb_1672x941.png 424w, https://substackcdn.com/image/fetch/$s_!MKpC!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe890c2fc-85cd-4759-9ae4-02f46b4554fb_1672x941.png 848w, https://substackcdn.com/image/fetch/$s_!MKpC!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe890c2fc-85cd-4759-9ae4-02f46b4554fb_1672x941.png 1272w, https://substackcdn.com/image/fetch/$s_!MKpC!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe890c2fc-85cd-4759-9ae4-02f46b4554fb_1672x941.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 buttonBase-GK1x3M"><svg aria-hidden="true" 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" class="icon-noB79L"><g><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 buttonBase-GK1x3M"><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 icon-noB79L"><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><span>These tools make your AI feel like an assistant: instead of just answering you, it can affect the real world through connections.</span></p><p><span>Let me show you how to install your first MCP server&#8230;</span></p><h4 style="text-align: center;"><strong>&#167;</strong></h4><h2><span>Install your first MCP server</span></h2><blockquote><p>WARNING: Untrusted MCP servers &amp; scraped web content can both carry prompt injection<a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-2" href="#footnote-2" target="_self">2</a>, hidden instructions aimed at your agent.</p></blockquote><p><span>Install only servers you </span><em><span>trust</span></em><span>, keep Manual mode on &amp; read every approval before you click &#8220;yes&#8221;.</span></p><p><span>Once you trust the source:</span></p><ol><li><p>Open your Claude app</p></li><li><p>Click &#8220;+&#8221;</p></li><li><p>Click &#8220;Connectors&#8221;</p></li><li><p>Click &#8220;Add connector&#8221;</p></li><li><p>Click &#8220;Browse Connectors&#8221;</p></li></ol><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!pvZd!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa49b5cfb-be01-4bd6-9102-db2777a3ea2d_2048x1346.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!pvZd!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa49b5cfb-be01-4bd6-9102-db2777a3ea2d_2048x1346.png 424w, https://substackcdn.com/image/fetch/$s_!pvZd!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa49b5cfb-be01-4bd6-9102-db2777a3ea2d_2048x1346.png 848w, https://substackcdn.com/image/fetch/$s_!pvZd!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa49b5cfb-be01-4bd6-9102-db2777a3ea2d_2048x1346.png 1272w, https://substackcdn.com/image/fetch/$s_!pvZd!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa49b5cfb-be01-4bd6-9102-db2777a3ea2d_2048x1346.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!pvZd!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa49b5cfb-be01-4bd6-9102-db2777a3ea2d_2048x1346.png" width="1456" height="957" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/a49b5cfb-be01-4bd6-9102-db2777a3ea2d_2048x1346.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:957,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!pvZd!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa49b5cfb-be01-4bd6-9102-db2777a3ea2d_2048x1346.png 424w, https://substackcdn.com/image/fetch/$s_!pvZd!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa49b5cfb-be01-4bd6-9102-db2777a3ea2d_2048x1346.png 848w, https://substackcdn.com/image/fetch/$s_!pvZd!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa49b5cfb-be01-4bd6-9102-db2777a3ea2d_2048x1346.png 1272w, https://substackcdn.com/image/fetch/$s_!pvZd!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa49b5cfb-be01-4bd6-9102-db2777a3ea2d_2048x1346.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 buttonBase-GK1x3M"><svg aria-hidden="true" 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" class="icon-noB79L"><g><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 buttonBase-GK1x3M"><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 icon-noB79L"><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><span>Next, choose from the list.</span></p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!moD_!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F217e54ea-7de5-4673-aa7e-3b3917185cb3_2020x1406.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!moD_!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F217e54ea-7de5-4673-aa7e-3b3917185cb3_2020x1406.png 424w, https://substackcdn.com/image/fetch/$s_!moD_!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F217e54ea-7de5-4673-aa7e-3b3917185cb3_2020x1406.png 848w, https://substackcdn.com/image/fetch/$s_!moD_!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F217e54ea-7de5-4673-aa7e-3b3917185cb3_2020x1406.png 1272w, https://substackcdn.com/image/fetch/$s_!moD_!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F217e54ea-7de5-4673-aa7e-3b3917185cb3_2020x1406.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!moD_!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F217e54ea-7de5-4673-aa7e-3b3917185cb3_2020x1406.png" width="1456" height="1013" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/217e54ea-7de5-4673-aa7e-3b3917185cb3_2020x1406.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1013,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!moD_!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F217e54ea-7de5-4673-aa7e-3b3917185cb3_2020x1406.png 424w, https://substackcdn.com/image/fetch/$s_!moD_!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F217e54ea-7de5-4673-aa7e-3b3917185cb3_2020x1406.png 848w, https://substackcdn.com/image/fetch/$s_!moD_!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F217e54ea-7de5-4673-aa7e-3b3917185cb3_2020x1406.png 1272w, https://substackcdn.com/image/fetch/$s_!moD_!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F217e54ea-7de5-4673-aa7e-3b3917185cb3_2020x1406.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 buttonBase-GK1x3M"><svg aria-hidden="true" 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" class="icon-noB79L"><g><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 buttonBase-GK1x3M"><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 icon-noB79L"><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><span>Most people connect Google Drive &amp; Google Docs, which are very useful.</span></p><p><span>But let&#8217;s try something different&#8230;</span></p><p><span>I connected with Firecrawl</span><a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-3" href="#footnote-3" target="_self">3</a><span>.</span></p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!Gwlw!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9236b48c-ac8d-4a85-ba0d-48a607f75ea9_2020x1406.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!Gwlw!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9236b48c-ac8d-4a85-ba0d-48a607f75ea9_2020x1406.png 424w, https://substackcdn.com/image/fetch/$s_!Gwlw!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9236b48c-ac8d-4a85-ba0d-48a607f75ea9_2020x1406.png 848w, https://substackcdn.com/image/fetch/$s_!Gwlw!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9236b48c-ac8d-4a85-ba0d-48a607f75ea9_2020x1406.png 1272w, https://substackcdn.com/image/fetch/$s_!Gwlw!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9236b48c-ac8d-4a85-ba0d-48a607f75ea9_2020x1406.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!Gwlw!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9236b48c-ac8d-4a85-ba0d-48a607f75ea9_2020x1406.png" width="1456" height="1013" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/9236b48c-ac8d-4a85-ba0d-48a607f75ea9_2020x1406.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1013,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!Gwlw!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9236b48c-ac8d-4a85-ba0d-48a607f75ea9_2020x1406.png 424w, https://substackcdn.com/image/fetch/$s_!Gwlw!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9236b48c-ac8d-4a85-ba0d-48a607f75ea9_2020x1406.png 848w, https://substackcdn.com/image/fetch/$s_!Gwlw!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9236b48c-ac8d-4a85-ba0d-48a607f75ea9_2020x1406.png 1272w, https://substackcdn.com/image/fetch/$s_!Gwlw!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9236b48c-ac8d-4a85-ba0d-48a607f75ea9_2020x1406.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 buttonBase-GK1x3M"><svg aria-hidden="true" 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" class="icon-noB79L"><g><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 buttonBase-GK1x3M"><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 icon-noB79L"><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><span>To connect with it, you need an account.</span></p><p><span>You can open it </span><a href="https://www.firecrawl.dev/"><span>here</span></a><span>.</span></p><p><span>(It has 1000 free credits each month.)</span></p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!Fq4X!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7465027c-6259-46bd-ac4b-3494f9f1b2bf_2048x1388.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!Fq4X!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7465027c-6259-46bd-ac4b-3494f9f1b2bf_2048x1388.png 424w, https://substackcdn.com/image/fetch/$s_!Fq4X!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7465027c-6259-46bd-ac4b-3494f9f1b2bf_2048x1388.png 848w, https://substackcdn.com/image/fetch/$s_!Fq4X!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7465027c-6259-46bd-ac4b-3494f9f1b2bf_2048x1388.png 1272w, https://substackcdn.com/image/fetch/$s_!Fq4X!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7465027c-6259-46bd-ac4b-3494f9f1b2bf_2048x1388.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!Fq4X!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7465027c-6259-46bd-ac4b-3494f9f1b2bf_2048x1388.png" width="1456" height="987" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/7465027c-6259-46bd-ac4b-3494f9f1b2bf_2048x1388.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:987,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!Fq4X!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7465027c-6259-46bd-ac4b-3494f9f1b2bf_2048x1388.png 424w, https://substackcdn.com/image/fetch/$s_!Fq4X!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7465027c-6259-46bd-ac4b-3494f9f1b2bf_2048x1388.png 848w, https://substackcdn.com/image/fetch/$s_!Fq4X!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7465027c-6259-46bd-ac4b-3494f9f1b2bf_2048x1388.png 1272w, https://substackcdn.com/image/fetch/$s_!Fq4X!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7465027c-6259-46bd-ac4b-3494f9f1b2bf_2048x1388.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 buttonBase-GK1x3M"><svg aria-hidden="true" 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" class="icon-noB79L"><g><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 buttonBase-GK1x3M"><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 icon-noB79L"><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><span>You&#8217;d think, why would I need a scraper when Claude can already open a webpage?</span></p><p><span>But Firecrawl does more than visit it. It crawls the entire page with all its elements.</span></p><p><span>Let&#8217;s test it&#8230;</span></p><p><span>Paste this prompt:</span></p><div class="highlighted_code_block" data-attrs="{&quot;language&quot;:&quot;plaintext&quot;,&quot;nodeId&quot;:&quot;37cd828d-5b8a-453f-9a44-e46789a25400&quot;}" data-component-name="HighlightedCodeBlockToDOM"><pre class="shiki"><code class="language-plaintext">Use Firecrawl to extract everything from this page:
https://www.tesla.com/model3

Study its sections, content hierarchy, headlines, feature blocks, and calls to action.
Then use Claude Code to build a similar one-page landing page for an AI product,
named Grammar Doctor, with original branding, copy, and visuals.</code></pre></div><p><span>By the way, Grammar Doctor is a grammar-fixing skill I built, so it deserves a landing page.</span></p><p><span>After pasting, it asks for my approval because the session runs in Manual mode, and every action waits for a yes.</span></p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!RvE8!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa06f1aab-f127-44d5-9e47-8999d783db51_2048x1362.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!RvE8!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa06f1aab-f127-44d5-9e47-8999d783db51_2048x1362.png 424w, https://substackcdn.com/image/fetch/$s_!RvE8!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa06f1aab-f127-44d5-9e47-8999d783db51_2048x1362.png 848w, https://substackcdn.com/image/fetch/$s_!RvE8!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa06f1aab-f127-44d5-9e47-8999d783db51_2048x1362.png 1272w, https://substackcdn.com/image/fetch/$s_!RvE8!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa06f1aab-f127-44d5-9e47-8999d783db51_2048x1362.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!RvE8!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa06f1aab-f127-44d5-9e47-8999d783db51_2048x1362.png" width="1456" height="968" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/a06f1aab-f127-44d5-9e47-8999d783db51_2048x1362.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:968,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!RvE8!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa06f1aab-f127-44d5-9e47-8999d783db51_2048x1362.png 424w, https://substackcdn.com/image/fetch/$s_!RvE8!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa06f1aab-f127-44d5-9e47-8999d783db51_2048x1362.png 848w, https://substackcdn.com/image/fetch/$s_!RvE8!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa06f1aab-f127-44d5-9e47-8999d783db51_2048x1362.png 1272w, https://substackcdn.com/image/fetch/$s_!RvE8!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa06f1aab-f127-44d5-9e47-8999d783db51_2048x1362.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 buttonBase-GK1x3M"><svg aria-hidden="true" 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" class="icon-noB79L"><g><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 buttonBase-GK1x3M"><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 icon-noB79L"><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><span>As you can see from the screenshot above, it started using Firecrawl, and that&#8217;s how it&#8217;ll scrape every element of the website.</span></p><p><span>And it saved the output inside </span><code>tesla_md.txt</code></p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!ouuD!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F45f3c6e3-1c88-421e-b0d3-c8625535dac3_1676x804.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!ouuD!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F45f3c6e3-1c88-421e-b0d3-c8625535dac3_1676x804.png 424w, https://substackcdn.com/image/fetch/$s_!ouuD!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F45f3c6e3-1c88-421e-b0d3-c8625535dac3_1676x804.png 848w, https://substackcdn.com/image/fetch/$s_!ouuD!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F45f3c6e3-1c88-421e-b0d3-c8625535dac3_1676x804.png 1272w, https://substackcdn.com/image/fetch/$s_!ouuD!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F45f3c6e3-1c88-421e-b0d3-c8625535dac3_1676x804.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!ouuD!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F45f3c6e3-1c88-421e-b0d3-c8625535dac3_1676x804.png" width="1456" height="698" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/45f3c6e3-1c88-421e-b0d3-c8625535dac3_1676x804.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:698,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!ouuD!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F45f3c6e3-1c88-421e-b0d3-c8625535dac3_1676x804.png 424w, https://substackcdn.com/image/fetch/$s_!ouuD!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F45f3c6e3-1c88-421e-b0d3-c8625535dac3_1676x804.png 848w, https://substackcdn.com/image/fetch/$s_!ouuD!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F45f3c6e3-1c88-421e-b0d3-c8625535dac3_1676x804.png 1272w, https://substackcdn.com/image/fetch/$s_!ouuD!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F45f3c6e3-1c88-421e-b0d3-c8625535dac3_1676x804.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 buttonBase-GK1x3M"><svg aria-hidden="true" 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" class="icon-noB79L"><g><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 buttonBase-GK1x3M"><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 icon-noB79L"><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><span>Next, before building, it reads this file.</span></p><div class="captioned-image-container"><figure><div class="image-link image2" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!AVW6!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F709f7c78-5238-49e6-ba09-3b96ada38578_826x108.png 424w, https://substackcdn.com/image/fetch/$s_!AVW6!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F709f7c78-5238-49e6-ba09-3b96ada38578_826x108.png 848w, https://substackcdn.com/image/fetch/$s_!AVW6!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F709f7c78-5238-49e6-ba09-3b96ada38578_826x108.png 1272w, https://substackcdn.com/image/fetch/$s_!AVW6!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F709f7c78-5238-49e6-ba09-3b96ada38578_826x108.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!AVW6!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F709f7c78-5238-49e6-ba09-3b96ada38578_826x108.png" width="826" height="108" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/709f7c78-5238-49e6-ba09-3b96ada38578_826x108.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:108,&quot;width&quot;:826,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!AVW6!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F709f7c78-5238-49e6-ba09-3b96ada38578_826x108.png 424w, https://substackcdn.com/image/fetch/$s_!AVW6!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F709f7c78-5238-49e6-ba09-3b96ada38578_826x108.png 848w, https://substackcdn.com/image/fetch/$s_!AVW6!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F709f7c78-5238-49e6-ba09-3b96ada38578_826x108.png 1272w, https://substackcdn.com/image/fetch/$s_!AVW6!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F709f7c78-5238-49e6-ba09-3b96ada38578_826x108.png 1456w" sizes="100vw" loading="lazy"></picture><div></div></div></div></figure></div><p><span>After a few permission requests to create CSS files &amp; 15 minutes, web page is ready.</span></p><div class="captioned-image-container"><figure><div class="image-link image2" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!9ooH!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb4d68e18-515a-41f6-a54b-d3c5ae51e0f1_1252x278.png 424w, https://substackcdn.com/image/fetch/$s_!9ooH!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb4d68e18-515a-41f6-a54b-d3c5ae51e0f1_1252x278.png 848w, https://substackcdn.com/image/fetch/$s_!9ooH!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb4d68e18-515a-41f6-a54b-d3c5ae51e0f1_1252x278.png 1272w, https://substackcdn.com/image/fetch/$s_!9ooH!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb4d68e18-515a-41f6-a54b-d3c5ae51e0f1_1252x278.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!9ooH!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb4d68e18-515a-41f6-a54b-d3c5ae51e0f1_1252x278.png" width="1252" height="278" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/b4d68e18-515a-41f6-a54b-d3c5ae51e0f1_1252x278.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:278,&quot;width&quot;:1252,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!9ooH!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb4d68e18-515a-41f6-a54b-d3c5ae51e0f1_1252x278.png 424w, https://substackcdn.com/image/fetch/$s_!9ooH!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb4d68e18-515a-41f6-a54b-d3c5ae51e0f1_1252x278.png 848w, https://substackcdn.com/image/fetch/$s_!9ooH!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb4d68e18-515a-41f6-a54b-d3c5ae51e0f1_1252x278.png 1272w, https://substackcdn.com/image/fetch/$s_!9ooH!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb4d68e18-515a-41f6-a54b-d3c5ae51e0f1_1252x278.png 1456w" sizes="100vw" loading="lazy"></picture><div></div></div></div></figure></div><p><span>Let me show you the website it creates:</span></p><div class="native-video-embed" data-component-name="VideoPlaceholder" data-attrs="{&quot;mediaUploadId&quot;:&quot;acaadf59-68bc-428d-8147-439d62b0c5c8&quot;,&quot;duration&quot;:null}"></div><p><span>If you check Tesla&#8217;s website, you&#8217;ll see it looks very similar.</span></p><p><span>You can also try doing this with a regular web search.</span></p><p><span>But the output quality won't be the same.</span></p><p><span>Web search cannot scrape every element from the page and rebuild a website that is simple, effective &amp; similar to Tesla&#8217;s.</span></p><h4 style="text-align: center;"><strong>&#167;</strong></h4><div class="captioned-button-wrap" data-attrs="{&quot;url&quot;:&quot;https://newsletter.systemdesign.one/p/claude-code-mcp-vs-cli?utm_source=substack&utm_medium=email&utm_content=share&action=share&quot;,&quot;text&quot;:&quot;Share&quot;}" data-component-name="CaptionedButtonToDOM"><div class="preamble"><p class="cta-caption"><em><span data-color="#3a7bf9" style="color: rgb(58, 123, 249);">If something resonated with you today, share this letter. Because one idea, one action, can change everything.</span></em></p></div><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://newsletter.systemdesign.one/p/claude-code-mcp-vs-cli?utm_source=substack&utm_medium=email&utm_content=share&action=share&quot;,&quot;text&quot;:&quot;Share&quot;}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://newsletter.systemdesign.one/p/claude-code-mcp-vs-cli?utm_source=substack&utm_medium=email&utm_content=share&action=share"><span>Share</span></a></p></div><h4 style="text-align: center;"><strong>&#167;</strong></h4><h2><span>CLIs, the faster way in</span></h2><p><span>A command-line interface (</span><strong><span>CLI</span></strong><span>) lets you connect these tools through your command line, instead of connecting via MCP.</span></p><p><span>This is the older way, since engineers were wiring tools this way long before MCP existed. But for some use cases, like &#8220;unofficial&#8221; connections, it came back.</span></p><p><span>Since Claude Code lives in the terminal, it can easily connect to these apps.</span></p><p><span>And since MCP servers can </span><em><span>consume more tokens and be harder to install</span></em><span>, CLIs can offer a faster way in.</span></p><p><span>Let me show you with NotebookLM</span><a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-4" href="#footnote-4" target="_self">4</a><span>&#8230;</span></p><p><span>It has no official MCP server/CLI, but an unofficial CLI called </span><code>notebooklm-py</code><span> exists. And it works quite well.</span></p><p><span>To install it, paste this prompt:</span></p><div class="highlighted_code_block" data-attrs="{&quot;language&quot;:&quot;plaintext&quot;,&quot;nodeId&quot;:&quot;ee489c2b-188f-42de-9cae-ff84ea5c56ad&quot;}" data-component-name="HighlightedCodeBlockToDOM"><pre class="shiki"><code class="language-plaintext">Install the notebooklm-py command-line interface from

https://github.com/teng-lin/notebooklm-py

and ping me when I need to authenticate.</code></pre></div><p><span>After you authenticate, you can now connect to your NotebookLM through Claude Code.</span></p><p><span>I have NotebookLM, created using &#8220;Boris Cherny&#8217;s 30-minute tips&#8221;</span><a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-5" href="#footnote-5" target="_self">5</a><span> about Claude Code.</span></p><p><span>Now, let&#8217;s use the CLI &amp; turn it into an infographic.</span></p><p><span>Open your Claude app &amp; paste this prompt:</span></p><div class="highlighted_code_block" data-attrs="{&quot;language&quot;:&quot;plaintext&quot;,&quot;nodeId&quot;:&quot;6b5cdd3f-2778-4b6a-9eeb-5fa425cfb3e9&quot;}" data-component-name="HighlightedCodeBlockToDOM"><pre class="shiki"><code class="language-plaintext">Here is my Notebook: 

&lt;paste your notebook&#8217;s link&gt;

Use the NotebookLM CLI to create a handwritten-style infographic
summarizing these 30 minutes.</code></pre></div><p><span>After pasting this, it connected to NotebookLM and started creating the infographic.</span></p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!YVDH!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3c8a5379-8c4e-4123-a94c-41587f58314d_1150x350.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!YVDH!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3c8a5379-8c4e-4123-a94c-41587f58314d_1150x350.png 424w, https://substackcdn.com/image/fetch/$s_!YVDH!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3c8a5379-8c4e-4123-a94c-41587f58314d_1150x350.png 848w, https://substackcdn.com/image/fetch/$s_!YVDH!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3c8a5379-8c4e-4123-a94c-41587f58314d_1150x350.png 1272w, https://substackcdn.com/image/fetch/$s_!YVDH!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3c8a5379-8c4e-4123-a94c-41587f58314d_1150x350.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!YVDH!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3c8a5379-8c4e-4123-a94c-41587f58314d_1150x350.png" width="1150" height="350" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/3c8a5379-8c4e-4123-a94c-41587f58314d_1150x350.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:350,&quot;width&quot;:1150,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!YVDH!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3c8a5379-8c4e-4123-a94c-41587f58314d_1150x350.png 424w, https://substackcdn.com/image/fetch/$s_!YVDH!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3c8a5379-8c4e-4123-a94c-41587f58314d_1150x350.png 848w, https://substackcdn.com/image/fetch/$s_!YVDH!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3c8a5379-8c4e-4123-a94c-41587f58314d_1150x350.png 1272w, https://substackcdn.com/image/fetch/$s_!YVDH!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3c8a5379-8c4e-4123-a94c-41587f58314d_1150x350.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 buttonBase-GK1x3M"><svg aria-hidden="true" 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" class="icon-noB79L"><g><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 buttonBase-GK1x3M"><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 icon-noB79L"><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><span>And now it is ready; let me show you the image:</span></p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!4cUK!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa66a5385-3fc5-45d5-a4ed-46ba9bf3cc1d_2048x1313.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!4cUK!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa66a5385-3fc5-45d5-a4ed-46ba9bf3cc1d_2048x1313.png 424w, https://substackcdn.com/image/fetch/$s_!4cUK!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa66a5385-3fc5-45d5-a4ed-46ba9bf3cc1d_2048x1313.png 848w, https://substackcdn.com/image/fetch/$s_!4cUK!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa66a5385-3fc5-45d5-a4ed-46ba9bf3cc1d_2048x1313.png 1272w, https://substackcdn.com/image/fetch/$s_!4cUK!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa66a5385-3fc5-45d5-a4ed-46ba9bf3cc1d_2048x1313.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!4cUK!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa66a5385-3fc5-45d5-a4ed-46ba9bf3cc1d_2048x1313.png" width="1456" height="933" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/a66a5385-3fc5-45d5-a4ed-46ba9bf3cc1d_2048x1313.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:933,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!4cUK!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa66a5385-3fc5-45d5-a4ed-46ba9bf3cc1d_2048x1313.png 424w, https://substackcdn.com/image/fetch/$s_!4cUK!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa66a5385-3fc5-45d5-a4ed-46ba9bf3cc1d_2048x1313.png 848w, https://substackcdn.com/image/fetch/$s_!4cUK!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa66a5385-3fc5-45d5-a4ed-46ba9bf3cc1d_2048x1313.png 1272w, https://substackcdn.com/image/fetch/$s_!4cUK!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa66a5385-3fc5-45d5-a4ed-46ba9bf3cc1d_2048x1313.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 buttonBase-GK1x3M"><svg aria-hidden="true" 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" class="icon-noB79L"><g><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 buttonBase-GK1x3M"><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 icon-noB79L"><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><span>I did not even visit </span><code>https://notebooklm.google/</code> <span>once.</span></p><p><span>NotebookLM created this image after my prompt inside Claude Code.</span></p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!v5cw!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F590b8d3c-a506-4455-a1bd-2e506a628496_2048x1062.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!v5cw!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F590b8d3c-a506-4455-a1bd-2e506a628496_2048x1062.png 424w, https://substackcdn.com/image/fetch/$s_!v5cw!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F590b8d3c-a506-4455-a1bd-2e506a628496_2048x1062.png 848w, https://substackcdn.com/image/fetch/$s_!v5cw!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F590b8d3c-a506-4455-a1bd-2e506a628496_2048x1062.png 1272w, https://substackcdn.com/image/fetch/$s_!v5cw!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F590b8d3c-a506-4455-a1bd-2e506a628496_2048x1062.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!v5cw!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F590b8d3c-a506-4455-a1bd-2e506a628496_2048x1062.png" width="1456" height="755" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/590b8d3c-a506-4455-a1bd-2e506a628496_2048x1062.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:755,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!v5cw!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F590b8d3c-a506-4455-a1bd-2e506a628496_2048x1062.png 424w, https://substackcdn.com/image/fetch/$s_!v5cw!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F590b8d3c-a506-4455-a1bd-2e506a628496_2048x1062.png 848w, https://substackcdn.com/image/fetch/$s_!v5cw!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F590b8d3c-a506-4455-a1bd-2e506a628496_2048x1062.png 1272w, https://substackcdn.com/image/fetch/$s_!v5cw!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F590b8d3c-a506-4455-a1bd-2e506a628496_2048x1062.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 buttonBase-GK1x3M"><svg aria-hidden="true" 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" class="icon-noB79L"><g><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 buttonBase-GK1x3M"><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 icon-noB79L"><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><span>When I clicked it in NotebookLM, I saw Claude Code wrote a prompt after my description.</span></p><p><span>So NotebookLM generated the image like this.</span></p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!1-jl!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F37f5b0b0-e2af-4cae-a1a6-03c7b3cf8e9e_2048x1062.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!1-jl!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F37f5b0b0-e2af-4cae-a1a6-03c7b3cf8e9e_2048x1062.png 424w, https://substackcdn.com/image/fetch/$s_!1-jl!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F37f5b0b0-e2af-4cae-a1a6-03c7b3cf8e9e_2048x1062.png 848w, https://substackcdn.com/image/fetch/$s_!1-jl!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F37f5b0b0-e2af-4cae-a1a6-03c7b3cf8e9e_2048x1062.png 1272w, https://substackcdn.com/image/fetch/$s_!1-jl!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F37f5b0b0-e2af-4cae-a1a6-03c7b3cf8e9e_2048x1062.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!1-jl!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F37f5b0b0-e2af-4cae-a1a6-03c7b3cf8e9e_2048x1062.png" width="1456" height="755" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/37f5b0b0-e2af-4cae-a1a6-03c7b3cf8e9e_2048x1062.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:755,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!1-jl!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F37f5b0b0-e2af-4cae-a1a6-03c7b3cf8e9e_2048x1062.png 424w, https://substackcdn.com/image/fetch/$s_!1-jl!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F37f5b0b0-e2af-4cae-a1a6-03c7b3cf8e9e_2048x1062.png 848w, https://substackcdn.com/image/fetch/$s_!1-jl!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F37f5b0b0-e2af-4cae-a1a6-03c7b3cf8e9e_2048x1062.png 1272w, https://substackcdn.com/image/fetch/$s_!1-jl!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F37f5b0b0-e2af-4cae-a1a6-03c7b3cf8e9e_2048x1062.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 buttonBase-GK1x3M"><svg aria-hidden="true" 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" class="icon-noB79L"><g><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 buttonBase-GK1x3M"><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 icon-noB79L"><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><em><span>But do you wonder how NotebookLM authentication works?</span></em></p><p><span>Claude opens the browser, lets me authenticate my account, and saves everything in a JSON file.</span></p><p><span>The next time it connects, it uses that file to access my account again.</span></p><p><span>Claude Code connects to the browser through browser automation</span><a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-6" href="#footnote-6" target="_self">6</a><span>.</span></p><p><span>Now, let me show you more about how this works&#8230;</span></p><h4 style="text-align: center;"><strong>&#167;</strong></h4><div class="callout-block" data-callout="true"><p style="text-align: center;"><em><strong><span data-color="#3a7bf9" style="color: rgb(58, 123, 249);">Reminder: this is a teaser of the subscriber-only newsletter, exclusive to my golden members.</span></strong></em></p><p>When you upgrade, you&#8217;ll get:</p><ul><li><p><strong>A complete Claude Code setup, from your first session to a fully automated one.</strong></p></li><li><p>Deep dives into how MCP, subagents, agent orchestration &amp; hooks actually work inside Claude Code.</p></li><li><p><strong>How real Claude Code projects handle context, scale &amp; running without you.</strong></p></li></ul><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://newsletter.systemdesign.one/subscribe&quot;,&quot;text&quot;:&quot;Unlock Full Access&quot;,&quot;action&quot;:null,&quot;class&quot;:&quot;button-wrapper&quot;}" data-component-name="ButtonCreateButton"><a class="button primary button-wrapper" href="https://newsletter.systemdesign.one/subscribe"><span>Unlock Full Access</span></a></p><p>(If this newsletter has helped you become a better software engineer, consider subscribing to support my work.)</p></div><h4 style="text-align: center;"><strong>&#167;</strong></h4><h2><span>Browser automation with /chrome</span></h2>
      <p>
          <a href="https://newsletter.systemdesign.one/p/claude-code-mcp-vs-cli">
              Read more
          </a>
      </p>
   ]]></content:encoded></item><item><title><![CDATA[If you want to get started with Claude Code, read this]]></title><description><![CDATA[#176: Part 1 - Claude Code 24/7]]></description><link>https://newsletter.systemdesign.one/p/claude-code-claude-md-best-practices</link><guid isPermaLink="false">https://newsletter.systemdesign.one/p/claude-code-claude-md-best-practices</guid><dc:creator><![CDATA[Neo Kim]]></dc:creator><pubDate>Thu, 10 Sep 2026 13:47:18 GMT</pubDate><enclosure url="https://substack-post-media.s3.amazonaws.com/public/images/5f1251c7-8d38-4d41-8e95-24ea0025a951_1280x720.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>&#128680; SUPER DUPER BIG ANNOUNCEMENT &#128680;</p><p>One of the best ways to get ahead of most software engineers is to become good at Claude Code&#8230;</p><p>So today we&#8217;re excited to announce that doors are officially open for our brand spanking new newsletter series...</p><p><strong>INTRODUCING: Claude Code 24/7</strong></p><p>This 5-part newsletter series (running through the end of October) will elevate your software engineering career.</p><p>If you&#8217;ve ever thought:</p><blockquote><p><em>&#8220;I want to understand Claude Code, but don&#8217;t know where to start.&#8221;</em></p><p><em>&#8220;I want to master Claude Code so I can get more out of it at work.&#8221;</em></p><p><em>&#8220;It&#8217;s time. I should learn how to set up subagents, hooks &amp; scheduled automation.&#8221;</em></p></blockquote><p>Then this is for you&#8230;</p><p><em>Here&#8217;s what you&#8217;ll get inside Claude Code 24/7:</em></p><ul><li><p><strong>A complete setup, from your first session to a fully automated one.</strong></p></li><li><p>Deep dives into how MCP, subagents, agent orchestration &amp; hooks work.</p></li><li><p><strong>How real projects handle context, scale, and running without you.</strong></p></li></ul><p>And here&#8217;s the best part:</p><p><em>You&#8217;ll get 10x the results you currently get with 1/10th of your time, energy &amp; effort.</em></p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://newsletter.systemdesign.one/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe now&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://newsletter.systemdesign.one/subscribe?"><span>Subscribe now</span></a></p><h4 style="text-align: center;"><strong><a href="https://blitzy.com/sandbox?utm_medium=paid_media&amp;utm_source=newsletter_systemdesign&amp;utm_campaign=sandbox">&#167;</a></strong></h4><h2><strong><a href="https://blitzy.com/sandbox?utm_medium=paid_media&amp;utm_source=newsletter_systemdesign&amp;utm_campaign=sandbox"><span>Autonomous Software Development for the Enterprise (Partner)</span></a></strong></h2><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://blitzy.com/sandbox?utm_medium=paid_media&amp;utm_source=newsletter_systemdesign&amp;utm_campaign=sandbox" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!mEVd!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8f45b0bf-dbe2-424a-bdc1-a689977a6061_2048x1072.png 424w, https://substackcdn.com/image/fetch/$s_!mEVd!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8f45b0bf-dbe2-424a-bdc1-a689977a6061_2048x1072.png 848w, https://substackcdn.com/image/fetch/$s_!mEVd!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8f45b0bf-dbe2-424a-bdc1-a689977a6061_2048x1072.png 1272w, https://substackcdn.com/image/fetch/$s_!mEVd!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8f45b0bf-dbe2-424a-bdc1-a689977a6061_2048x1072.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!mEVd!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8f45b0bf-dbe2-424a-bdc1-a689977a6061_2048x1072.png" width="1456" height="762" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/8f45b0bf-dbe2-424a-bdc1-a689977a6061_2048x1072.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:762,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:2058069,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:&quot;https://blitzy.com/sandbox?utm_medium=paid_media&amp;utm_source=newsletter_systemdesign&amp;utm_campaign=sandbox&quot;,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://newsletter.systemdesign.one/i/214745547?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8f45b0bf-dbe2-424a-bdc1-a689977a6061_2048x1072.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_!mEVd!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8f45b0bf-dbe2-424a-bdc1-a689977a6061_2048x1072.png 424w, https://substackcdn.com/image/fetch/$s_!mEVd!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8f45b0bf-dbe2-424a-bdc1-a689977a6061_2048x1072.png 848w, https://substackcdn.com/image/fetch/$s_!mEVd!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8f45b0bf-dbe2-424a-bdc1-a689977a6061_2048x1072.png 1272w, https://substackcdn.com/image/fetch/$s_!mEVd!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8f45b0bf-dbe2-424a-bdc1-a689977a6061_2048x1072.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 buttonBase-GK1x3M"><svg aria-hidden="true" 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" class="icon-noB79L"><g><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 buttonBase-GK1x3M"><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 icon-noB79L"><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><a href="https://blitzy.com/sandbox?utm_medium=paid_media&amp;utm_source=newsletter_systemdesign&amp;utm_campaign=sandbox"><span>Blitzy</span></a></strong><span> is built for large, complex software projects that other coding agents cannot handle: new feature development, large-scale refactors, scaled vulnerability remediation, and undocumented legacy systems.</span></p><p><span>Blitzy&#8217;s Sandbox lets engineers evaluate Blitzy on their own software estate, at their own pace. Eligible organizations can connect real applications, reverse-engineer up to 1 million lines of code, generate up to 25,000 lines of E2E tested code, and surface prioritized security vulnerabilities across their software estate.</span></p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://blitzy.com/sandbox?utm_medium=paid_media&amp;utm_source=newsletter_systemdesign&amp;utm_campaign=sandbox&quot;,&quot;text&quot;:&quot;Try Blitzy on your codebase&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://blitzy.com/sandbox?utm_medium=paid_media&amp;utm_source=newsletter_systemdesign&amp;utm_campaign=sandbox"><span>Try Blitzy on your codebase</span></a></p><p><em>(Thanks to <strong><a href="https://blitzy.com/sandbox?utm_medium=paid_media&amp;utm_source=newsletter_systemdesign&amp;utm_campaign=sandbox">Blitzy</a></strong> for partnering on this newsletter.)</em></p><h4 style="text-align: center;"><strong>&#167;</strong></h4><p>I want to introduce <strong><a href="https://www.learnwithmeai.com/welcome">Gencay</a></strong> as the guest author.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://www.learnwithmeai.com/welcome" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!i2sU!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F79774ca3-8968-45f9-bb13-fb23bc404b4f_1442x668.png 424w, https://substackcdn.com/image/fetch/$s_!i2sU!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F79774ca3-8968-45f9-bb13-fb23bc404b4f_1442x668.png 848w, https://substackcdn.com/image/fetch/$s_!i2sU!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F79774ca3-8968-45f9-bb13-fb23bc404b4f_1442x668.png 1272w, https://substackcdn.com/image/fetch/$s_!i2sU!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F79774ca3-8968-45f9-bb13-fb23bc404b4f_1442x668.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!i2sU!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F79774ca3-8968-45f9-bb13-fb23bc404b4f_1442x668.png" width="1442" height="668" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/79774ca3-8968-45f9-bb13-fb23bc404b4f_1442x668.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:668,&quot;width&quot;:1442,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;&quot;,&quot;title&quot;:&quot;&quot;,&quot;type&quot;:null,&quot;href&quot;:&quot;https://www.learnwithmeai.com/welcome&quot;,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" title="" srcset="https://substackcdn.com/image/fetch/$s_!i2sU!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F79774ca3-8968-45f9-bb13-fb23bc404b4f_1442x668.png 424w, https://substackcdn.com/image/fetch/$s_!i2sU!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F79774ca3-8968-45f9-bb13-fb23bc404b4f_1442x668.png 848w, https://substackcdn.com/image/fetch/$s_!i2sU!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F79774ca3-8968-45f9-bb13-fb23bc404b4f_1442x668.png 1272w, https://substackcdn.com/image/fetch/$s_!i2sU!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F79774ca3-8968-45f9-bb13-fb23bc404b4f_1442x668.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 buttonBase-GK1x3M"><svg aria-hidden="true" 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" class="icon-noB79L"><g><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 buttonBase-GK1x3M"><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 icon-noB79L"><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>He has been building with AI since ChatGPT first shipped in 2022.</p><p>For years, he built for clients on Upwork: 7,300+ hours of it.</p><p>Now he builds in the open and shares every piece of it on <strong><a href="https://www.learnwithmeai.com/welcome"><span>LearnAIWithMe</span></a></strong>, every Monday, Wednesday &amp; Friday.</p><p>Not just theory for its own sake. One real build at a time, from idea to running system.</p><h4 style="text-align: center;"><strong>&#167;</strong></h4><p>Claude Code is in every feed right now&#8230;</p><p>YouTube videos, Substack posts, tutorials, screenshots of an app someone built in a single prompt.</p><p>But when I sit down with clients, I keep seeing the same install.</p><p>Three commands, maybe one skill, that&#8217;s it.</p><p>So there&#8217;s a massive gap between what Claude Code can do &amp; how most people use it.</p><p>Let&#8217;s get started!</p><h4 style="text-align: center;"><strong>&#167;</strong></h4><p><em>Here&#8217;s what you&#8217;ll find inside this newsletter:</em></p><ul><li><p><strong>What Claude Code is actually doing after you give it a task.</strong> The agentic loop behind how it gathers context, takes action, verifies its work, and uses tools to work directly with your codebase.</p></li><li><p><strong>The setup mistake that can give Claude far more control than you intended.</strong> How permission modes work, when to use Manual, Plan, Auto, or Accept Edits, and why bypassing permissions can become dangerous as your workflow grows.</p></li><li><p><strong>How to hand Claude a codebase you&#8217;ve never seen before.</strong> A practical workflow for mapping an unfamiliar repository before touching the code, plus how effort levels change how much thinking Claude spends on harder tasks.</p></li><li><p><strong>How to stop re-explaining your project every time you open Claude Code.</strong> What belongs in CLAUDE.md, what should stay out, and how to make your project rules and preferences survive across sessions.</p></li><li><p><strong>How to turn something you repeatedly do by hand into a reusable Claude Code skill.</strong> You&#8217;ll build one from scratch, give it a trigger, test it on real input, teach it from its mistakes, and make those corrections permanent so the workflow improves over time.</p></li></ul><p></p><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://newsletter.systemdesign.one/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"><em><span data-color="#3a7bf9" style="color: rgb(58, 123, 249);">Golden members get full access to Claude Code 24/7!&#8230;</span></em></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><h4 style="text-align: center;"><strong>&#167;</strong></h4><h2><span>What Claude Code actually is</span></h2><p><span>Claude Code</span><a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-1" href="#footnote-1" target="_self">1</a><span> is an agent running in your terminal</span><a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-2" href="#footnote-2" target="_self">2</a><span> that can do anything you could do from the command line.</span></p><p><span>When you give Claude Code a task, it collects context, takes action, and verifies the results; this is called an Agentic loop</span><a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-3" href="#footnote-3" target="_self">3</a><span>.</span></p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!lUZD!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1d978f15-d102-48d8-bb51-cfc4d75148f7_1916x821.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!lUZD!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1d978f15-d102-48d8-bb51-cfc4d75148f7_1916x821.png 424w, https://substackcdn.com/image/fetch/$s_!lUZD!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1d978f15-d102-48d8-bb51-cfc4d75148f7_1916x821.png 848w, https://substackcdn.com/image/fetch/$s_!lUZD!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1d978f15-d102-48d8-bb51-cfc4d75148f7_1916x821.png 1272w, https://substackcdn.com/image/fetch/$s_!lUZD!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1d978f15-d102-48d8-bb51-cfc4d75148f7_1916x821.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!lUZD!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1d978f15-d102-48d8-bb51-cfc4d75148f7_1916x821.png" width="1456" height="624" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/1d978f15-d102-48d8-bb51-cfc4d75148f7_1916x821.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:624,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!lUZD!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1d978f15-d102-48d8-bb51-cfc4d75148f7_1916x821.png 424w, https://substackcdn.com/image/fetch/$s_!lUZD!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1d978f15-d102-48d8-bb51-cfc4d75148f7_1916x821.png 848w, https://substackcdn.com/image/fetch/$s_!lUZD!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1d978f15-d102-48d8-bb51-cfc4d75148f7_1916x821.png 1272w, https://substackcdn.com/image/fetch/$s_!lUZD!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1d978f15-d102-48d8-bb51-cfc4d75148f7_1916x821.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 buttonBase-GK1x3M"><svg aria-hidden="true" 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" class="icon-noB79L"><g><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 buttonBase-GK1x3M"><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 icon-noB79L"><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><span>But that doesn&#8217;t mean all three stages run every time you give it a task&#8230;</span></p><p><span>Let&#8217;s say you ask a question about the codebase.</span></p><p><span>In this case, gathering context could be enough, while fixing a bug would require all three stages of the agentic loop.</span></p><h3><span>Models</span></h3><p><span>You can change the model during the conversation.</span></p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!5R6j!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6f3b7bd4-fbd8-4138-9adb-a7bc2cf8979a_1640x560.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!5R6j!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6f3b7bd4-fbd8-4138-9adb-a7bc2cf8979a_1640x560.png 424w, https://substackcdn.com/image/fetch/$s_!5R6j!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6f3b7bd4-fbd8-4138-9adb-a7bc2cf8979a_1640x560.png 848w, https://substackcdn.com/image/fetch/$s_!5R6j!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6f3b7bd4-fbd8-4138-9adb-a7bc2cf8979a_1640x560.png 1272w, https://substackcdn.com/image/fetch/$s_!5R6j!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6f3b7bd4-fbd8-4138-9adb-a7bc2cf8979a_1640x560.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!5R6j!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6f3b7bd4-fbd8-4138-9adb-a7bc2cf8979a_1640x560.png" width="1456" height="497" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/6f3b7bd4-fbd8-4138-9adb-a7bc2cf8979a_1640x560.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:497,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!5R6j!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6f3b7bd4-fbd8-4138-9adb-a7bc2cf8979a_1640x560.png 424w, https://substackcdn.com/image/fetch/$s_!5R6j!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6f3b7bd4-fbd8-4138-9adb-a7bc2cf8979a_1640x560.png 848w, https://substackcdn.com/image/fetch/$s_!5R6j!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6f3b7bd4-fbd8-4138-9adb-a7bc2cf8979a_1640x560.png 1272w, https://substackcdn.com/image/fetch/$s_!5R6j!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6f3b7bd4-fbd8-4138-9adb-a7bc2cf8979a_1640x560.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 buttonBase-GK1x3M"><svg aria-hidden="true" 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" class="icon-noB79L"><g><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 buttonBase-GK1x3M"><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 icon-noB79L"><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><span>Each model serves a different purpose.</span></p><p><span>For instance, Fable 5 is the most &#8220;intelligent&#8221; model, but you should NOT reach for it on every task</span><a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-4" href="#footnote-4" target="_self">4</a><span>.</span></p><p><span>We&#8217;ll return to this in the next parts as we explore subagents&#8230;</span></p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!7uoV!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F330ca319-c474-4e38-979f-559f764bb0da_1622x560.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!7uoV!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F330ca319-c474-4e38-979f-559f764bb0da_1622x560.png 424w, https://substackcdn.com/image/fetch/$s_!7uoV!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F330ca319-c474-4e38-979f-559f764bb0da_1622x560.png 848w, https://substackcdn.com/image/fetch/$s_!7uoV!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F330ca319-c474-4e38-979f-559f764bb0da_1622x560.png 1272w, https://substackcdn.com/image/fetch/$s_!7uoV!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F330ca319-c474-4e38-979f-559f764bb0da_1622x560.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!7uoV!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F330ca319-c474-4e38-979f-559f764bb0da_1622x560.png" width="1456" height="503" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/330ca319-c474-4e38-979f-559f764bb0da_1622x560.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:503,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!7uoV!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F330ca319-c474-4e38-979f-559f764bb0da_1622x560.png 424w, https://substackcdn.com/image/fetch/$s_!7uoV!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F330ca319-c474-4e38-979f-559f764bb0da_1622x560.png 848w, https://substackcdn.com/image/fetch/$s_!7uoV!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F330ca319-c474-4e38-979f-559f764bb0da_1622x560.png 1272w, https://substackcdn.com/image/fetch/$s_!7uoV!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F330ca319-c474-4e38-979f-559f764bb0da_1622x560.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 buttonBase-GK1x3M"><svg aria-hidden="true" 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" class="icon-noB79L"><g><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 buttonBase-GK1x3M"><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 icon-noB79L"><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><h3><span>Tools</span></h3><p><span>An agent takes all actions through tools</span><a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-5" href="#footnote-5" target="_self">5</a><span>.</span></p><p><span>And tools are what separate Claude Code from a simple LLM.</span></p><p><span>It reads your files, searches through them, and executes commands.</span></p><p><span>Sometimes it asks for your approval first, sometimes not, and permission modes decide which. (We will cover those later in this newsletter.)</span></p><p><span>It can search the web too.</span></p><p><span>And code intelligence means Claude sees its own mistakes right after it writes them, without running the code.</span></p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!Ut2P!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F504ee0fd-f84e-49ee-aba1-b96c45ced61e_1672x941.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!Ut2P!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F504ee0fd-f84e-49ee-aba1-b96c45ced61e_1672x941.png 424w, https://substackcdn.com/image/fetch/$s_!Ut2P!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F504ee0fd-f84e-49ee-aba1-b96c45ced61e_1672x941.png 848w, https://substackcdn.com/image/fetch/$s_!Ut2P!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F504ee0fd-f84e-49ee-aba1-b96c45ced61e_1672x941.png 1272w, https://substackcdn.com/image/fetch/$s_!Ut2P!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F504ee0fd-f84e-49ee-aba1-b96c45ced61e_1672x941.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!Ut2P!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F504ee0fd-f84e-49ee-aba1-b96c45ced61e_1672x941.png" width="1456" height="819" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/504ee0fd-f84e-49ee-aba1-b96c45ced61e_1672x941.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:819,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!Ut2P!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F504ee0fd-f84e-49ee-aba1-b96c45ced61e_1672x941.png 424w, https://substackcdn.com/image/fetch/$s_!Ut2P!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F504ee0fd-f84e-49ee-aba1-b96c45ced61e_1672x941.png 848w, https://substackcdn.com/image/fetch/$s_!Ut2P!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F504ee0fd-f84e-49ee-aba1-b96c45ced61e_1672x941.png 1272w, https://substackcdn.com/image/fetch/$s_!Ut2P!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F504ee0fd-f84e-49ee-aba1-b96c45ced61e_1672x941.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 buttonBase-GK1x3M"><svg aria-hidden="true" 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" class="icon-noB79L"><g><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 buttonBase-GK1x3M"><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 icon-noB79L"><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><span>Now you know how it works.</span></p><p><span>So let&#8217;s install it &amp; run your first session&#8230;</span></p><h4 style="text-align: center;"><strong>&#167;</strong></h4><div class="captioned-button-wrap" data-attrs="{&quot;url&quot;:&quot;https://newsletter.systemdesign.one/p/claude-code-claude-md-best-practices?utm_source=substack&utm_medium=email&utm_content=share&action=share&quot;,&quot;text&quot;:&quot;Share&quot;}" data-component-name="CaptionedButtonToDOM"><div class="preamble"><p class="cta-caption"><em><span data-color="#3a7bf9" style="color: rgb(58, 123, 249);">If something resonated with you today, share this letter. Because one idea, one action, can change everything.</span></em></p></div><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://newsletter.systemdesign.one/p/claude-code-claude-md-best-practices?utm_source=substack&utm_medium=email&utm_content=share&action=share&quot;,&quot;text&quot;:&quot;Share&quot;}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://newsletter.systemdesign.one/p/claude-code-claude-md-best-practices?utm_source=substack&utm_medium=email&utm_content=share&action=share"><span>Share</span></a></p></div><h4 style="text-align: center;"><strong>&#167;</strong></h4><h2><span>Install it and run your first session</span></h2><p><span>To install Claude Code, you should use the terminal.</span></p><p><span>If you have never used one, here are the basics.</span></p><p><span>It takes two steps:</span></p><p><strong><span>Step 1: Paste one of the following commands.</span></strong></p><div class="highlighted_code_block" data-attrs="{&quot;language&quot;:&quot;plaintext&quot;,&quot;nodeId&quot;:&quot;9462e2ae-6fa8-4b4a-9641-80d8cab3298b&quot;}" data-component-name="HighlightedCodeBlockToDOM"><pre class="shiki"><code class="language-plaintext">macOS/Linux:
curl -fsSL https://claude.ai/install.sh | bash

===

Windows(powershell):
irm https://claude.ai/install.ps1 | iex

===

Windows(CMD):
curl -fsSL https://claude.ai/install.cmd -o install.cmd
&amp;&amp; install.cmd &amp;&amp; del install.cmd</code></pre></div><p><strong><span>Step 2: Log in</span></strong></p><p><span>After Step 1 is finished successfully, paste the following command.</span></p><div class="highlighted_code_block" data-attrs="{&quot;language&quot;:&quot;plaintext&quot;,&quot;nodeId&quot;:&quot;148b5e73-8096-4daa-942c-ffde9c8de84a&quot;}" data-component-name="HighlightedCodeBlockToDOM"><pre class="shiki"><code class="language-plaintext">claude</code></pre></div><p><span>Next, Claude asks you to log in, and you can authenticate with your account/API key.</span></p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!pyzi!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5ac371ba-84ae-45c9-80d8-5629dd17cba1_1144x762.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!pyzi!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5ac371ba-84ae-45c9-80d8-5629dd17cba1_1144x762.png 424w, https://substackcdn.com/image/fetch/$s_!pyzi!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5ac371ba-84ae-45c9-80d8-5629dd17cba1_1144x762.png 848w, https://substackcdn.com/image/fetch/$s_!pyzi!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5ac371ba-84ae-45c9-80d8-5629dd17cba1_1144x762.png 1272w, https://substackcdn.com/image/fetch/$s_!pyzi!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5ac371ba-84ae-45c9-80d8-5629dd17cba1_1144x762.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!pyzi!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5ac371ba-84ae-45c9-80d8-5629dd17cba1_1144x762.png" width="1144" height="762" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/5ac371ba-84ae-45c9-80d8-5629dd17cba1_1144x762.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:762,&quot;width&quot;:1144,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!pyzi!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5ac371ba-84ae-45c9-80d8-5629dd17cba1_1144x762.png 424w, https://substackcdn.com/image/fetch/$s_!pyzi!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5ac371ba-84ae-45c9-80d8-5629dd17cba1_1144x762.png 848w, https://substackcdn.com/image/fetch/$s_!pyzi!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5ac371ba-84ae-45c9-80d8-5629dd17cba1_1144x762.png 1272w, https://substackcdn.com/image/fetch/$s_!pyzi!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5ac371ba-84ae-45c9-80d8-5629dd17cba1_1144x762.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 buttonBase-GK1x3M"><svg aria-hidden="true" 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" class="icon-noB79L"><g><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 buttonBase-GK1x3M"><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 icon-noB79L"><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><span>Also, let&#8217;s talk about three more shortcuts before you start.</span></p><ul><li><p><code>Esc</code><span> interrupts Claude mid-task, so you can redirect it without losing the work.</span></p></li><li><p><code>Esc</code><span> twice opens the rewind menu, which restores your code to an earlier point.</span></p></li><li><p><code>Ctrl+C</code><span> kills the current input when you change your mind.</span></p></li></ul><p><span>Now everything is ready, but the Claude team has also released an app.</span></p><p><span>For a better experience, you can download it </span><a href="https://claude.com/download"><span>here</span></a><span>.</span></p><p><span>Here&#8217;s what it looks like:</span></p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!lteT!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4b1fcf85-94ee-404d-a00e-591010056ad6_2048x1363.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!lteT!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4b1fcf85-94ee-404d-a00e-591010056ad6_2048x1363.png 424w, https://substackcdn.com/image/fetch/$s_!lteT!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4b1fcf85-94ee-404d-a00e-591010056ad6_2048x1363.png 848w, https://substackcdn.com/image/fetch/$s_!lteT!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4b1fcf85-94ee-404d-a00e-591010056ad6_2048x1363.png 1272w, https://substackcdn.com/image/fetch/$s_!lteT!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4b1fcf85-94ee-404d-a00e-591010056ad6_2048x1363.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!lteT!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4b1fcf85-94ee-404d-a00e-591010056ad6_2048x1363.png" width="1456" height="969" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/4b1fcf85-94ee-404d-a00e-591010056ad6_2048x1363.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:969,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!lteT!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4b1fcf85-94ee-404d-a00e-591010056ad6_2048x1363.png 424w, https://substackcdn.com/image/fetch/$s_!lteT!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4b1fcf85-94ee-404d-a00e-591010056ad6_2048x1363.png 848w, https://substackcdn.com/image/fetch/$s_!lteT!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4b1fcf85-94ee-404d-a00e-591010056ad6_2048x1363.png 1272w, https://substackcdn.com/image/fetch/$s_!lteT!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4b1fcf85-94ee-404d-a00e-591010056ad6_2048x1363.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 buttonBase-GK1x3M"><svg aria-hidden="true" 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" class="icon-noB79L"><g><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 buttonBase-GK1x3M"><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 icon-noB79L"><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><span>Did you notice the mistake I made?</span></p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!SA1I!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7687d385-17ae-4652-bda3-88608cc51613_1910x662.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!SA1I!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7687d385-17ae-4652-bda3-88608cc51613_1910x662.png 424w, https://substackcdn.com/image/fetch/$s_!SA1I!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7687d385-17ae-4652-bda3-88608cc51613_1910x662.png 848w, https://substackcdn.com/image/fetch/$s_!SA1I!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7687d385-17ae-4652-bda3-88608cc51613_1910x662.png 1272w, https://substackcdn.com/image/fetch/$s_!SA1I!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7687d385-17ae-4652-bda3-88608cc51613_1910x662.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!SA1I!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7687d385-17ae-4652-bda3-88608cc51613_1910x662.png" width="1456" height="505" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/7687d385-17ae-4652-bda3-88608cc51613_1910x662.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:505,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!SA1I!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7687d385-17ae-4652-bda3-88608cc51613_1910x662.png 424w, https://substackcdn.com/image/fetch/$s_!SA1I!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7687d385-17ae-4652-bda3-88608cc51613_1910x662.png 848w, https://substackcdn.com/image/fetch/$s_!SA1I!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7687d385-17ae-4652-bda3-88608cc51613_1910x662.png 1272w, https://substackcdn.com/image/fetch/$s_!SA1I!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7687d385-17ae-4652-bda3-88608cc51613_1910x662.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 buttonBase-GK1x3M"><svg aria-hidden="true" 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" class="icon-noB79L"><g><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 buttonBase-GK1x3M"><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 icon-noB79L"><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><span>Yes, I bypassed permissions and let Claude do anything </span><em><span>without</span></em><span> my approval.</span></p><p><span>It is a serious &#8220;mistake&#8221;, and it gets worse the longer you work that way.</span></p><p><span>Let&#8217;s explore the permission modes&#8230;</span></p><h4 style="text-align: center;"><strong>&#167;</strong></h4><h2><span>Permission modes and which one to pick</span></h2><p><span>When you work with Claude, it asks for your approval between tasks.</span></p><p><span>The permission modes control how often Claude asks.</span></p><p><span>Press </span><code>shift+tab</code><span> or click the mode label to see the list.</span></p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!yJIw!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F83f416bb-b47a-49fa-b2a1-080bb430bc00_1674x482.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!yJIw!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F83f416bb-b47a-49fa-b2a1-080bb430bc00_1674x482.png 424w, https://substackcdn.com/image/fetch/$s_!yJIw!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F83f416bb-b47a-49fa-b2a1-080bb430bc00_1674x482.png 848w, https://substackcdn.com/image/fetch/$s_!yJIw!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F83f416bb-b47a-49fa-b2a1-080bb430bc00_1674x482.png 1272w, https://substackcdn.com/image/fetch/$s_!yJIw!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F83f416bb-b47a-49fa-b2a1-080bb430bc00_1674x482.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!yJIw!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F83f416bb-b47a-49fa-b2a1-080bb430bc00_1674x482.png" width="1456" height="419" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/83f416bb-b47a-49fa-b2a1-080bb430bc00_1674x482.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:419,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!yJIw!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F83f416bb-b47a-49fa-b2a1-080bb430bc00_1674x482.png 424w, https://substackcdn.com/image/fetch/$s_!yJIw!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F83f416bb-b47a-49fa-b2a1-080bb430bc00_1674x482.png 848w, https://substackcdn.com/image/fetch/$s_!yJIw!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F83f416bb-b47a-49fa-b2a1-080bb430bc00_1674x482.png 1272w, https://substackcdn.com/image/fetch/$s_!yJIw!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F83f416bb-b47a-49fa-b2a1-080bb430bc00_1674x482.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 buttonBase-GK1x3M"><svg aria-hidden="true" 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" class="icon-noB79L"><g><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 buttonBase-GK1x3M"><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 icon-noB79L"><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><span>At the top of the list, you&#8217;ll see your current default.</span></p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!Xbmx!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F26c50054-23f7-46cf-9c8f-30a79d5602b1_596x482.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!Xbmx!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F26c50054-23f7-46cf-9c8f-30a79d5602b1_596x482.png 424w, https://substackcdn.com/image/fetch/$s_!Xbmx!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F26c50054-23f7-46cf-9c8f-30a79d5602b1_596x482.png 848w, https://substackcdn.com/image/fetch/$s_!Xbmx!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F26c50054-23f7-46cf-9c8f-30a79d5602b1_596x482.png 1272w, https://substackcdn.com/image/fetch/$s_!Xbmx!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F26c50054-23f7-46cf-9c8f-30a79d5602b1_596x482.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!Xbmx!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F26c50054-23f7-46cf-9c8f-30a79d5602b1_596x482.png" width="596" height="482" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/26c50054-23f7-46cf-9c8f-30a79d5602b1_596x482.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:482,&quot;width&quot;:596,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!Xbmx!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F26c50054-23f7-46cf-9c8f-30a79d5602b1_596x482.png 424w, https://substackcdn.com/image/fetch/$s_!Xbmx!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F26c50054-23f7-46cf-9c8f-30a79d5602b1_596x482.png 848w, https://substackcdn.com/image/fetch/$s_!Xbmx!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F26c50054-23f7-46cf-9c8f-30a79d5602b1_596x482.png 1272w, https://substackcdn.com/image/fetch/$s_!Xbmx!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F26c50054-23f7-46cf-9c8f-30a79d5602b1_596x482.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 buttonBase-GK1x3M"><svg aria-hidden="true" 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" class="icon-noB79L"><g><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 buttonBase-GK1x3M"><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 icon-noB79L"><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><span>To change it, click on Settings/Claude Code.</span></p><p><span>You can toggle </span><em><span>&#8220;Allow bypass permission mode&#8221;</span></em><span> on &amp; off.</span></p><p><span>If you&#8217;re still learning, leave this option off.</span></p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!esWR!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F01600301-3406-4645-987b-8514b715898d_1900x1320.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!esWR!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F01600301-3406-4645-987b-8514b715898d_1900x1320.png 424w, https://substackcdn.com/image/fetch/$s_!esWR!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F01600301-3406-4645-987b-8514b715898d_1900x1320.png 848w, https://substackcdn.com/image/fetch/$s_!esWR!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F01600301-3406-4645-987b-8514b715898d_1900x1320.png 1272w, https://substackcdn.com/image/fetch/$s_!esWR!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F01600301-3406-4645-987b-8514b715898d_1900x1320.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!esWR!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F01600301-3406-4645-987b-8514b715898d_1900x1320.png" width="1456" height="1012" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/01600301-3406-4645-987b-8514b715898d_1900x1320.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1012,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!esWR!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F01600301-3406-4645-987b-8514b715898d_1900x1320.png 424w, https://substackcdn.com/image/fetch/$s_!esWR!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F01600301-3406-4645-987b-8514b715898d_1900x1320.png 848w, https://substackcdn.com/image/fetch/$s_!esWR!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F01600301-3406-4645-987b-8514b715898d_1900x1320.png 1272w, https://substackcdn.com/image/fetch/$s_!esWR!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F01600301-3406-4645-987b-8514b715898d_1900x1320.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 buttonBase-GK1x3M"><svg aria-hidden="true" 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" class="icon-noB79L"><g><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 buttonBase-GK1x3M"><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 icon-noB79L"><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><span>Here are all five options and a single-sentence explanation for each of them:</span></p><ul><li><p><strong><span>Manual</span></strong><span>: Always ask before making any changes.</span></p></li><li><p><strong><span>Accept edits</span></strong><span>: Automatically accept all file edits.</span></p></li><li><p><strong><span>Plan</span></strong><span>: Create a plan before making any changes.</span></p></li><li><p><strong><span>Auto</span></strong><span>: Claude decides the permissions.</span></p></li><li><p><strong><span>Bypass permission</span></strong><span>: Claude runs everything without asking.</span></p></li></ul><p><span>Now you know how much freedom Claude has.</span></p><p><span>So let&#8217;s put it to work on a codebase you have never seen&#8230;</span></p><h4 style="text-align: center;"><strong>&#167;</strong></h4><h2><span>Read an unfamiliar codebase before you touch it</span></h2><p><span>A Claude project usually holds your skills and a Claude.md file</span><a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-6" href="#footnote-6" target="_self">6</a><span>.</span></p><p><span>(We&#8217;ll go through these later in this newsletter&#8230;)</span></p><p><span>But first, let me show you mine, using VS Code, because it also shows the files.</span></p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!uEDm!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0a9b6520-7f5f-4fbf-86be-6ba4dc0b1222_2048x1273.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!uEDm!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0a9b6520-7f5f-4fbf-86be-6ba4dc0b1222_2048x1273.png 424w, https://substackcdn.com/image/fetch/$s_!uEDm!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0a9b6520-7f5f-4fbf-86be-6ba4dc0b1222_2048x1273.png 848w, https://substackcdn.com/image/fetch/$s_!uEDm!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0a9b6520-7f5f-4fbf-86be-6ba4dc0b1222_2048x1273.png 1272w, https://substackcdn.com/image/fetch/$s_!uEDm!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0a9b6520-7f5f-4fbf-86be-6ba4dc0b1222_2048x1273.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!uEDm!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0a9b6520-7f5f-4fbf-86be-6ba4dc0b1222_2048x1273.png" width="1456" height="905" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/0a9b6520-7f5f-4fbf-86be-6ba4dc0b1222_2048x1273.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:905,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!uEDm!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0a9b6520-7f5f-4fbf-86be-6ba4dc0b1222_2048x1273.png 424w, https://substackcdn.com/image/fetch/$s_!uEDm!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0a9b6520-7f5f-4fbf-86be-6ba4dc0b1222_2048x1273.png 848w, https://substackcdn.com/image/fetch/$s_!uEDm!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0a9b6520-7f5f-4fbf-86be-6ba4dc0b1222_2048x1273.png 1272w, https://substackcdn.com/image/fetch/$s_!uEDm!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0a9b6520-7f5f-4fbf-86be-6ba4dc0b1222_2048x1273.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 buttonBase-GK1x3M"><svg aria-hidden="true" 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" class="icon-noB79L"><g><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 buttonBase-GK1x3M"><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 icon-noB79L"><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>Before publishing articles for my newsletter, I use my Claude project to test the code in them.</p><p><span>You can see my project name from the Claude app too.</span></p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!mphk!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F227efe09-73f8-458b-bb5c-635ad285fb2f_2048x1362.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!mphk!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F227efe09-73f8-458b-bb5c-635ad285fb2f_2048x1362.png 424w, https://substackcdn.com/image/fetch/$s_!mphk!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F227efe09-73f8-458b-bb5c-635ad285fb2f_2048x1362.png 848w, https://substackcdn.com/image/fetch/$s_!mphk!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F227efe09-73f8-458b-bb5c-635ad285fb2f_2048x1362.png 1272w, https://substackcdn.com/image/fetch/$s_!mphk!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F227efe09-73f8-458b-bb5c-635ad285fb2f_2048x1362.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!mphk!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F227efe09-73f8-458b-bb5c-635ad285fb2f_2048x1362.png" width="1456" height="968" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/227efe09-73f8-458b-bb5c-635ad285fb2f_2048x1362.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:968,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!mphk!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F227efe09-73f8-458b-bb5c-635ad285fb2f_2048x1362.png 424w, https://substackcdn.com/image/fetch/$s_!mphk!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F227efe09-73f8-458b-bb5c-635ad285fb2f_2048x1362.png 848w, https://substackcdn.com/image/fetch/$s_!mphk!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F227efe09-73f8-458b-bb5c-635ad285fb2f_2048x1362.png 1272w, https://substackcdn.com/image/fetch/$s_!mphk!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F227efe09-73f8-458b-bb5c-635ad285fb2f_2048x1362.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 buttonBase-GK1x3M"><svg aria-hidden="true" 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" class="icon-noB79L"><g><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 buttonBase-GK1x3M"><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 icon-noB79L"><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><span>Let&#8217;s turn the permission mode from &#8220;Manual&#8221; to &#8220;Plan&#8221; by pressing </span><code>shift + tab</code><span>.</span></p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!71aj!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F934cde2c-4c0c-49fe-8df2-00d72af37225_1716x466.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!71aj!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F934cde2c-4c0c-49fe-8df2-00d72af37225_1716x466.png 424w, https://substackcdn.com/image/fetch/$s_!71aj!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F934cde2c-4c0c-49fe-8df2-00d72af37225_1716x466.png 848w, https://substackcdn.com/image/fetch/$s_!71aj!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F934cde2c-4c0c-49fe-8df2-00d72af37225_1716x466.png 1272w, https://substackcdn.com/image/fetch/$s_!71aj!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F934cde2c-4c0c-49fe-8df2-00d72af37225_1716x466.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!71aj!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F934cde2c-4c0c-49fe-8df2-00d72af37225_1716x466.png" width="1456" height="395" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/934cde2c-4c0c-49fe-8df2-00d72af37225_1716x466.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:395,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!71aj!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F934cde2c-4c0c-49fe-8df2-00d72af37225_1716x466.png 424w, https://substackcdn.com/image/fetch/$s_!71aj!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F934cde2c-4c0c-49fe-8df2-00d72af37225_1716x466.png 848w, https://substackcdn.com/image/fetch/$s_!71aj!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F934cde2c-4c0c-49fe-8df2-00d72af37225_1716x466.png 1272w, https://substackcdn.com/image/fetch/$s_!71aj!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F934cde2c-4c0c-49fe-8df2-00d72af37225_1716x466.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 buttonBase-GK1x3M"><svg aria-hidden="true" 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" class="icon-noB79L"><g><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 buttonBase-GK1x3M"><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 icon-noB79L"><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><span>(I&#8217;ve been building different projects and creating separate folders, which has made my codebase a bit messy.)</span></p><p><span>Let&#8217;s explore those files by creating an artifact</span><a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-7" href="#footnote-7" target="_self">7</a><span>.</span></p><p><span>Here is the prompt to paste:</span></p><div class="highlighted_code_block" data-attrs="{&quot;language&quot;:&quot;plaintext&quot;,&quot;nodeId&quot;:&quot;85cd6262-07e5-4e0e-a6f2-6d2e614c6255&quot;}" data-component-name="HighlightedCodeBlockToDOM"><pre class="shiki"><code class="language-plaintext">Read this project and map its structure.

Show every folder and the projects in it.

Return it as an artifact.</code></pre></div><p><span>After pasting it, Claude maps the project &amp; starts writing the plan.</span></p><p><span>Remember, we&#8217;re in &#8220;plan&#8221; mode.</span></p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!aX8Z!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9e6c74e6-f142-4e3d-b02f-068bb9727934_924x364.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!aX8Z!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9e6c74e6-f142-4e3d-b02f-068bb9727934_924x364.png 424w, https://substackcdn.com/image/fetch/$s_!aX8Z!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9e6c74e6-f142-4e3d-b02f-068bb9727934_924x364.png 848w, https://substackcdn.com/image/fetch/$s_!aX8Z!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9e6c74e6-f142-4e3d-b02f-068bb9727934_924x364.png 1272w, https://substackcdn.com/image/fetch/$s_!aX8Z!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9e6c74e6-f142-4e3d-b02f-068bb9727934_924x364.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!aX8Z!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9e6c74e6-f142-4e3d-b02f-068bb9727934_924x364.png" width="924" height="364" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/9e6c74e6-f142-4e3d-b02f-068bb9727934_924x364.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:364,&quot;width&quot;:924,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!aX8Z!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9e6c74e6-f142-4e3d-b02f-068bb9727934_924x364.png 424w, https://substackcdn.com/image/fetch/$s_!aX8Z!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9e6c74e6-f142-4e3d-b02f-068bb9727934_924x364.png 848w, https://substackcdn.com/image/fetch/$s_!aX8Z!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9e6c74e6-f142-4e3d-b02f-068bb9727934_924x364.png 1272w, https://substackcdn.com/image/fetch/$s_!aX8Z!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9e6c74e6-f142-4e3d-b02f-068bb9727934_924x364.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 buttonBase-GK1x3M"><svg aria-hidden="true" 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" class="icon-noB79L"><g><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 buttonBase-GK1x3M"><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 icon-noB79L"><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><span>After the plan, it asks for your approval.</span></p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!924p!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F37059fe9-8810-48b2-9e2b-252e5c0bf0e3_1520x1312.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!924p!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F37059fe9-8810-48b2-9e2b-252e5c0bf0e3_1520x1312.png 424w, https://substackcdn.com/image/fetch/$s_!924p!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F37059fe9-8810-48b2-9e2b-252e5c0bf0e3_1520x1312.png 848w, https://substackcdn.com/image/fetch/$s_!924p!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F37059fe9-8810-48b2-9e2b-252e5c0bf0e3_1520x1312.png 1272w, https://substackcdn.com/image/fetch/$s_!924p!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F37059fe9-8810-48b2-9e2b-252e5c0bf0e3_1520x1312.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!924p!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F37059fe9-8810-48b2-9e2b-252e5c0bf0e3_1520x1312.png" width="1456" height="1257" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/37059fe9-8810-48b2-9e2b-252e5c0bf0e3_1520x1312.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1257,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!924p!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F37059fe9-8810-48b2-9e2b-252e5c0bf0e3_1520x1312.png 424w, https://substackcdn.com/image/fetch/$s_!924p!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F37059fe9-8810-48b2-9e2b-252e5c0bf0e3_1520x1312.png 848w, https://substackcdn.com/image/fetch/$s_!924p!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F37059fe9-8810-48b2-9e2b-252e5c0bf0e3_1520x1312.png 1272w, https://substackcdn.com/image/fetch/$s_!924p!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F37059fe9-8810-48b2-9e2b-252e5c0bf0e3_1520x1312.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 buttonBase-GK1x3M"><svg aria-hidden="true" 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" class="icon-noB79L"><g><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 buttonBase-GK1x3M"><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 icon-noB79L"><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><span>I clicked on </span><em><span>&#8220;Accept and auto mode,&#8221;</span></em><span> so it continues building for me.</span></p><p><span>Here is the artifact in 6 minutes:</span></p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!eMRM!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fef6d0846-dc1d-485c-97ce-8dc884b2eea3_1976x1576.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!eMRM!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fef6d0846-dc1d-485c-97ce-8dc884b2eea3_1976x1576.png 424w, https://substackcdn.com/image/fetch/$s_!eMRM!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fef6d0846-dc1d-485c-97ce-8dc884b2eea3_1976x1576.png 848w, https://substackcdn.com/image/fetch/$s_!eMRM!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fef6d0846-dc1d-485c-97ce-8dc884b2eea3_1976x1576.png 1272w, https://substackcdn.com/image/fetch/$s_!eMRM!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fef6d0846-dc1d-485c-97ce-8dc884b2eea3_1976x1576.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!eMRM!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fef6d0846-dc1d-485c-97ce-8dc884b2eea3_1976x1576.png" width="1456" height="1161" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/ef6d0846-dc1d-485c-97ce-8dc884b2eea3_1976x1576.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1161,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!eMRM!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fef6d0846-dc1d-485c-97ce-8dc884b2eea3_1976x1576.png 424w, https://substackcdn.com/image/fetch/$s_!eMRM!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fef6d0846-dc1d-485c-97ce-8dc884b2eea3_1976x1576.png 848w, https://substackcdn.com/image/fetch/$s_!eMRM!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fef6d0846-dc1d-485c-97ce-8dc884b2eea3_1976x1576.png 1272w, https://substackcdn.com/image/fetch/$s_!eMRM!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fef6d0846-dc1d-485c-97ce-8dc884b2eea3_1976x1576.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 buttonBase-GK1x3M"><svg aria-hidden="true" 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" class="icon-noB79L"><g><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 buttonBase-GK1x3M"><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 icon-noB79L"><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><span>I know my repo, but you don&#8217;t.</span></p><p><span>If I show you the report from top to bottom, you&#8217;ll understand what was going on.</span></p><p><span>So this flow also works on a repository you&#8217;ve never opened before.</span></p><p><span>I pointed it at my own messy folder, but it works the same way with a stranger&#8217;s codebase.</span></p><p><span>Now you get the idea&#8230;</span></p><p><span>But what if the job needs &#8220;deeper thinking&#8221; than this one did?</span></p><p><span>Then you need to adjust the effort level.</span></p><p><span>Let&#8217;s explore different levels&#8230;</span></p><h4 style="text-align: center;"><strong>&#167;</strong></h4><h2><span>Effort levels</span></h2><p><span>Effort levels adjust how much Claude </span><em><span>thinks</span></em><span> before doing a task.</span></p><p><span>You set it by clicking here:</span></p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!_3Wu!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdd5607b1-2bfa-4ccf-845d-25d093671724_1790x1530.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!_3Wu!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdd5607b1-2bfa-4ccf-845d-25d093671724_1790x1530.png 424w, https://substackcdn.com/image/fetch/$s_!_3Wu!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdd5607b1-2bfa-4ccf-845d-25d093671724_1790x1530.png 848w, https://substackcdn.com/image/fetch/$s_!_3Wu!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdd5607b1-2bfa-4ccf-845d-25d093671724_1790x1530.png 1272w, https://substackcdn.com/image/fetch/$s_!_3Wu!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdd5607b1-2bfa-4ccf-845d-25d093671724_1790x1530.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!_3Wu!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdd5607b1-2bfa-4ccf-845d-25d093671724_1790x1530.png" width="1456" height="1245" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/dd5607b1-2bfa-4ccf-845d-25d093671724_1790x1530.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1245,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!_3Wu!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdd5607b1-2bfa-4ccf-845d-25d093671724_1790x1530.png 424w, https://substackcdn.com/image/fetch/$s_!_3Wu!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdd5607b1-2bfa-4ccf-845d-25d093671724_1790x1530.png 848w, https://substackcdn.com/image/fetch/$s_!_3Wu!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdd5607b1-2bfa-4ccf-845d-25d093671724_1790x1530.png 1272w, https://substackcdn.com/image/fetch/$s_!_3Wu!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdd5607b1-2bfa-4ccf-845d-25d093671724_1790x1530.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 buttonBase-GK1x3M"><svg aria-hidden="true" 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" class="icon-noB79L"><g><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 buttonBase-GK1x3M"><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 icon-noB79L"><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><span>Effort is directly related to token usage</span><a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-8" href="#footnote-8" target="_self">8</a><span>.</span></p><p><span>The default level is </span><strong><span>High</span></strong><span> for every model, which is </span><em><span>best</span></em><span> for most tasks.</span></p><p><span>If your Claude token limit is low and the task does not require maximum intelligence, you can set it to </span><strong><span>Medium</span></strong><span>.</span></p><p><span>But if the task is critical and you do not care how many tokens it takes, the highest setting is </span><strong><span>Ultracode</span></strong><span>.</span></p><div class="captioned-image-container"><figure><div class="image-link image2" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!VEn7!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F25227b76-2594-4fd9-a36d-8389c27a9236_1664x344.png 424w, https://substackcdn.com/image/fetch/$s_!VEn7!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F25227b76-2594-4fd9-a36d-8389c27a9236_1664x344.png 848w, https://substackcdn.com/image/fetch/$s_!VEn7!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F25227b76-2594-4fd9-a36d-8389c27a9236_1664x344.png 1272w, https://substackcdn.com/image/fetch/$s_!VEn7!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F25227b76-2594-4fd9-a36d-8389c27a9236_1664x344.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!VEn7!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F25227b76-2594-4fd9-a36d-8389c27a9236_1664x344.png" width="1456" height="301" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/25227b76-2594-4fd9-a36d-8389c27a9236_1664x344.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:301,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!VEn7!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F25227b76-2594-4fd9-a36d-8389c27a9236_1664x344.png 424w, https://substackcdn.com/image/fetch/$s_!VEn7!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F25227b76-2594-4fd9-a36d-8389c27a9236_1664x344.png 848w, https://substackcdn.com/image/fetch/$s_!VEn7!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F25227b76-2594-4fd9-a36d-8389c27a9236_1664x344.png 1272w, https://substackcdn.com/image/fetch/$s_!VEn7!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F25227b76-2594-4fd9-a36d-8389c27a9236_1664x344.png 1456w" sizes="100vw" loading="lazy"></picture><div></div></div></div></figure></div><p><span>But what if you don&#8217;t want your project to forget your settings &amp; you don&#8217;t want to repeat them in every session?</span></p><p><span>Then you should set up your Claude.md file.</span></p><p><span>Let me show you how&#8230;</span></p><h4 style="text-align: center;"><strong>&#167;</strong></h4><h2><span>Your project&#8217;s memory</span></h2><p><span>Let&#8217;s say you have a client project/personal project.</span></p><p><span>Each day brings a new challenge, and sometimes you realize that you keep copying and pasting the same prompts and/or repeating the same settings.</span></p><p><span>Starting from scratch every time is wasted work.</span></p><p><span>With just one command/prompt, your project can gain &#8220;permanent memory&#8221; of your preferences.</span></p><p><span>To test it, I created a new folder named </span><em><strong><span>Your First Day with Claude Code.</span></strong></em></p><p><span>The official way to create </span><a href="http://claude.md"><span>Claude.md</span></a><span> is using this command:</span></p><div class="highlighted_code_block" data-attrs="{&quot;language&quot;:&quot;plaintext&quot;,&quot;nodeId&quot;:&quot;8a6548a4-816c-4a4c-856e-a1da2cf8ea92&quot;}" data-component-name="HighlightedCodeBlockToDOM"><pre class="shiki"><code class="language-plaintext">/init</code></pre></div><p><span>This will </span><em><span>automatically</span></em><span> create a Claude.md in your folder.</span></p><p><span>Let&#8217;s create it together </span>only<span> by prompting&#8230;</span></p><p><span>Create a new folder &amp; open a new Claude Code session inside your Claude app.</span></p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!hhPt!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F34f41f15-ad2f-497a-a311-8b7305f6cc81_1736x1492.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!hhPt!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F34f41f15-ad2f-497a-a311-8b7305f6cc81_1736x1492.png 424w, https://substackcdn.com/image/fetch/$s_!hhPt!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F34f41f15-ad2f-497a-a311-8b7305f6cc81_1736x1492.png 848w, https://substackcdn.com/image/fetch/$s_!hhPt!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F34f41f15-ad2f-497a-a311-8b7305f6cc81_1736x1492.png 1272w, https://substackcdn.com/image/fetch/$s_!hhPt!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F34f41f15-ad2f-497a-a311-8b7305f6cc81_1736x1492.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!hhPt!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F34f41f15-ad2f-497a-a311-8b7305f6cc81_1736x1492.png" width="1456" height="1251" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/34f41f15-ad2f-497a-a311-8b7305f6cc81_1736x1492.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1251,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!hhPt!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F34f41f15-ad2f-497a-a311-8b7305f6cc81_1736x1492.png 424w, https://substackcdn.com/image/fetch/$s_!hhPt!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F34f41f15-ad2f-497a-a311-8b7305f6cc81_1736x1492.png 848w, https://substackcdn.com/image/fetch/$s_!hhPt!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F34f41f15-ad2f-497a-a311-8b7305f6cc81_1736x1492.png 1272w, https://substackcdn.com/image/fetch/$s_!hhPt!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F34f41f15-ad2f-497a-a311-8b7305f6cc81_1736x1492.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 buttonBase-GK1x3M"><svg aria-hidden="true" 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" class="icon-noB79L"><g><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 buttonBase-GK1x3M"><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 icon-noB79L"><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><span>Next, copy everything you have read in this newsletter so far.</span></p><p><span>And paste this prompt:</span></p><div class="highlighted_code_block" data-attrs="{&quot;language&quot;:&quot;plaintext&quot;,&quot;nodeId&quot;:&quot;7a69360f-0cde-45f2-a99b-60972d4df4d5&quot;}" data-component-name="HighlightedCodeBlockToDOM"><pre class="shiki"><code class="language-plaintext">Turn this into a Claude.md file.
Assume I&#8217;m a beginner, add these as instructions,
and follow them whenever I ask you to do something.</code></pre></div><p><span>Here it is:</span></p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!CSxp!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F16ded7d4-e354-425d-9ab1-768c2b8bed45_2048x1324.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!CSxp!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F16ded7d4-e354-425d-9ab1-768c2b8bed45_2048x1324.png 424w, https://substackcdn.com/image/fetch/$s_!CSxp!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F16ded7d4-e354-425d-9ab1-768c2b8bed45_2048x1324.png 848w, https://substackcdn.com/image/fetch/$s_!CSxp!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F16ded7d4-e354-425d-9ab1-768c2b8bed45_2048x1324.png 1272w, https://substackcdn.com/image/fetch/$s_!CSxp!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F16ded7d4-e354-425d-9ab1-768c2b8bed45_2048x1324.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!CSxp!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F16ded7d4-e354-425d-9ab1-768c2b8bed45_2048x1324.png" width="1456" height="941" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/16ded7d4-e354-425d-9ab1-768c2b8bed45_2048x1324.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:941,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!CSxp!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F16ded7d4-e354-425d-9ab1-768c2b8bed45_2048x1324.png 424w, https://substackcdn.com/image/fetch/$s_!CSxp!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F16ded7d4-e354-425d-9ab1-768c2b8bed45_2048x1324.png 848w, https://substackcdn.com/image/fetch/$s_!CSxp!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F16ded7d4-e354-425d-9ab1-768c2b8bed45_2048x1324.png 1272w, https://substackcdn.com/image/fetch/$s_!CSxp!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F16ded7d4-e354-425d-9ab1-768c2b8bed45_2048x1324.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 buttonBase-GK1x3M"><svg aria-hidden="true" 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" class="icon-noB79L"><g><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 buttonBase-GK1x3M"><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 icon-noB79L"><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><span>Now, whenever you start a new conversation inside this project, the context stays.</span></p><p><span>i.e., your setup travels with you session after session.</span></p><p>But <span>you must follow a few rules when creating a&nbsp;Claude.md.</span></p><p><span>Let&#8217;s</span> talk about that&#8230;</p><h3><span>What goes in and what stays out</span></h3><p><span>The </span><code>CLAUDE.md</code><span> you create should not run too long/too thin.</span></p><p><span>Claude reads the entire file every time your project starts, so every line either earns its place/wastes it.</span></p><p><em><span>So what earns a place?</span></em></p><ul><li><p><span>Write down what you would otherwise re-explain.</span></p></li><li><p><span>Build commands, naming conventions, and the rules you keep repeating.</span></p></li></ul><p><em><span>What stays out matters just as much:</span></em></p><ul><li><p><span>Skip anything Claude can read from the code itself, like folder layouts and dependency lists, since they only burn context on every session.</span></p></li><li><p><span>Long procedures stay out, too, because those belong in a skill.</span></p></li></ul><p><span>And two habits from the Claude team keep the file healthy.</span></p><ul><li><p><span>Keep it under 200 lines, since longer files get followed less, not more.</span></p></li><li><p><span>Then run </span><code>/context</code><a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-9" href="#footnote-9" target="_self">9</a><span> now &amp; then, and check that your file is listed under memory files. If it is missing there, Claude never saw it.</span></p></li></ul><p><span>Now think about the most repetitive task you do&#8230; How would it change if you used this?</span></p><p><code>Claude.md</code><span> is only half of it.</span></p><p><span>You can also use Skills alongside Claude.md, which lets you hand each job to a specialist.</span></p><p><span>Let me show you how&#8230;</span></p><h4 style="text-align: center;"><strong>&#167;</strong></h4><div class="callout-block" data-callout="true"><p style="text-align: center;"><em><strong><span data-color="#3a7bf9" style="color: rgb(58, 123, 249);">Reminder: this is a teaser of the subscriber-only newsletter, exclusive to my golden members.</span></strong></em></p><p>When you upgrade, you get:</p><ul><li><p><strong>A complete Claude Code setup, from your first session to a fully automated one.</strong></p></li><li><p>Deep dives into how MCP, subagents, agent orchestration &amp; hooks actually work inside Claude Code.</p></li><li><p><strong>How real Claude Code projects handle context, scale &amp; running without you.</strong></p></li></ul><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://newsletter.systemdesign.one/subscribe&quot;,&quot;text&quot;:&quot;Unlock Full Access&quot;,&quot;action&quot;:null,&quot;class&quot;:&quot;button-wrapper&quot;}" data-component-name="ButtonCreateButton"><a class="button primary button-wrapper" href="https://newsletter.systemdesign.one/subscribe"><span>Unlock Full Access</span></a></p><p>(If this newsletter has helped you become a better software engineer, consider subscribing to support my work.)</p></div><h4 style="text-align: center;"><strong>&#167;</strong></h4><h2><span>Skills</span></h2>
      <p>
          <a href="https://newsletter.systemdesign.one/p/claude-code-claude-md-best-practices">
              Read more
          </a>
      </p>
   ]]></content:encoded></item><item><title><![CDATA[API testing was “hard” until I learned these 53 techniques]]></title><description><![CDATA[#175: Part 2 - fuzz testing, penetration testing, injection attack testing, and 25 others.]]></description><link>https://newsletter.systemdesign.one/p/types-of-api-testing</link><guid isPermaLink="false">https://newsletter.systemdesign.one/p/types-of-api-testing</guid><dc:creator><![CDATA[Neo Kim]]></dc:creator><pubDate>Mon, 07 Sep 2026 16:59:35 GMT</pubDate><enclosure url="https://substack-post-media.s3.amazonaws.com/public/images/09d796b2-d6a4-48b6-be48-8ff7baba6703_1280x720.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p style="text-align: center;"></p><p></p><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://newsletter.systemdesign.one/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"><span data-color="#3a7bf9" style="color: rgb(58, 123, 249);">Get my system design playbook for FREE on newsletter signup:</span></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><ul><li><p><em><a href="https://newsletter.systemdesign.one/p/types-of-api-testing/?action=share">Share this letter</a> &amp; I&#8217;ll send you some rewards for the referrals.</em></p></li></ul><div><hr></div><p>Onwards &#8216;n downwards:</p><p>Following is the second of a premium 2-part<a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-1" href="#footnote-1" target="_self">1</a> newsletter series&#8230;</p><p><span>Some of these are foundational, and some are quite advanced. ALL of them are super useful to engineers building production-ready systems.</span></p><p><span>Curious to know how many were new to you:</span></p><ol start="26"><li><p><span>Fuzz Testing</span></p></li><li><p><span>Penetration Testing</span></p></li><li><p><span>Injection Attack Testing</span></p></li><li><p><span>Encryption/TLS Testing</span></p></li><li><p><span>Policy/Compliance Testing</span></p></li><li><p><span>Reliability Testing</span></p></li><li><p><span>Chaos Testing</span></p></li><li><p><span>Circuit Breaker Testing</span></p></li><li><p><span>Backpressure Testing</span></p></li><li><p><span>Fault Injection Testing</span></p></li><li><p><span>Failover Testing</span></p></li><li><p><span>Recovery Testing</span></p></li><li><p><span>Idempotency Testing</span></p></li><li><p><span>Timeout and Retry Testing</span></p></li><li><p><span>Caching Testing</span></p></li><li><p><span>Data Integrity Testing</span></p></li><li><p><span>Data Consistency Testing</span></p></li><li><p><span>State Transition Testing</span></p></li><li><p><span>UI-Level API Testing</span></p></li><li><p><span>Developer Experience Testing</span></p></li><li><p><span>Documentation Testing</span></p></li><li><p><span>Rate Limiting Testing</span></p></li><li><p><span>Backward Compatibility Testing</span></p></li><li><p><span>Mutation Testing</span></p></li><li><p><span>Mock/Stub Testing</span></p></li><li><p><span>Synthetic Monitoring</span></p></li><li><p><span>Scenario/Workflow Testing</span></p></li><li><p><span>Component Testing</span></p></li></ol><p><span>For each, I&#8217;ll share:</span></p><ul><li><p><span>What it is and how it works (in simple words)</span></p></li><li><p><span>A real-world analogy</span></p></li><li><p><span>Tradeoffs</span></p></li><li><p><span>Why it matters</span></p></li></ul><p><span>Let&#8217;s go!</span></p><h4 style="text-align: center;"><strong>&#167;</strong></h4><div class="callout-block" data-callout="true"><h2><strong><a href="https://link.svix.com/system-01">Make your agents realtime (Partner)</a></strong></h2><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://link.svix.com/system-01" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!v-ZP!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fde8a87d9-0b90-4a74-857c-be37bba398f2_2000x1047.png 424w, https://substackcdn.com/image/fetch/$s_!v-ZP!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fde8a87d9-0b90-4a74-857c-be37bba398f2_2000x1047.png 848w, https://substackcdn.com/image/fetch/$s_!v-ZP!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fde8a87d9-0b90-4a74-857c-be37bba398f2_2000x1047.png 1272w, https://substackcdn.com/image/fetch/$s_!v-ZP!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fde8a87d9-0b90-4a74-857c-be37bba398f2_2000x1047.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!v-ZP!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fde8a87d9-0b90-4a74-857c-be37bba398f2_2000x1047.png" width="1456" height="762" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/de8a87d9-0b90-4a74-857c-be37bba398f2_2000x1047.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:762,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:212365,&quot;alt&quot;:&quot;&quot;,&quot;title&quot;:&quot;&quot;,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:&quot;https://link.svix.com/system-01&quot;,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://newsletter.systemdesign.one/i/211217193?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fde8a87d9-0b90-4a74-857c-be37bba398f2_2000x1047.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" title="" srcset="https://substackcdn.com/image/fetch/$s_!v-ZP!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fde8a87d9-0b90-4a74-857c-be37bba398f2_2000x1047.png 424w, https://substackcdn.com/image/fetch/$s_!v-ZP!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fde8a87d9-0b90-4a74-857c-be37bba398f2_2000x1047.png 848w, https://substackcdn.com/image/fetch/$s_!v-ZP!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fde8a87d9-0b90-4a74-857c-be37bba398f2_2000x1047.png 1272w, https://substackcdn.com/image/fetch/$s_!v-ZP!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fde8a87d9-0b90-4a74-857c-be37bba398f2_2000x1047.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 buttonBase-GK1x3M"><svg aria-hidden="true" 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" class="icon-noB79L"><g><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 buttonBase-GK1x3M"><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 icon-noB79L"><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>Agents are killing your apps with compounding latency across workflows.</p><p>Your customers want their agent workflows to be efficient, so you&#8217;re losing deals if you don&#8217;t make them event-driven. Webhooks solve this issue, but implementing them is harder than it looks.</p><p>If you homebrewed your webhooks and are getting pinged at 4 in the morning for failed deliveries, this is for you.</p><p><strong><a href="https://link.svix.com/system-01">Svix</a></strong> handles everything: retries, idempotency, security, and compliance. Qualified startups get $12,000 in free credits.</p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://link.svix.com/system-01&quot;,&quot;text&quot;:&quot;Get started for free&quot;,&quot;action&quot;:null,&quot;class&quot;:&quot;button-wrapper&quot;}" data-component-name="ButtonCreateButton"><a class="button primary button-wrapper" href="https://link.svix.com/system-01"><span>Get started for free</span></a></p><p><em>(Thanks to <strong><a href="https://link.svix.com/system-01">Svix</a></strong> for partnering on this newsletter.)</em></p></div><h4 style="text-align: center;"><strong>&#167;</strong></h4><h2><strong><span>26. Fuzz Testing</span></strong></h2><blockquote><p><span>Fuzz testing sends randomized, malformed, unexpected data to API endpoints to discover crashes, memory leaks, unhandled exceptions, and/or security vulnerabilities.</span></p></blockquote><p><span>A human does NOT design the inputs. Instead, they&#8217;re generated algorithmically, mutated from valid inputs, pulled from known attack pattern libraries.</span></p><p><span>Tools such as AFL, Burp Suite &amp; Restler automate this process at scale.</span></p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!18Li!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd7a8c3a3-933c-4a67-bd2a-aa5d284b3e7a_2048x1027.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!18Li!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd7a8c3a3-933c-4a67-bd2a-aa5d284b3e7a_2048x1027.png 424w, https://substackcdn.com/image/fetch/$s_!18Li!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd7a8c3a3-933c-4a67-bd2a-aa5d284b3e7a_2048x1027.png 848w, https://substackcdn.com/image/fetch/$s_!18Li!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd7a8c3a3-933c-4a67-bd2a-aa5d284b3e7a_2048x1027.png 1272w, https://substackcdn.com/image/fetch/$s_!18Li!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd7a8c3a3-933c-4a67-bd2a-aa5d284b3e7a_2048x1027.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!18Li!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd7a8c3a3-933c-4a67-bd2a-aa5d284b3e7a_2048x1027.png" width="1456" height="730" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/d7a8c3a3-933c-4a67-bd2a-aa5d284b3e7a_2048x1027.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:730,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!18Li!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd7a8c3a3-933c-4a67-bd2a-aa5d284b3e7a_2048x1027.png 424w, https://substackcdn.com/image/fetch/$s_!18Li!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd7a8c3a3-933c-4a67-bd2a-aa5d284b3e7a_2048x1027.png 848w, https://substackcdn.com/image/fetch/$s_!18Li!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd7a8c3a3-933c-4a67-bd2a-aa5d284b3e7a_2048x1027.png 1272w, https://substackcdn.com/image/fetch/$s_!18Li!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd7a8c3a3-933c-4a67-bd2a-aa5d284b3e7a_2048x1027.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 buttonBase-GK1x3M"><svg aria-hidden="true" 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" class="icon-noB79L"><g><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 buttonBase-GK1x3M"><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 icon-noB79L"><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><h3><span>Analogy</span></h3><p><span>A locksmith testing a new lock does not just use the </span><em><span>correct</span></em><span> key.</span></p><p><span>They jam random objects into the keyhole, apply unusual force, insert keys from other locks, and try every unexpected interaction to find weaknesses the designer did not anticipate.</span></p><h3><span>Tradeoff</span></h3><p><span>Fuzz testing finds bugs that NO human tester would think to look for.</span></p><p><span>It excels at discovering edge cases in input parsing, deserialization, &amp; memory management. Yet results are often noisy. Many crashes are duplicates/low-severity.</span></p><p><span>Triaging fuzz results requires effort &amp; expertise.</span></p><h3><span>Why it matters</span></h3><p><span>Buffer overflows, injection vulnerabilities, and crash bugs</span><a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-2" href="#footnote-2" target="_self">2</a><span> in production often come from inputs no developer imagined.</span></p><p><span>Fuzz testing imagines them at machine speed. Run fuzz tests continuously against input-parsing endpoints, and treat every crash as a potential security issue.</span></p><h2><strong><span>27. Penetration Testing</span></strong></h2><blockquote><p><span>Penetration testing is a simulated real-world attack against the API, performed by a skilled security professional/team.</span></p></blockquote><p><span>It involves creative, context-aware exploitation: </span><em><span>chaining vulnerabilities, exploiting business logic flaws, and using social engineering vectors that tools cannot detect</span></em><span>.</span></p><p><span>The goal is not a checklist&#8230;it&#8217;s to find out whether a motivated attacker can break in.</span></p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!S4js!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Febed6687-8a7c-411d-9dd9-e0e9219b5fde_2048x588.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!S4js!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Febed6687-8a7c-411d-9dd9-e0e9219b5fde_2048x588.png 424w, https://substackcdn.com/image/fetch/$s_!S4js!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Febed6687-8a7c-411d-9dd9-e0e9219b5fde_2048x588.png 848w, https://substackcdn.com/image/fetch/$s_!S4js!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Febed6687-8a7c-411d-9dd9-e0e9219b5fde_2048x588.png 1272w, https://substackcdn.com/image/fetch/$s_!S4js!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Febed6687-8a7c-411d-9dd9-e0e9219b5fde_2048x588.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!S4js!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Febed6687-8a7c-411d-9dd9-e0e9219b5fde_2048x588.png" width="1456" height="418" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/ebed6687-8a7c-411d-9dd9-e0e9219b5fde_2048x588.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:418,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!S4js!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Febed6687-8a7c-411d-9dd9-e0e9219b5fde_2048x588.png 424w, https://substackcdn.com/image/fetch/$s_!S4js!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Febed6687-8a7c-411d-9dd9-e0e9219b5fde_2048x588.png 848w, https://substackcdn.com/image/fetch/$s_!S4js!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Febed6687-8a7c-411d-9dd9-e0e9219b5fde_2048x588.png 1272w, https://substackcdn.com/image/fetch/$s_!S4js!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Febed6687-8a7c-411d-9dd9-e0e9219b5fde_2048x588.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 buttonBase-GK1x3M"><svg aria-hidden="true" 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" class="icon-noB79L"><g><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 buttonBase-GK1x3M"><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 icon-noB79L"><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><h3><span>Analogy</span></h3><p><span>A museum hires a professional thief to attempt a heist under controlled conditions.</span></p><p><span>Not to check the alarm sensors one by one, but to see whether someone clever enough can get past them all together.</span></p><p><span>The thief thinks like a thief,,, not like an alarm technician.</span></p><h3><span>Tradeoff</span></h3><p><span>Penetration testing provides the most realistic assessment of your API&#8217;s security posture.</span></p><p><span>It finds vulnerabilities automated tools miss by combining technical exploitation with creative thinking. Yet it&#8217;s expensive, time-consuming, and only as good as the tester.</span></p><p><span>Plus results are a snapshot&#8230;not continuous coverage.</span></p><h3><span>Why it matters</span></h3><p><span>Automated scans find known vulnerability patterns.</span></p><p><span>Pen testing finds the unknown ones: </span><em><span>a business logic flaw that lets an attacker manipulate pricing, or a chained exploit that bypasses auth entirely.</span></em></p><p><span>So schedule pen tests before major launches &amp; at least annually for production APIs.</span></p><h2><strong><span>28. Injection Attack Testing</span></strong></h2><blockquote><p><span>Injection attack testing verifies if the API is immune to attacks when malicious code gets embedded in input data: </span><em><span>SQL injection, NoSQL injection, command injection, LDAP injection, and header injection</span></em><a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-3" href="#footnote-3" target="_self">3</a><span>.</span></p></blockquote><p><span>You craft payloads designed to escape the intended input context &amp; execute as code on the server. If any payload succeeds,,, the API has a critical vulnerability.</span></p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!PjTv!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdb03f50e-14b6-456c-b295-ebdc8efe06aa_2048x1172.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!PjTv!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdb03f50e-14b6-456c-b295-ebdc8efe06aa_2048x1172.png 424w, https://substackcdn.com/image/fetch/$s_!PjTv!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdb03f50e-14b6-456c-b295-ebdc8efe06aa_2048x1172.png 848w, https://substackcdn.com/image/fetch/$s_!PjTv!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdb03f50e-14b6-456c-b295-ebdc8efe06aa_2048x1172.png 1272w, https://substackcdn.com/image/fetch/$s_!PjTv!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdb03f50e-14b6-456c-b295-ebdc8efe06aa_2048x1172.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!PjTv!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdb03f50e-14b6-456c-b295-ebdc8efe06aa_2048x1172.png" width="1456" height="833" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/db03f50e-14b6-456c-b295-ebdc8efe06aa_2048x1172.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:833,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!PjTv!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdb03f50e-14b6-456c-b295-ebdc8efe06aa_2048x1172.png 424w, https://substackcdn.com/image/fetch/$s_!PjTv!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdb03f50e-14b6-456c-b295-ebdc8efe06aa_2048x1172.png 848w, https://substackcdn.com/image/fetch/$s_!PjTv!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdb03f50e-14b6-456c-b295-ebdc8efe06aa_2048x1172.png 1272w, https://substackcdn.com/image/fetch/$s_!PjTv!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdb03f50e-14b6-456c-b295-ebdc8efe06aa_2048x1172.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 buttonBase-GK1x3M"><svg aria-hidden="true" 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" class="icon-noB79L"><g><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 buttonBase-GK1x3M"><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 icon-noB79L"><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><h3><span>Analogy</span></h3><p><span>A customs officer checks a package labeled &#8220;books&#8221; to make sure it contains books and not something dangerous hidden inside&#8230;</span></p><p><span>Injection testing confirms that data labeled as &#8220;user input&#8221; stays as data &amp; never becomes executable instructions.</span></p><h3><span>Tradeoff</span></h3><p><span>Injection testing catches the most exploitable class of API vulnerabilities.</span></p><p><span>A single successful injection can expose an entire database or grant shell access. Yet the test surface is wide. Every input field, header, query parameter &amp; path segment is a potential injection point.</span></p><p><span>Thoroughness requires systematic coverage.</span></p><h3><span>Why it matters</span></h3><p><span>Injection attacks remain among the most common and damaging API exploits.</span></p><p><span>They are well understood &amp; well documented, and still happen because most people skip it&#8230;</span></p><p><span>So test every input vector with known injection patterns. Use parameterized queries and input sanitization as defenses, then verify those defenses hold</span><a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-4" href="#footnote-4" target="_self">4</a><span>.</span></p><h2><strong><span>29. Encryption/TLS Testing</span></strong></h2><blockquote><p><span>Encryption &amp; TLS testing verifies if data in transit is protected.</span></p></blockquote><p><span>You confirm the API enforces HTTPS, rejects HTTP connections, uses strong TLS versions, and avoids weak cipher suites</span><a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-5" href="#footnote-5" target="_self">5</a><span>. You also verify that certificates are valid, not expired, and correctly chained.</span></p><p><span>Tools such as testssl.sh, sslyze &amp; nmap automate these checks.</span></p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!7Lax!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fec25e5df-250a-40e7-a13a-c3e50f5ab42d_2048x1492.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!7Lax!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fec25e5df-250a-40e7-a13a-c3e50f5ab42d_2048x1492.png 424w, https://substackcdn.com/image/fetch/$s_!7Lax!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fec25e5df-250a-40e7-a13a-c3e50f5ab42d_2048x1492.png 848w, https://substackcdn.com/image/fetch/$s_!7Lax!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fec25e5df-250a-40e7-a13a-c3e50f5ab42d_2048x1492.png 1272w, https://substackcdn.com/image/fetch/$s_!7Lax!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fec25e5df-250a-40e7-a13a-c3e50f5ab42d_2048x1492.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!7Lax!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fec25e5df-250a-40e7-a13a-c3e50f5ab42d_2048x1492.png" width="1456" height="1061" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/ec25e5df-250a-40e7-a13a-c3e50f5ab42d_2048x1492.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1061,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!7Lax!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fec25e5df-250a-40e7-a13a-c3e50f5ab42d_2048x1492.png 424w, https://substackcdn.com/image/fetch/$s_!7Lax!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fec25e5df-250a-40e7-a13a-c3e50f5ab42d_2048x1492.png 848w, https://substackcdn.com/image/fetch/$s_!7Lax!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fec25e5df-250a-40e7-a13a-c3e50f5ab42d_2048x1492.png 1272w, https://substackcdn.com/image/fetch/$s_!7Lax!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fec25e5df-250a-40e7-a13a-c3e50f5ab42d_2048x1492.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 buttonBase-GK1x3M"><svg aria-hidden="true" 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" class="icon-noB79L"><g><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 buttonBase-GK1x3M"><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 icon-noB79L"><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><h3><span>Analogy</span></h3><p><span>A courier service guarantees tamper-proof delivery.</span></p><p><span>Encryption testing verifies every envelope is sealed, the seals cannot be broken without detection, and no courier is secretly delivering in transparent bags.</span></p><h3><span>Tradeoff</span></h3><p><span>TLS testing catches misconfigurations that leave data exposed in transit.</span></p><p><span>A single misconfigured endpoint serving HTTP can leak credentials/session tokens. Although tests are straightforward, they&#8217;re easy to forget.</span></p><p><span>Plus, TLS configurations degrade over time as certificates expire &amp; protocols get deprecated.</span></p><h3><span>Why it matters</span></h3><p><span>Unencrypted API traffic is readable by anyone on the network path.</span></p><p><span>This includes credentials, tokens, PII &amp; business data. Therefore:</span></p><ul><li><p><span>Enforce TLS 1.2+ on every endpoint.</span></p></li><li><p><span>Automate certificate expiry monitoring.</span></p></li><li><p><span>Run TLS configuration scans on every deployment.</span></p></li></ul><h4 style="text-align: center;"><strong>&#167;</strong></h4><div class="captioned-button-wrap" data-attrs="{&quot;url&quot;:&quot;https://newsletter.systemdesign.one/p/types-of-api-testing?utm_source=substack&utm_medium=email&utm_content=share&action=share&quot;,&quot;text&quot;:&quot;Share&quot;}" data-component-name="CaptionedButtonToDOM"><div class="preamble"><p class="cta-caption"><em><span data-color="#3a7bf9" style="color: rgb(58, 123, 249);">If something resonated with you today, share this letter. Because one idea, one action, can change everything.</span></em></p></div><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://newsletter.systemdesign.one/p/types-of-api-testing?utm_source=substack&utm_medium=email&utm_content=share&action=share&quot;,&quot;text&quot;:&quot;Share&quot;}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://newsletter.systemdesign.one/p/types-of-api-testing?utm_source=substack&utm_medium=email&utm_content=share&action=share"><span>Share</span></a></p></div><h4 style="text-align: center;"><strong>&#167;</strong></h4><h2><strong><span>30. Policy/Compliance Testing</span></strong></h2><blockquote><p><span>Policy &amp; compliance testing verifies if the API adheres to regulatory requirements and organizational security policies.</span></p></blockquote><p><span>This includes GDPR data handling rules, HIPAA protections for health data, PCI-DSS requirements for payment data, and SOC 2</span><a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-6" href="#footnote-6" target="_self">6</a><span> controls for service organizations.</span></p><p><span>You test personal data is encrypted, audit logs get generated, data retention policies are enforced &amp; consent mechanisms work correctly.</span></p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!RBxq!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0c69b18f-61c6-463e-94c0-fef1132dcbc1_1922x2048.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!RBxq!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0c69b18f-61c6-463e-94c0-fef1132dcbc1_1922x2048.png 424w, https://substackcdn.com/image/fetch/$s_!RBxq!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0c69b18f-61c6-463e-94c0-fef1132dcbc1_1922x2048.png 848w, https://substackcdn.com/image/fetch/$s_!RBxq!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0c69b18f-61c6-463e-94c0-fef1132dcbc1_1922x2048.png 1272w, https://substackcdn.com/image/fetch/$s_!RBxq!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0c69b18f-61c6-463e-94c0-fef1132dcbc1_1922x2048.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!RBxq!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0c69b18f-61c6-463e-94c0-fef1132dcbc1_1922x2048.png" width="1456" height="1551" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/0c69b18f-61c6-463e-94c0-fef1132dcbc1_1922x2048.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1551,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!RBxq!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0c69b18f-61c6-463e-94c0-fef1132dcbc1_1922x2048.png 424w, https://substackcdn.com/image/fetch/$s_!RBxq!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0c69b18f-61c6-463e-94c0-fef1132dcbc1_1922x2048.png 848w, https://substackcdn.com/image/fetch/$s_!RBxq!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0c69b18f-61c6-463e-94c0-fef1132dcbc1_1922x2048.png 1272w, https://substackcdn.com/image/fetch/$s_!RBxq!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0c69b18f-61c6-463e-94c0-fef1132dcbc1_1922x2048.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 buttonBase-GK1x3M"><svg aria-hidden="true" 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" class="icon-noB79L"><g><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 buttonBase-GK1x3M"><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 icon-noB79L"><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><h3><span>Analogy</span></h3><p><span>A restaurant does not just cook good food.</span></p><p><span>It must also pass health inspections: </span><em><span>proper food storage temperatures, handwashing stations, pest control records.</span></em><span> The food could taste great, but if it fails the inspection, it shuts the doors.</span></p><p><span>Compliance testing is like a health inspection for your API.</span></p><h3><span>Tradeoff</span></h3><p><span>Compliance testing protects the organization from regulatory fines, legal liability &amp; loss of certifications.</span></p><p><span>It is non-negotiable for APIs handling sensitive data. Yet the tradeoff is rigidity&#8230; Compliance requirements change slowly &amp; are often more prescriptive than practical.</span></p><p><span>Tests must be updated whenever regulations change.</span></p><h3><span>Why it matters</span></h3><ul><li><p><span>GDPR violation could cost up to 4% of global annual revenue.</span></p></li><li><p><span>HIPAA breach triggers mandatory reporting &amp; potential criminal charges.</span></p></li></ul><p><span>i.e., compliance is not optional.</span></p><p><span>So map every regulatory requirement to a specific test. Automate compliance checks and run them on every release.</span></p><h2><strong><span>31. Reliability Testing</span></strong></h2><blockquote><p><span>Reliability testing measures how consistently an API performs its intended function over time &amp; under varying conditions.</span></p></blockquote><p><span>You are not testing a single response.</span></p><p><span>Instead, you&#8217;re testing whether the API delivers the right response reliably across thousands of requests, network disruptions &amp; partial system failures.</span></p><p><span>This includes uptime measurement, error rate tracking, and mean time between failures (</span><strong><span>MTBF</span></strong><a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-7" href="#footnote-7" target="_self">7</a><span>).</span></p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!4udM!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F051cf66c-ed90-4981-82af-eae3fb1b66e9_2048x548.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!4udM!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F051cf66c-ed90-4981-82af-eae3fb1b66e9_2048x548.png 424w, https://substackcdn.com/image/fetch/$s_!4udM!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F051cf66c-ed90-4981-82af-eae3fb1b66e9_2048x548.png 848w, https://substackcdn.com/image/fetch/$s_!4udM!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F051cf66c-ed90-4981-82af-eae3fb1b66e9_2048x548.png 1272w, https://substackcdn.com/image/fetch/$s_!4udM!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F051cf66c-ed90-4981-82af-eae3fb1b66e9_2048x548.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!4udM!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F051cf66c-ed90-4981-82af-eae3fb1b66e9_2048x548.png" width="1456" height="390" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/051cf66c-ed90-4981-82af-eae3fb1b66e9_2048x548.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:390,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!4udM!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F051cf66c-ed90-4981-82af-eae3fb1b66e9_2048x548.png 424w, https://substackcdn.com/image/fetch/$s_!4udM!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F051cf66c-ed90-4981-82af-eae3fb1b66e9_2048x548.png 848w, https://substackcdn.com/image/fetch/$s_!4udM!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F051cf66c-ed90-4981-82af-eae3fb1b66e9_2048x548.png 1272w, https://substackcdn.com/image/fetch/$s_!4udM!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F051cf66c-ed90-4981-82af-eae3fb1b66e9_2048x548.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 buttonBase-GK1x3M"><svg aria-hidden="true" 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" class="icon-noB79L"><g><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 buttonBase-GK1x3M"><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 icon-noB79L"><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><h3><span>Analogy</span></h3><p><span>A light switch that works 99 times out of 100 is not reliable&#8230;</span></p><p><span>You need to know the exact failure rate, the failure pattern, and how quickly the light recovers after a failure.</span></p><p><span>Reliability testing is counting every flicker.</span></p><h3><span>Tradeoff</span></h3><p><span>Reliability testing gives you hard numbers on system dependability.</span></p><p><span>These numbers drive SLAs, SLOs</span><a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-8" href="#footnote-8" target="_self">8</a><span>, and architecture decisions. But it requires sustained observation over time, not a single test run.</span></p><p><span>True reliability data comes from weeks of monitoring, not minutes of testing.</span></p><h3><span>Why it matters</span></h3><p><span>Users tolerate slow APIs.</span></p><p><span>Yet they do not tolerate unreliable ones. An API that works perfectly 95% of the time &amp; fails randomly 5% of the time will drive users away faster than a consistently slow one.</span></p><p><span>So define SLOs for error rate &amp; availability&#8230; Then measure continuously &amp; alert on degradation.</span></p><h2><strong><span>32. Chaos Testing</span></strong></h2><blockquote><p><span>Chaos testing deliberately introduces failures into the system to verify if the API handles them gracefully.</span></p></blockquote><p><span>You kill server instances, inject network latency, corrupt DNS responses, and fill disks, all while monitoring whether the API continues serving requests/degrades predictably.</span></p><p><span>Netflix&#8217;s Chaos Monkey is the most well-known tool in this space:</span></p><p><span>It randomly terminates production instances during business hours.</span></p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!ZPYd!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F63ead335-ac9b-4be1-9c6a-10eb42409bff_2048x764.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!ZPYd!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F63ead335-ac9b-4be1-9c6a-10eb42409bff_2048x764.png 424w, https://substackcdn.com/image/fetch/$s_!ZPYd!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F63ead335-ac9b-4be1-9c6a-10eb42409bff_2048x764.png 848w, https://substackcdn.com/image/fetch/$s_!ZPYd!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F63ead335-ac9b-4be1-9c6a-10eb42409bff_2048x764.png 1272w, https://substackcdn.com/image/fetch/$s_!ZPYd!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F63ead335-ac9b-4be1-9c6a-10eb42409bff_2048x764.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!ZPYd!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F63ead335-ac9b-4be1-9c6a-10eb42409bff_2048x764.png" width="1456" height="543" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/63ead335-ac9b-4be1-9c6a-10eb42409bff_2048x764.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:543,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!ZPYd!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F63ead335-ac9b-4be1-9c6a-10eb42409bff_2048x764.png 424w, https://substackcdn.com/image/fetch/$s_!ZPYd!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F63ead335-ac9b-4be1-9c6a-10eb42409bff_2048x764.png 848w, https://substackcdn.com/image/fetch/$s_!ZPYd!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F63ead335-ac9b-4be1-9c6a-10eb42409bff_2048x764.png 1272w, https://substackcdn.com/image/fetch/$s_!ZPYd!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F63ead335-ac9b-4be1-9c6a-10eb42409bff_2048x764.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 buttonBase-GK1x3M"><svg aria-hidden="true" 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" class="icon-noB79L"><g><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 buttonBase-GK1x3M"><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 icon-noB79L"><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><h3><span>Analogy</span></h3><p><span>A fire drill does not wait for a real fire:</span></p><p><span>You pull the alarm during a normal workday &amp; observe whether people follow the evacuation plan/panic.</span></p><p><span>Chaos testing is the fire drill for your API infrastructure.</span></p><h3><span>Tradeoff</span></h3><p><span>Chaos testing reveals resilience gaps that no other testing approach can find.</span></p><p><span>It builds confidence that the system survives real-world failures, not just theoretical ones. Yet the risk is real. Poorly scoped chaos experiments can cause actual outages.</span></p><p><span>So start small, in staging, with a clear blast radius.</span></p><h3><span>Why it matters</span></h3><p><span>In distributed systems, failure is not a possibility&#8230;it is a certainty.</span></p><p><span>The question is not whether a service will go down, but whether the system handles it when it does&#8230;</span></p><p><span>Start with simple experiments: </span><em><span>kill one instance, add 200ms latency to one dependency</span></em><span>. Expand the scope as confidence grows.</span></p><h4 style="text-align: center;"><strong>&#167;</strong></h4><div class="callout-block" data-callout="true"><p style="text-align: center;"><em><strong><span data-color="#3a7bf9" style="color: rgb(58, 123, 249);">Reminder: this is a teaser of the subscriber-only newsletter, exclusive to my golden members.</span></strong></em></p><p>When you upgrade, you&#8217;ll get:</p><ul><li><p><strong>High-level architecture of real-world systems.</strong></p></li><li><p>Deep dive into how popular real-world systems work.</p></li><li><p><strong>How real-world systems handle scale, reliability, and performance.</strong></p></li></ul><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://newsletter.systemdesign.one/subscribe&quot;,&quot;text&quot;:&quot;Unlock Full Access&quot;,&quot;action&quot;:null,&quot;class&quot;:&quot;button-wrapper&quot;}" data-component-name="ButtonCreateButton"><a class="button primary button-wrapper" href="https://newsletter.systemdesign.one/subscribe"><span>Unlock Full Access</span></a></p><p>(If this newsletter has helped you become a better software engineer, consider subscribing to support my work.)</p></div><h4 style="text-align: center;"><strong>&#167;</strong></h4><h2><strong><span>33. Circuit Breaker Testing</span></strong></h2>
      <p>
          <a href="https://newsletter.systemdesign.one/p/types-of-api-testing">
              Read more
          </a>
      </p>
   ]]></content:encoded></item><item><title><![CDATA[50 shades of system design]]></title><description><![CDATA[#174: tradeoffs behind designing scalable, reliable systems]]></description><link>https://newsletter.systemdesign.one/p/system-design-tradeoffs</link><guid isPermaLink="false">https://newsletter.systemdesign.one/p/system-design-tradeoffs</guid><dc:creator><![CDATA[Neo Kim]]></dc:creator><pubDate>Thu, 03 Sep 2026 12:17:25 GMT</pubDate><enclosure url="https://substack-post-media.s3.amazonaws.com/public/images/ebd09cb3-4018-458d-bb31-771585e67abc_1280x720.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p></p><div class="callout-block" data-callout="true"><h2><a href="http://a0.to/1t9">Built for vibecoders, trusted by enterprises, priced for all &#128640; (Partner)</a></h2><div class="native-video-embed" data-component-name="VideoPlaceholder" data-attrs="{&quot;mediaUploadId&quot;:&quot;5f44a55e-ceae-445c-ad81-786e37d5eefb&quot;,&quot;duration&quot;:null}"></div><p>AI has made it ridiculously easy to go from &#8220;I have an idea&#8221; to &#8220;wait&#8230; I actually built this&#8221;.</p><p>You prompt your coding agent, get the app running, and move on. But as soon as real users, sensitive data, or AI agents enter the picture, auth becomes one of those things you really don&#8217;t want to &#8220;vibe code&#8221; your way through.</p><p>That&#8217;s why Auth0 is worth a look.</p><p><strong><a href="http://a0.to/1t9">Auth0</a></strong> has long been a go-to identity platform for enterprises, but it&#8217;s now making the economics a lot more interesting for developers and startups, too&#8212;including a $0 free plan and new B2B plans designed to make it easier to start small and scale up.</p><p>If you&#8217;re shipping an app, SaaS product, or AI agent and need authentication without slowing down your build, check out Auth0.</p><p>Same Auth0. Better math. Try it for free.</p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;http://a0.to/1t9&quot;,&quot;text&quot;:&quot;Try it for free&quot;,&quot;action&quot;:null,&quot;class&quot;:&quot;button-wrapper&quot;}" data-component-name="ButtonCreateButton"><a class="button primary button-wrapper" href="http://a0.to/1t9"><span>Try it for free</span></a></p><p>(Thanks to <strong><a href="http://a0.to/1t9">Auth0</a></strong> for partnering on this post.)</p></div><h4 style="text-align: center;"><strong>&#167;</strong></h4><p>Most people think system design is about building the &#8220;best&#8221; architecture.</p><p>It&#8217;s not... instead it&#8217;s about making the right <em>tradeoffs</em> for a given workload &amp; constraints.</p><p>Here are 50 tradeoffs you should understand:</p><ol><li><p><strong>Latency vs throughput.</strong> Batching many requests together can reduce network, serialization &amp; processing overhead and increase throughput<a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-1" href="#footnote-1" target="_self">1</a>. Yet the downside is individual requests wait longer while a batch forms. So use batching when throughput matters and individual requests when low latency matters.</p></li><li><p><strong>Latency vs tail latency.</strong> A system can have excellent median latency while a tiny number of slow requests create poor p95 and/or p99 latency<a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-2" href="#footnote-2" target="_self">2</a>. Redundant/hedged requests<a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-3" href="#footnote-3" target="_self">3</a> can reduce these long tails, but they consume extra capacity. So use hedged requests when low tail latency matters &amp; normal requests when conserving capacity matters.</p></li><li><p><strong>Compression vs CPU usage.</strong> Compressing data reduces network bandwidth &amp; storage requirements. Yet compression and decompression require CPU and could add processing latency<a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-4" href="#footnote-4" target="_self">4</a>. So use compression when bandwidth &amp; storage matters and <em>uncompressed</em> data when low CPU usage &amp; processing latency matter.</p></li><li><p><strong>Telemetry fidelity vs observability cost.</strong> Recording ALL distributed traces gives you information for debugging production issues. Sampling<a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-5" href="#footnote-5" target="_self">5</a> reduces processing and storage costs, but you&#8217;d miss occasional traces you later need. So use full tracing when maximum debugging visibility matters &amp; use sampling when observability costs matter.</p></li><li><p><strong>Cache freshness vs cache hit rate.</strong> Longer TTLs increase cache hits<a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-6" href="#footnote-6" target="_self">6</a> and reduce requests to the origin. But they also keep stale data cached longer. So use longer TTLs when a high cache hit rate matters &amp; shorter TTLs when data freshness matters.</p></li><li><p><strong>Local cache vs shared cache.</strong> An in-process cache avoids a network request and can provide extremely fast reads. A shared remote cache makes data easier to share across instances, but adds network latency &amp; dependency. So use a local cache when low read latency matters, and a shared cache when many instances need shared cached data.</p></li><li><p><strong>Database indexes vs cheaper writes.</strong> Database indexes<a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-7" href="#footnote-7" target="_self">7</a> can boost query performance. But they consume storage &amp; add work when rows get inserted, updated, and/or deleted. So use indexes when query performance matters and keep them low when write performance matters.</p></li><li><p><strong>High utilization vs capacity headroom.</strong> Running infrastructure close to maximum utilization can reduce cost per unit of work. While extra headroom<a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-8" href="#footnote-8" target="_self">8</a> allows the system to better absorb traffic bursts &amp; latency spikes. So use high utilization when cost efficiency matters, and extra headroom when handling traffic bursts matters.</p></li></ol><h4 style="text-align: center;"><strong>&#167;</strong></h4><p></p><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://newsletter.systemdesign.one/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"><span data-color="#3a7bf9" style="color: rgb(58, 123, 249);">Get my system design playbook for FREE on newsletter signup:</span></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><ul><li><p><em><a href="https://newsletter.systemdesign.one/p/system-design-tradeoffs/?action=share">Share this lette</a><span>r &amp; I&#8217;ll send you some rewards for the referrals.</span></em></p></li></ul><h4 style="text-align: center;"><strong>&#167;</strong></h4><ol start="9"><li><p><strong>Consistency vs availability during network partitions. </strong><span>Replicas&nbsp;</span><em><span>cannot</span></em><span>&nbsp;coordinate when requests arrive during a partition.</span> Maintaining strong consistency requires &#8220;rejecting&#8221; some operations, while remaining available replicas can temporarily diverge<a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-9" href="#footnote-9" target="_self">9</a>. Prioritize consistency when stale/conflicting data is unacceptable, and prioritize availability when serving requests during partitions matters.</p></li><li><p><strong>Cross-region consistency vs write latency</strong><a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-10" href="#footnote-10" target="_self">10</a><strong>.</strong> Synchronously coordinating data across distant regions provides stronger consistency guarantees. Yet the network round trips between regions increase write and/or transaction latency. So use synchronous cross-region replication when strong consistency matters &amp; asynchronous replication when low write latency matters.</p></li><li><p><strong>Read quorum vs write quorum.</strong> Replicated systems contact many replicas during reads/writes<a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-11" href="#footnote-11" target="_self">11</a>. This approach provides stronger guarantees, but increases latency &amp; use extra resources. Use a larger read quorum when stronger read guarantees matter, and a larger write quorum when stronger write guarantees matter.</p></li><li><p><strong>Synchronous vs asynchronous replication.</strong> Synchronous replication waits for another replica before acknowledging a write to reduce the risk of losing acknowledged data. Asynchronous replication<a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-12" href="#footnote-12" target="_self">12</a> gives faster writes, but replicas can lag behind. So use synchronous replication when <em>protecting</em> acknowledged writes matters, and asynchronous replication when faster writes matter.</p></li><li><p><strong>Single-region vs multi-region deployment.</strong> Keeping data in one region typically lowers write latency<a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-13" href="#footnote-13" target="_self">13</a> &amp; has less infrastructure complexity. Multi-region setup improves geographic resilience and brings reads closer to users, but replication becomes expensive &amp; complicated. So use a single region when simplicity and low write latency matter, and multiple regions when geographic resilience matters.</p></li><li><p><strong>Replica reads vs primary reads.</strong> Reading from a nearby replica reduces latency and improves read capacity. Yet if the replica is behind the primary, the application would read <em>stale</em> data<a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-14" href="#footnote-14" target="_self">14</a>. Use local replica reads when read latency matters, and use primary/strongly consistent reads when data freshness matters.</p></li><li><p><strong>Serializable vs weaker transaction isolation.</strong> Serializable isolation makes concurrent transactions behave as though they executed serially. Stronger isolation causes more transaction aborts &amp; retries under contention, while weaker isolation allows more anomalies<a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-15" href="#footnote-15" target="_self">15</a>. Use serializable isolation when preventing concurrency anomalies matters, and use weaker isolation when higher concurrency matters<a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-16" href="#footnote-16" target="_self">16</a>.</p></li><li><p><strong>Optimistic vs pessimistic concurrency control.</strong> Optimistic concurrency allows operations to proceed &amp; check for conflicts later. This works well when conflicts are rare. Pessimistic locking prevents conflicts earlier but can increase blocking<a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-17" href="#footnote-17" target="_self">17</a>. Use optimistic concurrency when conflicts are rare, and pessimistic concurrency when conflicts are frequent/costly<a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-18" href="#footnote-18" target="_self">18</a>.</p></li><li><p><strong>Last-write-wins vs concurrent updates.</strong> Last-write-wins <em>automatically</em> resolves conflicting values &amp; keeps conflict handling simple. Version tracking &amp; explicit merging preserve more concurrent updates, but require extra metadata and application logic<a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-19" href="#footnote-19" target="_self">19</a>. Use last-write-wins when simple conflict resolution matters, and versioning &amp; merging when preserving concurrent updates matters<a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-20" href="#footnote-20" target="_self">20</a>.</p></li><li><p><strong>Normalization vs denormalization.</strong> Normalized data reduces duplication and makes updates easier to stay consistent. Denormalization makes reads faster and avoids expensive joins, but you must keep duplicate data synchronized<a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-21" href="#footnote-21" target="_self">21</a>. Use normalization when reducing duplication &amp; consistency matter, and denormalization when faster reads matter<a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-22" href="#footnote-22" target="_self">22</a>.</p></li><li><p><strong>Relational databases vs NoSQL.</strong> Relational databases<a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-23" href="#footnote-23" target="_self">23</a> make it easy to query data in different ways and connect related data across tables. NoSQL databases can scale across many machines for known access patterns, but adding new query patterns can be harder. So use relational databases when flexible queries and relationships matter, and NoSQL when horizontal scaling around <em>known</em> access patterns matters.</p></li><li><p><strong>B-tree storage vs LSM-style storage.</strong> B-trees<a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-24" href="#footnote-24" target="_self">24</a> organize data so reads are fast, including looking up one value/range of values. LSM trees optimize for heavy writes by writing data efficiently &amp; reorganizing it later, but reads &amp; background compaction can require extra work. Use B-trees when fast point &amp; range reads matter, and LSM trees<a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-25" href="#footnote-25" target="_self">25</a> when high write throughput matters.</p></li><li><p><strong>Leveled vs universal LSM compaction.</strong> LSM databases periodically merge stored files to clean up &amp; reorganize data. <em>Leveled compaction</em> does more rewrites to keep data neatly organized, thus making reads more efficient. <em>Universal compaction</em> does less rewrites, making writes more efficient, but reads require checking more data. So use leveled compaction when read performance matters &amp; universal compaction when write performance matters<a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-26" href="#footnote-26" target="_self">26</a>.</p></li><li><p><strong>Range partitioning vs hash partitioning.</strong> Range partitioning<a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-27" href="#footnote-27" target="_self">27</a> keeps nearby keys together; this is useful for range queries. Hashing spreads writes more evenly across partitions, but sacrifices natural key locality. Use range partitioning when range queries &amp; key locality matter, and hash partitioning when evenly distributing writes matters<a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-28" href="#footnote-28" target="_self">28</a>.</p></li><li><p><strong>Replication vs sharding.</strong> Replication copies the same data to many nodes, thus improving redundancy &amp; read capacity. Sharding divides &#8220;different&#8221; data across nodes. This increases aggregate storage &amp; write capacity while making routing &amp; cross-shard operations harder<a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-29" href="#footnote-29" target="_self">29</a>. Use replication when redundancy &amp; read scaling matter, and sharding when storage &amp; write scaling matter.</p></li><li><p><strong>Event sourcing vs state-based persistence.</strong> Event sourcing stores every change as an event &amp; rebuilds the current state by replaying those events. State-based storage stores the latest state directly, thus making reads and updates simpler, but it does NOT preserve every historical change<a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-30" href="#footnote-30" target="_self">30</a>. Use event sourcing when audit history &amp; replay matter, and state-based storage when simpler reads &amp; updates matter<a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-31" href="#footnote-31" target="_self">31</a>.</p></li><li><p><strong>Vertical vs horizontal scaling.</strong> Vertical scaling increases a server&#8217;s CPU, memory, and/or storage capacity without distributing the workload across many machines. Horizontal scaling adds more machines &amp; offers better scalability, but requires the system to distribute requests/data across them<a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-32" href="#footnote-32" target="_self">32</a>. Use vertical scaling when simplicity matters, and horizontal scaling when you need to scale beyond one machine.</p></li><li><p><strong>Stateful vs stateless compute.</strong> Keeping state inside an application server makes operations simpler &amp; faster. Yet stateless servers are easy to replace, rebalance, and autoscale because durable state lives elsewhere<a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-33" href="#footnote-33" target="_self">33</a>. Use stateful compute to simplify operations, and stateless compute when scaling &amp; replacement matter.</p></li></ol><div class="twitter-embed" data-attrs="{&quot;url&quot;:&quot;https://x.com/systemdesignone/status/2093394593677029879?s=20&quot;,&quot;full_text&quot;:&quot;1 big monolith = low cortisol &quot;,&quot;username&quot;:&quot;systemdesignone&quot;,&quot;name&quot;:&quot;Neo Kim&quot;,&quot;profile_image_url&quot;:&quot;https://pbs.substack.com/profile_images/1715471366835556352/zuMLBgAQ_normal.jpg&quot;,&quot;date&quot;:&quot;2026-08-28T17:45:39.000Z&quot;,&quot;photos&quot;:[{&quot;img_url&quot;:&quot;https://pbs.substack.com/media/HQ07SYjWcAAbJFd.jpg&quot;,&quot;link_url&quot;:&quot;https://t.co/t8PJPYphjU&quot;}],&quot;quoted_tweet&quot;:{},&quot;reply_count&quot;:47,&quot;retweet_count&quot;:354,&quot;like_count&quot;:6568,&quot;impression_count&quot;:305218,&quot;expanded_url&quot;:null,&quot;video_url&quot;:null,&quot;video_preview_media_key&quot;:null,&quot;belowTheFold&quot;:true}" data-component-name="Twitter2ToDOM"></div><ol start="27"><li><p><strong>Monolith vs microservices.</strong> A monolith keeps calls, transactions, deployments, and debugging inside a <em>smaller</em> operational boundary. Microservices split the application into independent services that can be deployed and scaled separately, but add network calls, distributed data, &amp; operational complexity. Use a monolith when simplicity matters, and microservices when independent deployment &amp; scaling matter<a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-34" href="#footnote-34" target="_self">34</a>.</p></li><li><p><strong>Coarse-grained vs fine-grained services.</strong> Coarse-grained services handle larger parts of the application, resulting in fewer service boundaries &amp; network calls. Fine-grained services<a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-35" href="#footnote-35" target="_self">35</a> handle tiny, focused functions and can be deployed &amp; scaled independently, but require extra network communication &amp; distributed coordination<a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-36" href="#footnote-36" target="_self">36</a>.</p></li><li><p><strong>Shared database vs database per service.</strong> A shared database makes joins &amp; transactions between services straightforward. Giving each service its own database increases autonomy and independent evolution, but makes cross-service queries and transactions hard<a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-37" href="#footnote-37" target="_self">37</a>. Use a shared database when cross-service joins and transactions matter, and use a database per service when service autonomy matters<a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-38" href="#footnote-38" target="_self">38</a>.</p></li><li><p><strong>Single model vs CQRS.</strong> A single model handles both reads &amp; writes, thus keeping the application simpler. CQRS<a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-39" href="#footnote-39" target="_self">39</a> separates read &amp; write models so each can be optimized and scaled independently, but adds infrastructure &amp; synchronization between them. Use a single model<a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-40" href="#footnote-40" target="_self">40</a> when simplicity matters, and use CQRS when reads &amp; writes need independent optimization/scaling.</p></li><li><p><strong>Synchronous calls vs asynchronous messaging.</strong> Synchronous calls<a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-41" href="#footnote-41" target="_self">41</a> provide immediate success/failure and are straightforward for short operations. Queues<a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-42" href="#footnote-42" target="_self">42</a> decouple services and absorb traffic bursts, but introduce delayed execution, duplicate handling &amp; workflow-state complexity.</p></li><li><p><strong>Saga</strong><a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-43" href="#footnote-43" target="_self">43</a><strong> choreography vs saga orchestration.</strong> With choreography, each service reacts to events and triggers the next step without a central controller. With orchestration, a central orchestrator tells each service what to do and tracks the overall workflow. Use choreography for simpler, loosely coupled workflows, and use orchestration for complex workflows<a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-44" href="#footnote-44" target="_self">44</a> that need centralized coordination &amp; recovery.</p></li><li><p><strong>Two-Phase Commit (2PC) vs Saga.</strong> 2PC coordinates transactions across many services/databases so they either ALL commit or ALL roll back. But coordination can increase latency &amp; reduce availability during failures. A Saga<a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-45" href="#footnote-45" target="_self">45</a> breaks the workflow into separate local transactions and uses compensating actions when a later step fails. Use 2PC when &#8220;strict&#8221; atomicity matters<a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-46" href="#footnote-46" target="_self">46</a> and Sagas for long-running distributed workflows where services need more autonomy.</p></li><li><p><strong>Message queue vs event log.</strong> A message queue distributes tasks across workers, with each task typically processed by one worker. An event log<a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-47" href="#footnote-47" target="_self">47</a> stores events for a retention period, allowing many consumers to read the same events &amp; replay them later. Use message queues<a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-48" href="#footnote-48" target="_self">48</a> for distributing background tasks and event logs when replay &amp; many independent consumers matter.</p></li><li><p><strong>At-least-once vs exactly-once processing.</strong> At-least-once processing retries messages after failures, so the same message would be processed more than once. Exactly-once processing prevents the same operation from producing duplicate effects, but needs extra coordination, transactions, and/or deduplication<a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-49" href="#footnote-49" target="_self">49</a>. Use at-least-once when consumers can safely handle duplicates, and exactly-once<a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-50" href="#footnote-50" target="_self">50</a> when prevention of duplicate effects matters.</p></li><li><p><strong>Total ordering vs partitioned ordering.</strong> Total ordering processes all events in the same order, but limits how much work can run in parallel. Partitioned ordering<a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-51" href="#footnote-51" target="_self">51</a> guarantees order only for events with the <em>same</em> partition key, allowing different partitions to process events in parallel. Use total ordering when strict ordering across all events matters, and partitioned ordering when high throughput matters<a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-52" href="#footnote-52" target="_self">52</a>.</p></li><li><p><strong>Push-based vs pull-based messaging.</strong> With push-based messaging, the broker sends messages to consumers as they arrive. With pull-based messaging, consumers request messages from the broker when they are ready<a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-53" href="#footnote-53" target="_self">53</a>, thus giving them more control over batching &amp; processing rate. Use push when immediate delivery matters, and pull<a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-54" href="#footnote-54" target="_self">54</a> when consumers need more control over how fast they process messages.</p></li><li><p><strong>Batch processing vs stream processing</strong><a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-55" href="#footnote-55" target="_self">55</a><strong>.</strong> Batch processing<a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-56" href="#footnote-56" target="_self">56</a> collects data &amp; processes it together at scheduled intervals, thus making it efficient for BIG datasets. Stream processing processes data continuously as it arrives, providing lower-latency results but adds unbounded data, state, time, and fault recovery complexity.</p></li><li><p><strong>REST vs GraphQL.</strong> REST exposes predefined endpoints that return fixed data structures. GraphQL lets clients request exactly the fields they need through a query<a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-57" href="#footnote-57" target="_self">57</a>, but adds complexity for query execution, caching, &amp; performance control. Use REST for simpler, resource-based APIs, and GraphQL when clients need flexible data access<a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-58" href="#footnote-58" target="_self">58</a>.</p></li><li><p><strong>Unary RPC vs streaming RPC.</strong> Unary RPC sends one request &amp; receives one response. Streaming RPC keeps the connection open so the client and/or server can continuously send many messages<a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-59" href="#footnote-59" target="_self">59</a> but makes load balancing &amp; debugging complex<a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-60" href="#footnote-60" target="_self">60</a>. Use unary RPC for simple request-response operations, and streaming RPC<a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-61" href="#footnote-61" target="_self">61</a> for continuous/real-time communication.</p></li></ol><h4 style="text-align: center;"><strong>&#167;</strong></h4><div class="captioned-button-wrap" data-attrs="{&quot;url&quot;:&quot;https://newsletter.systemdesign.one/p/system-design-tradeoffs?utm_source=substack&utm_medium=email&utm_content=share&action=share&quot;,&quot;text&quot;:&quot;Share&quot;}" data-component-name="CaptionedButtonToDOM"><div class="preamble"><p class="cta-caption"><em><span data-color="#3a7bf9" style="color: rgb(58, 123, 249);">If something resonated with you today, share this letter. Because one idea, one action, can change everything.</span></em></p></div><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://newsletter.systemdesign.one/p/system-design-tradeoffs?utm_source=substack&utm_medium=email&utm_content=share&action=share&quot;,&quot;text&quot;:&quot;Share&quot;}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://newsletter.systemdesign.one/p/system-design-tradeoffs?utm_source=substack&utm_medium=email&utm_content=share&action=share"><span>Share</span></a></p></div><h4 style="text-align: center;"><strong>&#167;</strong></h4><ol start="41"><li><p><strong>Synchronous APIs vs asynchronous APIs.</strong> A synchronous API waits for the operation to finish before returning a result, but consumes connection &amp; timeout budgets<a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-62" href="#footnote-62" target="_self">62</a>. An asynchronous API starts the work and returns immediately, usually with an ID you can use to check its status later. Yet it requires explicit state for status, completion &amp; cancellation. Use synchronous APIs for quick operations, and asynchronous APIs for long-running operations<a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-63" href="#footnote-63" target="_self">63</a> that take too long for a single request.</p></li><li><p><strong>Acknowledgment latency vs durability.</strong> A messaging system can confirm a write after fewer replicas store it. This reduces latency but increases the risk of losing the message if the server fails. Waiting for more replicas before confirming the write improves durability but increases latency. Use fewer acknowledgments when low latency matters, and more acknowledgments when stronger durability matters<a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-64" href="#footnote-64" target="_self">64</a>.</p></li><li><p><strong>Retries vs load amplification.</strong> Retries can recover from temporary failures by resending a failed request. But if a service is already overloaded<a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-65" href="#footnote-65" target="_self">65</a>, retries create even more requests and can worsen the overload. Use retries for temporary failures, and limit retries when a service gets overloaded.</p></li><li><p><strong>Short vs long timeouts.</strong> Short timeouts release resources quickly when dependencies are slow. Yet setting them too aggressively can abandon requests that would have completed successfully a moment later. Use short timeouts when fast failure and resource protection matter, and long timeouts<a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-66" href="#footnote-66" target="_self">66</a> when operations legitimately need more time.</p></li><li><p><strong>Idempotency vs implementation complexity.</strong> Idempotency<a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-67" href="#footnote-67" target="_self">67</a> makes retries safer because sending the same request many times produces the same intended effect as sending it once. But implementing it requires extra logic to detect &amp; handle duplicate requests. Use idempotency when requests would be retried, and duplicate actions could cause problems. Use simpler non-idempotent operations when duplicates are harmless/impossible.</p></li><li><p><strong>Aggressive vs conservative circuit breakers.</strong> An aggressive circuit breaker stops sending requests to a failing service quickly, protecting it from more traffic but potentially blocking requests during a temporary problem. A conservative circuit breaker<a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-68" href="#footnote-68" target="_self">68</a> waits for more failures before stopping requests, reducing unnecessary circuit openings but sending more traffic to a struggling service. </p></li><li><p><strong>Load shedding vs graceful degradation.</strong> Load shedding<a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-69" href="#footnote-69" target="_self">69</a> rejects requests when a system is overloaded, thus freeing up capacity to handle the remaining requests successfully. Accepting more requests increases the chance of serving everyone, but during overload it can slow the entire system/cause failures. Use load shedding when system stability matters, and accept more requests when enough capacity is available.</p></li><li><p><strong>Deep queues vs backpressure.</strong> Deep queues<a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-70" href="#footnote-70" target="_self">70</a> store more work when producers send data faster than consumers can process it, thus helping to absorb <em>temporary</em> traffic spikes. But if the queue gets too large, requests can sit there for a long time &amp; become stale. Backpressure slows down/rejects producers when consumers cannot keep up, thus preventing the backlog from growing too large. Use deep queues to absorb temporary traffic spikes and backpressure to prevent large backlogs.</p></li><li><p><strong>Active-active vs active-passive.</strong> Active-active runs the application in many regions at the same time, so another region can continue serving traffic if one fails. Active-passive<a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-71" href="#footnote-71" target="_self">71</a> keeps a secondary region on standby &amp; switches traffic to it only when the primary region fails. This makes coordination simpler but increases failover time. Use active-active when high availability across regions matters, and active-passive when simpler multi-region operation matters.</p></li><li><p><strong>Low RTO/RPO vs cost &amp; complexity. </strong>A lower Recovery Time Objective<a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-72" href="#footnote-72" target="_self">72</a> (<strong>RTO</strong>) means recovering faster after a failure, while lower Recovery Point Objective (<strong>RPO</strong>) means losing less data. Achieving both requires more replication, backup infrastructure, automation &amp; testing,,, this increases cost &amp; complexity. Use low RTO/RPO when minimizing downtime &amp; data loss matters, and higher RTO/RPO when reducing cost &amp; complexity matters.</p></li></ol><p>I started by telling you system design is about tradeoffs&#8230;</p><p>After 50 of them, the pattern is clear: every architecture choice gives you something &amp; costs you something.</p><p>The skill is knowing which tradeoff your workload can afford.</p><blockquote><p><em>&#8220;There are no solutions. There are only trade-offs.&#8221;<br>- Thomas Sowell</em></p></blockquote><h4 style="text-align: center;"><strong>&#167;</strong></h4><p style="text-align: center;"><em><span data-color="#3a7bf9" style="color: rgb(58, 123, 249);">If you are serious about system design, you really can&#8217;t miss out on the footnotes about these 50 tradeoffs:</span></em></p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://newsletter.systemdesign.one/subscribe&quot;,&quot;text&quot;:&quot;Get Instant Access Now&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://newsletter.systemdesign.one/subscribe"><span>Get Instant Access Now</span></a></p><div><hr></div><div class="captioned-image-container"><figure><a class="image-link image2" target="_blank" href="https://www.linkedin.com/in/nk-systemdesign-one/" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!68aQ!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe4eab3a0-fda8-4df8-b651-0f976b223e9a_320x320.png 424w, https://substackcdn.com/image/fetch/$s_!68aQ!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe4eab3a0-fda8-4df8-b651-0f976b223e9a_320x320.png 848w, https://substackcdn.com/image/fetch/$s_!68aQ!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe4eab3a0-fda8-4df8-b651-0f976b223e9a_320x320.png 1272w, https://substackcdn.com/image/fetch/$s_!68aQ!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe4eab3a0-fda8-4df8-b651-0f976b223e9a_320x320.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!68aQ!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe4eab3a0-fda8-4df8-b651-0f976b223e9a_320x320.png" width="160" height="160" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/e4eab3a0-fda8-4df8-b651-0f976b223e9a_320x320.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:320,&quot;width&quot;:320,&quot;resizeWidth&quot;:160,&quot;bytes&quot;:121414,&quot;alt&quot;:&quot;&quot;,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:&quot;https://www.linkedin.com/in/nk-systemdesign-one/&quot;,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://newsletter.systemdesign.one/i/136161496?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe4eab3a0-fda8-4df8-b651-0f976b223e9a_320x320.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" title="" srcset="https://substackcdn.com/image/fetch/$s_!68aQ!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe4eab3a0-fda8-4df8-b651-0f976b223e9a_320x320.png 424w, https://substackcdn.com/image/fetch/$s_!68aQ!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe4eab3a0-fda8-4df8-b651-0f976b223e9a_320x320.png 848w, https://substackcdn.com/image/fetch/$s_!68aQ!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe4eab3a0-fda8-4df8-b651-0f976b223e9a_320x320.png 1272w, https://substackcdn.com/image/fetch/$s_!68aQ!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe4eab3a0-fda8-4df8-b651-0f976b223e9a_320x320.png 1456w" sizes="100vw" loading="lazy"></picture><div></div></div></a><figcaption class="image-caption"><strong>Find me on <a href="https://www.linkedin.com/in/nk-systemdesign-one/">LinkedIn</a> | <a href="https://x.com/intent/follow?screen_name=systemdesignone">Twitter</a> | <a href="https://www.instagram.com/systemdesignone/">Instagram</a></strong></figcaption></figure></div><div><hr></div><p><strong>Want to reach 250K+ tech professionals at scale? </strong>&#128240;</p><p>If your company wants to reach 250K+ tech professionals, <a href="https://newsletter.systemdesign.one/p/sponsorship">advertise with me</a>.</p><div><hr></div><p>Thank you for supporting this newsletter.</p><p>You are now 250,001+ readers strong, very close to 251k. Let&#8217;s try to get 251k readers by 7 September. Consider sharing this letter with your friends and get rewards.</p><p>Y&#8217;all are the best.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!6oWl!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2e739087-a910-4643-be36-997b6dd5b4af_800x500.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!6oWl!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2e739087-a910-4643-be36-997b6dd5b4af_800x500.png 424w, https://substackcdn.com/image/fetch/$s_!6oWl!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2e739087-a910-4643-be36-997b6dd5b4af_800x500.png 848w, https://substackcdn.com/image/fetch/$s_!6oWl!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2e739087-a910-4643-be36-997b6dd5b4af_800x500.png 1272w, https://substackcdn.com/image/fetch/$s_!6oWl!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2e739087-a910-4643-be36-997b6dd5b4af_800x500.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!6oWl!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2e739087-a910-4643-be36-997b6dd5b4af_800x500.png" width="590" height="368.75" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/2e739087-a910-4643-be36-997b6dd5b4af_800x500.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:500,&quot;width&quot;:800,&quot;resizeWidth&quot;:590,&quot;bytes&quot;:87878,&quot;alt&quot;:&quot;system design newsletter&quot;,&quot;title&quot;:&quot;system design newsletter&quot;,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://newsletter.systemdesign.one/i/163380418?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2e739087-a910-4643-be36-997b6dd5b4af_800x500.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="system design newsletter" title="system design newsletter" srcset="https://substackcdn.com/image/fetch/$s_!6oWl!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2e739087-a910-4643-be36-997b6dd5b4af_800x500.png 424w, https://substackcdn.com/image/fetch/$s_!6oWl!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2e739087-a910-4643-be36-997b6dd5b4af_800x500.png 848w, https://substackcdn.com/image/fetch/$s_!6oWl!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2e739087-a910-4643-be36-997b6dd5b4af_800x500.png 1272w, https://substackcdn.com/image/fetch/$s_!6oWl!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2e739087-a910-4643-be36-997b6dd5b4af_800x500.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 buttonBase-GK1x3M"><svg aria-hidden="true" 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" class="icon-noB79L"><g><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 buttonBase-GK1x3M"><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 icon-noB79L"><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 class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://newsletter.systemdesign.one/p/system-design-tradeoffs?utm_source=substack&utm_medium=email&utm_content=share&action=share&quot;,&quot;text&quot;:&quot;Share&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://newsletter.systemdesign.one/p/system-design-tradeoffs?utm_source=substack&utm_medium=email&utm_content=share&action=share"><span>Share</span></a></p>
      <p>
          <a href="https://newsletter.systemdesign.one/p/system-design-tradeoffs">
              Read more
          </a>
      </p>
   ]]></content:encoded></item><item><title><![CDATA[I struggled with “API testing” until I learned these 53 techniques]]></title><description><![CDATA[#173: Part 1 - smoke testing, functional testing, unit testing, and 22 others.]]></description><link>https://newsletter.systemdesign.one/p/api-testing-types</link><guid isPermaLink="false">https://newsletter.systemdesign.one/p/api-testing-types</guid><dc:creator><![CDATA[Neo Kim]]></dc:creator><pubDate>Mon, 31 Aug 2026 11:19:11 GMT</pubDate><enclosure url="https://substack-post-media.s3.amazonaws.com/public/images/025eb7c5-9f3f-4bcf-95f6-84b5f213730f_1280x720.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p></p><p></p><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://newsletter.systemdesign.one/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"><span data-color="#3a7bf9" style="color: rgb(58, 123, 249);">Get my system design playbook for FREE on newsletter signup:</span></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><ul><li><p><em><a href="https://newsletter.systemdesign.one/p/api-testing-types/?action=share">Share this letter</a> &amp; I&#8217;ll send you some rewards for the referrals.</em></p></li></ul><div><hr></div><p><span>Some of these are foundational, and some are quite advanced. ALL of them are super useful to engineers building production-ready systems.</span></p><p><span>Curious to know how many were new to you:</span></p><ol><li><p><span>Smoke Testing</span></p></li><li><p><span>Functional Testing</span></p></li><li><p><span>Unit Testing</span></p></li><li><p><span>Integration Testing</span></p></li><li><p><span>End-to-end testing</span></p></li><li><p><span>Regression Testing</span></p></li><li><p><span>Acceptance Testing</span></p></li><li><p><span>Negative Testing</span></p></li><li><p><span>Boundary Testing</span></p></li><li><p><span>Validation Testing</span></p></li><li><p><span>Exploratory Testing</span></p></li><li><p><span>Contract Testing</span></p></li><li><p><span>Consumer-Driven Contract Testing</span></p></li><li><p><span>API Contract Mocking</span></p></li><li><p><span>Load Testing</span></p></li><li><p><span>Stress Testing</span></p></li><li><p><span>Performance Testing</span></p></li><li><p><span>Spike Testing</span></p></li><li><p><span>Soak/Endurance Testing</span></p></li><li><p><span>Scalability Testing</span></p></li><li><p><span>Latency Testing</span></p></li><li><p><span>Concurrency Testing</span></p></li><li><p><span>Security Testing</span></p></li><li><p><span>Authentication Testing</span></p></li><li><p><span>Authorization Testing</span></p></li></ol><p><span>For each, I&#8217;ll share:</span></p><ul><li><p><span>What it is &amp; how it works in simple words</span></p></li><li><p><span>A real-world analogy</span></p></li><li><p><span>Tradeoffs</span></p></li><li><p><span>Why it matters</span></p></li></ul><p><span>Let&#8217;s go!</span></p><h4 style="text-align: center;"><strong>&#167;</strong></h4><div class="callout-block" data-callout="true"><h2><a href="https://link.svix.com/system-01">Make your agents realtime (Partner)</a></h2><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://link.svix.com/system-01" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!v-ZP!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fde8a87d9-0b90-4a74-857c-be37bba398f2_2000x1047.png 424w, https://substackcdn.com/image/fetch/$s_!v-ZP!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fde8a87d9-0b90-4a74-857c-be37bba398f2_2000x1047.png 848w, https://substackcdn.com/image/fetch/$s_!v-ZP!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fde8a87d9-0b90-4a74-857c-be37bba398f2_2000x1047.png 1272w, https://substackcdn.com/image/fetch/$s_!v-ZP!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fde8a87d9-0b90-4a74-857c-be37bba398f2_2000x1047.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!v-ZP!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fde8a87d9-0b90-4a74-857c-be37bba398f2_2000x1047.png" width="1456" height="762" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/de8a87d9-0b90-4a74-857c-be37bba398f2_2000x1047.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:762,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:212365,&quot;alt&quot;:&quot;&quot;,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:&quot;https://link.svix.com/system-01&quot;,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://newsletter.systemdesign.one/i/211217193?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fde8a87d9-0b90-4a74-857c-be37bba398f2_2000x1047.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" title="" srcset="https://substackcdn.com/image/fetch/$s_!v-ZP!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fde8a87d9-0b90-4a74-857c-be37bba398f2_2000x1047.png 424w, https://substackcdn.com/image/fetch/$s_!v-ZP!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fde8a87d9-0b90-4a74-857c-be37bba398f2_2000x1047.png 848w, https://substackcdn.com/image/fetch/$s_!v-ZP!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fde8a87d9-0b90-4a74-857c-be37bba398f2_2000x1047.png 1272w, https://substackcdn.com/image/fetch/$s_!v-ZP!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fde8a87d9-0b90-4a74-857c-be37bba398f2_2000x1047.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 buttonBase-GK1x3M"><svg aria-hidden="true" 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" class="icon-noB79L"><g><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 buttonBase-GK1x3M"><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 icon-noB79L"><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>Agents are killing your apps with compounding latency across workflows.</p><p>Your customers want their agent workflows to be efficient, so you&#8217;re losing deals if you don&#8217;t make them event-driven. Webhooks solve this issue, but implementing them is harder than it looks.</p><p>If you homebrewed your webhooks and are getting pinged at 4 in the morning for failed deliveries, this is for you.</p><p><strong><a href="https://link.svix.com/system-01">Svix</a></strong> handles everything: retries, idempotency, security, and compliance. Qualified startups get $12,000 in free credits.</p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://link.svix.com/system-01&quot;,&quot;text&quot;:&quot;Get started for free&quot;,&quot;action&quot;:null,&quot;class&quot;:&quot;button-wrapper&quot;}" data-component-name="ButtonCreateButton"><a class="button primary button-wrapper" href="https://link.svix.com/system-01"><span>Get started for free</span></a></p><p><em>(Thanks to <a href="https://link.svix.com/system-01">Svix</a> for partnering on this newsletter.)</em></p></div><h4 style="text-align: center;"><strong>&#167;</strong></h4><h2><strong><span>1. Smoke Testing</span></strong></h2><blockquote><p><span>Smoke testing is the first sanity check you run after a new build/deployment. You pick the most critical endpoints: a health check, a login, a basic read, and confirm the API responds at all.</span></p></blockquote><p><span>It runs first in your CI pipeline.</span></p><p><span>If it fails, everything else stops. No point running 500 detailed tests on a broken build. A passing smoke test only means the API responded, NOT that it responded correctly.</span></p><p><span>So you cannot rely on smoke tests alone &amp; call it safe.</span></p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!5ao1!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbdae27d4-68ee-44db-b389-63d71ac6b033_2048x878.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!5ao1!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbdae27d4-68ee-44db-b389-63d71ac6b033_2048x878.png 424w, https://substackcdn.com/image/fetch/$s_!5ao1!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbdae27d4-68ee-44db-b389-63d71ac6b033_2048x878.png 848w, https://substackcdn.com/image/fetch/$s_!5ao1!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbdae27d4-68ee-44db-b389-63d71ac6b033_2048x878.png 1272w, https://substackcdn.com/image/fetch/$s_!5ao1!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbdae27d4-68ee-44db-b389-63d71ac6b033_2048x878.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!5ao1!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbdae27d4-68ee-44db-b389-63d71ac6b033_2048x878.png" width="1456" height="624" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/bdae27d4-68ee-44db-b389-63d71ac6b033_2048x878.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:624,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!5ao1!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbdae27d4-68ee-44db-b389-63d71ac6b033_2048x878.png 424w, https://substackcdn.com/image/fetch/$s_!5ao1!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbdae27d4-68ee-44db-b389-63d71ac6b033_2048x878.png 848w, https://substackcdn.com/image/fetch/$s_!5ao1!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbdae27d4-68ee-44db-b389-63d71ac6b033_2048x878.png 1272w, https://substackcdn.com/image/fetch/$s_!5ao1!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbdae27d4-68ee-44db-b389-63d71ac6b033_2048x878.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 buttonBase-GK1x3M"><svg aria-hidden="true" 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" class="icon-noB79L"><g><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 buttonBase-GK1x3M"><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 icon-noB79L"><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><h3><span>Analogy</span></h3><p><span>Before a surgeon begins a 6-hour operation, they confirm the patient&#8217;s vitals are stable&#8230;Not a full diagnosis, but is the patient ready to proceed?</span></p><p><span>Smoke testing is that vital check before you invest deeper.</span></p><h3><span>Tradeoff</span></h3><p><span>Smoke tests are lightning fast and simple. They give instant feedback on failures before they ripple through a QA pipeline.</span></p><p><span>But simplicity is also their limitation. They are a first gate, not a full safety net.</span></p><h3><span>Why it matters</span></h3><p><span>Every minute a broken build spends in a QA pipeline wastes someone&#8217;s time.</span></p><p><span>Smoke testing is the cheapest guard you can put at the gate.</span></p><p><span>Run them first in every CI pipeline. If they fail, stop everything else immediately!</span></p><h2><strong><span>2. Functional Testing</span></strong></h2><blockquote><p><span>Functional testing holds the API accountable to its specification. For every endpoint, you define what valid input looks like, what the response must contain, and what status code should come back. Then you verify if the API delivers it.</span></p></blockquote><p><span>This includes happy paths and unhappy paths.</span></p><ul><li><p><em><span>What happens when required fields are missing?</span></em></p></li><li><p><em><span>&#8230;When the auth token is invalid?</span></em></p></li><li><p><em><span>&#8230;When the payload is structurally wrong?</span></em></p></li></ul><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!zmdm!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fce2ddae9-112f-4222-999b-c87a1d0550c6_2048x692.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!zmdm!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fce2ddae9-112f-4222-999b-c87a1d0550c6_2048x692.png 424w, https://substackcdn.com/image/fetch/$s_!zmdm!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fce2ddae9-112f-4222-999b-c87a1d0550c6_2048x692.png 848w, https://substackcdn.com/image/fetch/$s_!zmdm!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fce2ddae9-112f-4222-999b-c87a1d0550c6_2048x692.png 1272w, https://substackcdn.com/image/fetch/$s_!zmdm!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fce2ddae9-112f-4222-999b-c87a1d0550c6_2048x692.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!zmdm!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fce2ddae9-112f-4222-999b-c87a1d0550c6_2048x692.png" width="1456" height="492" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/ce2ddae9-112f-4222-999b-c87a1d0550c6_2048x692.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:492,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!zmdm!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fce2ddae9-112f-4222-999b-c87a1d0550c6_2048x692.png 424w, https://substackcdn.com/image/fetch/$s_!zmdm!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fce2ddae9-112f-4222-999b-c87a1d0550c6_2048x692.png 848w, https://substackcdn.com/image/fetch/$s_!zmdm!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fce2ddae9-112f-4222-999b-c87a1d0550c6_2048x692.png 1272w, https://substackcdn.com/image/fetch/$s_!zmdm!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fce2ddae9-112f-4222-999b-c87a1d0550c6_2048x692.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 buttonBase-GK1x3M"><svg aria-hidden="true" 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" class="icon-noB79L"><g><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 buttonBase-GK1x3M"><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 icon-noB79L"><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><h3><span>Analogy</span></h3><p><span>Imagine a vending machine:</span></p><p><span>Functional testing is inserting the right coins, pressing the right button, and confirming the right snack drops.</span></p><p><span>Then inserting too few coins, pressing a sold-out item, and confirming the machine rejects it cleanly without eating your money.</span></p><h3><span>Tradeoff</span></h3><p><span>Functional tests give you direct, verifiable confidence in your API&#8217;s behavior.</span></p><p><span>They&#8217;re the key safety net for catching broken contracts before a consumer sees them. Yet the catch is the maintenance costs. Poorly written functional tests become a tax: </span><em><span>fragile, brittle, and constantly breaking on harmless changes.</span></em></p><h3><span>Why it matters</span></h3><p><span>Consumers build products on top of your API, trusting it behaves as documented.</span></p><p><span>Functional tests enforce trust internally every time code changes. Assert what truly matters to clients, not every incidental implementation detail.</span></p><h2><strong><span>3. Unit Testing</span></strong></h2><blockquote><p><span>Unit testing isolates the pieces of your API logic: single handler, validation function, data transformer, and verifies them independently.</span></p></blockquote><p><span>No real database, no real network&#8230; Just the logic, tested in a controlled environment with </span><em><span>mocked</span></em><span> dependencies.</span></p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!pLaN!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd69ec3ef-3a7a-47c3-a4ea-dc7666a27561_1782x1796.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!pLaN!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd69ec3ef-3a7a-47c3-a4ea-dc7666a27561_1782x1796.png 424w, https://substackcdn.com/image/fetch/$s_!pLaN!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd69ec3ef-3a7a-47c3-a4ea-dc7666a27561_1782x1796.png 848w, https://substackcdn.com/image/fetch/$s_!pLaN!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd69ec3ef-3a7a-47c3-a4ea-dc7666a27561_1782x1796.png 1272w, https://substackcdn.com/image/fetch/$s_!pLaN!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd69ec3ef-3a7a-47c3-a4ea-dc7666a27561_1782x1796.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!pLaN!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd69ec3ef-3a7a-47c3-a4ea-dc7666a27561_1782x1796.png" width="572" height="576.3214285714286" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/d69ec3ef-3a7a-47c3-a4ea-dc7666a27561_1782x1796.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1467,&quot;width&quot;:1456,&quot;resizeWidth&quot;:572,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!pLaN!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd69ec3ef-3a7a-47c3-a4ea-dc7666a27561_1782x1796.png 424w, https://substackcdn.com/image/fetch/$s_!pLaN!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd69ec3ef-3a7a-47c3-a4ea-dc7666a27561_1782x1796.png 848w, https://substackcdn.com/image/fetch/$s_!pLaN!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd69ec3ef-3a7a-47c3-a4ea-dc7666a27561_1782x1796.png 1272w, https://substackcdn.com/image/fetch/$s_!pLaN!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd69ec3ef-3a7a-47c3-a4ea-dc7666a27561_1782x1796.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 buttonBase-GK1x3M"><svg aria-hidden="true" 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" class="icon-noB79L"><g><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 buttonBase-GK1x3M"><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 icon-noB79L"><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><h3><span>Analogy</span></h3><p><span>Before assembling a watch, a craftsman tests each gear wheel individually on a flat surface.</span></p><p><span>You cannot judge the full watch until you trust the components individually.</span></p><h3><span>Tradeoff</span></h3><p><span>Unit tests are the fastest tests you will ever write.</span></p><p><span>They run in milliseconds and give instant feedback during development, enabling fearless refactoring. Yet the risk is over-reliance.</span></p><p><span>Mocks do not always reflect reality, and a codebase with 100% unit test coverage can still fail catastrophically when components interact.</span></p><h3><span>Why it matters</span></h3><p><span>Unit tests form the foundation of the testing pyramid.</span></p><p><span>They catch logic bugs before they compound into harder-to-debug integration failures.</span></p><p><span>Use them for all pure logic:</span><em><span> validators, transformers, calculators, and business rules.</span></em></p><h2><strong><span>4. Integration Testing</span></strong></h2><blockquote><p><span>Integration testing verifies if different parts of the system work correctly &#8220;together&#8221;. </span></p></blockquote><p>Instead of testing a single endpoint in isolation, you chain a sequence of API calls that reflect a real workflow: <em>create a resource, read it back, update it, and delete it</em>.</p><p>Then you confirm the entire sequence produces correct state. <span>These tests touch realistic versions of your databases, queues, and dependent services.</span></p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!zbL3!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F52915095-08f6-4280-a10c-03bebd2cb320_1540x706.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!zbL3!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F52915095-08f6-4280-a10c-03bebd2cb320_1540x706.png 424w, https://substackcdn.com/image/fetch/$s_!zbL3!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F52915095-08f6-4280-a10c-03bebd2cb320_1540x706.png 848w, https://substackcdn.com/image/fetch/$s_!zbL3!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F52915095-08f6-4280-a10c-03bebd2cb320_1540x706.png 1272w, https://substackcdn.com/image/fetch/$s_!zbL3!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F52915095-08f6-4280-a10c-03bebd2cb320_1540x706.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!zbL3!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F52915095-08f6-4280-a10c-03bebd2cb320_1540x706.png" width="1456" height="667" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/52915095-08f6-4280-a10c-03bebd2cb320_1540x706.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:667,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!zbL3!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F52915095-08f6-4280-a10c-03bebd2cb320_1540x706.png 424w, https://substackcdn.com/image/fetch/$s_!zbL3!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F52915095-08f6-4280-a10c-03bebd2cb320_1540x706.png 848w, https://substackcdn.com/image/fetch/$s_!zbL3!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F52915095-08f6-4280-a10c-03bebd2cb320_1540x706.png 1272w, https://substackcdn.com/image/fetch/$s_!zbL3!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F52915095-08f6-4280-a10c-03bebd2cb320_1540x706.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 buttonBase-GK1x3M"><svg aria-hidden="true" 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" class="icon-noB79L"><g><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 buttonBase-GK1x3M"><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 icon-noB79L"><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><h3><span>Analogy</span></h3><p><span>A chef does not just taste each ingredient separately&#8230;</span></p><p><span>Before serving a dish, they cook the full recipe, taste the result, and confirm the combined flavors work together.</span></p><p><span>Integration testing is that final cook-and-taste step before the plate leaves the kitchen.</span></p><h3><span>Tradeoff</span></h3><p><span>Integration tests catch an entire class of bugs that unit tests are structurally incapable of finding: </span><em><span>serialization mismatches, transaction failures, auth token propagation errors.</span></em></p><p><span>But they are slower, need more infrastructure, and sensitive to environmental issues. One &#8220;flaky&#8221; dependency can make the entire suite unreliable.</span></p><h3><span>Why it matters</span></h3><p><span>In distributed systems, the bugs that cause the worst incidents rarely live inside a single function.</span></p><p><span>They live in the seams between systems. So keep a small, critical integration suite per workflow and run heavier scenarios on a nightly schedule.</span></p><h2><strong><span>5. End-to-End (E2E) Testing</span></strong></h2><blockquote><p><span>End-to-end testing validates a complete user journey through the entire system, exactly as a real user would experience it.</span></p></blockquote><p>Unlike integration tests, you hit the &#8220;real&#8221; API, which calls real services, writes to a real database, and returns a real response.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!L_ff!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Faf4f0d25-f17f-4c85-8de3-b4492676e1c8_2048x886.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!L_ff!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Faf4f0d25-f17f-4c85-8de3-b4492676e1c8_2048x886.png 424w, https://substackcdn.com/image/fetch/$s_!L_ff!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Faf4f0d25-f17f-4c85-8de3-b4492676e1c8_2048x886.png 848w, https://substackcdn.com/image/fetch/$s_!L_ff!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Faf4f0d25-f17f-4c85-8de3-b4492676e1c8_2048x886.png 1272w, https://substackcdn.com/image/fetch/$s_!L_ff!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Faf4f0d25-f17f-4c85-8de3-b4492676e1c8_2048x886.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!L_ff!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Faf4f0d25-f17f-4c85-8de3-b4492676e1c8_2048x886.png" width="1456" height="630" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/af4f0d25-f17f-4c85-8de3-b4492676e1c8_2048x886.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:630,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!L_ff!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Faf4f0d25-f17f-4c85-8de3-b4492676e1c8_2048x886.png 424w, https://substackcdn.com/image/fetch/$s_!L_ff!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Faf4f0d25-f17f-4c85-8de3-b4492676e1c8_2048x886.png 848w, https://substackcdn.com/image/fetch/$s_!L_ff!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Faf4f0d25-f17f-4c85-8de3-b4492676e1c8_2048x886.png 1272w, https://substackcdn.com/image/fetch/$s_!L_ff!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Faf4f0d25-f17f-4c85-8de3-b4492676e1c8_2048x886.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 buttonBase-GK1x3M"><svg aria-hidden="true" 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" class="icon-noB79L"><g><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 buttonBase-GK1x3M"><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 icon-noB79L"><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><h3><span>Analogy</span></h3><p><span>A car manufacturer does not just test the engine on a stand and/or the brakes on a rig.</span></p><p><span>Before shipping a vehicle, a test driver takes it on the road, through traffic, over speed bumps, at highway speed, to confirm the whole car behaves as designed in the real world.</span></p><h3><span>Tradeoff</span></h3><p><span>E2E tests are the most realistic tests you can run, which makes them the most trustworthy signal before a release.</span></p><p><span>But they are the most expensive to maintain. Flaky environments, test data management &amp; </span><em><span>slow</span></em><span> execution times make large E2E suites painful.</span></p><h3><span>Why it matters</span></h3><p><span>Individual services can all pass their own tests while the complete user journey still fails.</span></p><p><span>E2E tests are the last line of defense before users become your testers. Keep the suite small and focused on the most </span><em><span>critical</span></em><span> business journeys only.</span></p><h2><strong><span>6. Regression Testing</span></strong></h2><blockquote><p><span>Regression testing reruns a set of existing tests every time new code gets merged. This confirm nothing previously working has been </span><em><span>broken</span></em><span>.</span></p></blockquote><p><span>It&#8217;s less about testing new functionality &amp; more about protecting what </span><em><span>already</span></em><span> works.</span></p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!IdWu!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb406cf3a-1b83-4989-8a6d-f4243c090fe2_2048x1212.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!IdWu!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb406cf3a-1b83-4989-8a6d-f4243c090fe2_2048x1212.png 424w, https://substackcdn.com/image/fetch/$s_!IdWu!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb406cf3a-1b83-4989-8a6d-f4243c090fe2_2048x1212.png 848w, https://substackcdn.com/image/fetch/$s_!IdWu!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb406cf3a-1b83-4989-8a6d-f4243c090fe2_2048x1212.png 1272w, https://substackcdn.com/image/fetch/$s_!IdWu!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb406cf3a-1b83-4989-8a6d-f4243c090fe2_2048x1212.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!IdWu!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb406cf3a-1b83-4989-8a6d-f4243c090fe2_2048x1212.png" width="1456" height="862" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/b406cf3a-1b83-4989-8a6d-f4243c090fe2_2048x1212.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:862,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!IdWu!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb406cf3a-1b83-4989-8a6d-f4243c090fe2_2048x1212.png 424w, https://substackcdn.com/image/fetch/$s_!IdWu!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb406cf3a-1b83-4989-8a6d-f4243c090fe2_2048x1212.png 848w, https://substackcdn.com/image/fetch/$s_!IdWu!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb406cf3a-1b83-4989-8a6d-f4243c090fe2_2048x1212.png 1272w, https://substackcdn.com/image/fetch/$s_!IdWu!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb406cf3a-1b83-4989-8a6d-f4243c090fe2_2048x1212.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 buttonBase-GK1x3M"><svg aria-hidden="true" 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" class="icon-noB79L"><g><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 buttonBase-GK1x3M"><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 icon-noB79L"><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><h3><span>Analogy</span></h3><p><span>A musician who mastered a repertoire runs through it before every performance.</span></p><p><span>This is not to learn the pieces, but to catch any drift/forgotten fingering that crept in during recent practice of new material.</span></p><h3><span>Tradeoff</span></h3><p><span>Regression tests are the institutional memory of your API.</span></p><p><span>They compound in value over time, catching the </span><em><span>&#8220;should not have touched that&#8221; </span></em><span>changes.</span></p><p><span>Without discipline, a regression suite becomes slow &amp; unmaintainable.</span></p><h3><span>Why it matters</span></h3><p><span>The most common source of production bugs is not new features&#8230;but unintended side effects of changes to existing code.</span></p><p><span>Run regression tests automatically on every merge request &amp; block merges on failures.</span></p><h2><strong><span>7. Acceptance Testing</span></strong></h2><blockquote><p><span>Acceptance testing is the final verification the API delivers what was agreed upon before development began.</span></p></blockquote><p><span>It tests against business criteria &amp; user requirements, not just technical specifications.</span></p><p><span>The question is not </span><em><span>&#8220;does it work?&#8221;</span></em><span> but </span><em><span>&#8220;does it do what we promised?&#8221;</span></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_!zGBq!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F390fcd8c-dfa3-4c12-a5f2-02d7ad357008_2048x1177.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!zGBq!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F390fcd8c-dfa3-4c12-a5f2-02d7ad357008_2048x1177.png 424w, https://substackcdn.com/image/fetch/$s_!zGBq!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F390fcd8c-dfa3-4c12-a5f2-02d7ad357008_2048x1177.png 848w, https://substackcdn.com/image/fetch/$s_!zGBq!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F390fcd8c-dfa3-4c12-a5f2-02d7ad357008_2048x1177.png 1272w, https://substackcdn.com/image/fetch/$s_!zGBq!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F390fcd8c-dfa3-4c12-a5f2-02d7ad357008_2048x1177.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!zGBq!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F390fcd8c-dfa3-4c12-a5f2-02d7ad357008_2048x1177.png" width="1456" height="837" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/390fcd8c-dfa3-4c12-a5f2-02d7ad357008_2048x1177.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:837,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!zGBq!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F390fcd8c-dfa3-4c12-a5f2-02d7ad357008_2048x1177.png 424w, https://substackcdn.com/image/fetch/$s_!zGBq!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F390fcd8c-dfa3-4c12-a5f2-02d7ad357008_2048x1177.png 848w, https://substackcdn.com/image/fetch/$s_!zGBq!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F390fcd8c-dfa3-4c12-a5f2-02d7ad357008_2048x1177.png 1272w, https://substackcdn.com/image/fetch/$s_!zGBq!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F390fcd8c-dfa3-4c12-a5f2-02d7ad357008_2048x1177.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 buttonBase-GK1x3M"><svg aria-hidden="true" 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" class="icon-noB79L"><g><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 buttonBase-GK1x3M"><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 icon-noB79L"><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><h3><span>Analogy</span></h3><p><span>A tailor finishing a bespoke suit does not just check the stitching.</span></p><p><span>They have the client try it on against the original measurements &amp; requirements.</span></p><p><span>The technical craft could be perfect, but if the suit does not fit the client&#8217;s needs,,, the job is not done.</span></p><h3><span>Tradeoff</span></h3><p><span>Acceptance tests provide the highest level of business confidence of any testing type.</span></p><p><span>They close the gap between a technical specification &amp; a business requirement.</span></p><p><span>But they require close collaboration between technical &amp; non-technical stakeholders. Plus, they are too slow and coarse to run on every commit.</span></p><h3><span>Why it matters</span></h3><p><span>Teams can spend weeks building an API that works perfectly from a technical standpoint but completely misses the actual business need&#8230;</span></p><p><span>Use acceptance tests as the final sign-off before a feature ships to production.</span></p><h4 style="text-align: center;"><strong>&#167;</strong></h4><div class="callout-block" data-callout="true"><p style="text-align: center;"><em><strong><span data-color="#3a7bf9" style="color: rgb(58, 123, 249);">Reminder: this is a teaser of the subscriber-only newsletter, exclusive to my golden members.</span></strong></em></p><p>When you upgrade, you&#8217;ll get:</p><ul><li><p><strong>High-level architecture of real-world systems.</strong></p></li><li><p>Deep dive into how popular real-world systems work.</p></li><li><p><strong>How real-world systems handle scale, reliability, and performance.</strong></p></li></ul><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://newsletter.systemdesign.one/subscribe&quot;,&quot;text&quot;:&quot;Unlock Full Access&quot;,&quot;action&quot;:null,&quot;class&quot;:&quot;button-wrapper&quot;}" data-component-name="ButtonCreateButton"><a class="button primary button-wrapper" href="https://newsletter.systemdesign.one/subscribe"><span>Unlock Full Access</span></a></p><p>(If this newsletter has helped you become a better software engineer, consider subscribing to support my work.)</p></div><h4 style="text-align: center;"><strong>&#167;</strong></h4><h2><strong><span>8. Negative Testing</span></strong></h2>
      <p>
          <a href="https://newsletter.systemdesign.one/p/api-testing-types">
              Read more
          </a>
      </p>
   ]]></content:encoded></item><item><title><![CDATA[How CI/CD Works - A Deep Dive]]></title><description><![CDATA[#172: Part 4 - DevOps Mastermind]]></description><link>https://newsletter.systemdesign.one/p/how-does-a-ci-cd-pipeline-work</link><guid isPermaLink="false">https://newsletter.systemdesign.one/p/how-does-a-ci-cd-pipeline-work</guid><dc:creator><![CDATA[Ayaan]]></dc:creator><pubDate>Fri, 28 Aug 2026 14:40:22 GMT</pubDate><enclosure url="https://substack-post-media.s3.amazonaws.com/public/images/68279ba3-7546-414f-aa94-dcf219004831_1280x720.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p></p><p></p><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://newsletter.systemdesign.one/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"><span data-color="#3a7bf9" style="color: rgb(58, 123, 249);">Get my system design playbook for FREE on newsletter signup:</span></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><ul><li><p><em><a href="https://newsletter.systemdesign.one/p/how-does-a-ci-cd-pipeline-work/?action=share">Share this letter</a> &amp; I&#8217;ll send you some rewards for the referrals.</em></p></li></ul><div><hr></div><p><span>Engineers still joke about not deploying on Fridays for a reason.</span></p><p><span>For a long time, deployments were one of the riskiest parts of software delivery. They were mostly manual. Engineers logged into production servers, made the required changes &amp; restarted services.</span></p><p><span>A tiny mistake could easily cause problems.</span></p><p><span>If a deployment failed, finding the cause meant retracing every step by hand. There was hardly an audit trail, a rollback plan, or even a clear record of what had changed.</span></p><p><span>For tiny teams, this was usually enough&#8230;</span></p><p><span>Deployments were infrequent, infrastructure was relatively simple, and a single engineer </span><em><span>often</span></em><span> understood the entire process from start to finish.</span></p><p><span>But as software teams grew, release cycles got shorter, and deployment frequency increased. What used to happen once a month started happening weekly, then daily, and eventually many times a day. The more often teams released software, the more opportunities for human error emerged.</span></p><p><span>Tiny mistakes could bring production down:</span></p><p><span>A missed command, a forgotten environment variable, or a deployment differing slightly from the previous one was often enough.</span></p><p><span>Teams reduced this risk through runbooks, deployment checklists, and planned release windows. Those practices helped. Yet they did not solve the underlying problem. The process was still manual, and manual processes become harder to manage as systems and teams grow.</span></p><p><span>CI/CD emerged as a response to these challenges &amp; became a </span><em><span>fundamental</span></em><span> part of modern software delivery.</span></p><p><span>Instead of relying on engineers to repeat the same sequence of steps, CI/CD turns those steps into an automated pipeline. Every change follows the same path. Code gets built, tested, packaged &amp; deployed the same way every time. This reduces the risk of deployment errors and makes releases more predictable.</span></p><p><span>The goal is simple:</span></p><p><em><span>Move changes from a developer&#8217;s machine to production quickly and safely.</span></em></p><p><span>But CI/CD is not a single tool/single process&#8230;It&#8217;s a collection of systems working together:</span></p><ul><li><p><span>Source control systems trigger pipelines.</span></p></li><li><p><span>Build stages create deployable artifacts</span><a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-1" href="#footnote-1" target="_self">1</a><span>.</span></p></li><li><p><span>Deployment stages promote those artifacts across environments.</span></p></li><li><p><span>And safe deployments depend on more than automation.</span></p></li></ul><p><span>They also require security checks, approval gates, rollback</span><a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-2" href="#footnote-2" target="_self">2</a><span> mechanisms, and monitoring.</span></p><p><span>Most engineers interact with CI/CD every day. They push code, wait for checks to pass, and watch deployments complete. What they rarely see is everything happening underneath&#8230;</span></p><p><span>Onward.</span></p><h4 style="text-align: center;"><strong>&#167;</strong></h4><div class="callout-block" data-callout="true"><h3><strong><a href="https://getunblocked.com/events/how-to-stop-babysitting-your-agents/?utm_source=systemdesign&amp;utm_medium=email&amp;utm_campaign=primary">[Webinar] How to stop babysitting your agents (Partner)</a></strong></h3><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://getunblocked.com/events/how-to-stop-babysitting-your-agents/?utm_source=systemdesign&amp;utm_medium=email&amp;utm_campaign=primary" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!6-MH!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9c3f24c4-3b04-4fed-a672-96dc40e8b12b_1600x900.png 424w, https://substackcdn.com/image/fetch/$s_!6-MH!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9c3f24c4-3b04-4fed-a672-96dc40e8b12b_1600x900.png 848w, https://substackcdn.com/image/fetch/$s_!6-MH!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9c3f24c4-3b04-4fed-a672-96dc40e8b12b_1600x900.png 1272w, https://substackcdn.com/image/fetch/$s_!6-MH!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9c3f24c4-3b04-4fed-a672-96dc40e8b12b_1600x900.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!6-MH!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9c3f24c4-3b04-4fed-a672-96dc40e8b12b_1600x900.png" width="1456" height="819" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/9c3f24c4-3b04-4fed-a672-96dc40e8b12b_1600x900.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:819,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:272266,&quot;alt&quot;:&quot;&quot;,&quot;title&quot;:&quot;&quot;,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:&quot;https://getunblocked.com/events/how-to-stop-babysitting-your-agents/?utm_source=systemdesign&amp;utm_medium=email&amp;utm_campaign=primary&quot;,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://newsletter.systemdesign.one/i/209258689?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9c3f24c4-3b04-4fed-a672-96dc40e8b12b_1600x900.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" title="" srcset="https://substackcdn.com/image/fetch/$s_!6-MH!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9c3f24c4-3b04-4fed-a672-96dc40e8b12b_1600x900.png 424w, https://substackcdn.com/image/fetch/$s_!6-MH!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9c3f24c4-3b04-4fed-a672-96dc40e8b12b_1600x900.png 848w, https://substackcdn.com/image/fetch/$s_!6-MH!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9c3f24c4-3b04-4fed-a672-96dc40e8b12b_1600x900.png 1272w, https://substackcdn.com/image/fetch/$s_!6-MH!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9c3f24c4-3b04-4fed-a672-96dc40e8b12b_1600x900.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 buttonBase-GK1x3M"><svg aria-hidden="true" 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" class="icon-noB79L"><g><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 buttonBase-GK1x3M"><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 icon-noB79L"><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>Agents can generate code. Getting it right for your system, team conventions, and past decisions is the hard part. You end up wasting time and tokens in correction loops.</p><p>More MCPs give agents access to information, but not understanding. The teams pulling ahead use a context layer to give agents exactly what they need.</p><p><a href="https://getunblocked.com/events/how-to-stop-babysitting-your-agents/?utm_source=systemdesign&amp;utm_medium=email&amp;utm_campaign=primary">Join live on Sep 2 (FREE)</a><span> to see:</span></p><ul><li><p>Where teams get stuck on the AI maturity curve</p></li><li><p>How a context layer solves for quality, efficiency, and cost</p></li><li><p>Live demo: the same coding task with and without a context layer</p></li></ul><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://getunblocked.com/events/how-to-stop-babysitting-your-agents/?utm_source=systemdesign&amp;utm_medium=email&amp;utm_campaign=primary&quot;,&quot;text&quot;:&quot;Register Now&quot;,&quot;action&quot;:null,&quot;class&quot;:&quot;button-wrapper&quot;}" data-component-name="ButtonCreateButton"><a class="button primary button-wrapper" href="https://getunblocked.com/events/how-to-stop-babysitting-your-agents/?utm_source=systemdesign&amp;utm_medium=email&amp;utm_campaign=primary"><span>Register Now</span></a></p><p><em><span>(Thanks to </span><a href="https://getunblocked.com/events/how-to-stop-babysitting-your-agents/?utm_source=systemdesign&amp;utm_medium=email&amp;utm_campaign=primary">Unblocked</a><span> for partnering on this newsletter.)</span></em></p></div><h4 style="text-align: center;"><strong>&#167;</strong></h4><p><span>I want to introduce </span><strong><a href="https://x.com/twtayaan">Ayaan</a></strong><span> as a guest author.</span></p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://x.com/twtayaan" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!GCV8!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5d442f35-0ac7-4552-bd87-66962939694d_2048x1024.png 424w, https://substackcdn.com/image/fetch/$s_!GCV8!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5d442f35-0ac7-4552-bd87-66962939694d_2048x1024.png 848w, https://substackcdn.com/image/fetch/$s_!GCV8!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5d442f35-0ac7-4552-bd87-66962939694d_2048x1024.png 1272w, https://substackcdn.com/image/fetch/$s_!GCV8!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5d442f35-0ac7-4552-bd87-66962939694d_2048x1024.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!GCV8!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5d442f35-0ac7-4552-bd87-66962939694d_2048x1024.png" width="1456" height="728" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/5d442f35-0ac7-4552-bd87-66962939694d_2048x1024.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:728,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;&quot;,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:&quot;https://x.com/twtayaan&quot;,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" title="" srcset="https://substackcdn.com/image/fetch/$s_!GCV8!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5d442f35-0ac7-4552-bd87-66962939694d_2048x1024.png 424w, https://substackcdn.com/image/fetch/$s_!GCV8!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5d442f35-0ac7-4552-bd87-66962939694d_2048x1024.png 848w, https://substackcdn.com/image/fetch/$s_!GCV8!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5d442f35-0ac7-4552-bd87-66962939694d_2048x1024.png 1272w, https://substackcdn.com/image/fetch/$s_!GCV8!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5d442f35-0ac7-4552-bd87-66962939694d_2048x1024.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 buttonBase-GK1x3M"><svg aria-hidden="true" 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" class="icon-noB79L"><g><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 buttonBase-GK1x3M"><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 icon-noB79L"><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><span>He&#8217;s a </span><strong>Certified Kubernetes Administrator (CKA)</strong><span> who writes about Kubernetes, cloud infrastructure, and cloud-native systems. He builds in public and shares practical tips, projects, and lessons learned along the way.</span></p><p>Check out his work &amp; socials:</p><ul><li><p><a href="https://x.com/twtayaan">Twitter</a></p></li><li><p><a href="https://github.com/Ayaan49">Github</a></p></li></ul><h4 style="text-align: center;"><strong>&#167;</strong></h4><p><em><strong>Here&#8217;s what you&#8217;ll find inside this newsletter:</strong></em></p><ul><li><p><strong>What actually happens after you push code.</strong> The full path from a Git commit to the build, test, release, and deployment stages that eventually put your application in front of real users.</p></li><li><p><strong>Why the same release can survive staging and still break production.</strong> How artifacts, environment parity, deployment strategies, and rollback decisions determine whether a release is repeatable or becomes an incident.</p></li><li><p><strong>The machinery underneath every pipeline run.</strong> What runners, triggers, registries, approval gates, Pipeline as Code, secrets, and software supply-chain controls are doing while you wait for that green checkmark.</p></li><li><p><strong>A successful deployment can still be a failed release.</strong> Health checks, smoke tests, latency and error signals, business metrics, and SLOs that reveal what happened after real traffic reached the new version.</p></li><li><p><strong>Why mature CI/CD pipelines eventually lead to GitOps.</strong> Where traditional pipelines stop, how production drift appears after deployment, and the architectural problem GitOps is designed to solve next.</p></li></ul><p></p><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://newsletter.systemdesign.one/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"><span data-color="#3a7bf9" style="color: rgb(58, 123, 249);">Golden members get all letters like these!&#8230;</span></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><h4 style="text-align: center;"><strong>&#167;</strong></h4><h2><span>What CI/CD Actually Means</span></h2><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!-SZB!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Faec45b68-d1b3-4203-b86a-85e353a1c3ab_1693x929.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!-SZB!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Faec45b68-d1b3-4203-b86a-85e353a1c3ab_1693x929.png 424w, https://substackcdn.com/image/fetch/$s_!-SZB!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Faec45b68-d1b3-4203-b86a-85e353a1c3ab_1693x929.png 848w, https://substackcdn.com/image/fetch/$s_!-SZB!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Faec45b68-d1b3-4203-b86a-85e353a1c3ab_1693x929.png 1272w, https://substackcdn.com/image/fetch/$s_!-SZB!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Faec45b68-d1b3-4203-b86a-85e353a1c3ab_1693x929.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!-SZB!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Faec45b68-d1b3-4203-b86a-85e353a1c3ab_1693x929.png" width="1456" height="799" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/aec45b68-d1b3-4203-b86a-85e353a1c3ab_1693x929.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:799,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!-SZB!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Faec45b68-d1b3-4203-b86a-85e353a1c3ab_1693x929.png 424w, https://substackcdn.com/image/fetch/$s_!-SZB!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Faec45b68-d1b3-4203-b86a-85e353a1c3ab_1693x929.png 848w, https://substackcdn.com/image/fetch/$s_!-SZB!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Faec45b68-d1b3-4203-b86a-85e353a1c3ab_1693x929.png 1272w, https://substackcdn.com/image/fetch/$s_!-SZB!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Faec45b68-d1b3-4203-b86a-85e353a1c3ab_1693x929.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 buttonBase-GK1x3M"><svg aria-hidden="true" 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" class="icon-noB79L"><g><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 buttonBase-GK1x3M"><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 icon-noB79L"><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><span>CI/CD is often used as a single term, but it refers to three distinct practices&#8230;</span></p><p><span>Each one solves a &#8220;different&#8221; problem&#8230;Treating them as one concept makes it harder to understand why pipelines are designed the way they are.</span></p><h3><span>Continuous Integration</span></h3><p><span>Continuous Integration (</span><strong><span>CI</span></strong><span>) is the practice of frequently merging code changes into a shared branch, often many times a day.</span></p><p><span>Each merge triggers an automated build &amp; a test suite. If the build breaks/tests fail, the team knows immediately.</span></p><p><span>Before CI, developers often worked on separate branches for days/weeks before merging. When they finally did, the differences had grown large enough to cause serious conflict. Integration became its own painful phase at the end of development.</span></p><p><span>This is called </span><em><span>merge hell</span></em><span>.</span></p><p><span>CI eliminates this phase by keeping integration &#8220;continuous&#8221;.</span></p><p><span>Small, frequent merges mean smaller conflicts. Automated checks catch broken code before it reaches anyone else. The branch stays stable, and the team can always see what is actually working.</span></p><h3><span>Continuous Delivery</span></h3><p><span>Continuous Delivery (</span><strong><span>CD</span></strong><span>) extends CI one step further:</span></p><p><span>It ensures every change passing through the pipeline is in a </span><em><span>releasable</span></em><span> state. Not eventually releasable but releasable right now.</span></p><p><span>A passing test suite alone is NOT enough. The code must be built into a deployable artifact. It must also be tested in a production-like environment and pass quality and security checks. Every stage gates the next one. A failure at any point stops the change from moving forward.</span></p><p><span>The keyword here is delivery, not deployment.</span></p><p><span>The pipeline brings the change to the production door, but a human still decides when to open it. This final approval step is intentional. Some teams need it for compliance, change management, and/or business coordination.</span></p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://newsletter.systemdesign.one/p/how-does-a-ci-cd-pipeline-work?utm_source=substack&utm_medium=email&utm_content=share&action=share&quot;,&quot;text&quot;:&quot;Share&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://newsletter.systemdesign.one/p/how-does-a-ci-cd-pipeline-work?utm_source=substack&utm_medium=email&utm_content=share&action=share"><span>Share</span></a></p><h3><span>Continuous Deployment</span></h3><p><span>Continuous Deployment removes the final manual step from the process.</span></p><p><span>Every change passing through the pipeline goes to production automatically. No human approval is required!</span></p><p><span>This is the furthest point on the spectrum, and not every team reaches it/needs to. It requires a high degree of confidence in the pipeline itself.</span></p><ul><li><p><span>Tests must be comprehensive.</span></p></li><li><p><span>Rollback mechanisms must be fast &amp; reliable.</span></p></li><li><p><span>Monitoring must catch regressions</span><a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-3" href="#footnote-3" target="_self">3</a><span> quickly after release.</span></p></li></ul><p><span>Most organizations operate somewhere between Delivery &amp; Deployment rather than at either extreme.</span></p><p><span>Teams operating at this level often deploy dozens/hundreds of times a day. The pipeline becomes the gating mechanism entirely.</span></p><p><span>The distinction between Delivery and Deployment comes down to this final approval step. Delivery keeps a human in the loop before production. Deployment automates the decision entirely. Both approaches are valid.</span></p><p><span>Now we understand the terminology, let&#8217;s look at the anatomy of the pipeline itself&#8230;</span></p><h4 style="text-align: center;"><strong>&#167;</strong></h4><h2><span>Anatomy of a Pipeline</span></h2><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!bPIz!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe3bf1a82-f26b-44de-b4d6-51a2ff66cb0f_1774x887.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!bPIz!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe3bf1a82-f26b-44de-b4d6-51a2ff66cb0f_1774x887.png 424w, https://substackcdn.com/image/fetch/$s_!bPIz!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe3bf1a82-f26b-44de-b4d6-51a2ff66cb0f_1774x887.png 848w, https://substackcdn.com/image/fetch/$s_!bPIz!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe3bf1a82-f26b-44de-b4d6-51a2ff66cb0f_1774x887.png 1272w, https://substackcdn.com/image/fetch/$s_!bPIz!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe3bf1a82-f26b-44de-b4d6-51a2ff66cb0f_1774x887.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!bPIz!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe3bf1a82-f26b-44de-b4d6-51a2ff66cb0f_1774x887.png" width="1456" height="728" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/e3bf1a82-f26b-44de-b4d6-51a2ff66cb0f_1774x887.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:728,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!bPIz!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe3bf1a82-f26b-44de-b4d6-51a2ff66cb0f_1774x887.png 424w, https://substackcdn.com/image/fetch/$s_!bPIz!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe3bf1a82-f26b-44de-b4d6-51a2ff66cb0f_1774x887.png 848w, https://substackcdn.com/image/fetch/$s_!bPIz!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe3bf1a82-f26b-44de-b4d6-51a2ff66cb0f_1774x887.png 1272w, https://substackcdn.com/image/fetch/$s_!bPIz!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe3bf1a82-f26b-44de-b4d6-51a2ff66cb0f_1774x887.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 buttonBase-GK1x3M"><svg aria-hidden="true" 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" class="icon-noB79L"><g><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 buttonBase-GK1x3M"><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 icon-noB79L"><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><span>A pipeline is a series of automated stages that a code change must pass through before it reaches production.</span></p><p><span>Each stage is a gate. Fail one, and the change stops there. Pass all of them, and you'll have a verified, deployable artifact ready for users.</span></p><p><span>Most pipelines follow the same fundamental sequence regardless of the tool. The stages have different names across GitHub Actions, GitLab CI, and Jenkins, but the underlying structure is always the same&#8230;</span></p><p><span>Let&#8217;s walk through each stage:</span></p><h3><span>1. Source Stage</span></h3><p><span>Everything starts with a commit.</span></p><p><span>When you push code to a branch, a webhook</span><a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-4" href="#footnote-4" target="_self">4</a><span> fires and the pipeline starts automatically. No manual trigger needed. This push signals that something has changed &amp; needs to be validated.</span></p><p><span>Git is the universal standard here.</span></p><p><span>But the branch strategy your team uses shapes how the pipeline behaves:</span></p><ul><li><p><strong><span>Trunk-based development</span></strong><span>: Everyone commits directly to a single main branch, often many times a day. Pipelines run on every push. Problems surface fast, but this approach requires strong test coverage and feature flags</span><a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-5" href="#footnote-5" target="_self">5</a><span> to hide incomplete work.</span></p></li><li><p><strong><span>Feature branches</span></strong><span>: Developers work in isolation and merge when ready. The pipeline runs on the branch first, then again after the merge. Safer, but long-lived branches delay integration.</span></p></li><li><p><strong><span>GitFlow</span></strong><span>: Long-lived branches for features, releases, and hotfixes. Each type triggers different pipeline behavior. Strong structure, but slower path to production.</span></p></li></ul><h3><span>2. Build Stage</span></h3><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!3w7o!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7f78a925-7ff9-4fba-8f12-697abf2e3aa7_1774x887.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!3w7o!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7f78a925-7ff9-4fba-8f12-697abf2e3aa7_1774x887.png 424w, https://substackcdn.com/image/fetch/$s_!3w7o!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7f78a925-7ff9-4fba-8f12-697abf2e3aa7_1774x887.png 848w, https://substackcdn.com/image/fetch/$s_!3w7o!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7f78a925-7ff9-4fba-8f12-697abf2e3aa7_1774x887.png 1272w, https://substackcdn.com/image/fetch/$s_!3w7o!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7f78a925-7ff9-4fba-8f12-697abf2e3aa7_1774x887.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!3w7o!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7f78a925-7ff9-4fba-8f12-697abf2e3aa7_1774x887.png" width="1456" height="728" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/7f78a925-7ff9-4fba-8f12-697abf2e3aa7_1774x887.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:728,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!3w7o!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7f78a925-7ff9-4fba-8f12-697abf2e3aa7_1774x887.png 424w, https://substackcdn.com/image/fetch/$s_!3w7o!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7f78a925-7ff9-4fba-8f12-697abf2e3aa7_1774x887.png 848w, https://substackcdn.com/image/fetch/$s_!3w7o!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7f78a925-7ff9-4fba-8f12-697abf2e3aa7_1774x887.png 1272w, https://substackcdn.com/image/fetch/$s_!3w7o!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7f78a925-7ff9-4fba-8f12-697abf2e3aa7_1774x887.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 buttonBase-GK1x3M"><svg aria-hidden="true" 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" class="icon-noB79L"><g><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 buttonBase-GK1x3M"><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 icon-noB79L"><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><span>The build stage turns source code into something deployable.</span></p><p><span>Dependencies are resolved, code is compiled, and an artifact is produced. This artifact is the immutable output of the build. It could be a Docker image, a JAR file, or a compiled binary. The exact form depends on the stack, but the principle never changes.</span></p><p><span>Build once, deploy everywhere&#8230;</span></p><p><span>The artifact produced here moves through every environment unchanged. Nothing gets rebuilt for staging, and nothing gets rebuilt for production. Rebuilding introduces drift, and drift means what you tested is no longer what you shipped. The same artifact passing the tests in CI must be the exact artifact running in production.</span></p><p><span>Build speed matters too&#8230;A slow build is one that developers start routing around.</span></p><p><span>Here are two ways to keep it fast:</span></p><ul><li><p><strong><span>Dependency caching</span></strong><span>: Stores resolved packages between runs. Dependencies change far less often than source code, so caching them cuts significant time off every build.</span></p></li><li><p><strong><span>Docker layer caching</span></strong><span>: Reuses unchanged image layers. If the base image and dependency steps haven&#8217;t changed, the build skips straight to copying the new source. The key is to order your Dockerfile from least to most frequently changed.</span></p></li></ul><p><span>The build stage ends when a versioned, immutable artifact exists and is ready to be tested&#8230;</span></p><h3><span>3. Test Stage</span></h3><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!LqTY!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F72dbd627-da33-4140-a631-6c6fa24eca32_1536x1024.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!LqTY!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F72dbd627-da33-4140-a631-6c6fa24eca32_1536x1024.png 424w, https://substackcdn.com/image/fetch/$s_!LqTY!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F72dbd627-da33-4140-a631-6c6fa24eca32_1536x1024.png 848w, https://substackcdn.com/image/fetch/$s_!LqTY!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F72dbd627-da33-4140-a631-6c6fa24eca32_1536x1024.png 1272w, https://substackcdn.com/image/fetch/$s_!LqTY!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F72dbd627-da33-4140-a631-6c6fa24eca32_1536x1024.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!LqTY!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F72dbd627-da33-4140-a631-6c6fa24eca32_1536x1024.png" width="1456" height="971" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/72dbd627-da33-4140-a631-6c6fa24eca32_1536x1024.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:971,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!LqTY!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F72dbd627-da33-4140-a631-6c6fa24eca32_1536x1024.png 424w, https://substackcdn.com/image/fetch/$s_!LqTY!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F72dbd627-da33-4140-a631-6c6fa24eca32_1536x1024.png 848w, https://substackcdn.com/image/fetch/$s_!LqTY!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F72dbd627-da33-4140-a631-6c6fa24eca32_1536x1024.png 1272w, https://substackcdn.com/image/fetch/$s_!LqTY!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F72dbd627-da33-4140-a631-6c6fa24eca32_1536x1024.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 buttonBase-GK1x3M"><svg aria-hidden="true" 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" class="icon-noB79L"><g><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 buttonBase-GK1x3M"><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 icon-noB79L"><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><span>The test stage validates whether the artifact actually works.</span></p><p><span>Automated tests run against it to catch problems before they reach users. The goal is not to run every possible test. But to run the right tests in the right order so obvious problems fail fast, and expensive checks come later.</span></p><p><span>The test pyramid describes how to think about this:</span></p><ul><li><p><strong><span>Unit tests</span></strong><span> sit at the base. They are fast, isolated, and numerous. A suite of a thousand unit tests can be completed in a minute or less. They catch logic errors at the function level and should make up the majority of your test coverage.</span></p></li><li><p><strong><span>Integration tests</span></strong><span> sit in the middle. They test how components interact with each other, with services, and with databases. Slower and more expensive to maintain, but they catch problems undetected by unit tests.</span></p></li><li><p><strong><span>End-to-end tests</span></strong><span> sit at the top. They simulate real user behavior through the full system. Use them sparingly, focused only on the most critical paths.</span></p></li></ul><p><span>Fast feedback is not optional&#8230;</span></p><p><span>A pipeline taking 45 minutes to report a failure is the one developers stop trusting. They push &amp; move on. By the time it reports back, they have lost the context to fix it. Most teams target a feedback window of 10 minutes or less for the core suite.</span></p><p><span>Here are two techniques to keep test time manageable as the codebase grows:</span></p><ul><li><p><strong><span>Parallel jobs</span></strong><span>: Splits the suite across different runners executing at the same time. Instead of 500 tests running sequentially on one machine, 100 tests run on five machines simultaneously.</span></p></li><li><p><strong><span>Test sharding</span></strong><span>: Partitions the suite so each runner covers a different subset. Combined with parallel runners, this scales well even for large codebases.</span></p></li></ul><p><span>Test failures are intentional gates.</span></p><p><span>They exist to stop bad changes. A pipeline not failing doesn&#8217;t mean it&#8217;s a healthy pipeline. It just means it is not catching anything&#8230;</span></p><h3><span>4. Release Stage</span></h3><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!QPZE!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Feec698a3-6ae6-4574-8907-d8bbf394fd31_1536x1024.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!QPZE!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Feec698a3-6ae6-4574-8907-d8bbf394fd31_1536x1024.png 424w, https://substackcdn.com/image/fetch/$s_!QPZE!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Feec698a3-6ae6-4574-8907-d8bbf394fd31_1536x1024.png 848w, https://substackcdn.com/image/fetch/$s_!QPZE!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Feec698a3-6ae6-4574-8907-d8bbf394fd31_1536x1024.png 1272w, https://substackcdn.com/image/fetch/$s_!QPZE!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Feec698a3-6ae6-4574-8907-d8bbf394fd31_1536x1024.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!QPZE!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Feec698a3-6ae6-4574-8907-d8bbf394fd31_1536x1024.png" width="1456" height="971" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/eec698a3-6ae6-4574-8907-d8bbf394fd31_1536x1024.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:971,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!QPZE!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Feec698a3-6ae6-4574-8907-d8bbf394fd31_1536x1024.png 424w, https://substackcdn.com/image/fetch/$s_!QPZE!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Feec698a3-6ae6-4574-8907-d8bbf394fd31_1536x1024.png 848w, https://substackcdn.com/image/fetch/$s_!QPZE!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Feec698a3-6ae6-4574-8907-d8bbf394fd31_1536x1024.png 1272w, https://substackcdn.com/image/fetch/$s_!QPZE!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Feec698a3-6ae6-4574-8907-d8bbf394fd31_1536x1024.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 buttonBase-GK1x3M"><svg aria-hidden="true" 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" class="icon-noB79L"><g><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 buttonBase-GK1x3M"><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 icon-noB79L"><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><span>Once the artifact is tested, it needs to be stored and versioned before it can be deployed anywhere&#8230; The artifact is pushed to a registry. </span></p><p><span>Here are some popular </span>registries:</p><ul><li><p><span>Docker Hub</span></p></li><li><p><span>Amazon Elastic Container Registry (</span><strong><span>ECR</span></strong><span>)</span></p></li><li><p><span>Google Artifact Registry</span></p></li><li><p><span>JFrog Artifactory</span></p></li></ul><p><span>The registry is the central store from which every environment pulls.</span></p><p><span>Without it, there is no consistent source of truth for what gets deployed&#8230;</span></p><p><span>Here are two versioning practices that matter here:</span></p><ul><li><p><strong><span>Semantic versioning</span></strong><a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-6" href="#footnote-6" target="_self">6</a><span>. Major, minor, and patch numbers give each artifact a meaningful identifier. Teams can see at a glance what kind of change they are deploying.</span></p></li><li><p><strong><span>Immutable tags</span></strong><span>. A given tag should always point to the same artifact. Never use the latest in production pipelines. latest is a mutable pointer. It moves every time you push. A deployment pinned to latest six months ago would pull a completely different image today. Pin to a specific version tag, or a content digest</span><a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-7" href="#footnote-7" target="_self">7</a><span>.</span></p></li></ul><p><span>At the end of this stage, the artifact is deployment-ready&#8230; versioned, stored, verified. </span></p><p><span>But it has not reached any environment yet&#8230;</span></p><h3><span>5. Deploy Stage</span></h3><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!C_5H!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7cb9f4de-b41d-4e37-9427-70acbdc8e7f8_1536x1024.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!C_5H!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7cb9f4de-b41d-4e37-9427-70acbdc8e7f8_1536x1024.png 424w, https://substackcdn.com/image/fetch/$s_!C_5H!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7cb9f4de-b41d-4e37-9427-70acbdc8e7f8_1536x1024.png 848w, https://substackcdn.com/image/fetch/$s_!C_5H!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7cb9f4de-b41d-4e37-9427-70acbdc8e7f8_1536x1024.png 1272w, https://substackcdn.com/image/fetch/$s_!C_5H!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7cb9f4de-b41d-4e37-9427-70acbdc8e7f8_1536x1024.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!C_5H!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7cb9f4de-b41d-4e37-9427-70acbdc8e7f8_1536x1024.png" width="1456" height="971" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/7cb9f4de-b41d-4e37-9427-70acbdc8e7f8_1536x1024.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:971,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!C_5H!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7cb9f4de-b41d-4e37-9427-70acbdc8e7f8_1536x1024.png 424w, https://substackcdn.com/image/fetch/$s_!C_5H!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7cb9f4de-b41d-4e37-9427-70acbdc8e7f8_1536x1024.png 848w, https://substackcdn.com/image/fetch/$s_!C_5H!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7cb9f4de-b41d-4e37-9427-70acbdc8e7f8_1536x1024.png 1272w, https://substackcdn.com/image/fetch/$s_!C_5H!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7cb9f4de-b41d-4e37-9427-70acbdc8e7f8_1536x1024.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 buttonBase-GK1x3M"><svg aria-hidden="true" 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" class="icon-noB79L"><g><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 buttonBase-GK1x3M"><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 icon-noB79L"><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><span>The deploy stage takes the verified artifact &amp; makes it available to users.</span></p><p><span>By this point, the artifact has already been built, tested &amp; stored in a registry. The deploy stage takes that artifact and releases it into a target environment.</span></p><p><span>This stage often includes approval gates, deployment policies, and infrastructure-specific tasks. Some teams deploy automatically&#8230;others require manual approval before production changes can proceed.</span></p><p><span>Deployments can also involve additional work beyond simply starting a new application version:</span></p><ul><li><p><span>Database migrations</span><a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-8" href="#footnote-8" target="_self">8</a><span> would need to run first.</span></p></li><li><p><span>Configuration changes </span>would<span> need to be applied.</span></p></li><li><p><span>Infrastructure resources </span>would<span> need to be updated.</span></p></li></ul><p><span>The deploy stage is where the pipeline stops validating the artifact &amp; starts delivering it.</span></p><h3><span>Pipeline Runners</span></h3><p><span>The pipeline defines the work, and runners execute it.</span></p><p><span>A </span><em><span>runner</span></em><span> is the compute environment where pipeline jobs run. GitHub Actions runners, GitLab runners, and Jenkins agents all serve this role. When a stage is triggered, the platform schedules its jobs onto available runners. Each job runs in an isolated environment, completes its steps, and reports the result back.</span></p><p><span>Runners come in two forms:</span></p><ul><li><p><strong><span>Platform-managed runners</span></strong><span>: These get provisioned by the CI/CD provider. You define the job, and the platform handles the infrastructure. Less control over the environment, but no infrastructure to maintain.</span></p></li><li><p><strong><span>Self-hosted runners</span></strong><span>: They run on your own machines. Teams use them when they need specific hardware, internal network access, and/or more control over the build environment. The tradeoff is you have to own the maintenance &amp; scaling.</span></p></li></ul><p><span>Every build, every test run, and every deployment runs on a runner somewhere.</span></p><p><span>Slow/overloaded runners are a common cause of slow pipelines, even when the rest of the system works as expected.</span></p><p><span>Each stage serves a purpose. Together, they turn a code change into a tested, versioned, and deployable release.</span></p><p><span>But a pipeline is more than a collection of stages. Teams also need a reliable way to define how those stages work &amp; evolve over time&#8230;</span></p><h4 style="text-align: center;"><strong>&#167;</strong></h4><div class="callout-block" data-callout="true"><p style="text-align: center;"><em><strong><span data-color="#3a7bf9" style="color: rgb(58, 123, 249);">Reminder: this is a teaser of the subscriber-only newsletter, exclusive to my golden members.</span></strong></em></p><p>When you upgrade, you&#8217;ll get:</p><ul><li><p><strong>High-level architecture of real-world systems.</strong></p></li><li><p>Deep dive into how popular real-world systems work.</p></li><li><p><strong>How real-world systems handle scale, reliability, and performance.</strong></p></li></ul><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://newsletter.systemdesign.one/subscribe&quot;,&quot;text&quot;:&quot;Unlock Full Access&quot;,&quot;action&quot;:null,&quot;class&quot;:&quot;button-wrapper&quot;}" data-component-name="ButtonCreateButton"><a class="button primary button-wrapper" href="https://newsletter.systemdesign.one/subscribe"><span>Unlock Full Access</span></a></p><p>(If this newsletter has helped you become a better software engineer, consider subscribing to support my work.)</p></div><h4 style="text-align: center;"><strong>&#167;</strong></h4><h2><span>Pipeline as Code</span></h2>
      <p>
          <a href="https://newsletter.systemdesign.one/p/how-does-a-ci-cd-pipeline-work">
              Read more
          </a>
      </p>
   ]]></content:encoded></item><item><title><![CDATA[Fine Tuning: A Deep Dive]]></title><description><![CDATA[#171: The Fine-Tuning Guide That Will Change How You Build With LLMs]]></description><link>https://newsletter.systemdesign.one/p/llm-fine-tuning-guide-with-lora-and-qlora</link><guid isPermaLink="false">https://newsletter.systemdesign.one/p/llm-fine-tuning-guide-with-lora-and-qlora</guid><dc:creator><![CDATA[Neo Kim]]></dc:creator><pubDate>Mon, 24 Aug 2026 16:23:10 GMT</pubDate><enclosure url="https://substack-post-media.s3.amazonaws.com/public/images/20656540-12f5-4256-8425-a56889a2a723_1280x720.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p style="text-align: center;"></p><p></p><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://newsletter.systemdesign.one/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"><span data-color="#3a7bf9" style="color: rgb(58, 123, 249);">Get my system design playbook for FREE on newsletter signup:</span></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><ul><li><p><em><a href="https://newsletter.systemdesign.one/p/llm-fine-tuning-guide-with-lora-and-qlora/?action=share">Share this letter</a> &amp; I&#8217;ll send you some rewards for the referrals.</em></p></li></ul><div><hr></div><p><span>You&#8217;ve rewritten the prompt five times, but the AI model still </span><em><span>ignores</span></em><span> your format&#8230;</span></p><p><span>It returns clean JSON on one request but &#8220;broken&#8221; JSON on the next. The tone you asked for doesn&#8217;t last either&#8230; No matter how you write the instructions, the model won&#8217;t follow them "reliably&#8221;.</span></p><p><em><span>So how do you make the behavior stick?</span></em></p><p><span>Getting there takes a series of judgment calls, each one yours to make&#8230;</span></p><p><span>Onward.</span></p><h4 style="text-align: center;"><strong>&#167;</strong></h4><div class="callout-block" data-callout="true"><h3><a href="https://getunblocked.com/events/how-to-stop-babysitting-your-agents/?utm_source=systemdesign&amp;utm_medium=email&amp;utm_campaign=primary">[Webinar] How to stop babysitting your agents (Partner)</a></h3><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://getunblocked.com/events/how-to-stop-babysitting-your-agents/?utm_source=systemdesign&amp;utm_medium=email&amp;utm_campaign=primary" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!6-MH!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9c3f24c4-3b04-4fed-a672-96dc40e8b12b_1600x900.png 424w, https://substackcdn.com/image/fetch/$s_!6-MH!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9c3f24c4-3b04-4fed-a672-96dc40e8b12b_1600x900.png 848w, https://substackcdn.com/image/fetch/$s_!6-MH!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9c3f24c4-3b04-4fed-a672-96dc40e8b12b_1600x900.png 1272w, https://substackcdn.com/image/fetch/$s_!6-MH!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9c3f24c4-3b04-4fed-a672-96dc40e8b12b_1600x900.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!6-MH!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9c3f24c4-3b04-4fed-a672-96dc40e8b12b_1600x900.png" width="1456" height="819" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/9c3f24c4-3b04-4fed-a672-96dc40e8b12b_1600x900.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:819,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:272266,&quot;alt&quot;:&quot;&quot;,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:&quot;https://getunblocked.com/events/how-to-stop-babysitting-your-agents/?utm_source=systemdesign&amp;utm_medium=email&amp;utm_campaign=primary&quot;,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://newsletter.systemdesign.one/i/209258689?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9c3f24c4-3b04-4fed-a672-96dc40e8b12b_1600x900.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" title="" srcset="https://substackcdn.com/image/fetch/$s_!6-MH!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9c3f24c4-3b04-4fed-a672-96dc40e8b12b_1600x900.png 424w, https://substackcdn.com/image/fetch/$s_!6-MH!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9c3f24c4-3b04-4fed-a672-96dc40e8b12b_1600x900.png 848w, https://substackcdn.com/image/fetch/$s_!6-MH!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9c3f24c4-3b04-4fed-a672-96dc40e8b12b_1600x900.png 1272w, https://substackcdn.com/image/fetch/$s_!6-MH!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9c3f24c4-3b04-4fed-a672-96dc40e8b12b_1600x900.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 buttonBase-GK1x3M"><svg aria-hidden="true" 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" class="icon-noB79L"><g><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 buttonBase-GK1x3M"><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 icon-noB79L"><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>Agents can generate code. Getting it right for your system, team conventions, and past decisions is the hard part. You end up wasting time and tokens in correction loops.</p><p>More MCPs give agents access to information, but not understanding. The teams pulling ahead use a context layer to give agents exactly what they need.</p><p><a href="https://getunblocked.com/events/how-to-stop-babysitting-your-agents/?utm_source=systemdesign&amp;utm_medium=email&amp;utm_campaign=primary">Join live on Sep 2 (FREE)</a> to see:</p><ul><li><p>Where teams get stuck on the AI maturity curve</p></li><li><p>How a context layer solves for quality, efficiency, and cost</p></li><li><p>Live demo: the same coding task with and without a context layer</p></li></ul><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://getunblocked.com/events/how-to-stop-babysitting-your-agents/?utm_source=systemdesign&amp;utm_medium=email&amp;utm_campaign=primary&quot;,&quot;text&quot;:&quot;Register Now&quot;,&quot;action&quot;:null,&quot;class&quot;:&quot;button-wrapper&quot;}" data-component-name="ButtonCreateButton"><a class="button primary button-wrapper" href="https://getunblocked.com/events/how-to-stop-babysitting-your-agents/?utm_source=systemdesign&amp;utm_medium=email&amp;utm_campaign=primary"><span>Register Now</span></a></p><p><em>(Thanks to <a href="https://getunblocked.com/events/how-to-stop-babysitting-your-agents/?utm_source=systemdesign&amp;utm_medium=email&amp;utm_campaign=primary">Unblocked</a> for partnering on this newsletter.)</em></p></div><h4 style="text-align: center;"><strong>&#167;</strong></h4><p>I want to introduce <strong><a href="https://www.linkedin.com/in/dimplesharma21">Dimple Sharma</a></strong> as a guest author.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://www.linkedin.com/in/dimplesharma21" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!WTzx!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd524d526-2fc8-490f-a226-b9a3d7e02203_991x495.png 424w, https://substackcdn.com/image/fetch/$s_!WTzx!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd524d526-2fc8-490f-a226-b9a3d7e02203_991x495.png 848w, https://substackcdn.com/image/fetch/$s_!WTzx!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd524d526-2fc8-490f-a226-b9a3d7e02203_991x495.png 1272w, https://substackcdn.com/image/fetch/$s_!WTzx!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd524d526-2fc8-490f-a226-b9a3d7e02203_991x495.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!WTzx!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd524d526-2fc8-490f-a226-b9a3d7e02203_991x495.png" width="991" height="495" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/d524d526-2fc8-490f-a226-b9a3d7e02203_991x495.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:495,&quot;width&quot;:991,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;&quot;,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:&quot;https://www.linkedin.com/in/dimplesharma21&quot;,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" title="" srcset="https://substackcdn.com/image/fetch/$s_!WTzx!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd524d526-2fc8-490f-a226-b9a3d7e02203_991x495.png 424w, https://substackcdn.com/image/fetch/$s_!WTzx!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd524d526-2fc8-490f-a226-b9a3d7e02203_991x495.png 848w, https://substackcdn.com/image/fetch/$s_!WTzx!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd524d526-2fc8-490f-a226-b9a3d7e02203_991x495.png 1272w, https://substackcdn.com/image/fetch/$s_!WTzx!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd524d526-2fc8-490f-a226-b9a3d7e02203_991x495.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 buttonBase-GK1x3M"><svg aria-hidden="true" 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" class="icon-noB79L"><g><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 buttonBase-GK1x3M"><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 icon-noB79L"><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>Dimple is an AI engineer. Previously, she worked as a software engineer at Microsoft &amp; Samsung.</p><p>At Microsoft, she built security infrastructure for SharePoint Online, serving millions of users. At Samsung, she developed a reinforcement-learning system for real-time video streaming, shipped in Samsung HD Displays.</p><p>She also holds two patents &amp; a published research paper.</p><p>Today she builds applied AI systems and writes about how they work. She has a knack for taking a complex topic apart until it clicks into a clear mental model, with the precision of an engineer who has built production systems at scale.</p><p>You can follow her on:</p><ul><li><p><a href="https://www.linkedin.com/in/dimplesharma21">LinkedIn</a></p></li><li><p><a href="https://substack.com/@dimplesharma21">Substack</a></p></li></ul><h4 style="text-align: center;"><strong>&#167;</strong></h4><p><em><strong>Here&#8217;s what&#8217;s inside this newsletter:</strong></em></p><ul><li><p><strong>Fine-tuning is probably not where you should start.</strong> The decision framework for when fine-tuning makes sense, when prompting/RAG is enough, and red flags that tell you to stop before spending money on training.</p></li><li><p><strong>LoRA changed the economics of fine-tuning.</strong> Why updating a tiny fraction of a model&#8217;s parameters can be enough to specialize an LLM, and how QLoRA pushes hardware requirements even lower.</p></li><li><p><strong>SFT, RLHF, DPO, ORPO, KTO, GRPO.</strong> The modern fine-tuning landscape, what these techniques are designed to teach a model, and where each one fits.</p></li><li><p><strong>Fine-tuning now goes far beyond better text responses.</strong> Reasoning, reliable tool use, function calling, and multimodal models can all require specialized training approaches.</p></li><li><p><strong>Getting a better benchmark score can hide a worse model.</strong> Production failure modes that can appear after training, including overfitting, catastrophic forgetting, and safety degradation.</p></li><li><p><strong>The complete path from base model to production.</strong> Model selection, dataset preparation, training, evaluation, deployment, monitoring, and continual fine-tuning, including what to watch at each stage.</p></li></ul><p></p><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://newsletter.systemdesign.one/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"><span data-color="#3a7bf9" style="color: rgb(58, 123, 249);">Golden members get all letters like these!&#8230;</span></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><h4 style="text-align: center;"><strong>&#167;</strong></h4><h2><strong><span>What Fine-Tuning Is</span></strong></h2><p><span>Fine-tuning never starts from scratch&#8230;</span></p><p><span>You take a model that already works &amp; train it a little more on a small, curated dataset of your own examples showing the exact behavior you want. Each example nudges the model&#8217;s weights</span><a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-1" href="#footnote-1" target="_self">1</a><span>, the billions of numbers shaping its output. Run enough of them, &amp; the behavior becomes the model&#8217;s new default.</span></p><p><span>It&#8217;s a &#8220;permanent&#8221; physical edit to the model.</span></p><p><span>But it&#8217;s NOT always the best choice&#8230;</span></p><p><span>It&#8217;s expensive in data, compute &amp; maintenance. So don&#8217;t reach for it by reflex when a sharper prompt/retrieval step would have solved your problem for far less.</span></p><p><span>Before you train anything, learn fine-tuning&#8217;s capabilities &amp; limits. Plus learn how it differs from prompting, retrieval &amp; agents&#8230;</span></p><h3><strong><span>What Fine-Tuning Can and Cannot Do</span></strong></h3><p><span>Fine-tuning changes model behavior reliably&#8230;</span></p><p><span>It shapes tone, voice, response style, format compliance (JSON, templates), domain-specific reasoning patterns, response persona, and consistent structured outputs.</span></p><p><span>Consider a support team&#8217;s resolved tickets:</span></p><p><span>Feed the model thousands of (ticket, ideal response) pairs, and it stops sounding like generic internet text. Instead, it starts responding in the team&#8217;s voice, consistently. Escalation paths, tone with a difficult customer, phrasing refined over years--the model learns all of it.</span></p><p><span>The change lives in the weights, NOT in a system prompt.</span></p><p><span>Yet adding new factual knowledge is where it becomes &#8220;unreliable&#8221;&#8230;</span></p><p><span>Forcing new facts through fine-tuning can make the model hallucinate. This is called the </span><em><span>Superficial Alignment Hypothesis</span></em><a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-2" href="#footnote-2" target="_self">2</a><span>. Pretraining builds knowledge; fine-tuning shapes &#8220;how&#8221; the knowledge comes out by default.</span></p><p><span>When the gap is knowledge instead of behavior, fine-tuning is often NOT the best fix.</span></p><h3><strong><span>Fine-Tuning vs RAG vs Agents</span></strong></h3><p><span>So which tool a problem needs depends on what&#8217;s actually broken&#8230;</span></p><p><span>Imagine your model gives solid answers to some questions but </span><em><span>hallucinates</span></em><span> on others. It follows your format instructions one moment &amp; ignores them the next.</span></p><p><span>So what do you fix: </span><em><span>prompt, data, model, or workflow?</span></em></p><p><span>Think of your LLM as a new hire at your company:</span></p><ul><li><p><strong><span>Prompt engineering</span></strong><span> is how you give instructions: format, tone, constraints. Like writing your new hire a detailed brief before every assignment. It&#8217;s cheap, fast, and often enough. But you can&#8217;t instruct someone to know things they were never taught.</span></p></li><li><p><strong><span>Retrieval-Augmented Generation (RAG)</span></strong><span> is how you supply knowledge. You pull relevant documents from a database &amp; feed them into the prompt, so the model stays &#8220;current&#8221; without retraining. Like handing your hire the company&#8217;s latest documentation before they answer a client.</span></p></li><li><p><strong><span>Agents</span></strong><span> are how you enable action. You give the model access to tools, APIs, and external systems, and then let it decide how to complete a goal. Like giving your hire access to the company&#8217;s CRM, email, and databases, then trusting them to pick the right tool.</span></p></li><li><p><strong><span>Fine-tuning</span></strong><span> is how you teach behavior. You train the model on curated examples of what you want it to do, and the change lasts. Like sending your hire through a specialized training program--they come back with a skill baked into how they work.</span></p></li></ul><p><span>Now notice what actually changed in each case&#8230;</span></p><p><span>Prompt engineering, RAG, and agents work &#8220;</span><em><span>around</span></em><span>&#8221; the model: they shape what goes in/what the model can access, but the model itself stays identical. Not a single weight moves.</span></p><p><span>While fine-tuning &#8220;works&#8221; </span><em><span>on</span></em><span> the model.</span></p><p><span>i.e., the model comes out different from what went in.</span></p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!F2Uz!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F96c518d4-c928-4abc-bdd0-230d317b3e48_2048x1143.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!F2Uz!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F96c518d4-c928-4abc-bdd0-230d317b3e48_2048x1143.png 424w, https://substackcdn.com/image/fetch/$s_!F2Uz!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F96c518d4-c928-4abc-bdd0-230d317b3e48_2048x1143.png 848w, https://substackcdn.com/image/fetch/$s_!F2Uz!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F96c518d4-c928-4abc-bdd0-230d317b3e48_2048x1143.png 1272w, https://substackcdn.com/image/fetch/$s_!F2Uz!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F96c518d4-c928-4abc-bdd0-230d317b3e48_2048x1143.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!F2Uz!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F96c518d4-c928-4abc-bdd0-230d317b3e48_2048x1143.png" width="1456" height="813" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/96c518d4-c928-4abc-bdd0-230d317b3e48_2048x1143.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:813,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!F2Uz!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F96c518d4-c928-4abc-bdd0-230d317b3e48_2048x1143.png 424w, https://substackcdn.com/image/fetch/$s_!F2Uz!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F96c518d4-c928-4abc-bdd0-230d317b3e48_2048x1143.png 848w, https://substackcdn.com/image/fetch/$s_!F2Uz!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F96c518d4-c928-4abc-bdd0-230d317b3e48_2048x1143.png 1272w, https://substackcdn.com/image/fetch/$s_!F2Uz!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F96c518d4-c928-4abc-bdd0-230d317b3e48_2048x1143.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 buttonBase-GK1x3M"><svg aria-hidden="true" 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" class="icon-noB79L"><g><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 buttonBase-GK1x3M"><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 icon-noB79L"><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><ul><li><p><span>Prompt engineering costs tokens.</span></p></li><li><p><span>RAG adds retrieval infrastructure: a vector database, an embedding model, a pipeline.</span></p></li><li><p><span>Agents multiply LLM calls per task and add orchestration overhead.</span></p></li><li><p><span>Fine-tuning demands GPU compute, curated data, and iteration cycles.</span></p></li></ul><p><span>Start with the cheapest option; in production, these often combine&#8230;</span></p><p><span>So should you fine-tune?</span></p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://newsletter.systemdesign.one/p/llm-fine-tuning-guide-with-lora-and-qlora?utm_source=substack&utm_medium=email&utm_content=share&action=share&quot;,&quot;text&quot;:&quot;Share&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://newsletter.systemdesign.one/p/llm-fine-tuning-guide-with-lora-and-qlora?utm_source=substack&utm_medium=email&utm_content=share&action=share"><span>Share</span></a></p><h4 style="text-align: center;"><strong>&#167;</strong></h4><h2><strong><span>When (and When Not) to Fine-Tune</span></strong></h2><p><span>Whether to fine-tune comes down to a few clear signals--some say stop, some say go:</span></p><h3><strong><span>Red Flags</span></strong></h3><ul><li><p><strong><span>Prompting still works.</span></strong><span> Try using a detailed system prompt, few-shot examples</span><a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-3" href="#footnote-3" target="_self">3</a><span>, and clear format instructions first. Only then think about fine-tuning.</span></p></li><li><p><strong><span>Your data changes frequently.</span></strong><span> Fine-tuning bakes a snapshot into weights. Live data goes stale at deployment; this is what RAG is for.</span></p></li><li><p><strong><span>You don&#8217;t have enough quality data.</span></strong><span> Quality &amp; representativeness of training data matter more than volume. If your examples don&#8217;t cover edge cases, the count doesn&#8217;t save you.</span></p></li><li><p><strong><span>Your requirements keep changing.</span></strong><span> Fine-tuning cycles take days to weeks. If requirements are still shifting, the spec will have changed by the time your training run finishes.</span></p></li><li><p><strong><span>You need instant rollback.</span></strong><span> Fine-tuning encodes behavior. If something goes wrong, there&#8217;s no quick patch; fixing it means retraining and redeploying.</span></p></li></ul><h3><strong><span>Green Flags</span></strong></h3><ul><li><p><strong><span>Your structured output keeps breaking.</span></strong><span> The model handles familiar inputs but breaks on &#8220;edge cases&#8221; even with explicit formatting instructions. Fine-tuning bakes the format into behavior.</span></p></li><li><p><strong><span>You need a specific voice/persona.</span></strong><span> Prompting cannot reliably hold a distinctive tone at scale. Fine-tuning makes it the model&#8217;s default, not a request.</span></p></li><li><p><strong><span>Your inference costs are unsustainable.</span></strong><span> Fine-tuning a smaller open-source model on your specific task can match the same performance at a fraction of the cost. You pay for generality only when you need it.</span></p></li><li><p><strong><span>You have a well-defined, narrow task.</span></strong><span> When the problem is bounded (classification, extraction, structured generation</span><a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-4" href="#footnote-4" target="_self">4</a><span>), a fine-tuned small model consistently outperforms a large general one. The narrower the task, the bigger the advantage.</span></p></li><li><p><strong><span>Your data can&#8217;t leave your infrastructure.</span></strong><span> GDPR, HIPAA</span><a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-5" href="#footnote-5" target="_self">5</a><span>, and/or internal policy blocks you from sending training data to a third-party API. Self-hosted open-source fine-tuning keeps everything on-premises.</span></p></li></ul><h3><strong><span>What Fine-Tuning Costs</span></strong></h3><p><span>If the </span><em><span>green</span></em><span> flags fit, one question remains before you commit: </span><em><span>what are you taking on?</span></em></p><p><span>Fine-tuning costs money to build &amp; saves money to run.</span></p><p><span>The build cost is higher than it looks; per-call savings are larger than the GPU bill alone suggests.</span></p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!o9Kt!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F07e7a668-b971-48c6-a13e-784338667bd8_2048x1143.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!o9Kt!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F07e7a668-b971-48c6-a13e-784338667bd8_2048x1143.png 424w, https://substackcdn.com/image/fetch/$s_!o9Kt!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F07e7a668-b971-48c6-a13e-784338667bd8_2048x1143.png 848w, https://substackcdn.com/image/fetch/$s_!o9Kt!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F07e7a668-b971-48c6-a13e-784338667bd8_2048x1143.png 1272w, https://substackcdn.com/image/fetch/$s_!o9Kt!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F07e7a668-b971-48c6-a13e-784338667bd8_2048x1143.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!o9Kt!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F07e7a668-b971-48c6-a13e-784338667bd8_2048x1143.png" width="1456" height="813" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/07e7a668-b971-48c6-a13e-784338667bd8_2048x1143.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:813,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!o9Kt!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F07e7a668-b971-48c6-a13e-784338667bd8_2048x1143.png 424w, https://substackcdn.com/image/fetch/$s_!o9Kt!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F07e7a668-b971-48c6-a13e-784338667bd8_2048x1143.png 848w, https://substackcdn.com/image/fetch/$s_!o9Kt!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F07e7a668-b971-48c6-a13e-784338667bd8_2048x1143.png 1272w, https://substackcdn.com/image/fetch/$s_!o9Kt!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F07e7a668-b971-48c6-a13e-784338667bd8_2048x1143.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 buttonBase-GK1x3M"><svg aria-hidden="true" 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" class="icon-noB79L"><g><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 buttonBase-GK1x3M"><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 icon-noB79L"><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><span>The investment pays off in three cases:</span></p><ul><li><p><span>You have high &amp; steady inference volume.</span></p></li><li><p>You&#8217;re replacing a costly frontier model API.</p></li><li><p><span>Your data must stay within your infrastructure.</span></p></li></ul><p><span>Task fine-tuning carries one more cost not shown above: </span><em><span>it can &#8220;erase&#8221; the model&#8217;s built-in safety behaviors</span></em><span>. So budget for safety evaluation as part of every training cycle.</span></p><p><span>First, the groundwork&#8230;</span></p><h4 style="text-align: center;"><strong>&#167;</strong></h4><h2><strong><span>Foundations You Need First</span></strong></h2><p><span>So you&#8217;ve decided to fine-tune&#8230; but first you need to know where fine-tuning fits in a model&#8217;s lifecycle &amp; which kind of model you start from.</span></p><h3><strong><span>From pretraining to fine-tuning</span></strong></h3><p><span>When you fine-tune a model, you&#8217;re changing one thing: </span><em><span>numbers inside</span></em><span>.</span></p><p><span>Those numbers are parameters: weights packed into every layer. Your text enters as tokens; attention connects them across context. Each layer transforms the representation using those weights. Fine-tuning updates them on your data</span><a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-6" href="#footnote-6" target="_self">6</a><span>.</span></p><p><span>Everything else stays fixed&#8230;</span></p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!fCTU!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9448eac5-214a-4984-865b-ed1f8152e8ef_2048x1143.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!fCTU!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9448eac5-214a-4984-865b-ed1f8152e8ef_2048x1143.png 424w, https://substackcdn.com/image/fetch/$s_!fCTU!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9448eac5-214a-4984-865b-ed1f8152e8ef_2048x1143.png 848w, https://substackcdn.com/image/fetch/$s_!fCTU!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9448eac5-214a-4984-865b-ed1f8152e8ef_2048x1143.png 1272w, https://substackcdn.com/image/fetch/$s_!fCTU!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9448eac5-214a-4984-865b-ed1f8152e8ef_2048x1143.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!fCTU!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9448eac5-214a-4984-865b-ed1f8152e8ef_2048x1143.png" width="1456" height="813" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/9448eac5-214a-4984-865b-ed1f8152e8ef_2048x1143.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:813,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!fCTU!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9448eac5-214a-4984-865b-ed1f8152e8ef_2048x1143.png 424w, https://substackcdn.com/image/fetch/$s_!fCTU!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9448eac5-214a-4984-865b-ed1f8152e8ef_2048x1143.png 848w, https://substackcdn.com/image/fetch/$s_!fCTU!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9448eac5-214a-4984-865b-ed1f8152e8ef_2048x1143.png 1272w, https://substackcdn.com/image/fetch/$s_!fCTU!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9448eac5-214a-4984-865b-ed1f8152e8ef_2048x1143.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 buttonBase-GK1x3M"><svg aria-hidden="true" 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" class="icon-noB79L"><g><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 buttonBase-GK1x3M"><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 icon-noB79L"><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><span>Think of it as three stages of education:</span></p><ul><li><p><span>Pre-training is twelve years of general schooling: trillions of tokens, language, reasoning.</span></p></li><li><p><span>Continued Pre-Training (</span><strong><span>CPT</span></strong><span>) is a specialty degree: more training on a domain corpus when the base model needs it.</span></p></li><li><p><span>Fine-tuning is an apprenticeship: a curated dataset teaching the model exactly how to behave in your context.</span></p></li></ul><p><span>Each stage builds on the previous one.</span></p><p><span>Here&#8217;s how to think about CPT &amp; fine-tuning:</span></p><ul><li><p><span>CPT is for knowing your domain: raw text at scale, absorbed into the weights.</span></p></li><li><p><span>Fine-tuning is for acting in your domain: labeled examples teaching specific task behavior, format &amp; style.</span></p></li></ul><p><span>CPT demands far more data &amp; compute; fine-tuning is cheaper &amp; faster.</span></p><p><span>Strong domain systems often sequence both.</span></p><h3><strong><span>Base Models vs Chat Models</span></strong></h3><p><span>Before you fine-tune, pick the right starting point&#8230;</span></p><ul><li><p><strong><span>Base model</span></strong><span> is a raw next-token predictor: it has read everything but held no job. Ask it a question, and it would continue writing the question.</span></p></li></ul><ul><li><p><strong><span>Chat model (aka instruct)</span></strong><span> is a base plus supervised fine-tuning (</span><strong><span>SFT</span></strong><span>) and alignment. It knows how to respond, follow instructions &amp; converse.</span></p></li></ul><p><span>So start from </span><em><span>base</span></em><span> for full control; and start from </span><em><span>chat</span></em><span> to preserve instruction-following &amp; specialize on top.</span></p><p><span>Chat models carry one piece of hidden structure: </span><em><span>a chat template</span></em><span>.</span></p><p><span>These models are built around a specific conversation format: control tokens marking the system, user, and assistant roles. The format varies by model family: Llama 3, Mistral, and Gemma each use different tokens.</span></p><p><span>Use the wrong template &amp; the model loses track of who&#8217;s speaking&#8230;and responses degrade without warning</span><a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-7" href="#footnote-7" target="_self">7</a><span>.</span></p><p><span>So how&#8217;s it actually done?&#8230;</span></p><h4 style="text-align: center;"><strong>&#167;</strong></h4><div class="callout-block" data-callout="true"><p style="text-align: center;"><em><strong><span data-color="#3a7bf9" style="color: rgb(58, 123, 249);">Reminder: this is a teaser of the subscriber-only newsletter series, exclusive to my golden members.</span></strong></em></p><p>When you upgrade, you&#8217;ll get:</p><ul><li><p><strong>Simple breakdown of real-world architectures</strong></p></li><li><p>Frameworks you can plug into your work/business</p></li><li><p><strong>Proven systems behind ChatGPT, Perplexity &amp; Copilot</strong></p></li></ul><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://newsletter.systemdesign.one/subscribe&quot;,&quot;text&quot;:&quot;Unlock Full Access&quot;,&quot;action&quot;:null,&quot;class&quot;:&quot;button-wrapper&quot;}" data-component-name="ButtonCreateButton"><a class="button primary button-wrapper" href="https://newsletter.systemdesign.one/subscribe"><span>Unlock Full Access</span></a></p><p><em>Ready for the best part?</em></p></div>
      <p>
          <a href="https://newsletter.systemdesign.one/p/llm-fine-tuning-guide-with-lora-and-qlora">
              Read more
          </a>
      </p>
   ]]></content:encoded></item><item><title><![CDATA[How to Build AI Agents That Don’t Start Over When They Fail]]></title><description><![CDATA[#170: The Infrastructure AI Agents Actually Need]]></description><link>https://newsletter.systemdesign.one/p/durable-ai-agents</link><guid isPermaLink="false">https://newsletter.systemdesign.one/p/durable-ai-agents</guid><dc:creator><![CDATA[Neo Kim]]></dc:creator><pubDate>Thu, 20 Aug 2026 17:26:04 GMT</pubDate><enclosure url="https://substack-post-media.s3.amazonaws.com/public/images/86a1aa75-49dc-4f2f-8b37-f99daa770e14_1280x720.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p></p><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://newsletter.systemdesign.one/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"><span data-color="#3a7bf9" style="color: rgb(58, 123, 249);">Get my system design playbook for FREE on newsletter signup:</span></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><ul><li><p><em><a href="https://newsletter.systemdesign.one/p/durable-ai-agents/?action=share">Share this letter</a> &amp; I&#8217;ll send you some rewards for the referrals.</em></p></li></ul><div><hr></div><p><span>You know that feeling when a job runs for ten minutes, gets closer to the end, and then fails?</span></p><p><span>You check the logs &amp; one API timed out!</span></p><p><span>So you run it again&#8230;</span></p><p><span>And now you wait another ten minutes for the &#8220;same work&#8221; to start all over again.</span></p><p><span>This is annoying enough for a tiny background job. But imagine the job was a &#8220;long-running&#8221; AI agent workflow</span><a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-1" href="#footnote-1" target="_self">1</a><span>. It searched through dozens of documents, called an LLM several times, extracted the necessary information, and prepared most of the final answer.</span></p><p><span>And then all the work is </span><em><span>gone</span></em><span> because one step failed near the end.</span></p><p><span>It could get worse&#8230;</span></p><p><em><span>What if the agent had already sent an email before it failed? Or updated a database?</span></em><span> Running the whole workflow again could &#8220;repeat&#8221; those actions as well.</span></p><p><span>Plus, an AI agent could call a model, search a database, call an external API, wait for someone to approve something, and then continue later. The longer the workflow gets,,, the more </span><em><span>painful</span></em><span> it becomes to start over whenever something goes wrong.</span></p><p><span>So workflow needs to &#8220;remember&#8221; what has already happened&#8230;</span></p><p><span>If the first five steps succeeded, but the sixth failed, then you want to pick up from step six. (i.e., you don&#8217;t want to run the first five steps again!)</span></p><p><span>This is the problem </span><em><span>durable execution</span></em><span> is designed to solve&#8230;</span></p><p><span>It tracks progress as the workflow runs, so a failure does NOT have to erase everything before it.</span></p><p><em><span>But how does it actually work? What happens when a workflow needs to retry a failed step, wait for a person, or recover after the process running it disappears?</span></em></p><p>I&#8217;ll use <strong><a href="https://inngest.link/jtH41MP">Inngest</a></strong> as the case study for this newsletter.</p><p>(It&#8217;s a durable execution platform for background functions, workflows, and AI agents.)</p><p><span>Onward.</span></p><h4 style="text-align: center;"><strong>&#167;</strong></h4><h2><span>What Is an AI Agent</span></h2><p><span>You already know what an AI chatbot looks like&#8230;</span></p><p><span>You probably use it every day to ask questions, write something, summarize a document, and/or help you solve a problem. In a typical interaction, you ask for something &amp; the model gives you an answer. Period.</span></p><p><span>An AI agent takes this idea one step further&#8230;</span></p><p><span>Instead of stopping after one response, it keeps working toward a goal, deciding what it needs to do next as the work unfolds. Give a research agent a topic, and it can work through the research before coming back with the final answer.</span></p><p><span>The catch is this work does NOT always finish in </span><em><span>one</span></em><span> simple request.</span></p><p><span>It can take several steps, involve external systems, wait for something to happen, and/or fail midway. And once an AI agent starts working like a real workflow, simply retrying the request is NOT enough.</span></p><p><span>So let&#8217;s see what happens when these workflows have to deal with &#8220;real&#8221; failures &amp; how to make them reliable&#8230;</span></p><h4 style="text-align: center;"><strong>&#167;</strong></h4><h2><span>Why AI Agents Need Durable Execution</span></h2><p><span>A simple &amp; self-contained background job is &#8220;easy&#8221; to retry from the start.</span></p><p><span>Yet a single agent run chains together LLM calls, tool calls, database reads, and external API requests. And any of those can fail on its own.</span></p><p><span>Let&#8217;s look at what actually makes &#8220;agents&#8221; different&#8230;</span></p><h3><span>What Makes Agent Workflows Different</span></h3><p><span>Here&#8217;s what:</span></p><h4><span>1. Individual steps are slow and expensive</span></h4><p><span>A single LLM call can take several seconds &amp; cost real money.</span></p><p><span>Repeating five completed steps to get back to the one that failed is never a rounding error. Instead, wasted time &amp; tokens on work already done.</span></p><h4><span>2. Outputs are not deterministic</span></h4><p><span>LLM outputs can vary between executions.</span></p><p><span>Rerunning a completed step does not &#8220;guarantee&#8221; the same result, so restarting from the beginning can change the workflow&#8217;s outcome.</span></p><h4><span>3. Some steps create real side effects</span></h4><p><span>If the agent already sent an email, updated a record, and/or charged a card before the failure, restarting the workflow will repeat those actions&#8230;</span></p><p><span>A duplicate charge is NOT a retry problem, but a </span><em><span>correctness</span></em><span> problem.</span></p><h4><span>4. Some steps wait on people</span></h4><p><span>A workflow pausing for editor approval would stay paused for hours/days.</span></p><p><span>And holding a worker process open the entire time does not &#8220;scale&#8221;. A basic job queue is NOT designed to track where a multi-step workflow was waiting &amp; resume it later.</span></p><h3><span>When an Agent Fails Mid-Workflow</span></h3><p>Think of a research agent:</p><p>It retrieves sources, extracts evidence, generates a draft, waits for editor approval, &amp; publishes the result.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!70A4!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F185f3feb-cf07-4131-9beb-8c287aba46d5_1774x887.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!70A4!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F185f3feb-cf07-4131-9beb-8c287aba46d5_1774x887.png 424w, https://substackcdn.com/image/fetch/$s_!70A4!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F185f3feb-cf07-4131-9beb-8c287aba46d5_1774x887.png 848w, https://substackcdn.com/image/fetch/$s_!70A4!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F185f3feb-cf07-4131-9beb-8c287aba46d5_1774x887.png 1272w, https://substackcdn.com/image/fetch/$s_!70A4!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F185f3feb-cf07-4131-9beb-8c287aba46d5_1774x887.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!70A4!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F185f3feb-cf07-4131-9beb-8c287aba46d5_1774x887.png" width="1456" height="728" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/185f3feb-cf07-4131-9beb-8c287aba46d5_1774x887.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:728,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!70A4!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F185f3feb-cf07-4131-9beb-8c287aba46d5_1774x887.png 424w, https://substackcdn.com/image/fetch/$s_!70A4!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F185f3feb-cf07-4131-9beb-8c287aba46d5_1774x887.png 848w, https://substackcdn.com/image/fetch/$s_!70A4!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F185f3feb-cf07-4131-9beb-8c287aba46d5_1774x887.png 1272w, https://substackcdn.com/image/fetch/$s_!70A4!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F185f3feb-cf07-4131-9beb-8c287aba46d5_1774x887.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 buttonBase-GK1x3M"><svg aria-hidden="true" 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" class="icon-noB79L"><g><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 buttonBase-GK1x3M"><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 icon-noB79L"><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><span>Say the model provider </span><em><span>times out</span></em><span> during the drafting step:</span></p><p><span>Retrieval &amp; extraction already finished. In a system with NO memory of progress, the entire workflow must restart. And the completed steps have to </span><em><span>rerun</span></em><span> for no reason.</span></p><p><span>So if any &#8220;side effects&#8221; fired before the failure, those repeat too&#8230;</span></p><p><span>Reliability is not just a property of the model/agent framework. It also depends on the </span><em><span>execution layer</span></em><span> running underneath them.</span></p><p><span>Now we understand what makes agent workflows different; let&#8217;s look at where the traditional queue &amp; worker model starts to fall short&#8230;</span></p><h4 style="text-align: center;"><strong>&#167;</strong></h4><div class="callout-block" data-callout="true"><p>I&#8217;m happy to partner with <strong><a href="https://inngest.link/jtH41MP">Inngest</a></strong> on this newsletter.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://inngest.link/jtH41MP" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!i9Kg!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1e7c0083-b0b6-4069-af0c-afdaf57a25ec_1200x675.png 424w, https://substackcdn.com/image/fetch/$s_!i9Kg!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1e7c0083-b0b6-4069-af0c-afdaf57a25ec_1200x675.png 848w, https://substackcdn.com/image/fetch/$s_!i9Kg!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1e7c0083-b0b6-4069-af0c-afdaf57a25ec_1200x675.png 1272w, https://substackcdn.com/image/fetch/$s_!i9Kg!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1e7c0083-b0b6-4069-af0c-afdaf57a25ec_1200x675.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!i9Kg!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1e7c0083-b0b6-4069-af0c-afdaf57a25ec_1200x675.png" width="1200" height="675" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/1e7c0083-b0b6-4069-af0c-afdaf57a25ec_1200x675.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:675,&quot;width&quot;:1200,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;&quot;,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:&quot;https://inngest.link/jtH41MP&quot;,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" title="" srcset="https://substackcdn.com/image/fetch/$s_!i9Kg!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1e7c0083-b0b6-4069-af0c-afdaf57a25ec_1200x675.png 424w, https://substackcdn.com/image/fetch/$s_!i9Kg!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1e7c0083-b0b6-4069-af0c-afdaf57a25ec_1200x675.png 848w, https://substackcdn.com/image/fetch/$s_!i9Kg!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1e7c0083-b0b6-4069-af0c-afdaf57a25ec_1200x675.png 1272w, https://substackcdn.com/image/fetch/$s_!i9Kg!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1e7c0083-b0b6-4069-af0c-afdaf57a25ec_1200x675.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 buttonBase-GK1x3M"><svg aria-hidden="true" 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" class="icon-noB79L"><g><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 buttonBase-GK1x3M"><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 icon-noB79L"><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>Agents, like all of us, often need to recover from failure. But they shouldn&#8217;t start from scratch.</p><p>Inngest&#8217;s durable execution checkpoints your agents every step of the way.</p><p>So your agents can pick up where they left off and avoid doubling up on token &amp; compute spend.</p><p><a href="https://inngest.link/jtH41MP">Inngest</a> offers a generous free tier and a sleek local dev server for testing.</p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://inngest.link/jtH41MP&quot;,&quot;text&quot;:&quot;Build durably with Inngest&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://inngest.link/jtH41MP"><span>Build durably with Inngest</span></a></p></div><h4 style="text-align: center;"><strong>&#167;</strong></h4><h2><span>Why Traditional Job Queues Are NOT Enough</span></h2><p>The basic idea is simple:</p><p>An event creates a job, the job enters a queue, and a worker processes it. If something goes wrong, the job gets retried&#8230;</p><p>For simple, self-contained work, such as sending an email/resizing an image, retrying the entire job from the beginning is reasonable.</p><p>Yet the problem becomes DIFFICULT when the job represents a long-running workflow. Instead of one piece of work, you now have several steps, each depending on results from earlier steps.</p><p>AI agent workflows &#8220;amplify&#8221; this problem<a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-2" href="#footnote-2" target="_self">2</a> because a single run could involve many LLM calls, tool calls, external APIs, intermediate results &amp; side effects&#8230;</p><h3><span>Queue vs Workflow</span></h3><p><span>This is where the difference between a queue &amp; a workflow matters:</span></p><ul><li><p><span>A queue mainly focuses on getting work to a worker &amp; making sure </span><em><span>failed</span></em><span> work gets another chance.</span></p></li><li><p><span>A workflow needs to remember what happened along the way, including which steps finished, which ones failed, and what needs to happen next.</span></p></li></ul><p><span>BullMQ, Celery &amp; SQS</span><a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-3" href="#footnote-3" target="_self">3</a><span> give you useful building blocks for queues.</span></p><p><span>You get workers, retries, rate limiting, job dependencies, and parent-child flows. But once you need checkpointing, resumability, human-in-the-loop coordination, and/or a complete history of every step, you&#8217;ve more work to do&#8230;</span></p><p><span>You can build those pieces yourself,,, but now the queue is no longer the whole solution. You&#8217;re starting to build a </span><em><span>workflow</span></em><span> </span><em><span>system</span></em><span> around it&#8230;</span></p><p><span>So what does it take to make these workflows recover properly?</span></p><p><span>Let&#8217;s take a look&#8230;</span></p><h4 style="text-align: center;"><strong>&#167;</strong></h4><div class="captioned-button-wrap" data-attrs="{&quot;url&quot;:&quot;https://newsletter.systemdesign.one/p/durable-ai-agents?utm_source=substack&utm_medium=email&utm_content=share&action=share&quot;,&quot;text&quot;:&quot;Share&quot;}" data-component-name="CaptionedButtonToDOM"><div class="preamble"><p class="cta-caption"><em><span data-color="#3a7bf9" style="color: rgb(58, 123, 249);">Get 1+ referral &amp; I&#8217;ll send you my Leetcode Master Template!</span></em></p></div><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://newsletter.systemdesign.one/p/durable-ai-agents?utm_source=substack&utm_medium=email&utm_content=share&action=share&quot;,&quot;text&quot;:&quot;Share&quot;}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://newsletter.systemdesign.one/p/durable-ai-agents?utm_source=substack&utm_medium=email&utm_content=share&action=share"><span>Share</span></a></p></div><h4 style="text-align: center;"><strong>&#167;</strong></h4><h2><span>What Durable Execution Actually Means</span></h2><p><em><span>Durable execution</span></em><span> is a simple idea with a ton of work happening underneath it&#8230;</span></p><p><span>The system remembers what has already been completed. So when something fails, execution can resume from the </span><em><span>last</span></em><span> </span><em><span>successful step</span></em><span> instead of starting from zero.</span></p><p><span>Let&#8217;s dive in!</span></p><h3><span>Checkpointing</span></h3><p><span>A checkpoint records a &#8220;completed&#8221; unit of work.</span></p><p><span>When a step finishes successfully, it saves the result. If the process crashes, restarts, or a deployment occurs mid-workflow, the result is still available when execution continues&#8230;</span></p><p><span>The workflow can then reuse the completed result instead of running the same step again.</span></p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!8rix!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4067e0d6-59a0-4421-ae89-f76c53641dd4_1895x830.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!8rix!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4067e0d6-59a0-4421-ae89-f76c53641dd4_1895x830.png 424w, https://substackcdn.com/image/fetch/$s_!8rix!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4067e0d6-59a0-4421-ae89-f76c53641dd4_1895x830.png 848w, https://substackcdn.com/image/fetch/$s_!8rix!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4067e0d6-59a0-4421-ae89-f76c53641dd4_1895x830.png 1272w, https://substackcdn.com/image/fetch/$s_!8rix!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4067e0d6-59a0-4421-ae89-f76c53641dd4_1895x830.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!8rix!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4067e0d6-59a0-4421-ae89-f76c53641dd4_1895x830.png" width="1456" height="638" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/4067e0d6-59a0-4421-ae89-f76c53641dd4_1895x830.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:638,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!8rix!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4067e0d6-59a0-4421-ae89-f76c53641dd4_1895x830.png 424w, https://substackcdn.com/image/fetch/$s_!8rix!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4067e0d6-59a0-4421-ae89-f76c53641dd4_1895x830.png 848w, https://substackcdn.com/image/fetch/$s_!8rix!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4067e0d6-59a0-4421-ae89-f76c53641dd4_1895x830.png 1272w, https://substackcdn.com/image/fetch/$s_!8rix!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4067e0d6-59a0-4421-ae89-f76c53641dd4_1895x830.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 buttonBase-GK1x3M"><svg aria-hidden="true" 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" class="icon-noB79L"><g><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 buttonBase-GK1x3M"><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 icon-noB79L"><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><span>Each step can also be retried independently, so a later failure does NOT undo the work already completed.</span></p><p><span>Inngest memoizes</span><a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-4" href="#footnote-4" target="_self">4</a><span> </span>completed steps <span>in the function&#8217;s stored state and skips on later executions.</span></p><h3><span>Resumability</span></h3><p>You can resume a workflow after an &#8220;interruption&#8221; with checkpointing.</p><p><span>The workflow does not need to stay tied to the same process/machine while it runs. If the process disappears, execution can continue using the progress already saved.</span></p><p><span>This matters even more for long-running tasks&#8230;</span></p><p><span>A workflow could run for hours, pause for an external event, or survive a deployment mid-execution. The workflow keeps its progress even while the process running it changes.</span></p><p><span>i.e., the workflow is the full job; the process is just what runs it.</span></p><h3><span>Why Retries Are NOT Enough</span></h3><p><span>Retries &amp; checkpoints solve different problems&#8230;</span></p><p><span>A </span><em><span>retry</span></em><span> reruns a failed task, while a </span><em><span>checkpoint</span></em><span> remembers completed tasks.</span></p><p>Think of a research agent:</p><p>It already retrieved the documents &amp; extracted useful information. Then <em>times out</em> on the drafting step &#8230;</p><p>With a <em>retry</em>, the whole workflow must run again from the beginning, repeating the retrieval &amp; extraction work.</p><p>With <em>durable execution</em>, those completed steps get saved. And their results can be reused, so only the failed drafting step needs to run again.</p><p><span>For an agent workflow, this can save a lot of time &amp; reduce LLM usage costs. This is the difference between retrying a job &amp; recovering a workflow.</span></p><p><span>Now we understand what durable execution means&#8230;But what does it take to build it yourself?</span></p><p><span>Let&#8217;s keep going!</span></p><h4 style="text-align: center;"><strong>&#167;</strong></h4><h2><span>How to Build Durable Execution Yourself</span></h2><p><span>You need a way to track progress &amp; recover from failures.</span></p><p><span>The workflow must handle retries and long waits without causing duplicate actions. Also, it needs traffic controls &amp; history to explain what happened.</span></p><p>Let&#8217;s get into it!</p><h3><span>1. Persisting Workflow State</span></h3><p><span>You need a place to store the &#8220;workflow&#8217;s progress&#8221;.</span></p><p><span>Plus, you need to save the &#8220;result&#8221; outside the process running the workflow </span>when a step finishes<span>. Otherwise, a crash/deployment can take the progress with it.</span></p><p><span>You also need to connect each result to the right workflow &amp; step, so execution knows where to continue later&#8230;</span></p><h3><span>2. Retries and Recovery</span></h3><p><span>Once progress is persisted, the next problem is handling failures&#8230;</span></p><p><span>Some failures are worth retrying, while others are not. So you need retry rules, backoff between attempts, and a defined path once those attempts run out.</span></p><p><span>And when a retry occurs, workflow needs to know which work has already finished.</span></p><h3><span>3. Idempotency</span></h3><p><span>Then there is the problem of doing something </span><em><span>twice</span></em><span>.</span></p><p><span>Imagine an agent sends an email &amp; fails immediately afterward. When the step runs again, the application needs to know whether sending the email again is &#8220;safe&#8221;.</span></p><p><span>Idempotency keys, upserts, existence checks, and deterministic identifiers can help. The exact approach depends on the system, but protecting the side effect is still the application&#8217;s job.</span></p><h3><span>4. Waiting and Scheduling</span></h3><p><span>Long-running workflows should </span>wait <span>somewhere.</span></p><p><span>An agent could finish a draft &amp; sit for days while an editor decides what to do. Keeping a worker alive during the entire wait &#8220;wastes&#8221; resources. Instead, the workflow should save its state &amp; release the compute. It resumes when the event arrives.</span></p><p><span>Also it needs a defined path if the approval never comes, arrives too late, and/or gets rejected.</span></p><h3><span>5. Flow Control</span></h3><p><span>A workflow recovering correctly can cause problems when too much work arrives at once&#8230;</span></p><p><span>A single customer could trigger thousands of agent runs, consuming shared capacity &amp; hitting an LLM provider&#8217;s limits. The resulting failures can then create even more retries.</span></p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!NMjW!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9cbbdd84-786c-4d01-aabe-718f0a5867fe_1774x887.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!NMjW!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9cbbdd84-786c-4d01-aabe-718f0a5867fe_1774x887.png 424w, https://substackcdn.com/image/fetch/$s_!NMjW!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9cbbdd84-786c-4d01-aabe-718f0a5867fe_1774x887.png 848w, https://substackcdn.com/image/fetch/$s_!NMjW!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9cbbdd84-786c-4d01-aabe-718f0a5867fe_1774x887.png 1272w, https://substackcdn.com/image/fetch/$s_!NMjW!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9cbbdd84-786c-4d01-aabe-718f0a5867fe_1774x887.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!NMjW!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9cbbdd84-786c-4d01-aabe-718f0a5867fe_1774x887.png" width="1456" height="728" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/9cbbdd84-786c-4d01-aabe-718f0a5867fe_1774x887.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:728,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!NMjW!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9cbbdd84-786c-4d01-aabe-718f0a5867fe_1774x887.png 424w, https://substackcdn.com/image/fetch/$s_!NMjW!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9cbbdd84-786c-4d01-aabe-718f0a5867fe_1774x887.png 848w, https://substackcdn.com/image/fetch/$s_!NMjW!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9cbbdd84-786c-4d01-aabe-718f0a5867fe_1774x887.png 1272w, https://substackcdn.com/image/fetch/$s_!NMjW!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9cbbdd84-786c-4d01-aabe-718f0a5867fe_1774x887.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 buttonBase-GK1x3M"><svg aria-hidden="true" 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" class="icon-noB79L"><g><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 buttonBase-GK1x3M"><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 icon-noB79L"><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>Here are the necessary controls:</p><ol><li><p><strong><span>Concurrency</span></strong><span>: Controls how much work can run at the &#8220;same time&#8221;, so one workflow/customer cannot consume all available capacity.</span></p></li><li><p><strong><span>Throttling</span></strong><span>: Spreads work over time when a sudden burst would overwhelm downstream services.</span></p></li><li><p><strong><span>Rate limiting</span></strong><span>: Keeps requests within the limits imposed by external providers.</span></p></li><li><p><strong><span>Per-tenant isolation</span></strong><span>: Stops one customer&#8217;s traffic from consuming capacity needed by others.</span></p></li></ol><h3><span>6. Observability</span></h3><p><span>Finally, you need enough history to understand what happened when something goes wrong&#8230;</span></p><p><span>A basic queue can tell you a job failed. A long-running workflow needs more context around the steps, retries, results &amp; failures.</span></p><p><span>Without this history, you have to piece together what happened from queue logs, application logs &amp; tracing tools.</span></p><p><span>Now let&#8217;s see how </span><a href="https://inngest.link/jtH41MP"><span>Inngest</span></a><span> handles all of this&#8230;so you don&#8217;t have to build this yourself&#8230;</span></p><h4 style="text-align: center;"><strong>&#167;</strong></h4><div class="captioned-button-wrap" data-attrs="{&quot;url&quot;:&quot;https://newsletter.systemdesign.one/p/durable-ai-agents?utm_source=substack&utm_medium=email&utm_content=share&action=share&quot;,&quot;text&quot;:&quot;Share&quot;}" data-component-name="CaptionedButtonToDOM"><div class="preamble"><p class="cta-caption"><em><span data-color="#3a7bf9" style="color: rgb(58, 123, 249);">Get 2+ referrals &amp; I&#8217;ll send you my Interview Mistakes to Avoid PDF!</span></em></p></div><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://newsletter.systemdesign.one/p/durable-ai-agents?utm_source=substack&utm_medium=email&utm_content=share&action=share&quot;,&quot;text&quot;:&quot;Share&quot;}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://newsletter.systemdesign.one/p/durable-ai-agents?utm_source=substack&utm_medium=email&utm_content=share&action=share"><span>Share</span></a></p></div><h4 style="text-align: center;"><strong>&#167;</strong></h4><h2><span>What Inngest Is</span></h2><p><a href="https://inngest.link/jtH41MP"><span>Inngest</span></a><span> is a </span><em><span>durable execution platform</span></em><span> for background functions, workflows &amp; AI agents.</span></p><p><span>It sits between your application logic &amp; infrastructure running underneath it. Your model handles generation, while your agent code handles tools &amp; workflow logic.</span></p><p><span>And Inngest takes care of the execution around them, including retries, pauses, recovery &amp; observability.</span></p><p><span>Your functions still run on your own compute &amp; can run in environments such as serverless platforms.</span></p><p><span>i.e., Inngest provides the execution layer without requiring you to build all the workflow infrastructure yourself.</span></p><p><span>Ready for the best part?</span></p><h3><span>step.run() as the Core Primitive</span></h3><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!3w5T!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7f7c8847-36a2-4511-96c3-045325f61beb_1536x1024.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!3w5T!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7f7c8847-36a2-4511-96c3-045325f61beb_1536x1024.png 424w, https://substackcdn.com/image/fetch/$s_!3w5T!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7f7c8847-36a2-4511-96c3-045325f61beb_1536x1024.png 848w, https://substackcdn.com/image/fetch/$s_!3w5T!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7f7c8847-36a2-4511-96c3-045325f61beb_1536x1024.png 1272w, https://substackcdn.com/image/fetch/$s_!3w5T!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7f7c8847-36a2-4511-96c3-045325f61beb_1536x1024.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!3w5T!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7f7c8847-36a2-4511-96c3-045325f61beb_1536x1024.png" width="1456" height="971" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/7f7c8847-36a2-4511-96c3-045325f61beb_1536x1024.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:971,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!3w5T!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7f7c8847-36a2-4511-96c3-045325f61beb_1536x1024.png 424w, https://substackcdn.com/image/fetch/$s_!3w5T!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7f7c8847-36a2-4511-96c3-045325f61beb_1536x1024.png 848w, https://substackcdn.com/image/fetch/$s_!3w5T!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7f7c8847-36a2-4511-96c3-045325f61beb_1536x1024.png 1272w, https://substackcdn.com/image/fetch/$s_!3w5T!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7f7c8847-36a2-4511-96c3-045325f61beb_1536x1024.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 buttonBase-GK1x3M"><svg aria-hidden="true" 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" class="icon-noB79L"><g><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 buttonBase-GK1x3M"><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 icon-noB79L"><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><span>Everything in Inngest starts with </span><code>step.run()</code><a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-5" href="#footnote-5" target="_self">5</a><span>.</span></p><p><span>It wraps a unit of work &amp; gives Inngest a point where it can save the result. Once the step finishes, its result is stored &amp; can be reused if the workflow runs again.</span></p><p><span>So if a later step fails, Inngest does NOT need to rerun earlier steps. Instead, completed results can be reused &amp; execution can continue from the step that still needs to run.</span></p><p><span>Your workflow logic stays in your application code. And Inngest handles the execution around it, while </span><code>step.run()</code><span> gives the runtime a clear &#8220;boundary&#8221; for each piece of work.</span></p><h3><span>Long-Running and Waiting Workflows</span></h3><p><span>Not every workflow finishes in one go.</span></p><p><span>Some need to </span><em><span>pause</span></em><span> for a while before they can continue&#8230;</span></p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!ILYK!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd7661741-145f-4335-86c0-71fbef5e3cb0_1774x887.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!ILYK!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd7661741-145f-4335-86c0-71fbef5e3cb0_1774x887.png 424w, https://substackcdn.com/image/fetch/$s_!ILYK!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd7661741-145f-4335-86c0-71fbef5e3cb0_1774x887.png 848w, https://substackcdn.com/image/fetch/$s_!ILYK!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd7661741-145f-4335-86c0-71fbef5e3cb0_1774x887.png 1272w, https://substackcdn.com/image/fetch/$s_!ILYK!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd7661741-145f-4335-86c0-71fbef5e3cb0_1774x887.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!ILYK!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd7661741-145f-4335-86c0-71fbef5e3cb0_1774x887.png" width="1456" height="728" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/d7661741-145f-4335-86c0-71fbef5e3cb0_1774x887.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:728,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!ILYK!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd7661741-145f-4335-86c0-71fbef5e3cb0_1774x887.png 424w, https://substackcdn.com/image/fetch/$s_!ILYK!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd7661741-145f-4335-86c0-71fbef5e3cb0_1774x887.png 848w, https://substackcdn.com/image/fetch/$s_!ILYK!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd7661741-145f-4335-86c0-71fbef5e3cb0_1774x887.png 1272w, https://substackcdn.com/image/fetch/$s_!ILYK!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd7661741-145f-4335-86c0-71fbef5e3cb0_1774x887.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 buttonBase-GK1x3M"><svg aria-hidden="true" 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" class="icon-noB79L"><g><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 buttonBase-GK1x3M"><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 icon-noB79L"><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><ul><li><p><code>step.sleep()</code><a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-6" href="#footnote-6" target="_self">6</a><span> lets a workflow wait until a specific time.</span></p></li><li><p><code>step.waitForEvent()</code><a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-7" href="#footnote-7" target="_self">7</a><code> </code><span>lets it wait for an event, such as an editor approving a draft or a payment webhook arriving.</span></p></li></ul><p><span>The crucial part is what happens during the wait&#8230;</span></p><p><span>A worker does NOT need to sit there doing nothing. The workflow can pause, keep its state, and continue when the required time/event arrives.</span></p><p><span>This becomes extremely useful for workflows involving human approval and/or external systems, where the next step would not happen for hours/days.</span></p><h3><span>Durable Functions and Durable Endpoints</span></h3><p><span>Inngest supports two ways to run these workflows based on how they are triggered:</span></p><ul><li><p><em><span>Durable functions</span></em><span> run &#8220;asynchronously&#8221; in the background. They can start from an event, schedule, or webhook and continue until the workflow finishes. This fits research agents, ingestion pipelines, and other work where the result does not need to come back immediately.</span></p></li><li><p><em><span>Durable endpoints</span></em><span> are designed for &#8220;user-facing calls&#8221; where the response needs to come back to the user, while the steps inside the request still need durable execution.</span></p></li></ul><p><span>The entry point is different, but both use the same underlying execution model.</span></p><p><span>Now let&#8217;s see how Inngest compares with other ways to build durable workflows&#8230;</span></p><h4 style="text-align: center;"><strong>&#167;</strong></h4><h2><span>BullMQ vs Temporal vs Inngest</span></h2><p><span>Here are three ways to solve the same problem (along with their tradeoffs):</span></p><h3><span>BullMQ: Queue-First</span></h3><p><span>BullMQ makes sense if you need </span><em><span>fine-grained control</span></em><span> over background work.</span></p><p><span>Also it works well when your team already has the expertise to operate the required infrastructure. You get queues, workers, retries, rate limiting &amp; job dependencies out of the box. Your team controls how those pieces are configured &amp; how the workflow is built around them.</span></p><p><span>Yet the tradeoff is the &#8220;operational&#8221; work.</span></p><p><span>Someone has to own the infrastructure, tune the system &amp; deal with the cost when a configuration does not behave as expected in production.</span></p><p><span>So this fits well for organizations with a </span><em><span>dedicated</span></em><span> infrastructure team seeking that level of control.</span></p><h3><span>Temporal: Workflow-First</span></h3><p><span>Temporal takes a more </span><em><span>workflow-centric</span></em><span> approach&#8230;</span></p><p><span>Its biggest advantage shows up when workflows become very complex &amp; depends on/call many other workflows. A dedicated workflow model can make a large web of dependencies easier to keep straight.</span></p><p><span>Yet the tradeoff is &#8220;complexity&#8221;.</span></p><p><span>Temporal is more involved for developers &amp; operators. The extra machinery makes sense when workflows actually need it.</span></p><h3><span>Inngest: Application-Code-First</span></h3><p><span>Inngest takes a </span><em><span>simpler</span></em><span> approach&#8230;</span></p><p><span>The workflow stays in your application code, with steps as the basic units of durable work. Completed steps are saved &amp; reused during recovery, while failed steps can retry independently.</span></p><p><span>Your functions run on your existing compute, while Inngest handles the orchestration around them. You get durable execution without building the workflow infrastructure yourself.</span></p><p>So you take on less infrastructure &amp; workflow complexity.</p><p><span>Yet the tradeoff is </span><em><span>less</span></em><span> low-level control than BullMQ. </span></p><h3><span>Choosing Between Them</span></h3><p><span>There is NO one right choice.</span></p><ul><li><p><span>BullMQ works well when you have the infrastructure team &amp; want to control the system yourself.</span></p></li><li><p><span>Temporal becomes more compelling as the workflow graph grows more complex.</span></p></li><li><p><span>Inngest fits when you want durable execution around application code. It avoids much of the infrastructure &amp; workflow complexity.</span></p></li></ul><p><span>So the question is not which tool has the most features&#8230;.Instead, how much control &amp; complexity your workflow actually needs&#8230;.</span></p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!3WFD!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7e62a8b4-997b-4c95-a161-e5debaae25ef_1536x1024.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!3WFD!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7e62a8b4-997b-4c95-a161-e5debaae25ef_1536x1024.png 424w, https://substackcdn.com/image/fetch/$s_!3WFD!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7e62a8b4-997b-4c95-a161-e5debaae25ef_1536x1024.png 848w, https://substackcdn.com/image/fetch/$s_!3WFD!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7e62a8b4-997b-4c95-a161-e5debaae25ef_1536x1024.png 1272w, https://substackcdn.com/image/fetch/$s_!3WFD!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7e62a8b4-997b-4c95-a161-e5debaae25ef_1536x1024.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!3WFD!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7e62a8b4-997b-4c95-a161-e5debaae25ef_1536x1024.png" width="1456" height="971" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/7e62a8b4-997b-4c95-a161-e5debaae25ef_1536x1024.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:971,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!3WFD!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7e62a8b4-997b-4c95-a161-e5debaae25ef_1536x1024.png 424w, https://substackcdn.com/image/fetch/$s_!3WFD!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7e62a8b4-997b-4c95-a161-e5debaae25ef_1536x1024.png 848w, https://substackcdn.com/image/fetch/$s_!3WFD!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7e62a8b4-997b-4c95-a161-e5debaae25ef_1536x1024.png 1272w, https://substackcdn.com/image/fetch/$s_!3WFD!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7e62a8b4-997b-4c95-a161-e5debaae25ef_1536x1024.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 buttonBase-GK1x3M"><svg aria-hidden="true" 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" class="icon-noB79L"><g><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 buttonBase-GK1x3M"><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 icon-noB79L"><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>Let&#8217;s keep going!</p><h4 style="text-align: center;"><strong>&#167;</strong></h4><div class="callout-block" data-callout="true"><h3><a href="https://inngest.link/jtH41MP">Don&#8217;t let agent failures blow the budget (Partner)</a></h3><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://inngest.link/jtH41MP" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!i9Kg!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1e7c0083-b0b6-4069-af0c-afdaf57a25ec_1200x675.png 424w, https://substackcdn.com/image/fetch/$s_!i9Kg!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1e7c0083-b0b6-4069-af0c-afdaf57a25ec_1200x675.png 848w, https://substackcdn.com/image/fetch/$s_!i9Kg!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1e7c0083-b0b6-4069-af0c-afdaf57a25ec_1200x675.png 1272w, https://substackcdn.com/image/fetch/$s_!i9Kg!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1e7c0083-b0b6-4069-af0c-afdaf57a25ec_1200x675.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!i9Kg!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1e7c0083-b0b6-4069-af0c-afdaf57a25ec_1200x675.png" width="1200" height="675" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/1e7c0083-b0b6-4069-af0c-afdaf57a25ec_1200x675.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:675,&quot;width&quot;:1200,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;&quot;,&quot;title&quot;:&quot;&quot;,&quot;type&quot;:null,&quot;href&quot;:&quot;https://inngest.link/jtH41MP&quot;,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" title="" srcset="https://substackcdn.com/image/fetch/$s_!i9Kg!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1e7c0083-b0b6-4069-af0c-afdaf57a25ec_1200x675.png 424w, https://substackcdn.com/image/fetch/$s_!i9Kg!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1e7c0083-b0b6-4069-af0c-afdaf57a25ec_1200x675.png 848w, https://substackcdn.com/image/fetch/$s_!i9Kg!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1e7c0083-b0b6-4069-af0c-afdaf57a25ec_1200x675.png 1272w, https://substackcdn.com/image/fetch/$s_!i9Kg!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1e7c0083-b0b6-4069-af0c-afdaf57a25ec_1200x675.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 buttonBase-GK1x3M"><svg aria-hidden="true" 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" class="icon-noB79L"><g><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 buttonBase-GK1x3M"><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 icon-noB79L"><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>Agents, like all of us, often need to recover from failure. But they shouldn&#8217;t start from scratch.</p><p>Inngest&#8217;s durable execution checkpoints your agents every step of the way.</p><p>So your agents can pick up where they left off and avoid doubling up on token &amp; compute spend.</p><p><strong><a href="https://inngest.link/jtH41MP"><span>Build durably with Inngest</span></a></strong><span> - includes a generous free tier and a sleek local dev server.</span></p></div><h4 style="text-align: center;"><strong>&#167;</strong></h4><h2><span>Under the Hood: How Inngest Executes a Function</span></h2><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!0aex!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb2792a82-bfbf-4e86-a878-9f0b4aa1fa40_1774x887.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!0aex!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb2792a82-bfbf-4e86-a878-9f0b4aa1fa40_1774x887.png 424w, https://substackcdn.com/image/fetch/$s_!0aex!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb2792a82-bfbf-4e86-a878-9f0b4aa1fa40_1774x887.png 848w, https://substackcdn.com/image/fetch/$s_!0aex!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb2792a82-bfbf-4e86-a878-9f0b4aa1fa40_1774x887.png 1272w, https://substackcdn.com/image/fetch/$s_!0aex!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb2792a82-bfbf-4e86-a878-9f0b4aa1fa40_1774x887.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!0aex!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb2792a82-bfbf-4e86-a878-9f0b4aa1fa40_1774x887.png" width="1456" height="728" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/b2792a82-bfbf-4e86-a878-9f0b4aa1fa40_1774x887.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:728,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!0aex!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb2792a82-bfbf-4e86-a878-9f0b4aa1fa40_1774x887.png 424w, https://substackcdn.com/image/fetch/$s_!0aex!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb2792a82-bfbf-4e86-a878-9f0b4aa1fa40_1774x887.png 848w, https://substackcdn.com/image/fetch/$s_!0aex!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb2792a82-bfbf-4e86-a878-9f0b4aa1fa40_1774x887.png 1272w, https://substackcdn.com/image/fetch/$s_!0aex!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb2792a82-bfbf-4e86-a878-9f0b4aa1fa40_1774x887.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 buttonBase-GK1x3M"><svg aria-hidden="true" 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" class="icon-noB79L"><g><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 buttonBase-GK1x3M"><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 icon-noB79L"><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><span>Every Inngest function follows the same basic execution pattern:</span></p><p><span>A trigger starts the run, steps execute one by one, their results get saved, and later executions reuse the work already completed.</span></p><p><span>Once you see this flow, the recovery behavior becomes much easier to understand&#8230;</span></p><h3><span>Step 1: Starting an Execution</span></h3><p><span>A run can start from an event, a schedule, or a webhook.</span></p><p><span>When the trigger fires, Inngest invokes your function over HTTP. Your function still runs on your own compute. You could be using a serverless platform, a container, or a traditional server.</span></p><p><span>There is NO separate worker process sitting there waiting for your function.</span></p><p><span>Inngest coordinates the execution, while your existing application environment runs the code.</span></p><h3><span>Step 2: Discovering Completed Steps</span></h3><p><span>The interesting part starts when the function should rerun...</span></p><p><span>The function begins from the top, but Inngest already knows which steps have been completed. Before running a step, the SDK checks its saved state.</span></p><p><span>If the step has a recorded result, the SDK returns this result instead of running the code again.</span></p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!QWDY!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1cefdf17-77a5-4232-8526-36f2cdd9f6a1_1536x1024.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!QWDY!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1cefdf17-77a5-4232-8526-36f2cdd9f6a1_1536x1024.png 424w, https://substackcdn.com/image/fetch/$s_!QWDY!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1cefdf17-77a5-4232-8526-36f2cdd9f6a1_1536x1024.png 848w, https://substackcdn.com/image/fetch/$s_!QWDY!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1cefdf17-77a5-4232-8526-36f2cdd9f6a1_1536x1024.png 1272w, https://substackcdn.com/image/fetch/$s_!QWDY!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1cefdf17-77a5-4232-8526-36f2cdd9f6a1_1536x1024.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!QWDY!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1cefdf17-77a5-4232-8526-36f2cdd9f6a1_1536x1024.png" width="1456" height="971" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/1cefdf17-77a5-4232-8526-36f2cdd9f6a1_1536x1024.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:971,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!QWDY!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1cefdf17-77a5-4232-8526-36f2cdd9f6a1_1536x1024.png 424w, https://substackcdn.com/image/fetch/$s_!QWDY!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1cefdf17-77a5-4232-8526-36f2cdd9f6a1_1536x1024.png 848w, https://substackcdn.com/image/fetch/$s_!QWDY!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1cefdf17-77a5-4232-8526-36f2cdd9f6a1_1536x1024.png 1272w, https://substackcdn.com/image/fetch/$s_!QWDY!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1cefdf17-77a5-4232-8526-36f2cdd9f6a1_1536x1024.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 buttonBase-GK1x3M"><svg aria-hidden="true" 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" class="icon-noB79L"><g><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 buttonBase-GK1x3M"><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 icon-noB79L"><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><span>Each step has its own ID, and Inngest uses the step ID to identify its stored state.</span></p><p><span>SDK hashes the ID &amp; use it to look up the previous result. This is also why completed steps can be reused across later executions &amp; deployments.</span></p><p><span>So the function would run from the start again, but the completed work does not.</span></p><h3><span>Step 3: Executing New Steps</span></h3><p><span>Any step </span><em><span>without</span></em><span> a saved result still needs to run.</span></p><p><span>Inngest executes each step separately &amp; records the result when it finishes. The result then becomes available to the next part of the workflow.</span></p><p><span>If the function runs again later, Inngest can use the recorded result instead of re-executing the same step. This lets a workflow move forward </span><em><span>without</span></em><span> repeating everything it has already finished.</span></p><h3><span>Step 4: Checkpointing</span></h3><p><span>Inngest can checkpoint progress as the function runs instead of waiting for the full workflow to finish.</span></p><p><span>With checkpointing enabled, the SDK can execute steps immediately and send progress back to Inngest as those steps complete. This reduces extra latency between steps while still recording the workflow&#8217;s progress.</span></p><p><span>This is especially useful for AI workflows, where a function could contain many small steps and even tiny extra latency between each one can add up.</span></p><p><span>If a step fails &amp; needs to retry, Inngest can fall back to its standard orchestration path to handle the failure safely. So you get faster execution when things go well, without losing recovery behavior when they don&#8217;t.</span></p><h3><span>Step 5: Waiting Without Holding Compute</span></h3><p><span>Some workflows reach a point where they simply need to wait&#8230;</span></p><ul><li><p><code>step.sleep()</code><span> can pause execution until a specific time.</span></p></li><li><p><span>While </span><code>step.waitForEvent() </code><span>waits for an external event, such as an editor approving a draft or another system confirming a payment.</span></p></li></ul><p><span>Also you can configure a timeout for an event wait.</span></p><p><span>Your function does NOT need to keep a worker process running just to sit there while waiting. Inngest tracks the workflow, and when the required time/event arrives, execution can continue with the </span>recorded <span>progress.</span></p><p><span>So a workflow can start on one machine, pause for hours/days, and continue later </span><em><span>without</span></em><span> keeping compute occupied the entire time.</span></p><p><span>Everything looks pretty smooth so far&#8230;But real workflows rarely stay this way.</span></p><p><span>Let&#8217;s see what happens when something goes wrong&#8230;</span></p><h4 style="text-align: center;"><strong>&#167;</strong></h4><h2><span>How Inngest Handles Failures</span></h2><p><span>Once a workflow runs for a while, things can go wrong in different ways.</span></p><p><span>A retry is useful in some cases but not in others&#8230;</span></p><p><span>A temporary failure can usually be retried, while a process crash requires the workflow to recover its previous progress. Duplicate execution brings its own problems, and some workflows simply need to wait for a person before they can continue.</span></p><p><span>There is also one more case to consider:</span></p><p><span>The workflow can finish </span><em><span>without</span></em><span> technical errors and still produce a BAD result.</span></p><p><span>So instead of treating each failure the same way, let&#8217;s look at what each one requires...</span></p><h3><span>Transient and Permanent Failures</span></h3><p><span>An LLM request could time out, or the provider could return a </span><code>429 HTTP status</code><span> because you have hit a rate limit.</span></p><p><span>In either case, the problem could disappear on the next attempt, so retrying the step makes sense.</span></p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!Zjys!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F516bd17e-cfd6-440b-9707-9e884031fc73_1536x1024.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!Zjys!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F516bd17e-cfd6-440b-9707-9e884031fc73_1536x1024.png 424w, https://substackcdn.com/image/fetch/$s_!Zjys!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F516bd17e-cfd6-440b-9707-9e884031fc73_1536x1024.png 848w, https://substackcdn.com/image/fetch/$s_!Zjys!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F516bd17e-cfd6-440b-9707-9e884031fc73_1536x1024.png 1272w, https://substackcdn.com/image/fetch/$s_!Zjys!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F516bd17e-cfd6-440b-9707-9e884031fc73_1536x1024.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!Zjys!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F516bd17e-cfd6-440b-9707-9e884031fc73_1536x1024.png" width="1456" height="971" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/516bd17e-cfd6-440b-9707-9e884031fc73_1536x1024.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:971,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!Zjys!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F516bd17e-cfd6-440b-9707-9e884031fc73_1536x1024.png 424w, https://substackcdn.com/image/fetch/$s_!Zjys!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F516bd17e-cfd6-440b-9707-9e884031fc73_1536x1024.png 848w, https://substackcdn.com/image/fetch/$s_!Zjys!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F516bd17e-cfd6-440b-9707-9e884031fc73_1536x1024.png 1272w, https://substackcdn.com/image/fetch/$s_!Zjys!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F516bd17e-cfd6-440b-9707-9e884031fc73_1536x1024.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 buttonBase-GK1x3M"><svg aria-hidden="true" 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" class="icon-noB79L"><g><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 buttonBase-GK1x3M"><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 icon-noB79L"><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><span>Inngest retries steps independently.</span></p><p><span>i.e., a failed drafting step can run again without repeating the retrieval &amp; extraction steps.</span></p><p><span>If you configure </span><code>retries: 5</code><a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-8" href="#footnote-8" target="_self">8</a><span>, the step gets five retries after its initial attempt, while the completed steps keep their recorded results.</span></p><p><span>But some errors won't fix themselves&#8230;</span></p><p><span>If the request is invalid/API key is wrong, running the same step again will most likely produce the same error. Inngest lets you mark an error as non-retriable, so it skips the remaining attempts &amp; moves the run toward its failure path.</span></p><p><span>Once all retries have been used, </span><code>onFailure</code><span> can handle the failed run.</span></p><p><span>It can send an alert, notify a user, trigger a fallback, or pass the problem to another part of the system.</span></p><h3><span>Infrastructure Failures</span></h3><p><span>Retries are NO help when the process running the workflow </span><em><span>disappears</span></em><span>&#8230;</span></p><p><span>Suppose several steps have already completed but the process restarted before the next step finished. When the function reruns, it needs to know which work has already been done.</span></p><p><span>Inngest keeps the results of completed steps; so those results can be reused when execution starts again. The workflow can then continue from its saved progress instead of rerunning all the earlier steps.</span></p><p><span>So even though the process itself did not survive, the work it had already completed does.</span></p><h3><span>Duplicate Execution</span></h3><p><span>Recovery can also create a different problem:</span></p><p><span>If the same operation runs again, you need to make sure it does NOT accidentally perform the same action &#8220;twice&#8221;.</span></p><p><span>A webhook could arrive more than once, or a function could get re-triggered after a failure. Inngest provides event IDs &amp; function-level idempotency keys to prevent duplicate function executions for the same operation.</span></p><p><span>Yet the external action still needs its own protection.</span></p><p><span>If the workflow sends emails and/or writes to a database, you&#8217;d need an idempotency key, an upsert, an existence check, or a deterministic identifier so the operation remains safe to reattempt.</span></p><p><span>Inngest can help prevent the function from running twice, but &#8220;your&#8221; application still needs to make its side effects safe.</span></p><h3><span>Human Delays</span></h3><p><span>Think of a research agent&#8230;</span></p><p><span>Once the draft is ready, an editor would need to approve it before publishing. Approval could arrive in a few minutes/days, so keeping compute running the entire time wouldn't make much sense.</span></p><p><span>Instead, the workflow can wait for the required event </span>with <code>step.waitForEvent()</code><span>. Also you can set a timeout for cases where the event never arrives. Once the matching event arrives, the workflow continues with its previous progress intact.</span></p><p><span>From there, you can handle the result normally&#8230;</span></p><p><span>An approval can continue the workflow, a rejection can stop it, and a timeout can trigger an escalation/fallback.</span></p><h3><span>Disconnected Clients</span></h3><p><span>Sometimes the workflow is fine, but the connection to the user breaks.</span></p><p><span>Token streaming is a good example:</span></p><p><span>An agent can be in the middle of a model turn/tool call when the browser closes or the connection drops. The agent can keep running in the background, while the browser simply reconnects later &amp; catches up with the stream.</span></p><p><span>This separates the agent&#8217;s execution from the connection delivering its output.</span></p><p><span>i.e., the browser can disappear without taking the workflow with it, and when the user comes back, the result is still there.</span></p><h3><span>Outcome Failures</span></h3><p><span>The workflow can finish successfully but still give you a BAD result.</span></p><p><span>An agent could choose the wrong tool, miss an important source, or produce an answer a reviewer rejects. Technically, everything worked because every step completed without an error.</span></p><p><span>But completing the workflow is NOT the same as producing a good outcome.</span></p><p><span>The execution system can tell you whether the work finished&#8230; yet it cannot decide by itself whether the result was actually good&#8230;</span></p><p><span>For this, you need scoring and evaluation; let&#8217;s look at it next&#8230;</span></p><h4 style="text-align: center;"><strong>&#167;</strong></h4><div class="captioned-button-wrap" data-attrs="{&quot;url&quot;:&quot;https://newsletter.systemdesign.one/p/durable-ai-agents?utm_source=substack&utm_medium=email&utm_content=share&action=share&quot;,&quot;text&quot;:&quot;Share&quot;}" data-component-name="CaptionedButtonToDOM"><div class="preamble"><p class="cta-caption"><em><span data-color="#3a7bf9" style="color: rgb(58, 123, 249);">Get 3+ referrals &amp; I&#8217;ll send you Popular Interview Questions PDF!</span></em></p></div><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://newsletter.systemdesign.one/p/durable-ai-agents?utm_source=substack&utm_medium=email&utm_content=share&action=share&quot;,&quot;text&quot;:&quot;Share&quot;}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://newsletter.systemdesign.one/p/durable-ai-agents?utm_source=substack&utm_medium=email&utm_content=share&action=share"><span>Share</span></a></p></div><h4 style="text-align: center;"><strong>&#167;</strong></h4><h2><span>Other Pieces That Matter in Production</span></h2><p>Let&#8217;s dive in!</p><h3><span>Handling Traffic and Concurrency</span></h3><p><span>A workflow recovering correctly can cause problems if </span><em><span>too much work</span></em><span> arrives at once.</span></p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!2Uoo!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F66ef2e4e-8c28-4386-b3ab-9d042b3df20e_1536x1024.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!2Uoo!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F66ef2e4e-8c28-4386-b3ab-9d042b3df20e_1536x1024.png 424w, https://substackcdn.com/image/fetch/$s_!2Uoo!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F66ef2e4e-8c28-4386-b3ab-9d042b3df20e_1536x1024.png 848w, https://substackcdn.com/image/fetch/$s_!2Uoo!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F66ef2e4e-8c28-4386-b3ab-9d042b3df20e_1536x1024.png 1272w, https://substackcdn.com/image/fetch/$s_!2Uoo!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F66ef2e4e-8c28-4386-b3ab-9d042b3df20e_1536x1024.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!2Uoo!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F66ef2e4e-8c28-4386-b3ab-9d042b3df20e_1536x1024.png" width="1456" height="971" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/66ef2e4e-8c28-4386-b3ab-9d042b3df20e_1536x1024.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:971,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!2Uoo!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F66ef2e4e-8c28-4386-b3ab-9d042b3df20e_1536x1024.png 424w, https://substackcdn.com/image/fetch/$s_!2Uoo!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F66ef2e4e-8c28-4386-b3ab-9d042b3df20e_1536x1024.png 848w, https://substackcdn.com/image/fetch/$s_!2Uoo!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F66ef2e4e-8c28-4386-b3ab-9d042b3df20e_1536x1024.png 1272w, https://substackcdn.com/image/fetch/$s_!2Uoo!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F66ef2e4e-8c28-4386-b3ab-9d042b3df20e_1536x1024.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 buttonBase-GK1x3M"><svg aria-hidden="true" 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" class="icon-noB79L"><g><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 buttonBase-GK1x3M"><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 icon-noB79L"><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><span>A burst from one customer can fill the queue, hit a shared LLM provider&#8217;s rate limit, and &#8220;slow down&#8221; everyone else. So the system needs ways to control how much work runs &amp; how quickly new work starts.</span></p><p><span>Here are the flow-control tools used by Inngest:</span></p><ol><li><p><strong><span>Concurrency</span></strong><span>: Controls how much work can run at the same time. If a database struggles beyond 20 concurrent writes, a concurrency limit keeps the workflow from overwhelming it.</span></p></li><li><p><strong><span>Throttling</span></strong><span>: Controls how quickly new work starts. If an API allows 100 requests per minute, throttling spreads the work out instead of sending everything at once.</span></p></li><li><p><strong><span>Rate limiting</span></strong><span>: Instead of holding excess work for later, it skips events once the configured limit is reached. This is pretty useful when some events are better dropped than processed later.</span></p></li><li><p><strong><span>Debouncing</span></strong><span>: Helps when many events arrive within a short period, but only the final state matters. Instead of running the function for every event, the system waits until the burst settles before starting it.</span></p></li><li><p><strong><span>Priority</span></strong><span>: Lets more important work move ahead when capacity is limited. A critical workflow does not have to sit behind a large amount of lower-priority work.</span></p></li></ol><p><span>These controls sit alongside the execution&#8230;so traffic management does not become another layer around the workflow.</span></p><h3><span>Seeing What Happened</span></h3><p><span>Once something fails, you need to see what happened before you can fix it.</span></p><p><span>A basic queue usually gives you the job &amp; its final status. For a long-running workflow,,, you need more. You need to see where the run spent its time, which steps completed, what retried &amp; where execution stopped.</span></p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!N-hv!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F375bf6f0-bbf7-4aef-b312-ad5f41893ec8_1686x933.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!N-hv!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F375bf6f0-bbf7-4aef-b312-ad5f41893ec8_1686x933.png 424w, https://substackcdn.com/image/fetch/$s_!N-hv!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F375bf6f0-bbf7-4aef-b312-ad5f41893ec8_1686x933.png 848w, https://substackcdn.com/image/fetch/$s_!N-hv!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F375bf6f0-bbf7-4aef-b312-ad5f41893ec8_1686x933.png 1272w, https://substackcdn.com/image/fetch/$s_!N-hv!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F375bf6f0-bbf7-4aef-b312-ad5f41893ec8_1686x933.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!N-hv!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F375bf6f0-bbf7-4aef-b312-ad5f41893ec8_1686x933.png" width="1456" height="806" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/375bf6f0-bbf7-4aef-b312-ad5f41893ec8_1686x933.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:806,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!N-hv!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F375bf6f0-bbf7-4aef-b312-ad5f41893ec8_1686x933.png 424w, https://substackcdn.com/image/fetch/$s_!N-hv!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F375bf6f0-bbf7-4aef-b312-ad5f41893ec8_1686x933.png 848w, https://substackcdn.com/image/fetch/$s_!N-hv!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F375bf6f0-bbf7-4aef-b312-ad5f41893ec8_1686x933.png 1272w, https://substackcdn.com/image/fetch/$s_!N-hv!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F375bf6f0-bbf7-4aef-b312-ad5f41893ec8_1686x933.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 buttonBase-GK1x3M"><svg aria-hidden="true" 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" class="icon-noB79L"><g><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 buttonBase-GK1x3M"><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 icon-noB79L"><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><span>Inngest automatically traces function runs.</span></p><p><span>The trace shows step timing, queue delays, retries, and the data going into &amp; coming out of each step. You can follow the whole workflow in one place instead of piecing it together from queue logs, application logs &amp; separate tracing tools.</span></p><p><span>And when you fix the problem, you can replay the affected runs instead of rebuilding them manually. Inngest lets you select runs by time range and status and replay them in bulk.</span></p><p><span>Plus, replays are spread over time so a large recovery does NOT overwhelm the application.</span></p><h3><span>Execution Success vs Outcome Success</span></h3><p><span>Execution tells you whether the workflow finished&#8230;but it does NOT tell you whether the result was good.</span></p><p><span>Inngest lets you attach scores to a run/step.</span></p><p><span>This keeps user feedback, human review, or business outcomes connected to the execution that produced them. The score can also arrive after the workflow has finished. This is extremely useful when a result's quality only becomes clear later.</span></p><p><span>It gives you two different things to look at:</span></p><ul><li><p><span>You can see whether the workflow completed.</span></p></li><li><p><span>And you can see whether it actually did the right thing.</span></p></li></ul><p><span>But you still need to handle a few pieces yourself.</span></p><p><span>Let&#8217;s have a look at what they are&#8230;</span></p><h4 style="text-align: center;"><strong>&#167;</strong></h4><h2><span>What You Still Have to Handle</span></h2><p><span>Here are some responsibilities that still belong to your application:</span></p><h3><span>Idempotent Side Effects</span></h3><p><span>A step can rerun after an error, so the code inside it needs to be &#8220;safe&#8221;.</span></p><p><span>For example, inserting a new user twice can create two records if the first write succeeded, but the response never reached the application. An upsert/deterministic identifier can make the second attempt harmless.</span></p><p><span>The same applies to emails, payments, API calls, or/and other external actions.</span></p><p><span>Inngest can control when a step runs again, but the application still needs to decide what happens when the external operation is attempted again.</span></p><h3><span>Good Step Boundaries and Stable Step Identities</span></h3><p><span>How you split the workflow into steps is still a design decision&#8230;</span></p><p><span>A step should represent a meaningful &#8220;unit of work&#8221;. Put too much inside one step, and a retry could repeat more work than necessary. Split everything into tiny steps, and the workflow becomes harder to reason about.</span></p><p><span>Step IDs matter for the same reason&#8230;</span></p><p><span>Inngest uses them to memoize completed work, so changing an existing step&#8217;s ID makes Inngest treat it as a different step. The SDK also uses a counter when the same step runs inside a loop, so the ID can stay stable across iterations.</span></p><p><span>The execution layer can preserve the state, but it cannot decide where your workflow should draw its boundaries.</span></p><h3><span>Retry and Failure Policies</span></h3><p><span>Inngest handles retries automatically,,, but the application still needs to decide when a retry makes sense.</span></p><p><span>A network timeout is usually worth another attempt, but an invalid API key is not. You can mark permanent errors as non-retriable, while </span><code>onFailure</code><a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-9" href="#footnote-9" target="_self">9</a><span> gives the workflow a place to go once its retries are exhausted. The default is four retries after the initial attempt, and you can configure this per function.</span></p><p><span>The right response after failure depends on the workflow:</span></p><p><span>Sometimes you need an alert, and sometimes you need a fallback. In other cases, the user needs to be told that the operation could not finish.</span></p><h3><span>Data Consistency Across External Systems</span></h3><p><span>Durable execution keeps the workflow&#8217;s progress.</span></p><p><span>Yet it does NOT combine several external systems into one transaction.</span></p><p><span>Suppose a workflow records a payment &amp; then creates an order. If the payment succeeds but the process fails before the order gets created, retrying the workflow does not automatically undo the payment.</span></p><p><span>The application still needs a way to make the two operations work &#8220;safely&#8221; together. Idempotency, compensating actions, and careful ordering can help based on the systems involved.</span></p><p><span>This becomes highly crucial when a workflow touches many external systems.</span></p><p><span>The execution layer can keep the workflow moving, but the application still owns the consistency of the data it changes.</span></p><p><span>Let&#8217;s put all of this into one workflow &amp; see how it works together&#8230;</span></p><h4 style="text-align: center;"><strong>&#167;</strong></h4><h2><span>Putting It All Together: A Durable Research Agent</span></h2><p><span>Let&#8217;s see what all of it looks like in a real workflow using a research agent:</span></p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!pLUA!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F22757d5a-88c6-4760-bb1f-4993c5dd6c36_1916x821.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!pLUA!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F22757d5a-88c6-4760-bb1f-4993c5dd6c36_1916x821.png 424w, https://substackcdn.com/image/fetch/$s_!pLUA!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F22757d5a-88c6-4760-bb1f-4993c5dd6c36_1916x821.png 848w, https://substackcdn.com/image/fetch/$s_!pLUA!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F22757d5a-88c6-4760-bb1f-4993c5dd6c36_1916x821.png 1272w, https://substackcdn.com/image/fetch/$s_!pLUA!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F22757d5a-88c6-4760-bb1f-4993c5dd6c36_1916x821.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!pLUA!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F22757d5a-88c6-4760-bb1f-4993c5dd6c36_1916x821.png" width="1456" height="624" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/22757d5a-88c6-4760-bb1f-4993c5dd6c36_1916x821.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:624,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!pLUA!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F22757d5a-88c6-4760-bb1f-4993c5dd6c36_1916x821.png 424w, https://substackcdn.com/image/fetch/$s_!pLUA!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F22757d5a-88c6-4760-bb1f-4993c5dd6c36_1916x821.png 848w, https://substackcdn.com/image/fetch/$s_!pLUA!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F22757d5a-88c6-4760-bb1f-4993c5dd6c36_1916x821.png 1272w, https://substackcdn.com/image/fetch/$s_!pLUA!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F22757d5a-88c6-4760-bb1f-4993c5dd6c36_1916x821.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 buttonBase-GK1x3M"><svg aria-hidden="true" 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" class="icon-noB79L"><g><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 buttonBase-GK1x3M"><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 icon-noB79L"><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><h3><span>Workflow Starts</span></h3><p><span>The agent first retrieves its sources &amp; extracts the evidence it needs.</span></p><p><span>Each part runs as its own step, and once a step finishes, its result is saved.</span></p><p><span>So when retrieval &amp; extraction are done, the workflow already has two completed pieces of work it can reuse later.</span></p><h3><span>Failure and Recovery</span></h3><p><span>The agent moves on to drafting, but the model provider </span><em><span>times out </span></em><span>halfway through the step&#8230;</span></p><p><span>Yet the workflow does NOT start over. The drafting step retries, while the retrieval &amp; extraction results stay </span><em><span>untouched</span></em><span>. Once the draft succeeds, its result is saved &amp; the workflow can move on.</span></p><p><span>This is where checkpointing becomes very useful&#8230;</span></p><p><span>The workflow does NOT need to remember everything in the worker process because the completed work is already persisted.</span></p><h3><span>Waiting for Human Input</span></h3><p><span>The draft now needs editor approval&#8230;</span></p><p><span>So the workflow calls </span><code>step.waitForEvent() </code><span>and pauses.</span></p><p><span>Nothing needs to keep running while the editor decides. Two days later, the approval event arrives, and the workflow continues with the publishing step.</span></p><p><span>The same workflow has now survived a model failure &amp; a two-day wait without losing its progress.</span></p><h3><span>Execution History and Replay</span></h3><p><span>Once publishing finishes, the run still has a complete execution history.</span></p><p><span>You can see how the workflow progressed, where it retried, and how long each part took.</span></p><p><span>If the final answer turns out to be poor, a score can be attached to the run later. And if a fix needs to be tested against previous executions, the affected runs can be replayed instead of rebuilding them manually.</span></p><p><span>By the end, the workflow has done more than simply finish.</span></p><p><span>It has recovered from a failure, waited for a human without holding compute, preserved its progress, and left behind a history of what happened along the way.</span></p><h4 style="text-align: center;"><strong>&#167;</strong></h4><h2><span>Closing Thoughts</span></h2><p><span>Reliable AI agents need more than a model that produces good answers&#8230;</span></p><p><span>Once an agent runs long workflows, calls external tools, waits for people, and handles real traffic, the </span><em><span>execution layer</span></em><span> becomes just as important.</span></p><p><span>Here are the key takeaways for you:</span></p><ul><li><p><span>Durable execution saves progress. Completed steps can be reused after a failure instead of rerunning the whole workflow.</span></p></li><li><p><span>Retries need protection. Idempotency, backoff &amp; clear failure paths keep retries from creating bigger problems.</span></p></li><li><p><span>Waiting is part of the workflow. Human approvals and external events can take hours/days without keeping compute running.</span></p></li><li><p><span>Flow control is part of reliability. Concurrency, throttling, and rate limits keep one traffic spike from affecting everyone else.</span></p></li><li><p><span>Execution history matters. Knowing what ran, what failed, and what retried makes debugging much easier.</span></p></li><li><p><span>A successful run is not always a good run. Scoring and evaluation help measure result quality.</span></p></li></ul><p><span>BullMQ gives you queue primitives. Temporal gives you a workflow model. </span><strong><a href="https://inngest.link/jtH41MP"><span>Inngest</span></a></strong><span> puts durable execution around the application code you already write.</span></p><p><span>For AI agents, that application-centric approach is what makes Inngest particularly compelling.</span></p><h4 style="text-align: center;"><strong>&#167;</strong></h4><div class="callout-block" data-callout="true"><h3><a href="https://inngest.link/jtH41MP">Don&#8217;t let agent failures blow the budget (Partner)</a></h3><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://inngest.link/jtH41MP" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!i9Kg!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1e7c0083-b0b6-4069-af0c-afdaf57a25ec_1200x675.png 424w, https://substackcdn.com/image/fetch/$s_!i9Kg!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1e7c0083-b0b6-4069-af0c-afdaf57a25ec_1200x675.png 848w, https://substackcdn.com/image/fetch/$s_!i9Kg!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1e7c0083-b0b6-4069-af0c-afdaf57a25ec_1200x675.png 1272w, https://substackcdn.com/image/fetch/$s_!i9Kg!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1e7c0083-b0b6-4069-af0c-afdaf57a25ec_1200x675.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!i9Kg!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1e7c0083-b0b6-4069-af0c-afdaf57a25ec_1200x675.png" width="1200" height="675" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/1e7c0083-b0b6-4069-af0c-afdaf57a25ec_1200x675.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:675,&quot;width&quot;:1200,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;&quot;,&quot;title&quot;:&quot;&quot;,&quot;type&quot;:null,&quot;href&quot;:&quot;https://inngest.link/jtH41MP&quot;,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" title="" srcset="https://substackcdn.com/image/fetch/$s_!i9Kg!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1e7c0083-b0b6-4069-af0c-afdaf57a25ec_1200x675.png 424w, https://substackcdn.com/image/fetch/$s_!i9Kg!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1e7c0083-b0b6-4069-af0c-afdaf57a25ec_1200x675.png 848w, https://substackcdn.com/image/fetch/$s_!i9Kg!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1e7c0083-b0b6-4069-af0c-afdaf57a25ec_1200x675.png 1272w, https://substackcdn.com/image/fetch/$s_!i9Kg!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1e7c0083-b0b6-4069-af0c-afdaf57a25ec_1200x675.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 buttonBase-GK1x3M"><svg aria-hidden="true" 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" class="icon-noB79L"><g><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 buttonBase-GK1x3M"><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 icon-noB79L"><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>Agents, like all of us, often need to recover from failure. But they shouldn&#8217;t start from scratch.</p><p>Inngest&#8217;s durable execution checkpoints your agents every step of the way.</p><p>So your agents can pick up where they left off and avoid doubling up on token &amp; compute spend.</p><p><a href="https://inngest.link/jtH41MP">Inngest</a> offers a generous free tier and a sleek local dev server for testing.</p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://inngest.link/jtH41MP&quot;,&quot;text&quot;:&quot;Build durably with Inngest&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://inngest.link/jtH41MP"><span>Build durably with Inngest</span></a></p></div><div><hr></div><p>If you find this newsletter valuable, share it with a friend, and subscribe if you haven&#8217;t already. There are <a href="http://newsletter.systemdesign.one/subscribe?group=true">group discounts</a>, <a href="http://newsletter.systemdesign.one/subscribe?gift=true">gift options</a>, and <a href="https://newsletter.systemdesign.one/leaderboard">referral rewards</a> available.</p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://newsletter.systemdesign.one/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe now&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://newsletter.systemdesign.one/subscribe?"><span>Subscribe now</span></a></p><div><hr></div><div class="captioned-image-container"><figure><a class="image-link image2" target="_blank" href="https://www.linkedin.com/in/nk-systemdesign-one/" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!bEFk!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8f94ab8c-0d67-4775-992e-05e09ab710db_320x320.png 424w, https://substackcdn.com/image/fetch/$s_!bEFk!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8f94ab8c-0d67-4775-992e-05e09ab710db_320x320.png 848w, https://substackcdn.com/image/fetch/$s_!bEFk!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8f94ab8c-0d67-4775-992e-05e09ab710db_320x320.png 1272w, https://substackcdn.com/image/fetch/$s_!bEFk!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8f94ab8c-0d67-4775-992e-05e09ab710db_320x320.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!bEFk!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8f94ab8c-0d67-4775-992e-05e09ab710db_320x320.png" width="152" height="152" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/8f94ab8c-0d67-4775-992e-05e09ab710db_320x320.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:320,&quot;width&quot;:320,&quot;resizeWidth&quot;:152,&quot;bytes&quot;:74009,&quot;alt&quot;:&quot;Author Neo Kim; System design case studies&quot;,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:&quot;https://www.linkedin.com/in/nk-systemdesign-one/&quot;,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="Author Neo Kim; System design case studies" title="Author Neo Kim; System design case studies" srcset="https://substackcdn.com/image/fetch/$s_!bEFk!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8f94ab8c-0d67-4775-992e-05e09ab710db_320x320.png 424w, https://substackcdn.com/image/fetch/$s_!bEFk!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8f94ab8c-0d67-4775-992e-05e09ab710db_320x320.png 848w, https://substackcdn.com/image/fetch/$s_!bEFk!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8f94ab8c-0d67-4775-992e-05e09ab710db_320x320.png 1272w, https://substackcdn.com/image/fetch/$s_!bEFk!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8f94ab8c-0d67-4775-992e-05e09ab710db_320x320.png 1456w" sizes="100vw" loading="lazy"></picture><div></div></div></a><figcaption class="image-caption"><strong>Find me on <a href="https://www.linkedin.com/in/nk-systemdesign-one/">LinkedIn</a> | <a href="https://x.com/intent/follow?screen_name=systemdesignone">Twitter</a> | <a href="https://www.instagram.com/systemdesignone/">Instagram</a></strong></figcaption></figure></div><div><hr></div><p><strong>Want to reach 241K+ tech professionals at scale? </strong>&#128240;</p><p>If your company wants to reach 241K+ tech professionals, <a href="https://newsletter.systemdesign.one/p/sponsorship">partner with me</a>.</p><div><hr></div><p>Thank you for supporting this newsletter.</p><p>You are now 240,001+ readers strong, very close to 241k. Let&#8217;s try to get 241k readers by 27 August. Consider sharing this letter with your friends and get rewards.</p><p>Y&#8217;all are the best.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!6oWl!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2e739087-a910-4643-be36-997b6dd5b4af_800x500.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!6oWl!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2e739087-a910-4643-be36-997b6dd5b4af_800x500.png 424w, https://substackcdn.com/image/fetch/$s_!6oWl!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2e739087-a910-4643-be36-997b6dd5b4af_800x500.png 848w, https://substackcdn.com/image/fetch/$s_!6oWl!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2e739087-a910-4643-be36-997b6dd5b4af_800x500.png 1272w, https://substackcdn.com/image/fetch/$s_!6oWl!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2e739087-a910-4643-be36-997b6dd5b4af_800x500.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!6oWl!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2e739087-a910-4643-be36-997b6dd5b4af_800x500.png" width="590" height="368.75" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/2e739087-a910-4643-be36-997b6dd5b4af_800x500.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:500,&quot;width&quot;:800,&quot;resizeWidth&quot;:590,&quot;bytes&quot;:87878,&quot;alt&quot;:&quot;system design newsletter&quot;,&quot;title&quot;:&quot;system design newsletter&quot;,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://newsletter.systemdesign.one/i/163380418?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2e739087-a910-4643-be36-997b6dd5b4af_800x500.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="system design newsletter" title="system design newsletter" srcset="https://substackcdn.com/image/fetch/$s_!6oWl!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2e739087-a910-4643-be36-997b6dd5b4af_800x500.png 424w, https://substackcdn.com/image/fetch/$s_!6oWl!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2e739087-a910-4643-be36-997b6dd5b4af_800x500.png 848w, https://substackcdn.com/image/fetch/$s_!6oWl!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2e739087-a910-4643-be36-997b6dd5b4af_800x500.png 1272w, https://substackcdn.com/image/fetch/$s_!6oWl!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2e739087-a910-4643-be36-997b6dd5b4af_800x500.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 buttonBase-GK1x3M"><svg aria-hidden="true" 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" class="icon-noB79L"><g><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 buttonBase-GK1x3M"><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 icon-noB79L"><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 class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://newsletter.systemdesign.one/p/durable-ai-agents?utm_source=substack&utm_medium=email&utm_content=share&action=share&quot;,&quot;text&quot;:&quot;Share&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://newsletter.systemdesign.one/p/durable-ai-agents?utm_source=substack&utm_medium=email&utm_content=share&action=share"><span>Share</span></a></p><div><hr></div><h3>References</h3><ul><li><p><a href="https://www.inngest.com/docs">Inngest Documentation</a></p></li><li><p><a href="https://www.inngest.com/docs/learn/how-functions-are-executed">How Inngest Functions Execute</a></p></li><li><p><a href="https://www.inngest.com/docs/learn/inngest-steps">Inngest Steps</a></p></li><li><p><a href="https://www.inngest.com/docs/reference/typescript/v4/functions/step-run">Step Execution and step.run()</a></p></li><li><p><a href="https://www.inngest.com/docs/guides/error-handling">Error Handling and Retries</a></p></li><li><p><a href="https://www.inngest.com/docs/guides/handling-idempotency">Handling Idempotency</a></p></li><li><p><a href="https://www.inngest.com/docs/learn/durable-endpoints">Durable Endpoints</a></p></li><li><p><a href="https://www.inngest.com/docs/reference/typescript/v4/functions/step-wait-for-event">Waiting for Events</a></p></li><li><p><a href="https://www.inngest.com/docs/guides/concurrency">Concurrency and Flow Control</a></p></li><li><p><a href="https://www.inngest.com/docs/guides/throttling">Throttling</a></p></li><li><p><a href="https://www.inngest.com/docs/platform/monitor/observability-metrics">Observability and Metrics</a></p></li><li><p><a href="https://www.inngest.com/docs/features/inngest-functions/steps-workflows/scoring">Scoring Function Runs</a></p></li><li><p><a href="https://www.inngest.com/docs/patterns/durable/durable-token-streaming">Durable Token Streaming</a></p></li><li><p><a href="https://www.inngest.com/docs/learn/durable-endpoints/streaming">Durable Endpoints Streaming</a></p></li></ul><div class="footnote" data-component-name="FootnoteToDOM"><a id="footnote-1" href="#footnote-anchor-1" class="footnote-number" contenteditable="false" target="_self">1</a><div class="footnote-content"><p>An <strong>AI agent workflow</strong> is the sequence of steps an AI agent follows to complete a task.</p></div></div><div class="footnote" data-component-name="FootnoteToDOM"><a id="footnote-2" href="#footnote-anchor-2" class="footnote-number" contenteditable="false" target="_self">2</a><div class="footnote-content"><p>You can build an AI agent workflow as a chain of queue-worker jobs, but as the workflow becomes longer &amp; more dynamic, you also need to build the state, recovery, coordination, and observability that connect those jobs into a durable workflow. This can become very complex.</p></div></div><div class="footnote" data-component-name="FootnoteToDOM"><a id="footnote-3" href="#footnote-anchor-3" class="footnote-number" contenteditable="false" target="_self">3</a><div class="footnote-content"><p>BullMQ and Celery are job queue systems for running background work, while Amazon SQS is a managed message queue service used to send messages between distributed components.</p></div></div><div class="footnote" data-component-name="FootnoteToDOM"><a id="footnote-4" href="#footnote-anchor-4" class="footnote-number" contenteditable="false" target="_self">4</a><div class="footnote-content"><p><strong><span>Memoization:</span></strong><span> A technique where the result of a previously completed computation is stored and reused when the same computation is encountered again, avoiding unnecessary repeated work.</span></p></div></div><div class="footnote" data-component-name="FootnoteToDOM"><a id="footnote-5" href="#footnote-anchor-5" class="footnote-number" contenteditable="false" target="_self">5</a><div class="footnote-content"><p><strong><span>step.run():</span></strong><span> Inngest SDK function that wraps a unit of workflow work and gives Inngest a durable execution boundary. When the step completes, its result can be persisted and reused during later executions instead of re-running the same work.</span></p></div></div><div class="footnote" data-component-name="FootnoteToDOM"><a id="footnote-6" href="#footnote-anchor-6" class="footnote-number" contenteditable="false" target="_self">6</a><div class="footnote-content"><p><strong><span>step.sleep():</span></strong><span> Inngest SDK function that pauses a workflow until a specified amount of time or a specified point in time. The workflow does not need to keep a worker process running while it waits.</span></p></div></div><div class="footnote" data-component-name="FootnoteToDOM"><a id="footnote-7" href="#footnote-anchor-7" class="footnote-number" contenteditable="false" target="_self">7</a><div class="footnote-content"><p><strong><span>step.waitForEvent():</span></strong><span> Inngest SDK function that pauses a workflow until a matching event is received. It can be used for workflows that need to wait for external events such as human approval, payment confirmation, or another application's response.</span></p></div></div><div class="footnote" data-component-name="FootnoteToDOM"><a id="footnote-8" href="#footnote-anchor-8" class="footnote-number" contenteditable="false" target="_self">8</a><div class="footnote-content"><p><strong><span>retries:</span></strong><span> An Inngest function or step configuration that determines how many additional attempts are made after an execution fails before the failure is considered exhausted.</span></p></div></div><div class="footnote" data-component-name="FootnoteToDOM"><a id="footnote-9" href="#footnote-anchor-9" class="footnote-number" contenteditable="false" target="_self">9</a><div class="footnote-content"><p><strong><span>onFailure:</span></strong><span> An Inngest failure-handling mechanism that runs when a function's retries have been exhausted, allowing the application to perform actions such as sending alerts or triggering fallback logic.</span></p></div></div>]]></content:encoded></item></channel></rss>