<?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 Application Layer]]></title><description><![CDATA[Where Technology Meets Practicality – from Sector Shifts to Software Scripts]]></description><link>https://applicationlayer.substack.com</link><image><url>https://substackcdn.com/image/fetch/$s_!bL2R!,w_256,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F103e0c19-b207-4e89-a271-0e0c6cc248fc_1024x1024.png</url><title>The Application Layer</title><link>https://applicationlayer.substack.com</link></image><generator>Substack</generator><lastBuildDate>Sat, 15 Aug 2026 21:17:30 GMT</lastBuildDate><atom:link href="https://applicationlayer.substack.com/feed" rel="self" type="application/rss+xml"/><copyright><![CDATA[Michiel]]></copyright><language><![CDATA[en]]></language><webMaster><![CDATA[applicationlayer@substack.com]]></webMaster><itunes:owner><itunes:email><![CDATA[applicationlayer@substack.com]]></itunes:email><itunes:name><![CDATA[Michiel Voortman]]></itunes:name></itunes:owner><itunes:author><![CDATA[Michiel Voortman]]></itunes:author><googleplay:owner><![CDATA[applicationlayer@substack.com]]></googleplay:owner><googleplay:email><![CDATA[applicationlayer@substack.com]]></googleplay:email><googleplay:author><![CDATA[Michiel Voortman]]></googleplay:author><itunes:block><![CDATA[Yes]]></itunes:block><item><title><![CDATA[One class of compute]]></title><description><![CDATA[We treat shipping software like it needs five different computers.]]></description><link>https://applicationlayer.substack.com/p/one-class-of-compute</link><guid isPermaLink="false">https://applicationlayer.substack.com/p/one-class-of-compute</guid><dc:creator><![CDATA[Michiel Voortman]]></dc:creator><pubDate>Tue, 23 Jun 2026 15:33:29 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!V_fY!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcd1ecb72-abb7-4308-bc0f-636853b8c54b_1200x480.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p></p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!V_fY!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcd1ecb72-abb7-4308-bc0f-636853b8c54b_1200x480.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!V_fY!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcd1ecb72-abb7-4308-bc0f-636853b8c54b_1200x480.png 424w, https://substackcdn.com/image/fetch/$s_!V_fY!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcd1ecb72-abb7-4308-bc0f-636853b8c54b_1200x480.png 848w, https://substackcdn.com/image/fetch/$s_!V_fY!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcd1ecb72-abb7-4308-bc0f-636853b8c54b_1200x480.png 1272w, https://substackcdn.com/image/fetch/$s_!V_fY!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcd1ecb72-abb7-4308-bc0f-636853b8c54b_1200x480.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!V_fY!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcd1ecb72-abb7-4308-bc0f-636853b8c54b_1200x480.png" width="1200" height="480" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/cd1ecb72-abb7-4308-bc0f-636853b8c54b_1200x480.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:480,&quot;width&quot;:1200,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:32885,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:&quot;https://applicationlayer.substack.com/i/203261328?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcd1ecb72-abb7-4308-bc0f-636853b8c54b_1200x480.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!V_fY!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcd1ecb72-abb7-4308-bc0f-636853b8c54b_1200x480.png 424w, https://substackcdn.com/image/fetch/$s_!V_fY!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcd1ecb72-abb7-4308-bc0f-636853b8c54b_1200x480.png 848w, https://substackcdn.com/image/fetch/$s_!V_fY!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcd1ecb72-abb7-4308-bc0f-636853b8c54b_1200x480.png 1272w, https://substackcdn.com/image/fetch/$s_!V_fY!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcd1ecb72-abb7-4308-bc0f-636853b8c54b_1200x480.png 1456w" sizes="100vw" fetchpriority="high"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg 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"><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"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>We treat shipping software like it needs five different computers.</p><p>Local dev runs on your laptop. CI spins up a fresh runner. Preview gets a container somewhere. Staging lives on its own box, and prod lives on another one again. Five environments, configured five different ways, drifting apart a little more every week.</p><p>Then you lose a day to a bug that only shows up in one of them, because the five were never actually the same machine.</p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://applicationlayer.substack.com/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://applicationlayer.substack.com/subscribe?"><span>Subscribe now</span></a></p><h2><strong>It is one workload, observed at different moments</strong></h2><p>Here is what I keep coming back to. All five are the same thing. The same app, the same dependencies, the same code. We are just looking at it at different points in its life.</p><p>Local dev is the workload while you are writing it. CI is the workload under test. Preview is the workload someone clicks through. Staging is the workload one step from users. Prod is the workload live. One process, five snapshots of it, and we built a separate tool to host each snapshot.</p><p>So we spend real engineering time, every day, keeping five copies of one thing in sync. Dockerfiles that have to match the runner that has to match the base image that has to match prod. The work is not building software. The work is fighting the drift between five machines that were supposed to be one.</p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://applicationlayer.substack.com/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://applicationlayer.substack.com/subscribe?"><span>Subscribe now</span></a></p><h2><strong>The field already moved off containers, halfway</strong></h2><p>A lot of teams saw this and reached for better isolation. Some moved to microVMs for the security boundary, which is the right instinct. A container shares the host kernel, a microVM does not, and for anything running untrusted or agent-generated code that boundary matters.</p><p>That solves isolation. It does not solve drift. You can run five well isolated microVMs and still rebuild the environment from scratch five times, still configure each stage separately, still watch them diverge. Better walls between the boxes, same five boxes.</p><h2><strong>The position: one primitive you fork</strong></h2><p>The fix is to stop treating the stages as separate products and treat them as branches of one running machine.</p><p>boxd runs every stage as a forkable microVM. You start a machine in about 30ms. You fork it in about 100ms, and the fork comes up already live, sharing the parent&#8217;s warm state. You pause a machine and resume it sub-ms, with memory, processes, and warm caches exactly where you left them, not a fresh boot from a disk image.</p><p>That last part is the piece most people skip. Filesystem snapshots are table stakes now. Plenty of platforms will snapshot your disk on stop and boot a new session from it on resume. boxd resumes the running machine itself, the live process state, not a new session that happens to share your files.</p><p>Put those together and the five stages collapse. Your CI run is a fork of the machine you developed on. Your preview is a fork of that. Staging is a fork. They cannot drift, because they came from the same place. The agent and daemon run inside the guest, so this is something you can self-host and run yourself.</p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://applicationlayer.substack.com/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://applicationlayer.substack.com/subscribe?"><span>Subscribe now</span></a></p><h2><strong>What this looks like if it is right</strong></h2><p>Branching an environment becomes as cheap as branching code. You stop maintaining five definitions of one workload and start forking one. &#8220;Does staging match prod&#8221; stops being a question you have to answer, because staging is a fork of prod.</p><p>I know this sounds futuristic. The honest reaction is to ask what happens when real production shows up. Microservices architectures, load balancing, replication, high availability, geo replication, all the things you actually run a system on. Those are real and we are not waving them away. They get solved along the way, one at a time, as we build toward this being where you run the whole thing and not just where you develop it.</p><p>So far I have been describing a single box. One machine you start, fork, and resume. The reason that matters past the single box is that a system running across many servers is still just servers. A microservices setup is twenty machines instead of one. A high availability cluster is the same workload replicated across boxes. Geo replication is the same machine, closer to more users. The unit never changes. It is always a server in some state, and the thing you want is to fork that state, pause it, and bring it back live. The single box is where the dynamic is easiest to see. The same dynamic, in a slightly different shape, is what you are fighting every time you run a system that spans more than one of them.</p><p>This is the spine of what we are building this quarter. I will go deeper on the fork primitive, on live-state resume, and on why filesystem snapshots alone do not get you here, in the pieces that follow.</p><p>If you are tired of keeping five machines in sync to ship one app, drop me a message. I will get you a machine to fork.</p><p>Michiel - <a href="https://boxd.sh">boxd.sh</a></p><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://applicationlayer.substack.com/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe&quot;,&quot;language&quot;:&quot;en&quot;}" data-component-name="SubscribeWidgetToDOM"><div class="subscription-widget show-subscribe"><div class="preamble"><p class="cta-caption">Thanks for reading The Application Layer! Subscribe for free to receive new posts and support my work.</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><p></p>]]></content:encoded></item><item><title><![CDATA[MicroVMs got the boundary right and the lifecycle wrong]]></title><description><![CDATA[Series: where agents actually run.]]></description><link>https://applicationlayer.substack.com/p/microvms-got-the-boundary-right-and</link><guid isPermaLink="false">https://applicationlayer.substack.com/p/microvms-got-the-boundary-right-and</guid><dc:creator><![CDATA[Michiel Voortman]]></dc:creator><pubDate>Wed, 10 Jun 2026 06:31:05 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!jI7O!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4a29d548-2418-44c6-95b5-beda9092f7cf_1400x600.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!jI7O!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4a29d548-2418-44c6-95b5-beda9092f7cf_1400x600.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!jI7O!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4a29d548-2418-44c6-95b5-beda9092f7cf_1400x600.png 424w, https://substackcdn.com/image/fetch/$s_!jI7O!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4a29d548-2418-44c6-95b5-beda9092f7cf_1400x600.png 848w, https://substackcdn.com/image/fetch/$s_!jI7O!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4a29d548-2418-44c6-95b5-beda9092f7cf_1400x600.png 1272w, https://substackcdn.com/image/fetch/$s_!jI7O!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4a29d548-2418-44c6-95b5-beda9092f7cf_1400x600.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!jI7O!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4a29d548-2418-44c6-95b5-beda9092f7cf_1400x600.png" width="1400" height="600" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/4a29d548-2418-44c6-95b5-beda9092f7cf_1400x600.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:600,&quot;width&quot;:1400,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:72904,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:&quot;https://applicationlayer.substack.com/i/201413462?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4a29d548-2418-44c6-95b5-beda9092f7cf_1400x600.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_!jI7O!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4a29d548-2418-44c6-95b5-beda9092f7cf_1400x600.png 424w, https://substackcdn.com/image/fetch/$s_!jI7O!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4a29d548-2418-44c6-95b5-beda9092f7cf_1400x600.png 848w, https://substackcdn.com/image/fetch/$s_!jI7O!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4a29d548-2418-44c6-95b5-beda9092f7cf_1400x600.png 1272w, https://substackcdn.com/image/fetch/$s_!jI7O!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4a29d548-2418-44c6-95b5-beda9092f7cf_1400x600.png 1456w" sizes="100vw" fetchpriority="high"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg 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"><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"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p><em>Series: where agents actually run. Part 2 of 3. Part 1 covered why containers should not run sensitive agentic workloads. This piece covers the MicroVM, the runtime the whole industry moved to, and why most of them are still built for the wrong workload. Part 3 covers what an agent-native MicroVM looks like.</em></p><p>Part 1 landed on a boundary. Agent code should not run on a kernel it shares with the host. Containers fail that test.</p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://applicationlayer.substack.com/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://applicationlayer.substack.com/subscribe?"><span>Subscribe now</span></a></p><p>The teams running agent code at volume already agree. E2B and fly both run their sandboxes on MicroVMs. Anthropic ships a sandbox runtime rather than trust a container. The move off the shared kernel is settled, and the thing everyone moved to is the MicroVM.</p><p>So the boundary question is closed. This piece is about what comes after it, because getting the boundary right does not mean you got the runtime right. Most MicroVMs were built for a workload that looks nothing like an agent.</p><h2><strong>What a MicroVM is, and what it was built for</strong></h2><p>A MicroVM is a virtual machine stripped down for speed. On Linux the kernel&#8217;s own virtualization layer, KVM, does the isolation, the device model is minimal, the guest boots in milliseconds instead of tens of seconds. You get a real kernel per tenant and a hardware boundary between workloads, with most of the weight of a traditional vm removed.</p><p>Firecracker is the reference implementation and it is genuinely excellent. AWS <a href="https://www.usenix.org/conference/nsdi20/presentation/agache">built it for lambda and fargate</a>. Read the design goals. Boot a tiny vm fast, run one short function, tear it down, pack thousands on a host. The unit of work is a function invocation that lives for milliseconds to seconds.</p><p>That is serverless. The machine has no past and no future. It boots, computes a result, dies. State lives somewhere else. Nothing about the machine needs to survive the request.</p><p>Every assumption in that sentence is wrong for an agent.</p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://applicationlayer.substack.com/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://applicationlayer.substack.com/subscribe?"><span>Subscribe now</span></a></p><h2><strong>The shape of an agent run</strong></h2><p>Plenty of agents are short-lived, a single call that returns and ends. Those are a clean fit for the serverless shape, and nothing here argues otherwise. The agent this series is about is the other kind. It boots once and runs for hours. It reads a task, spawns a shell, installs packages, writes files, runs them, reads the output, decides what to do next. It accumulates state the whole way. Installed dependencies, a populated filesystem, environment, half-finished work, the context of everything it has done so far.</p><p>Then it stops to wait. For a tool response, for a user reply, for a rate limit to clear. It sits idle, often for most of its wall-clock life. Then it wakes and keeps going from exactly where it was.</p><p>Sometimes it needs to try five approaches to a hard problem. The clean way to do that is to branch the whole machine, live, and explore each path in parallel from the same starting state.</p><p>It also rarely works alone. The thing being built now is not one agent, it is many of them, spawning sub-agents, splitting a task across a fleet, comparing results. For that to work the machines have to talk to each other freely, and the context has to travel with them. An agent that hands work to another agent should pass the live state it has built, not start the other one from a cold slate and a serialized blob. The machines are nodes in one running system, not isolated functions that happen to share a host.</p><p>Long-lived. Stateful. Idle most of the time. Branching when it counts. Talking to each other with context intact. That is the opposite of boot-run-die on every axis that matters.</p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://applicationlayer.substack.com/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://applicationlayer.substack.com/subscribe?"><span>Subscribe now</span></a></p><h2><strong>Persistence is bolted on, not native</strong></h2><p>Firecracker assumes the machine is disposable and gets replaced. So if you want an agent&#8217;s state to survive a crash or a host reboot, you build that yourself. External database, external object store, a snapshot-and-restore dance, disk state registered somewhere outside the sandbox.</p><p>You end up building a persistence system around a runtime that was designed to throw state away. That is engineering you do because the primitive will not do it for you. The agent needs the opposite default, hours of accumulated context surviving a crash and coming back exactly where it left off, and the serverless MicroVM gives you a clean slate every time.</p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://applicationlayer.substack.com/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://applicationlayer.substack.com/subscribe?"><span>Subscribe now</span></a></p><h2><strong>Idle is billed, not suspended</strong></h2><p>A serverless runtime does not need an idle machine to suspend to zero and wake instantly, because serverless work does not sit idle for an hour. An agent does, most of the time.</p><p>So you get two bad options. Keep the machine alive while it waits on a user, and pay full rate for a machine doing nothing. Or tear it down and lose the live state you spent an hour building. Neither is what the workload wants, which is to suspend to zero bytes while idle and resume in milliseconds with state intact.</p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://applicationlayer.substack.com/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://applicationlayer.substack.com/subscribe?"><span>Subscribe now</span></a></p><h2><strong>Fork goes through a snapshot, not the live machine</strong></h2><p>This is the one that matters most, because branching is what turns one agent into a swarm. And it is where the serverless MicroVM works hardest to do something it was not built for.</p><p>Firecracker forks through snapshots. The shape is the same everywhere. Boot a machine, bring it to a useful standby point, snapshot it to a file, then start copies from that snapshot. Disk is cloned <a href="https://www.kernel.sh/blog/firecracker-faster">copy-on-write</a> so children only allocate blocks when they write. Clever, and it works.</p><p>But read what the teams running it say about the cost. From <a href="https://www.kernel.sh/blog/firecracker-faster">Kernel.sh</a>, after disk and vm state can be forked cheaply, &#8220;it&#8217;s loading the snapshot memory file that remains expensive.&#8221; Each vm resume &#8220;incurs a significant disk read,&#8221; and that read &#8220;scales linearly with the number of vms being launched, which means the physical limits of host disks throttle speed during bursts.&#8221; So they reach for userfaultfd paging to load memory lazily, a shared snapshot page cache, and hot pools of pre-booted machines so the common request never cold starts at all.</p><p>Look at what that stack is doing. Snapshot to a file, clone the disk copy-on-write, lazily fault memory back in, and keep a pool of pre-warmed machines so users do not feel the round trip. Each layer hides the same fact. The fork goes through a serialized snapshot of memory on disk, and pulling that memory back is the expensive part. It is a real engineering achievement, and it is a workaround for a primitive that was never meant to fork a live machine in the first place.</p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://applicationlayer.substack.com/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://applicationlayer.substack.com/subscribe?"><span>Subscribe now</span></a></p><h2><strong>The pattern</strong></h2><p>The MicroVM is the right boundary. That part is not in question, and the whole industry landing on it is the proof.</p><p>But most MicroVMs are still serverless underneath. Persistence is something you build around them. Idle is something you pay for or lose state to. Fork is a snapshot pipeline with three layers of optimization hiding the cost. None of that is a flaw in Firecracker. It is Firecracker being used far outside the boot-run-die workload it was designed for, by teams who picked the right boundary and then had to fight the lifecycle.</p><p>The agent workload asks for the boundary and a different lifecycle at the same time. Native persistence. Suspend to zero. Live fork that does not route through a file. A MicroVM shaped like the agent from the start, not a serverless one with the gaps papered over.</p><h2><strong>What comes next in this series</strong></h2><p>Part 3 covers what that looks like, treating persistence, suspend-to-zero and live fork as requirements rather than features bolted on, with concrete numbers on each. Cold boot fast enough to never pool. Native persistence so state survives a crash or a reboot. Suspend to zero so idle costs nothing. Live fork of a running machine, in parallel, without the snapshot round trip.</p><p>The boundary was the first decision and the industry already made it. The lifecycle is the next one, and it is still open.</p><p>If you&#8217;re building on agent infra and re-evaluating the runtime layer, drop me a message. Happy to compare notes.</p><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://applicationlayer.substack.com/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe&quot;,&quot;language&quot;:&quot;en&quot;}" data-component-name="SubscribeWidgetToDOM"><div class="subscription-widget show-subscribe"><div class="preamble"><p class="cta-caption">Thanks for reading The Application Layer! Leave your email and I&#8217;ll keep you in the loop</p></div><form class="subscription-widget-subscribe"><input type="email" class="email-input" name="email" placeholder="Type your email&#8230;" tabindex="-1"><input type="submit" class="button primary" value="Subscribe"><div class="fake-input-wrapper"><div class="fake-input"></div><div class="fake-button"></div></div></form></div></div><p></p>]]></content:encoded></item><item><title><![CDATA[Containers should not run sensitive agentic workloads. Period]]></title><description><![CDATA[Series: where agents actually run. Part 1 of 3. Part 2 covers why most vms and microvms also fall short. Part 3 covers what the right primitive looks like]]></description><link>https://applicationlayer.substack.com/p/containers-should-not-run-sensitive</link><guid isPermaLink="false">https://applicationlayer.substack.com/p/containers-should-not-run-sensitive</guid><dc:creator><![CDATA[Michiel Voortman]]></dc:creator><pubDate>Fri, 15 May 2026 07:29:32 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!TkGk!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F208ac442-2589-41f9-adf7-c362ab390c41_1400x600.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!TkGk!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F208ac442-2589-41f9-adf7-c362ab390c41_1400x600.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!TkGk!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F208ac442-2589-41f9-adf7-c362ab390c41_1400x600.png 424w, https://substackcdn.com/image/fetch/$s_!TkGk!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F208ac442-2589-41f9-adf7-c362ab390c41_1400x600.png 848w, https://substackcdn.com/image/fetch/$s_!TkGk!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F208ac442-2589-41f9-adf7-c362ab390c41_1400x600.png 1272w, https://substackcdn.com/image/fetch/$s_!TkGk!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F208ac442-2589-41f9-adf7-c362ab390c41_1400x600.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!TkGk!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F208ac442-2589-41f9-adf7-c362ab390c41_1400x600.png" width="1400" height="600" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/208ac442-2589-41f9-adf7-c362ab390c41_1400x600.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:600,&quot;width&quot;:1400,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:180931,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:&quot;https://applicationlayer.substack.com/i/197818489?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F208ac442-2589-41f9-adf7-c362ab390c41_1400x600.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_!TkGk!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F208ac442-2589-41f9-adf7-c362ab390c41_1400x600.png 424w, https://substackcdn.com/image/fetch/$s_!TkGk!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F208ac442-2589-41f9-adf7-c362ab390c41_1400x600.png 848w, https://substackcdn.com/image/fetch/$s_!TkGk!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F208ac442-2589-41f9-adf7-c362ab390c41_1400x600.png 1272w, https://substackcdn.com/image/fetch/$s_!TkGk!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F208ac442-2589-41f9-adf7-c362ab390c41_1400x600.png 1456w" sizes="100vw" fetchpriority="high"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg 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"><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"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>I posted this on x earlier this week and the responses split into two camps. Half nodded. Half asked what I&#8217;d use instead. Fair question. Before we get to the answer, we need to be honest about the starting point.</p><p>Every AI company shipping agents picks a runtime. The default pick today is a container. Docker, kubernetes pods, fargate tasks, whatever the cloud wraps around runc. It&#8217;s fast, cheap, the team already knows it. For trusted internal services this is the right call.</p><p>Agents are not trusted internal services.</p><h2><strong>What a container actually is</strong></h2><p>A container is a process tree on the host kernel with namespaces wrapped around it. Cgroups for resource limits, capabilities for permission slicing, seccomp filters for syscalls. Nice software primitives. All sharing one kernel with the host and every other container on the box.</p><p>NIST said this plainly in <a href="https://nvlpubs.nist.gov/nistpubs/specialpublications/nist.sp.800-190.pdf">SP 800-190</a>: containers &#8220;do not offer as clear and concrete of a security boundary as a VM.&#8221; That document was written for normal multi-tenant workloads, before LLMs were deciding what to run at runtime.</p><h2><strong>The escape pattern keeps repeating</strong></h2><p>April 2026, three weeks ago, <a href="https://nvd.nist.gov/vuln/detail/CVE-2026-31431">CVE-2026-31431</a> landed in the linux kernel <code>algif_aead</code> crypto module. CVSS 7.8 HIGH. Incorrect handling of in-place AEAD operations across memory spheres, exploitable from inside a container to corrupt host kernel memory. CISA added it to the Known Exploited Vulnerabilities catalog with a due date of May 15. Active exploitation in the wild. Every container on every patched-too-slow host is exposed because they all share that kernel.</p><p>This is the freshest case. It&#8217;s not the first one.</p><p>November 2025, <a href="https://www.sysdig.com/blog/runc-container-escape-vulnerabilities">CVE-2025-31133, CVE-2025-52565 and CVE-2025-52881</a>, all in runc, all enabling container escape, all disclosed in a single advisory. The masked-path bypass let an attacker write to <code>/proc/sys/kernel/core_pattern</code> from inside the container. That&#8217;s host code execution.</p><p>January 2024, snyk disclosed <a href="https://snyk.io/blog/cve-2024-21626-runc-process-cwd-container-breakout/">leaky vessels</a>. Four CVEs across runc, BuildKit and Moby. CVE-2024-21626 let a process escape to the host filesystem because of a leaked file descriptor in the runc working directory logic. Every version of runc up to 1.1.11 was affected, which means almost every docker, kubernetes and containerd deployment on the planet.</p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://applicationlayer.substack.com/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://applicationlayer.substack.com/subscribe?"><span>Subscribe now</span></a></p><p>The <a href="https://www.cncf.io/blog/2025/11/28/runc-container-breakout-vulnerabilities-a-technical-overview/">CNCF writeup</a> is worth reading because it shows the pattern. Runc was audited. These bugs sat in the codebase for years. Mount race conditions, symlink swaps, procfs writes. The kernel surface is too big to fully reason about.</p><p>Look further back and the same shape repeats. CVE-2019-5736 overwrote the runc binary on the host. CVE-2022-0185 was a kernel filesystem bug usable from inside containers. CVE-2024-1086 was a netfilter use-after-free that ransomware groups picked up and used for privilege escalation through 2025. One kernel under all the containers means one bug class.</p><h2><strong>What changes when an LLM picks the command</strong></h2><p>A normal container threat model assumes the workload is trusted code with untrusted inputs. You wrote the binary, you control what runs, the attacker pokes at the api.</p><p>Agents invert that. The model is the entity choosing what to execute. It reads a webpage, it reads a github issue, it reads a slack message, and then it decides to run <code>pip install something</code> or <code>curl | bash</code> or <code>chmod</code> on a path. Anyone who can influence the text the model reads can influence the command it runs. That&#8217;s the prompt injection threat model and it&#8217;s <a href="https://arxiv.org/abs/2306.05499">well documented</a>.</p><p>Now overlay the runc CVEs. A malicious image, a poisoned dependency, a <code>RUN --mount=</code> line in a dockerfile the agent decided to build. Each of those is a documented escape vector. The agent is happily running them because the prompt told it to.</p><p>Containers were built assuming the operator picks the workload. Agentic systems break that assumption.</p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://applicationlayer.substack.com/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://applicationlayer.substack.com/subscribe?"><span>Subscribe now</span></a></p><h2><strong>Hardening helps. It doesn&#8217;t solve</strong></h2><p>gVisor sits in front of the kernel and translates syscalls in userspace. Kata containers wrap a vm around the container. Both reduce attack surface in real measurable ways.</p><p>Both also pay for it. gVisor adds latency on every syscall. Workloads that are heavy on file io or networking can lose 30% or more. Kata is essentially admitting you wanted a vm in the first place, then bolting container ergonomics back on top. You pay for both the vm boot and the container runtime, and you still have to keep the container layer patched.</p><p>There&#8217;s also the deeper point. You can harden one runc deployment. You can&#8217;t audit out a class of bugs that has been resurfacing since 2019. The security history is the security forecast.</p><h2><strong>The teams closest to this already moved</strong></h2><p>The pattern repeats across the companies running agent code in production.</p><p>E2B runs AI agent sandboxes as their entire product. Their isolation primitive is <a href="https://e2b.dev/blog/series-a">firecracker microvms</a>. When their docker partnership shipped in <a href="https://www.docker.com/blog/docker-e2b-building-the-future-of-trusted-ai/">october 2025</a>, docker tooling landed <em>inside</em> the microvm. The kernel boundary lives in hardware, the container is just packaging. They also inherit firecracker&#8217;s ephemeral lifecycle. Firecracker was built to boot, run a function, die. Agents run for hours and accumulate state across sessions. We&#8217;ll come back to this.</p><p>Fly.io took the same direction with sprites, built on the same firecracker base. Their <a href="https://fly.io/blog/design-and-implementation/">checkpoint/restore lands around 300ms</a> via CoW metadata. Modal took the direction with their own microvm runtime, optimized for short serverless invocations. Same kernel-boundary instinct, different lifecycle bets, the same lambda-shaped assumptions baked in at different layers.</p><p>Every team that&#8217;s actually shipped agent code at meaningful volume concluded the security boundary belongs off the shared kernel. That&#8217;s the first move and it&#8217;s the right one. The runtime layered on top of that boundary is where the choices start to diverge from what agents actually need.</p><p>The counter-example is daytona. Their architecture runs <a href="https://cerebralvalley.beehiiv.com/p/daytona-composable-computers-for-ai-agents">privileged docker containers on bare metal</a>. They have HIPAA, SOC 2 and GDPR certifications which means their operational controls are real. The isolation primitive is still a shared-kernel container with elevated privileges. Compliance certifications and kernel boundaries are different things. An auditor checks that you have controls. An attacker checks the kernel.</p><p>The strongest validation comes from a company that has no commercial stake in this market. Anthropic, the team building claude, doesn&#8217;t trust containers as the boundary for claude code. They ship a <a href="https://www.anthropic.com/engineering/claude-code-sandboxing">sandbox runtime</a> built on bubblewrap and seatbelt with a network proxy. Read their threat model: &#8220;a prompt-injected claude&#8221; modifying sensitive files, exfiltrating ssh keys, abusing network access. That&#8217;s the threat. Containers don&#8217;t address it.</p><p>Whether the runtime e2b, fly and modal moved <em>to</em> is the right primitive for agents specifically is a separate question. Hardware isolation is necessary. It isn&#8217;t sufficient. That&#8217;s part 2.</p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://applicationlayer.substack.com/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://applicationlayer.substack.com/subscribe?"><span>Subscribe now</span></a></p><h2><strong>Why this matters now</strong></h2><p>Agent infrastructure was a research demo in 2023. It&#8217;s a $139B forecast for 2034 with <a href="https://www.latent.space/p/e2b">lovable running 1M+ sandboxes in a single weekend</a>. The runtime layer is being standardized right now. The choice teams make in the next twelve months gets locked into production architectures for years</p><p>If you&#8217;re running agents on shared containers today, you&#8217;re betting that no one in the next five years finds another runc bug. The last six years say that&#8217;s a bet you lose.</p><h2><strong>What comes next in this series</strong></h2><p>Part 2 covers why standard vms and most existing microvms also fall short. Firecracker is a great primitive built for lambda. Lambdas boot, run a function, die. Agents boot, accumulate state for hours, fork themselves, pause for a user reply, resume. The lifecycle assumptions sit on the wrong end of the spectrum</p><p>Part 3 covers what an agent-native runtime actually needs. Cold boot times, fork semantics, pause/resume, persistence. With concrete numbers</p><p>If you&#8217;re building on agent infra and re-evaluating the runtime layer, drop me a message. Happy to compare notes.</p><p>Michiel - <a href="https://boxd.sh">boxd.sh</a></p><div class="captioned-button-wrap" data-attrs="{&quot;url&quot;:&quot;https://applicationlayer.substack.com/p/containers-should-not-run-sensitive?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">Thanks for reading The Application Layer! This post is public so feel free to share it.</p></div><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://applicationlayer.substack.com/p/containers-should-not-run-sensitive?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://applicationlayer.substack.com/p/containers-should-not-run-sensitive?utm_source=substack&utm_medium=email&utm_content=share&action=share"><span>Share</span></a></p></div><p></p>]]></content:encoded></item><item><title><![CDATA[agents need a new compute primitive]]></title><description><![CDATA[$139B agentic infrastructure market by 2034. every AI company shipping agents hits the same question. where do these things actually run]]></description><link>https://applicationlayer.substack.com/p/agents-need-a-new-compute-primitive</link><guid isPermaLink="false">https://applicationlayer.substack.com/p/agents-need-a-new-compute-primitive</guid><dc:creator><![CDATA[Michiel Voortman]]></dc:creator><pubDate>Thu, 23 Apr 2026 08:12:54 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!q0SA!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F15d49b16-3518-4db5-9510-976b2e8b96c7_2730x1536.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!q0SA!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F15d49b16-3518-4db5-9510-976b2e8b96c7_2730x1536.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!q0SA!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F15d49b16-3518-4db5-9510-976b2e8b96c7_2730x1536.png 424w, https://substackcdn.com/image/fetch/$s_!q0SA!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F15d49b16-3518-4db5-9510-976b2e8b96c7_2730x1536.png 848w, https://substackcdn.com/image/fetch/$s_!q0SA!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F15d49b16-3518-4db5-9510-976b2e8b96c7_2730x1536.png 1272w, https://substackcdn.com/image/fetch/$s_!q0SA!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F15d49b16-3518-4db5-9510-976b2e8b96c7_2730x1536.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!q0SA!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F15d49b16-3518-4db5-9510-976b2e8b96c7_2730x1536.png" width="1456" height="819" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/15d49b16-3518-4db5-9510-976b2e8b96c7_2730x1536.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;:4420430,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:&quot;https://applicationlayer.substack.com/i/195214257?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F15d49b16-3518-4db5-9510-976b2e8b96c7_2730x1536.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_!q0SA!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F15d49b16-3518-4db5-9510-976b2e8b96c7_2730x1536.png 424w, https://substackcdn.com/image/fetch/$s_!q0SA!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F15d49b16-3518-4db5-9510-976b2e8b96c7_2730x1536.png 848w, https://substackcdn.com/image/fetch/$s_!q0SA!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F15d49b16-3518-4db5-9510-976b2e8b96c7_2730x1536.png 1272w, https://substackcdn.com/image/fetch/$s_!q0SA!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F15d49b16-3518-4db5-9510-976b2e8b96c7_2730x1536.png 1456w" sizes="100vw" fetchpriority="high"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg 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"><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"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p></p><p><strong><a href="https://www.fortunebusinessinsights.com/agentic-ai-market-114233">$139B agentic infrastructure market by 2034</a></strong>. every AI company shipping agents hits the same question. where do these things actually run</p><p>the answer matters because the workload looks nothing like what came before</p><h3><strong>the shape of the workload is new</strong></h3><p>agents run for hours, not milliseconds. they accumulate state across tasks. they fork themselves to explore in parallel. they pause between user turns and resume later. they spawn shells, apt install packages, execute arbitrary binaries decided by the model at runtime</p><p>this is a persistent, stateful, unpredictable process that runs code we don&#8217;t fully trust. the existing primitives were built for something else</p><h3><strong>containers</strong></h3><p>fast, cheap, universal. they share a kernel with the host though. an escape in agent code hits the host directly. fine for trusted workloads, risky when an LLM decides what to execute next</p><p>gVisor, Kata, and friends harden containers but come with real tradeoffs. you either keep the shared kernel (and the attack surface) or you bolt on a VM underneath and pay for both</p><h3><strong>unikernels</strong></h3><p>Ivan Velichko wrote a <strong><a href="https://labs.iximiuz.com/tutorials/unikernels-intro-93976514">sharp intro to unikernels</a></strong> that&#8217;s worth reading in full. short version: small, fast to boot, truly isolated. sub-200ms startup, sub-2MB images, no kernel/user split so syscalls stay cheap. the guest doesn&#8217;t share a kernel with anyone</p><p>the catch is what they ask of you. single-process by design. fork() isn&#8217;t supported, POSIX IPC goes over the network, there&#8217;s no shell to exec into when something goes wrong. agents spawn bash, install python packages, run arbitrary binaries at runtime. that whole pattern sits outside the unikernel model</p><p>great for narrow appliances. wrong shape for agents (could turn out to be wrong down the line here)</p><h3><strong>microvms</strong></h3><p>hardware isolation, real kernel per workload, KVM doing the heavy lifting. agents get a full linux they can actually use. a genuine virtual machine boundary between tenants</p><p>the isolation story is right. but most microvms were built for serverless. Firecracker, for example, was shaped around function-as-a-service workloads at AWS. boot, run, die. short-lived, stateless</p><p>agents live on the other end of that spectrum. they run for hours, accumulate state, fork, pause, resume</p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://applicationlayer.substack.com/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://applicationlayer.substack.com/subscribe?"><span>Subscribe now</span></a></p><p></p><h3><strong>agents need a new primitive</strong></h3><p>a variant of the microvm, with four characteristics the serverless generation never needed</p><p><strong>cold boot fast enough to spin up a fresh machine per task.</strong> slow boot forces you to pool and recycle VMs, which leaks state between agent runs. under 50ms, you stop pooling. every agent gets a clean machine</p><p><strong>memory-level fork so an agent can branch itself.</strong> this is the big one. agents hit hard problems all the time. &#8220;which of these five approaches works best&#8221; is a fork-join-reduce workload. if you can fork the entire live state of the machine in milliseconds, not just the disk, agents explore in parallel and keep the best result. without it, they serialize</p><p><strong>pause/resume so idle agents cost zero.</strong> agents are idle most of the time. waiting on a user, on a tool response, on a timer. if the machine suspends to zero bytes of memory and resumes instantly, idle time stops burning money</p><p><strong>persistence as a first-class property.</strong> most microvms are ephemeral by design. Firecracker assumes the VM dies and gets replaced. agents need the opposite. hours of accumulated context, installed packages, file system state, in-progress work. if the host reboots or the process crashes, the machine comes back exactly where it left off</p><p>that&#8217;s a compute primitive shaped like the workload</p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://applicationlayer.substack.com/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://applicationlayer.substack.com/subscribe?"><span>Subscribe now</span></a></p><p></p><h3><strong>what we built</strong></h3><p>at <strong><a href="http://boxd.sh/">boxd.sh</a></strong>, this is the product. hardware-isolated microvms with sub 50ms cold boot, sub 10ms pause/resume, memory-level fork, and persistent disks</p><p><strong><a href="https://www.linkedin.com/in/laurentiu-ciobanu/">Laurentiu Ciobanu</a></strong> wrote <strong><a href="https://github.com/lttle-cloud/ignition">ignition</a></strong>, our hypervisor, in rust, running directly on KVM. owning the hypervisor end to end is how we hit the numbers. no Firecracker, containerd, or gVisor between your code and the CPU</p><p>isolation is enforced at the network layer with eBPF/TC filters on the tap device, compiled at VM startup. egress restricted to tenant IPs and the infra subnet. every VM gets its own kernel, its own scheduler, its own file system</p><h3><strong>what comes next</strong></h3><p>the agent workloads we see today assume one machine per agent. that&#8217;s the baseline. once fork is cheap, the pattern changes. one agent orchestrates ten, each a branch of its own live state. after that, a hundred. an agent that hits a hard problem forks ten copies of itself, explores the solution space in parallel, merges the best result, keeps going</p><p>that&#8217;s the shape of compute behind the $139B number. a new primitive</p><h3><strong>try it</strong></h3><p>if you&#8217;re building agentic infra and figuring out the runtime layer, we&#8217;re shipping a new release which makes us the fastest in the market. drop me a message if you want to test it.</p><p>Michiel</p><p></p><div class="captioned-button-wrap" data-attrs="{&quot;url&quot;:&quot;https://applicationlayer.substack.com/p/agents-need-a-new-compute-primitive?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">Thanks for reading The Application Layer! Visit boxd.sh to get enjoy our agent runtimes.</p></div><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://applicationlayer.substack.com/p/agents-need-a-new-compute-primitive?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://applicationlayer.substack.com/p/agents-need-a-new-compute-primitive?utm_source=substack&utm_medium=email&utm_content=share&action=share"><span>Share</span></a></p></div><p></p>]]></content:encoded></item><item><title><![CDATA[Why we think Vercel is wrong]]></title><description><![CDATA[Vercel recently open-sourced Open Agents, a reference platform for building coding agents.]]></description><link>https://applicationlayer.substack.com/p/why-we-think-vercel-is-wrong</link><guid isPermaLink="false">https://applicationlayer.substack.com/p/why-we-think-vercel-is-wrong</guid><dc:creator><![CDATA[Michiel Voortman]]></dc:creator><pubDate>Tue, 14 Apr 2026 11:04:00 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!zOuy!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe9330351-ce48-45d7-a6fd-6462e5861197_1376x768.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!zOuy!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe9330351-ce48-45d7-a6fd-6462e5861197_1376x768.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!zOuy!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe9330351-ce48-45d7-a6fd-6462e5861197_1376x768.png 424w, https://substackcdn.com/image/fetch/$s_!zOuy!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe9330351-ce48-45d7-a6fd-6462e5861197_1376x768.png 848w, https://substackcdn.com/image/fetch/$s_!zOuy!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe9330351-ce48-45d7-a6fd-6462e5861197_1376x768.png 1272w, https://substackcdn.com/image/fetch/$s_!zOuy!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe9330351-ce48-45d7-a6fd-6462e5861197_1376x768.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!zOuy!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe9330351-ce48-45d7-a6fd-6462e5861197_1376x768.png" width="1376" height="768" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/e9330351-ce48-45d7-a6fd-6462e5861197_1376x768.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:768,&quot;width&quot;:1376,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:783252,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:&quot;https://applicationlayer.substack.com/i/194171850?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe9330351-ce48-45d7-a6fd-6462e5861197_1376x768.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_!zOuy!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe9330351-ce48-45d7-a6fd-6462e5861197_1376x768.png 424w, https://substackcdn.com/image/fetch/$s_!zOuy!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe9330351-ce48-45d7-a6fd-6462e5861197_1376x768.png 848w, https://substackcdn.com/image/fetch/$s_!zOuy!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe9330351-ce48-45d7-a6fd-6462e5861197_1376x768.png 1272w, https://substackcdn.com/image/fetch/$s_!zOuy!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe9330351-ce48-45d7-a6fd-6462e5861197_1376x768.png 1456w" sizes="100vw" fetchpriority="high"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg 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"><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"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>Vercel recently open-sourced <a href="https://open-agents.dev/">Open Agents</a>, a reference platform for building coding agents. It's well-built, well-documented, and we respect the team behind it. We also think its core architectural decision is wrong, and that it will limit what agents can become.</p><h2><strong>The decision</strong></h2><p>Most agent platforms today separate the agent from the execution environment. The agent process runs on one machine and controls a sandbox on another through tool calls: file reads, file edits, search, shell commands. The execution environment is passive. The brain lives elsewhere.</p><p>Open Agents makes this separation explicit and central. From their docs:</p><blockquote><p><em>The agent does not run inside the VM. It runs outside the sandbox and interacts with it through tools. That separation is the main point of the project.</em></p></blockquote><p>They list four reasons:</p><blockquote><ol><li><p><em>Agent execution isn&#8217;t tied to a single request lifecycle</em></p></li><li><p><em>Sandbox lifecycle can hibernate and resume independently</em></p></li><li><p><em>Model/provider choices and sandbox implementation can evolve separately</em></p></li><li><p><em>The VM stays a plain execution environment instead of becoming the control plane</em></p></li></ol></blockquote><p>These are reasonable engineering arguments. They&#8217;re also, we believe, optimizing for the wrong thing.</p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://applicationlayer.substack.com/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://applicationlayer.substack.com/subscribe?"><span>Subscribe now</span></a></p><h2><strong>What separation gets you</strong></h2><p>Let&#8217;s be fair. The separated architecture has real advantages.</p><p><strong>Observability.</strong> Separation makes it easy to log what the agent did. Every action goes through a defined tool interface.</p><p><strong>Orchestration.</strong> The agent can control multiple sandboxes simultaneously. Frontend in one, backend in another, tests in a third. An agent inside a single VM can&#8217;t easily do this.</p><p><strong>Resilience.</strong> The sandbox can crash without killing the agent. The agent can switch models mid-session. The two scale independently.</p><p><strong>It ships today.</strong> Current LLMs operate through tool calls. The architecture matches how models actually work right now. It&#8217;s pragmatic.</p><p>We don&#8217;t dismiss these benefits. For controlled enterprise workflows where predictability and auditability matter most, this architecture makes sense today.</p><h2><strong>What separation costs you</strong></h2><p><strong>Everything goes through a keyhole.</strong> Yes, <code>shell.exec()</code> exists. An agent outside the VM can technically install packages, write scripts, set up databases. But everything is serialized into shell command strings, sent over the network, and returned as text output. An agent inside the VM is a process on the OS. It reads files at disk speed, interacts with running processes in real time. Every interaction from outside carries the overhead of serialization, a network round-trip, and deserialization. An agent inside the VM just does the thing.</p><p><strong>Latency becomes a larger tax over time.</strong> Today, most agent time is spent on LLM inference, so the overhead per tool call is small relative to thinking time. But as models get faster and agents make more calls per task, the tool-call overhead becomes a larger share of total execution time. An agent inside the VM doesn&#8217;t have this tax at all.</p><p><strong>Fork breaks without the agent inside.</strong> If you fork a VM but the agent is running outside it, you&#8217;ve cloned the environment but not the agent&#8217;s context. The forked sandbox doesn&#8217;t know what the agent was thinking, what it tried, what it learned. The agent has to re-inject all of the relevant context into that new sandbox, costing tokens, time, and execution power. If the agent runs inside the VM, forking captures everything: environment, agent state, in-progress work. You can explore ten approaches in parallel, each with full context, and keep the most preferred outcome, while documenting non-preferred outcomes.</p><h2><strong>What we&#8217;re building instead</strong></h2><p>At boxd, we made the opposite bet. Every agent gets its own computer. Not a sandbox it controls through tools. A real Linux machine it runs inside. Here&#8217;s how we address the same four concerns without separation:</p><p><em><strong>&#8220;1. Agent execution isn&#8217;t tied to a single request lifecycle.&#8221;</strong></em> <br>Agreed, it shouldn&#8217;t be. In boxd, the agent process runs inside the VM and persists across requests. The VM is the durable context. No external orchestrator needed to maintain continuity.</p><p><em><strong>&#8220;2. Sandbox lifecycle can hibernate and resume independently.&#8221;</strong></em> <br>In boxd, the VM suspends and resumes in milliseconds, with the agent inside. Hibernation captures everything: environment, agent state, in-progress work. Resume is instant and complete. No context re-injection, no lost state, no token cost to rebuild what the agent already knew.</p><p><em><strong>&#8220;3. Model/provider choices and sandbox implementation can evolve separately.&#8221;</strong></em> <br>The agent inside the VM can use any model via API. Swapping providers is a configuration change, not an architectural one. The VM doesn&#8217;t care which model the agent calls. Coupling agent to VM doesn&#8217;t mean coupling agent to model.</p><p><em><strong>&#8220;4. The VM stays a plain execution environment instead of becoming the control plane.&#8221;</strong></em> <br>This is where we disagree most. A computer is the control plane for anyone doing real work on it. A developer thinks, experiments, and builds on the machine itself. Making the VM dumb and the external orchestrator smart limits what agents can become. Agents should be freed, not managed.</p><p>Full root access. Full filesystem. Full network. Whatever the agent needs, it can get. No permission, no tool call, no round-trip. The isolation comes from the hardware: each VM runs its own kernel. Full flexibility and full security, not a tradeoff between them.</p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://applicationlayer.substack.com/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://applicationlayer.substack.com/subscribe?"><span>Subscribe now</span></a></p><h2><strong>The training wheels argument</strong></h2><p>We think the separated architecture is a temporary crutch for a temporary problem.</p><p>Current models need structured tool interfaces because they&#8217;re not reliable enough to use a raw computer well. They make mistakes. They get confused by complex filesystem layouts. They run commands that don&#8217;t make sense. The tool interface acts as guardrails.</p><p>But models are improving fast. Every generation is more reliable, more capable, more autonomous. The tool abstraction that helps today&#8217;s models will constrain tomorrow&#8217;s.</p><p>You don&#8217;t give a junior developer a five-command terminal and an approval workflow for every action. You might start there. But the goal is to give them full access and trust them with it. The same trajectory applies to agents.</p><p>Vercel&#8217;s architecture makes the training wheels structural. When the models outgrow them, the architecture has to be replaced, not just updated.</p><h2><strong>We might be wrong</strong></h2><p>The honest version: we&#8217;re making a bet on the direction of AI capabilities. If models plateau and continue to need heavy guardrails and structured tool interfaces, the separated architecture wins. It&#8217;s more controllable, more auditable, more predictable.</p><p>If models continue to improve, if they become reliable enough to operate a full computer without hand-holding, then the separated architecture becomes the bottleneck. The companies whose agents have full computers will outperform the companies whose agents work through tool keyholes.</p><p>We&#8217;re betting on the models getting better. Given the trajectory of the last three years, we think that&#8217;s the right side of the bet.</p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://applicationlayer.substack.com/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://applicationlayer.substack.com/subscribe?"><span>Subscribe now</span></a></p><h2><strong>The bigger picture</strong></h2><p>Start with one agent, one computer. That&#8217;s today. But models get better and agent handoffs get smoother. Tomorrow, one agent coordinates ten computers. Then a hundred. Each one a full, isolated machine that the agent can fork, specialize, and orchestrate. An agent that hits a complex problem forks ten copies of its environment, explores in parallel, and merges the best result.</p><p>This scales indefinitely. The limiting factor stops being software architecture and becomes energy. That&#8217;s where we want to be: an infrastructure primitive so simple and fast that the only constraint on what agents can do is how many machines you&#8217;re willing to power.</p><p>You don&#8217;t get there by routing every action through a tool API on a remote orchestrator. You get there by giving agents computers and getting out of the way.</p><p>We think Vercel, respectfully, got it backwards.</p><div><hr></div><p><em>We&#8217;re building boxd: hardware-isolated, persistent, forkable computers for AI agents. If you&#8217;re interested, check out <a href="https://boxd.sh/">boxd.sh</a>.</em></p><p><strong>Sources:</strong></p><ul><li><p><a href="https://vercel.com/templates/template/open-agents">Open Agents on Vercel</a></p></li><li><p><a href="https://www.linkedin.com/posts/rauchg_open-agents-activity-7449642579983261696-FxLY">Guillermo Rauch&#8217;s announcement on LinkedIn</a></p></li><li><p><a href="https://open-agents.dev/">Open Agents docs</a></p></li></ul><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://applicationlayer.substack.com/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe&quot;,&quot;language&quot;:&quot;en&quot;}" data-component-name="SubscribeWidgetToDOM"><div class="subscription-widget show-subscribe"><div class="preamble"><p class="cta-caption">Thanks for reading The Application Layer! Subscribe for free to receive new posts and support my work.</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>]]></content:encoded></item><item><title><![CDATA[The Six-Phase Manifesto]]></title><description><![CDATA[There are seven phases in the software development lifecycle. There should be six.]]></description><link>https://applicationlayer.substack.com/p/the-six-phase-manifesto</link><guid isPermaLink="false">https://applicationlayer.substack.com/p/the-six-phase-manifesto</guid><dc:creator><![CDATA[Michiel Voortman]]></dc:creator><pubDate>Fri, 03 Apr 2026 09:49:49 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!-N_1!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbc8fc593-0f2b-4aa0-8714-f545bc99a91d_2754x1536.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!-N_1!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbc8fc593-0f2b-4aa0-8714-f545bc99a91d_2754x1536.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!-N_1!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbc8fc593-0f2b-4aa0-8714-f545bc99a91d_2754x1536.png 424w, https://substackcdn.com/image/fetch/$s_!-N_1!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbc8fc593-0f2b-4aa0-8714-f545bc99a91d_2754x1536.png 848w, https://substackcdn.com/image/fetch/$s_!-N_1!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbc8fc593-0f2b-4aa0-8714-f545bc99a91d_2754x1536.png 1272w, https://substackcdn.com/image/fetch/$s_!-N_1!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbc8fc593-0f2b-4aa0-8714-f545bc99a91d_2754x1536.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!-N_1!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbc8fc593-0f2b-4aa0-8714-f545bc99a91d_2754x1536.png" width="1456" height="812" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/bc8fc593-0f2b-4aa0-8714-f545bc99a91d_2754x1536.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:812,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:5617061,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:&quot;https://applicationlayer.substack.com/i/192965819?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbc8fc593-0f2b-4aa0-8714-f545bc99a91d_2754x1536.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_!-N_1!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbc8fc593-0f2b-4aa0-8714-f545bc99a91d_2754x1536.png 424w, https://substackcdn.com/image/fetch/$s_!-N_1!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbc8fc593-0f2b-4aa0-8714-f545bc99a91d_2754x1536.png 848w, https://substackcdn.com/image/fetch/$s_!-N_1!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbc8fc593-0f2b-4aa0-8714-f545bc99a91d_2754x1536.png 1272w, https://substackcdn.com/image/fetch/$s_!-N_1!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbc8fc593-0f2b-4aa0-8714-f545bc99a91d_2754x1536.png 1456w" sizes="100vw" fetchpriority="high"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg 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"><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"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><h3><strong>The Problem</strong></h3><p>The Software Development Lifecycle is outdated. It was built for an era when moving code to production was a dedicated step in the process. Coordination, environment configuration, dependency management, planning. That step created friction. It still</p><p> does.</p><p>The SDLC originated in the 1960s.&#185; Royce described sequential phases in 1970.&#178; The Agile Manifesto in 2001 prioritized working software and frequent delivery over rigid process.&#179; DevOps in 2009 focused on making deployment faster and more frequent.&#8308; Every major shift changed how teams move through the phases. None removed deployment.</p><p>The new generation of builders enters the stack higher than ever before. They produce real, working software without understanding the underlying layers. Abstraction has always worked this way. Coding agents are achieving near-perfect performance on implementation tasks.</p><p>As agents take on more of the implementation and begin making architectural decisions autonomously, the lifecycle must be designed for them. Solutions built today should be agent-friendly by default.</p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://applicationlayer.substack.com/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://applicationlayer.substack.com/subscribe?"><span>Subscribe now</span></a></p><p></p><h3><strong>The World We Want</strong></h3><p>The current software development lifecycle has seven phases. Planning, Requirements Analysis, System Design, Implementation, Testing, Deployment, and Maintenance. We remove Deployment.</p><p>The six-phase software development lifecycle:</p><ol><li><p>Planning - Define scope, goals, feasibility</p></li><li><p>Requirements Analysis - What are we building?</p></li><li><p>System Design - How will it work?</p></li><li><p>Implementation - Build the logic</p></li><li><p>Testing - Does it work correctly</p></li><li><p>Maintenance - Improve and iterate</p></li></ol><p>Deployment disappears because the environment you build in is the environment your users access. There is no second environment to push to. Code runs the moment it&#8217;s written.</p><p>This changes what&#8217;s possible.</p><p><strong>An agent builds a complete app without a human touching infrastructure.</strong> It creates a machine, installs dependencies, writes the code, starts the server. The app is live at a public URL. The agent tests it, iterates, and ships a working product. The only step between idea and live product is the code itself.</p><p><strong>A solo founder ships three MVPs in a single afternoon.</strong> Each one runs on its own machine with its own domain. She shares the links with early users and gets feedback the same day. Nothing stood between the idea and a live product except the time it took to write the code.</p><p><strong>A team replaces their environments with forks.</strong> A developer wants to test an experimental feature against real data on beta. Too risky to merge. She forks the beta machine in a second. Same disk, same database, same services. The fork shares the original state and only diverges when she writes to it. She runs the experiment, shows the team, destroys the fork. Beta was never touched.</p><p><strong>A model/RL lab runs 500 agents in parallel, each on its own computer.</strong> Every agent gets a real VM with its own kernel, IP, and persistent disk. They fork a known-good state, experiment independently, report results. Fully isolated. The lab tears down all 500 machines when the run is done. Total cost: minutes of compute.</p><p>Builders focus on application logic. Agents handle the implementation. The separation between development and production is gone.</p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://applicationlayer.substack.com/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://applicationlayer.substack.com/subscribe?"><span>Subscribe now</span></a></p><p></p><h3><strong>Core Beliefs</strong></h3><p>Deployment was a solution to a problem. Software used to run in a different environment than where it was built. Bridging that gap required coordination, tooling, and process. That gap is closing. The solution should close with it.</p><p>Abstraction compounds. Every generation of tooling raises the floor for the next. Builders today operate at the application layer because the layers below have been solved. Each generation builds higher because the previous one made it possible.</p><p>The lifecycle should reflect reality. The SDLC has been patched and extended but never rebuilt for a world where agents write code and builders operate at the application layer.</p><p>Agent-friendly by default. Agents are already writing code, choosing architectures, provisioning resources, and making tradeoffs. This is accelerating. A lifecycle with steps that require human judgment at every transition is a ceiling on what agents can do.</p><p>Start where the volume is. Applications, websites, APIs, internal tools. That is the majority of software being built today. Critical workloads with strict compliance requirements can follow. The default should change first.</p><h3><strong>Call to Action</strong></h3><p>At <a href="http://azin.run">Azin</a>, we are building infrastructure that eliminates the boundary between development and production. VMs that boot in milliseconds. Machines you can fork in seconds. HTTPS domains that appear the moment your code starts listening. Agents that manage their own infrastructure through a CLI.</p><p>ssh <a href="http://boxd.sh/">boxd.sh</a> new --name=myapp and you have a live computer on the internet in about 1 second. A beautiful gimmick: it starts and stops in under 10ms to have close to zero idle run time.</p><p>We are looking for builders, teams, and companies who want to explore what software development looks like without a deployment phase. If you have a use case, bring it.</p><p><a href="http://boxd.sh/">boxd.sh</a></p><p>There are seven phases in the software development lifecycle. We&#8217;re making it six.</p><p>Michiel</p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://applicationlayer.substack.com/?utm_source=substack&amp;utm_medium=email&amp;utm_content=share&amp;action=share&quot;,&quot;text&quot;:&quot;Share The Application Layer&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://applicationlayer.substack.com/?utm_source=substack&amp;utm_medium=email&amp;utm_content=share&amp;action=share"><span>Share The Application Layer</span></a></p><p></p><div><hr></div><p>&#185; Elliott, G. (2004). <em>Global Business Information Technology</em>. Pearson Education.</p><p>&#178; Royce, W. (1970). &#8220;Managing the Development of Large Software Systems.&#8221; <em>Proceedings of IEEE WESCON</em>.</p><p>&#179; Beck, K. et al. (2001). <em>Manifesto for Agile Software Development</em>. <strong><a href="http://agilemanifesto.org/">agilemanifesto.org</a></strong></p><p>&#8308; Debois, P. (2009). First DevOps Days conference, Ghent, Belgium. See also: Bass, L., Weber, I., Zhu, L. <em>DevOps: A Software Architect&#8217;s Perspective</em>. Addison-Wesley, 2015.</p>]]></content:encoded></item><item><title><![CDATA[Are MCP servers a thing of the past? ]]></title><description><![CDATA[Been watching this debate play out for months now.]]></description><link>https://applicationlayer.substack.com/p/are-mcp-servers-a-thing-of-the-past</link><guid isPermaLink="false">https://applicationlayer.substack.com/p/are-mcp-servers-a-thing-of-the-past</guid><dc:creator><![CDATA[Michiel Voortman]]></dc:creator><pubDate>Wed, 25 Feb 2026 08:50:22 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!6UET!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4d579f1c-f1b2-4cc9-81db-853a3ff67c74_2048x1143.jpeg" length="0" type="image/jpeg"/><content:encoded><![CDATA[<div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!6UET!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4d579f1c-f1b2-4cc9-81db-853a3ff67c74_2048x1143.jpeg" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!6UET!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4d579f1c-f1b2-4cc9-81db-853a3ff67c74_2048x1143.jpeg 424w, https://substackcdn.com/image/fetch/$s_!6UET!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4d579f1c-f1b2-4cc9-81db-853a3ff67c74_2048x1143.jpeg 848w, https://substackcdn.com/image/fetch/$s_!6UET!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4d579f1c-f1b2-4cc9-81db-853a3ff67c74_2048x1143.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!6UET!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4d579f1c-f1b2-4cc9-81db-853a3ff67c74_2048x1143.jpeg 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!6UET!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4d579f1c-f1b2-4cc9-81db-853a3ff67c74_2048x1143.jpeg" width="1456" height="813" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/4d579f1c-f1b2-4cc9-81db-853a3ff67c74_2048x1143.jpeg&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;:37513,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/jpeg&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:&quot;https://applicationlayer.substack.com/i/189113057?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4d579f1c-f1b2-4cc9-81db-853a3ff67c74_2048x1143.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_!6UET!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4d579f1c-f1b2-4cc9-81db-853a3ff67c74_2048x1143.jpeg 424w, https://substackcdn.com/image/fetch/$s_!6UET!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4d579f1c-f1b2-4cc9-81db-853a3ff67c74_2048x1143.jpeg 848w, https://substackcdn.com/image/fetch/$s_!6UET!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4d579f1c-f1b2-4cc9-81db-853a3ff67c74_2048x1143.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!6UET!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4d579f1c-f1b2-4cc9-81db-853a3ff67c74_2048x1143.jpeg 1456w" sizes="100vw" fetchpriority="high"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg 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"><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"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>Been watching this debate play out for months now. The data keeps pointing the same way. Anthropic launched MCP in December 2024. By March 2025 the hype was real - I was building a one-click deploy solution for remote MCP servers at the time. The promise was compelling: a universal connector between AI models and the world. But something in me kept questioning it. The context overhead, the awkward auth flows (way better now with OAuth 2.1), the servers you had to build and maintain for every single integration.</p><p><strong>The token math</strong></p><p>As an example of the context overhead: the GitHub MCP server dumps 55,000 tokens into your agent&#8217;s context before a single action runs. That&#8217;s just one server. Stack four of them - say GitHub, a database connector, Microsoft Graph, and Jira - and you&#8217;ve burned 150k+ tokens on plumbing before your agent does anything useful.</p><p>CLI equivalent? Your agent already knows <code>gh</code>. Total cost: around 200 tokens.</p><p>This goes beyond the Github server. Here&#8217;s what a typical enterprise agent comparison looks like on a real task - &#8220;list all non-compliant Intune devices and export to CSV&#8221;:</p><ul><li><p>MCP approach (Microsoft Graph MCP Server): ~28,000 tokens for schema injection alone, ~145,000 tokens total for 50 devices.</p></li><li><p>CLI approach: ~8,000 tokens total for the same task. That&#8217;s an 18x difference. On one task.</p></li></ul><p>That&#8217;s an 18x difference. On one task.</p><p><strong><a href="https://x.com/LLMJunky">@LLMJunky</a></strong> tested it in a more controlled way and found 4 MCP servers used 380% more tokens than 14 CLI tools. The stat is making rounds because it&#8217;s hard to argue with.</p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://applicationlayer.substack.com/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://applicationlayer.substack.com/subscribe?"><span>Subscribe now</span></a></p><p></p><p><strong>The implementation burden</strong></p><p>Beyond tokens, every MCP integration is a small project. You need to learn the SDK, implement tool schemas, handle edge cases, manage deployment, and keep up with protocol changes as MCP evolves. If a service doesn&#8217;t have an MCP server yet, you build one from scratch.</p><p>CLI flips this. Most tools you&#8217;d want your agent to use already have a battle-tested CLI. <code>git</code>, <code>gh</code>, <code>kubectl</code>, <code>aws</code>, <code>gcloud</code>, <code>stripe</code>, <code>railway</code> - they&#8217;re all there. Your agent already knows how to use them. Zero setup.</p><p><strong>What the builders are saying</strong></p><p><strong><a href="https://x.com/kepano/status/2021289444322820370">@kepano</a></strong>, creator of Obsidian, put it plainly earlier this month:</p><blockquote><p><em>&#8220;CLI is better than MCP. Faster. Direct access to your local files. No need for a server or auth. Easier for both humans and agents to access and explore. Composable with pipes.&#8221;</em></p></blockquote><p><strong><a href="https://x.com/hishboy/status/2026319393144320342">@hishboy</a></strong> was equally direct, quoting a viral CLI launch:</p><blockquote><p><em>&#8220;For agents (and humans): CLI is a way better interface than MCP&#8221;</em></p></blockquote><p><strong><a href="https://x.com/ninan_phillip/status/2023152965067141449">@Phillip Ninan</a></strong> on what he&#8217;s actually using day to day:</p><blockquote><p><em>&#8220;Skills + CLI &gt; MCP. My coding agents seem to work much better with CLIs than MCPs. Most of the MCPs I use nowadays are just for docs.&#8221;</em></p></blockquote><p>And <strong><a href="https://x.com/pareto_pakodas">@Shreyas Rao</a></strong> wrote a full deep dive: 33% token savings with CLI, Unix pipes beat protocols, battle-tested beats bleeding edge.</p><p><strong>So is MCP dead?</strong></p><p>Not exactly. The builders I respect aren&#8217;t abandoning MCP entirely. But they&#8217;re reaching for CLI a lot more than they did a year ago.</p><p>MCP still has genuine strengths: structured permission scoping, clean third-party integrations where a CLI doesn&#8217;t exist, and read-only context sources like documentation. If you&#8217;re building a tool that needs to be consumed by many different agents in a standardized way, MCP makes sense.</p><p>But for the actual work agents do - running tasks, querying systems, executing operations - CLI wins on almost every metric that matters for efficiency.</p><p>Most of the conversation around MCP is about what it enables. If you flip it - and ask what agents actually need to run efficiently - the math looks pretty broken.</p><p>CLI has been on every Unix system since 1971. No schema injection. No server to maintain. No auth overhead. Composable with pipes. And your agent already knows how to use it.</p><p>It&#8217;s been on every machine since 1971. We just forgot to look.</p><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://applicationlayer.substack.com/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe&quot;,&quot;language&quot;:&quot;en&quot;}" data-component-name="SubscribeWidgetToDOM"><div class="subscription-widget show-subscribe"><div class="preamble"><p class="cta-caption">Thanks for reading The Application Layer! Subscribe for free to receive new posts and support my work.</p></div><form class="subscription-widget-subscribe"><input type="email" class="email-input" name="email" placeholder="Type your email&#8230;" tabindex="-1"><input type="submit" class="button primary" value="Subscribe"><div class="fake-input-wrapper"><div class="fake-input"></div><div class="fake-button"></div></div></form></div></div><p></p>]]></content:encoded></item><item><title><![CDATA[The AI Agent Runtime Problem Nobody Is Talking About]]></title><description><![CDATA[Every AI agent deployment running right now is wasting money. Not a little - a lot.]]></description><link>https://applicationlayer.substack.com/p/the-ai-agent-runtime-problem-nobody</link><guid isPermaLink="false">https://applicationlayer.substack.com/p/the-ai-agent-runtime-problem-nobody</guid><dc:creator><![CDATA[Michiel Voortman]]></dc:creator><pubDate>Sat, 21 Feb 2026 20:58:46 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!dW6X!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe0d6c41f-6b31-4add-90e1-3f2a7cdc3d6b_2048x1143.jpeg" length="0" type="image/jpeg"/><content:encoded><![CDATA[<div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!dW6X!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe0d6c41f-6b31-4add-90e1-3f2a7cdc3d6b_2048x1143.jpeg" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!dW6X!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe0d6c41f-6b31-4add-90e1-3f2a7cdc3d6b_2048x1143.jpeg 424w, https://substackcdn.com/image/fetch/$s_!dW6X!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe0d6c41f-6b31-4add-90e1-3f2a7cdc3d6b_2048x1143.jpeg 848w, https://substackcdn.com/image/fetch/$s_!dW6X!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe0d6c41f-6b31-4add-90e1-3f2a7cdc3d6b_2048x1143.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!dW6X!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe0d6c41f-6b31-4add-90e1-3f2a7cdc3d6b_2048x1143.jpeg 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!dW6X!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe0d6c41f-6b31-4add-90e1-3f2a7cdc3d6b_2048x1143.jpeg" width="1456" height="813" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/e0d6c41f-6b31-4add-90e1-3f2a7cdc3d6b_2048x1143.jpeg&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;:59498,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/jpeg&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:&quot;https://applicationlayer.substack.com/i/188739787?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe0d6c41f-6b31-4add-90e1-3f2a7cdc3d6b_2048x1143.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_!dW6X!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe0d6c41f-6b31-4add-90e1-3f2a7cdc3d6b_2048x1143.jpeg 424w, https://substackcdn.com/image/fetch/$s_!dW6X!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe0d6c41f-6b31-4add-90e1-3f2a7cdc3d6b_2048x1143.jpeg 848w, https://substackcdn.com/image/fetch/$s_!dW6X!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe0d6c41f-6b31-4add-90e1-3f2a7cdc3d6b_2048x1143.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!dW6X!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe0d6c41f-6b31-4add-90e1-3f2a7cdc3d6b_2048x1143.jpeg 1456w" sizes="100vw" fetchpriority="high"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg 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"><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"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>Whether it&#8217;s OpenClaw on a Mac Mini, a VPS running 24/7, or a managed instance humming along in some cloud provider&#8217;s datacenter, the model is the same: always on, always paying, almost always idle.</p><p>We inherited this from web hosting. Keep a server warm, charge by the hour. It made sense when apps needed to hold state, maintain connections, and be ready at a moment&#8217;s notice. It doesn&#8217;t make sense for agents.</p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://applicationlayer.substack.com/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://applicationlayer.substack.com/subscribe?"><span>Subscribe now</span></a></p><h5>Agents are fundamentally different</h5><p>A web server serves requests continuously. An AI agent mostly waits - for a cron trigger, a message from Telegram, a webhook, a scheduled task. The actual compute happens in bursts. The rest is idle.</p><p>The current generation of agent hosting treats this like a traditional workload. You&#8217;re paying for a running process that sits there doing nothing, waiting for something to happen. It&#8217;s the equivalent of hiring a full-time employee to occasionally check their email.</p><h5>The numbers are ugly</h5><p>Take a typical OpenClaw deployment. Most users configure a handful of cron jobs, a Telegram channel, maybe some scheduled automations. The agent is actively running maybe 5-10% of the time. The other 90%+ it&#8217;s idle - but you&#8217;re paying the full rate.</p><p>At scale, this becomes absurd. The entire industry building agent infrastructure on top of VMs and containers is leaving efficiency on the table. The next layer of cloud infrastructure needs to be built around how agents actually work: bursty, event-driven, and mostly dormant.</p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://applicationlayer.substack.com/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://applicationlayer.substack.com/subscribe?"><span>Subscribe now</span></a></p><p></p><h5>What agent-first infrastructure looks like</h5><p>The model that makes sense for agents is the same that powers modern serverless functions - but faster. Sub-10ms startup so the &#8220;always on&#8221; illusion holds from the user&#8217;s perspective, but underneath, compute spins up when needed and disappears when the job is done. You pay for work, not waiting.</p><p>This means:</p><p>- <strong>Event-driven by default. </strong>A Telegram message arrives, the agent wakes, processes, sleeps.</p><p>- <strong>Startup so fast it&#8217;s imperceptible.</strong> Under 10ms means users never notice the difference.</p><p>- <strong>True pay-per-use. </strong>Not per hour. Not per month. Per unit of actual work done.</p><p>- <strong>No cold start hacks</strong>, no scheduled pings to keep things warm, no VM babysitting.</p><p>The gap between traditional cloud and agent-ready infrastructure isn&#8217;t small. It requires rethinking the runtime layer entirely - from how containers start, to how billing is calculated, to how orchestration handles bursty workloads.</p><h5>We&#8217;re building it</h5><p>At <a href="https://azin.run/">azin.run</a>, we've been working on this problem for a while.<br><br>Our current product is a console that lets developers deploy agents on their own cloud infrastructure - think Railway, but designed for agentic workloads. Bring your own cloud, get a sane deployment experience without the usual devops overhead. <a href="https://openclaw.azin.run/">openclaw.azin.run</a> is one of the products on our marketplace, making it dead simple to run OpenClaw without touching a terminal.<br><br>But the console is the beachhead, not the endgame.<br><br>The real work is on azin cloud - our own infrastructure layer built specifically for agent workloads. Sub-10ms cold starts, true pay-per-use billing, compute that spins up on demand and disappears when the job is done. No idle, no waste, no babysitting VMs.<br><br>That's what agent-first cloud actually looks like. We're building it now.</p><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://applicationlayer.substack.com/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe&quot;,&quot;language&quot;:&quot;en&quot;}" data-component-name="SubscribeWidgetToDOM"><div class="subscription-widget show-subscribe"><div class="preamble"><p class="cta-caption">Thanks for reading The Application Layer! Subscribe for free to receive new posts and support my work.</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>]]></content:encoded></item><item><title><![CDATA[How to Run LLMs Locally and Why It's Becoming More Relevant]]></title><description><![CDATA[Dependencies Are Vulnerabilities, Quality Gaps Are Narrowing, Asymptotic Convergence, Smaller Specialist Models, DIY]]></description><link>https://applicationlayer.substack.com/p/how-to-run-llms-locally-and-why-its</link><guid isPermaLink="false">https://applicationlayer.substack.com/p/how-to-run-llms-locally-and-why-its</guid><dc:creator><![CDATA[Michiel Voortman]]></dc:creator><pubDate>Sun, 20 Jul 2025 07:35:17 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!GWrq!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F67c4d9c5-acb1-4fdf-9968-561ae180f1fa_1704x860.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>&#129302; <strong>TL;DR</strong>: Smaller open-source models are becoming increasingly competitive with closed-source alternatives. Using them locally gives you complete control over your data and infrastructure. This blog shows you exactly how to deploy them on your own hardware and why it is important.</p><h2>Dependencies Are Vulnerabilities</h2><p>Your business relies on external AI APIs. Tomorrow, new export restrictions could cut off access to your region. Your AI-powered fraud detection, customer service, and analytics systems stop working. Your operations halt.</p><p>A couple of examples that highlight this:</p><ul><li><p><strong>Geopolitical tensions</strong> drive semiconductor export controls restricting AI chip access globally</p></li><li><p><strong>Closed-source cloud services</strong> (OpenAI, Anthropic via AWS/Google/Azure) remain subject to government oversight and potential restrictions</p></li><li><p><strong>Data sovereignty concerns</strong> make GDPR compliance with closed-source cloud AI legally problematic for European businesses</p></li><li><p><strong>Apple's reported $6.2B interest in Mistral AI</strong> (<a href="https://www.inspire2rise.com/apples-potential-mistral-ai-acquisition.html">recent reports</a>) signals another EU AI asset potentially moving to US control</p></li></ul><p><strong>Solution</strong>: Run open-source AI models on your own infrastructure with complete control over your data and operations.</p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://applicationlayer.substack.com/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://applicationlayer.substack.com/subscribe?"><span>Subscribe now</span></a></p><h2>Quality Gaps Are Narrowing</h2><p>Let's be honest: <strong>closed-source models</strong> from the leading foundational model providers <strong>still generally outperform</strong> their open-source counterparts, especially the smaller ones. But here's what's changing rapidly: </p><p><a href="https://spectrum.ieee.org/ai-index-2025">Stanford's 2025 AI Index</a> shows that in January 2024, the top U.S. model outperformed the best Chinese model by 9.26 percent; by February 2025, <strong>this gap has narrowed</strong> to just 1.70 percent. Similar convergence is happening between closed and open-source models.</p><p><a href="https://spectrum.ieee.org/ai-index-2025">The same report</a> reveals that many benchmarks we use to gauge AI systems are becoming "saturated"&#8212;AI systems get such high scores that the benchmarks are no longer useful for differentiation. This suggests we're approaching fundamental performance limits across all model types.</p><h2>Asymptotic Convergence</h2><p>My thesis: <strong>Model quality will asymptotically converge</strong>. Eventually, there won't be meaningful differences between closed-source and open-source models of similar scale. <strong>Therefore, most value capture will shift to the application layer</strong> - how you deploy, optimize, and integrate AI into your specific workflows and business processes. Why?</p><ol><li><p><strong>Architectural innovations spread rapidly</strong> - Research gets published, techniques get adopted</p></li><li><p><strong>Training data is becoming commoditized</strong> - Similar datasets are available to all players</p></li><li><p><strong>Fundamental physics limits</strong> - There are computational and data efficiency ceilings</p></li><li><p><strong>Talent mobility</strong> - Researchers move between companies, knowledge transfers</p></li></ol><p>We're seeing early signs of this convergence already.</p><h2>Smaller Specialist Models</h2><p>While everyone obsesses over larger general models, I find it highly interesting to look at smaller specialist models. In some domains, they even outperform general monolithic bigger models.</p><p>Looking in the medical AI corner,  an interesting one I found is <a href="https://www.invisible.co/blog/how-small-language-models-can-outperform-llms">the Diabetica-7B model</a>, which scored 87.2% accuracy on diabetes queries&#8212;beating both GPT-4 and Claude-3.5. That's a 7B model which can runs easily on the latest macbooks.</p><p>Improved small model performed can also be found in the coding corner. <a href="https://news.mit.edu/2025/making-ai-generated-code-more-accurate-0418">MIT researchers in 2025</a> developed an architecture that enables small, open-source models to outperform specialized commercial closed-source models more than double their size in Python code generation. <a href="https://www.techtarget.com/whatis/feature/12-of-the-best-large-language-models">DeepSeek-R1</a>, an open-source reasoning model, excels at complex reasoning and mathematical problem-solving through self-verification techniques. </p><p>This pattern can be found in more domains. Financial services use specialized fraud detection models that crush general-purpose ones. <a href="https://blog.jetbrains.com/ai/2025/07/small-models-big-impact-why-jetbrains-is-betting-on-focal-llms/">JetBrains talks about "focal models"</a> under 10 billion parameters that deliver better domain performance at a fraction of the cost.</p><p>The efficiency gains are appearing across general-purpose models too. <a href="https://www.techtarget.com/whatis/feature/12-of-the-best-large-language-models">Microsoft's Phi-3.5 series</a> includes models like Phi-3.5-mini-instruct with just 3.82 billion parameters that are doing pretty well in language, reasoning, coding, and math. <a href="https://www.techtarget.com/whatis/feature/12-of-the-best-large-language-models">Gemma 2</a> comes in 9 billion and 27 billion parameter versions that can run locally on personal computers. <a href="https://www.techtarget.com/whatis/feature/12-of-the-best-large-language-models">StableLM 2</a> offers a 1.6 billion parameter model for specific, narrow tasks with faster processing, while their 12B model provides more capability without massive resource requirements. <a href="https://www.techtarget.com/whatis/feature/12-of-the-best-large-language-models">Qwen2.5</a> supports 29 different languages and scales up to 72 billion parameters for code generation and mathematical problem-solving.</p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://applicationlayer.substack.com/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://applicationlayer.substack.com/subscribe?"><span>Subscribe now</span></a></p><h2>Therefore: Get familiar with running Models in your own infra</h2><p>Enough talking. Running models locally can be super straightforward. I&#8217;m on a macbook pro with an M4 chip and 24gb of RAM. For this tutorial, I&#8217;m using Ollama. While Ollama provides the simplest path to local deployment, you have several other options: you can run models directly using Python frameworks like Transformers and llama.cpp for more control, deploy via Docker containers for scalable production environments, or use specialized platforms for high-performance inference on GPUs.</p><p><strong>Step 1: Install Ollama</strong></p><p>Head to the <a href="https://ollama.com/download">Ollama Download</a> page and follow the instructions for your platform&#8212;Mac, Linux, or Windows. Ollama supports GPU acceleration on Nvidia, AMD, and Apple Metal, so it'll harness whatever hardware you've got.</p><p><strong>Step 2: Choose Your Model</strong></p><p>Browse the <a href="https://ollama.ai/library">Ollama Library</a> to explore available models. For this walkthrough, I'll be running a Mistral model, but you can pick whatever model you want as long as your hardware can handle it. Check the model size to ensure it fits in your available memory&#8212;the library shows the requirements for each model.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!GWrq!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F67c4d9c5-acb1-4fdf-9968-561ae180f1fa_1704x860.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!GWrq!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F67c4d9c5-acb1-4fdf-9968-561ae180f1fa_1704x860.png 424w, https://substackcdn.com/image/fetch/$s_!GWrq!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F67c4d9c5-acb1-4fdf-9968-561ae180f1fa_1704x860.png 848w, https://substackcdn.com/image/fetch/$s_!GWrq!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F67c4d9c5-acb1-4fdf-9968-561ae180f1fa_1704x860.png 1272w, https://substackcdn.com/image/fetch/$s_!GWrq!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F67c4d9c5-acb1-4fdf-9968-561ae180f1fa_1704x860.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!GWrq!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F67c4d9c5-acb1-4fdf-9968-561ae180f1fa_1704x860.png" width="1456" height="735" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/67c4d9c5-acb1-4fdf-9968-561ae180f1fa_1704x860.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:735,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:129040,&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://applicationlayer.substack.com/i/168717967?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F67c4d9c5-acb1-4fdf-9968-561ae180f1fa_1704x860.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_!GWrq!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F67c4d9c5-acb1-4fdf-9968-561ae180f1fa_1704x860.png 424w, https://substackcdn.com/image/fetch/$s_!GWrq!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F67c4d9c5-acb1-4fdf-9968-561ae180f1fa_1704x860.png 848w, https://substackcdn.com/image/fetch/$s_!GWrq!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F67c4d9c5-acb1-4fdf-9968-561ae180f1fa_1704x860.png 1272w, https://substackcdn.com/image/fetch/$s_!GWrq!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F67c4d9c5-acb1-4fdf-9968-561ae180f1fa_1704x860.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg 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"><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"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p><strong>Step 3: Load and Run</strong></p><p>Copy the command from the Tags tab (it'll start with <code>ollama run</code>) and paste it into your terminal. The model will download and start running locally. Use <code>/bye</code> to exit when you're done.</p><div class="captioned-image-container"><figure><a class="image-link image2" target="_blank" href="https://substackcdn.com/image/fetch/$s_!xPcQ!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F05542cb4-4514-4fb3-9881-695a8dfe2784_1442x320.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!xPcQ!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F05542cb4-4514-4fb3-9881-695a8dfe2784_1442x320.png 424w, https://substackcdn.com/image/fetch/$s_!xPcQ!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F05542cb4-4514-4fb3-9881-695a8dfe2784_1442x320.png 848w, https://substackcdn.com/image/fetch/$s_!xPcQ!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F05542cb4-4514-4fb3-9881-695a8dfe2784_1442x320.png 1272w, https://substackcdn.com/image/fetch/$s_!xPcQ!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F05542cb4-4514-4fb3-9881-695a8dfe2784_1442x320.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!xPcQ!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F05542cb4-4514-4fb3-9881-695a8dfe2784_1442x320.png" width="1442" height="320" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/05542cb4-4514-4fb3-9881-695a8dfe2784_1442x320.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:320,&quot;width&quot;:1442,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:143124,&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://applicationlayer.substack.com/i/168717967?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F05542cb4-4514-4fb3-9881-695a8dfe2784_1442x320.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_!xPcQ!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F05542cb4-4514-4fb3-9881-695a8dfe2784_1442x320.png 424w, https://substackcdn.com/image/fetch/$s_!xPcQ!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F05542cb4-4514-4fb3-9881-695a8dfe2784_1442x320.png 848w, https://substackcdn.com/image/fetch/$s_!xPcQ!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F05542cb4-4514-4fb3-9881-695a8dfe2784_1442x320.png 1272w, https://substackcdn.com/image/fetch/$s_!xPcQ!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F05542cb4-4514-4fb3-9881-695a8dfe2784_1442x320.png 1456w" sizes="100vw" loading="lazy"></picture><div></div></div></a></figure></div><p>You can use it in the terminal like this:</p><div class="captioned-image-container"><figure><a class="image-link image2" target="_blank" href="https://substackcdn.com/image/fetch/$s_!WJCf!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F51cab965-7f4a-4e3c-bbc5-be896d504025_1762x286.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!WJCf!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F51cab965-7f4a-4e3c-bbc5-be896d504025_1762x286.png 424w, https://substackcdn.com/image/fetch/$s_!WJCf!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F51cab965-7f4a-4e3c-bbc5-be896d504025_1762x286.png 848w, https://substackcdn.com/image/fetch/$s_!WJCf!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F51cab965-7f4a-4e3c-bbc5-be896d504025_1762x286.png 1272w, https://substackcdn.com/image/fetch/$s_!WJCf!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F51cab965-7f4a-4e3c-bbc5-be896d504025_1762x286.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!WJCf!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F51cab965-7f4a-4e3c-bbc5-be896d504025_1762x286.png" width="1456" height="236" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/51cab965-7f4a-4e3c-bbc5-be896d504025_1762x286.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:236,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:64340,&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://applicationlayer.substack.com/i/168717967?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F51cab965-7f4a-4e3c-bbc5-be896d504025_1762x286.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_!WJCf!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F51cab965-7f4a-4e3c-bbc5-be896d504025_1762x286.png 424w, https://substackcdn.com/image/fetch/$s_!WJCf!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F51cab965-7f4a-4e3c-bbc5-be896d504025_1762x286.png 848w, https://substackcdn.com/image/fetch/$s_!WJCf!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F51cab965-7f4a-4e3c-bbc5-be896d504025_1762x286.png 1272w, https://substackcdn.com/image/fetch/$s_!WJCf!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F51cab965-7f4a-4e3c-bbc5-be896d504025_1762x286.png 1456w" sizes="100vw" loading="lazy"></picture><div></div></div></a></figure></div><p>In addition, you can also use your models in a self-hosted version of <a href="https://witheve.ai">witheve.ai</a> to enjoy Agent and workflow automations with access to over 1500+ apps (<a href="https://witheve.ai/contact">reach out for support</a>). Below how I connected a llama and mistral model:</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!DwbN!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1cc4b132-7fd5-459e-8a83-8421be2f4bd0_2592x1220.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!DwbN!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1cc4b132-7fd5-459e-8a83-8421be2f4bd0_2592x1220.png 424w, https://substackcdn.com/image/fetch/$s_!DwbN!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1cc4b132-7fd5-459e-8a83-8421be2f4bd0_2592x1220.png 848w, https://substackcdn.com/image/fetch/$s_!DwbN!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1cc4b132-7fd5-459e-8a83-8421be2f4bd0_2592x1220.png 1272w, https://substackcdn.com/image/fetch/$s_!DwbN!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1cc4b132-7fd5-459e-8a83-8421be2f4bd0_2592x1220.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!DwbN!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1cc4b132-7fd5-459e-8a83-8421be2f4bd0_2592x1220.png" width="1456" height="685" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/1cc4b132-7fd5-459e-8a83-8421be2f4bd0_2592x1220.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:685,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:168557,&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://applicationlayer.substack.com/i/168717967?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1cc4b132-7fd5-459e-8a83-8421be2f4bd0_2592x1220.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_!DwbN!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1cc4b132-7fd5-459e-8a83-8421be2f4bd0_2592x1220.png 424w, https://substackcdn.com/image/fetch/$s_!DwbN!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1cc4b132-7fd5-459e-8a83-8421be2f4bd0_2592x1220.png 848w, https://substackcdn.com/image/fetch/$s_!DwbN!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1cc4b132-7fd5-459e-8a83-8421be2f4bd0_2592x1220.png 1272w, https://substackcdn.com/image/fetch/$s_!DwbN!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1cc4b132-7fd5-459e-8a83-8421be2f4bd0_2592x1220.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg 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"><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"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">A screenshot of the <a href="https://witheve.ai">witheve.ai</a> platform. Sign up via <a href="https://app.witheve.ai/register">this link</a> and receive 1M free credits</figcaption></figure></div><p>That's it. You now have a powerful AI model running entirely on your own hardware, with no cloud dependencies, no per-token costs, and complete control over your data. </p><p>Keep building,</p><p>Michiel</p><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://applicationlayer.substack.com/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe&quot;,&quot;language&quot;:&quot;en&quot;}" data-component-name="SubscribeWidgetToDOM"><div class="subscription-widget show-subscribe"><div class="preamble"><p class="cta-caption">Thanks for reading The Application Layer! Subscribe for free to receive new posts and support my work.</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>]]></content:encoded></item><item><title><![CDATA[E7.1: The Urgent Need for Affordable Real-Time Proof of Reserves]]></title><description><![CDATA[Where We Are Since the 2014 Blog Post and Where we Need to be.]]></description><link>https://applicationlayer.substack.com/p/e71-the-urgent-need-for-affordable</link><guid isPermaLink="false">https://applicationlayer.substack.com/p/e71-the-urgent-need-for-affordable</guid><dc:creator><![CDATA[Michiel Voortman]]></dc:creator><pubDate>Tue, 01 Oct 2024 11:49:29 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!0pkq!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F051e5615-0f0a-4554-a215-39cbbea9c733_680x349.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>In the wake of major platform collapses like FTX, trust in crypto has been severely shaken. These events have highlighted a critical question (which is in a sense also applicable to TradFi): How can we be sure that companies actually hold the assets they claim? This is where Proof of Reserves (PoR) comes in, and why it's becoming increasingly crucial in the crypto industry.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!0pkq!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F051e5615-0f0a-4554-a215-39cbbea9c733_680x349.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!0pkq!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F051e5615-0f0a-4554-a215-39cbbea9c733_680x349.png 424w, https://substackcdn.com/image/fetch/$s_!0pkq!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F051e5615-0f0a-4554-a215-39cbbea9c733_680x349.png 848w, https://substackcdn.com/image/fetch/$s_!0pkq!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F051e5615-0f0a-4554-a215-39cbbea9c733_680x349.png 1272w, https://substackcdn.com/image/fetch/$s_!0pkq!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F051e5615-0f0a-4554-a215-39cbbea9c733_680x349.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!0pkq!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F051e5615-0f0a-4554-a215-39cbbea9c733_680x349.png" width="680" height="349" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/051e5615-0f0a-4554-a215-39cbbea9c733_680x349.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:349,&quot;width&quot;:680,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:283402,&quot;alt&quot;:&quot;&#129371;Is Binance the next domino? - Milk Road&quot;,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="&#129371;Is Binance the next domino? - Milk Road" title="&#129371;Is Binance the next domino? - Milk Road" srcset="https://substackcdn.com/image/fetch/$s_!0pkq!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F051e5615-0f0a-4554-a215-39cbbea9c733_680x349.png 424w, https://substackcdn.com/image/fetch/$s_!0pkq!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F051e5615-0f0a-4554-a215-39cbbea9c733_680x349.png 848w, https://substackcdn.com/image/fetch/$s_!0pkq!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F051e5615-0f0a-4554-a215-39cbbea9c733_680x349.png 1272w, https://substackcdn.com/image/fetch/$s_!0pkq!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F051e5615-0f0a-4554-a215-39cbbea9c733_680x349.png 1456w" sizes="100vw" fetchpriority="high"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg 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"><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"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><h2>What is Proof of Reserves?</h2><p>POR is a method for companies to demonstrate that they have enough assets to cover what they owe to their customers. Around 2022, the concept came to crypto as a way to verify that for every digital coin or token a company has issued or is holding for its users, there's an equivalent amount of real assets backing it up.</p><h2>The Current State of Proof of Reserves</h2><p>Currently, most major players in the crypto world, either just claim their backing or provide POR reports infrequently. For example, popular stablecoins like <a href="https://tether.to/en/">Tether</a> only provide POR reports quarterly. These reports are typically attestations (evidence or proof of something) verified by third-party firms, offering a snapshot of the company's reserves at a specific moment in time.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!apLJ!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3e5a58f4-763f-444f-8a52-b964fdbf3960_877x1280.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!apLJ!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3e5a58f4-763f-444f-8a52-b964fdbf3960_877x1280.png 424w, https://substackcdn.com/image/fetch/$s_!apLJ!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3e5a58f4-763f-444f-8a52-b964fdbf3960_877x1280.png 848w, https://substackcdn.com/image/fetch/$s_!apLJ!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3e5a58f4-763f-444f-8a52-b964fdbf3960_877x1280.png 1272w, https://substackcdn.com/image/fetch/$s_!apLJ!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3e5a58f4-763f-444f-8a52-b964fdbf3960_877x1280.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!apLJ!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3e5a58f4-763f-444f-8a52-b964fdbf3960_877x1280.png" width="877" height="1280" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/3e5a58f4-763f-444f-8a52-b964fdbf3960_877x1280.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1280,&quot;width&quot;:877,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:203409,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;: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_!apLJ!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3e5a58f4-763f-444f-8a52-b964fdbf3960_877x1280.png 424w, https://substackcdn.com/image/fetch/$s_!apLJ!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3e5a58f4-763f-444f-8a52-b964fdbf3960_877x1280.png 848w, https://substackcdn.com/image/fetch/$s_!apLJ!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3e5a58f4-763f-444f-8a52-b964fdbf3960_877x1280.png 1272w, https://substackcdn.com/image/fetch/$s_!apLJ!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3e5a58f4-763f-444f-8a52-b964fdbf3960_877x1280.png 1456w" sizes="100vw"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg 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"><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"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">The most recent Reserves Report from Tether, dated June 30, 2024, includes footnotes that weaken the claims considerably on the verifiability spectrum</figcaption></figure></div><h3>The Tether Example</h3><p><a href="https://tether.to/en/">Tether</a> is a stable coin that should always be worth one US dollar. Despite claiming billions in excess reserves, Tether has faced criticism for the lack of detail and independent verification in its quarterly reports. This infrequent reporting leaves users in the dark about the true state of reserves for months at a time, creating significant risk in a market that moves quickly. </p><h2>The Need for Real-Time Verification</h2><p>Reports are better than just claims. However, a quarterly frequency is simply not enough. The crypto market operates 24/7, with millions of transactions happening every day. The market needs real-time Proof of Reserves. Real Time POR could offer:</p><ol><li><p>Instant verification of asset backing</p></li><li><p>Early detection of potential issues, possibly preventing major collapses</p></li><li><p>A stronger foundation for the growth of decentralized finance</p></li><li><p>Increased transparency and trust in the whole crypto ecosystem</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_!t7n5!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F805eeefa-4b7f-4984-bbc5-218a85217dda_500x701.jpeg" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!t7n5!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F805eeefa-4b7f-4984-bbc5-218a85217dda_500x701.jpeg 424w, https://substackcdn.com/image/fetch/$s_!t7n5!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F805eeefa-4b7f-4984-bbc5-218a85217dda_500x701.jpeg 848w, https://substackcdn.com/image/fetch/$s_!t7n5!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F805eeefa-4b7f-4984-bbc5-218a85217dda_500x701.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!t7n5!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F805eeefa-4b7f-4984-bbc5-218a85217dda_500x701.jpeg 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!t7n5!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F805eeefa-4b7f-4984-bbc5-218a85217dda_500x701.jpeg" width="500" height="701" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/805eeefa-4b7f-4984-bbc5-218a85217dda_500x701.jpeg&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:701,&quot;width&quot;:500,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;OKX on X: \&quot;We went full big brain with our Proof of Reserves &#129504;&#128073;  https://t.co/MaO2wXFifQ https://t.co/7RAS6H3wYP\&quot; / X&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="OKX on X: &quot;We went full big brain with our Proof of Reserves &#129504;&#128073;  https://t.co/MaO2wXFifQ https://t.co/7RAS6H3wYP&quot; / X" title="OKX on X: &quot;We went full big brain with our Proof of Reserves &#129504;&#128073;  https://t.co/MaO2wXFifQ https://t.co/7RAS6H3wYP&quot; / X" srcset="https://substackcdn.com/image/fetch/$s_!t7n5!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F805eeefa-4b7f-4984-bbc5-218a85217dda_500x701.jpeg 424w, https://substackcdn.com/image/fetch/$s_!t7n5!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F805eeefa-4b7f-4984-bbc5-218a85217dda_500x701.jpeg 848w, https://substackcdn.com/image/fetch/$s_!t7n5!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F805eeefa-4b7f-4984-bbc5-218a85217dda_500x701.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!t7n5!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F805eeefa-4b7f-4984-bbc5-218a85217dda_500x701.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"><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"><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"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><h2>Current Solutions and Challenges</h2><p>There are a few existing solutions in the market working on real-time POR. These solutions typically involve pulling off-chain data and making it available on-chain for smart contract verification. However, they face several limitations:</p><ol><li><p>Cost: Existing PoR solutions are often expensive to implement, making it challenging for smaller exchanges and protocols to adopt them. This high cost barrier limits widespread use across the industry.</p></li><li><p>Limited blockchain integration: Many current solutions are primarily designed to work with specific blockchain networks, such as those compatible with the Ethereum Virtual Machine (EVM). This limitation restricts their applicability to a broader range of blockchain ecosystems.</p></li><li><p>Complexity: Implementing these solutions can be technically complex, requiring significant resources and expertise.</p></li><li><p>Third-party reliance: Most current offerings are provided via third parties, introducing an additional layer of trust. This goes against the trustless principles that blockchain technology aims to achieve.</p></li></ol><p>These challenges highlight the need for more accessible, cost-effective, and versatile PoR solutions that can cater to a wider range of blockchain networks and service providers in the industry.</p><h2>The Future of Proof of Reserves</h2><p>As the industry evolves, there's a clear need for more accessible and cost-effective real-time PoR solutions. The ideal future system would:</p><ol><li><p>Provide real-time or near-real-time verification</p></li><li><p>Be affordable for both large and small companies</p></li><li><p>Offer easy integration with existing systems</p></li><li><p>Scale effectively to handle the growing crypto market</p></li><li><p>Implement a trustless setup, eliminating the need to rely on third parties for verification</p></li></ol><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://applicationlayer.substack.com/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe 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://applicationlayer.substack.com/subscribe?"><span>Subscribe now</span></a></p><h2>Core Technological Components of Proof of Reserves</h2><p>To understand how real-time POR works, it's important to grasp some of the key technological components that make it possible. The core components are essentially Merkle Trees and Zero-Knowledge Proofs (ZKPs). The idea behind building such cryptographic proofs is a really interesting one and goes back to as early a 2014 (worth reading <a href="https://bitcointalk.org/index.php?topic=595180.0">the proposal on the Bitcointalk forum</a>). An idea was proposed to use a Merkle tree-based technique to verify whether certain sites really hold the bitcoins they claim to hold. So it was already a point of attention at that time. </p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!mKo-!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8558f2a9-a594-4140-a675-f65881cf84ca_1024x487.jpeg" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!mKo-!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8558f2a9-a594-4140-a675-f65881cf84ca_1024x487.jpeg 424w, https://substackcdn.com/image/fetch/$s_!mKo-!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8558f2a9-a594-4140-a675-f65881cf84ca_1024x487.jpeg 848w, https://substackcdn.com/image/fetch/$s_!mKo-!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8558f2a9-a594-4140-a675-f65881cf84ca_1024x487.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!mKo-!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8558f2a9-a594-4140-a675-f65881cf84ca_1024x487.jpeg 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!mKo-!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8558f2a9-a594-4140-a675-f65881cf84ca_1024x487.jpeg" width="1024" height="487" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/8558f2a9-a594-4140-a675-f65881cf84ca_1024x487.jpeg&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:487,&quot;width&quot;:1024,&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_!mKo-!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8558f2a9-a594-4140-a675-f65881cf84ca_1024x487.jpeg 424w, https://substackcdn.com/image/fetch/$s_!mKo-!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8558f2a9-a594-4140-a675-f65881cf84ca_1024x487.jpeg 848w, https://substackcdn.com/image/fetch/$s_!mKo-!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8558f2a9-a594-4140-a675-f65881cf84ca_1024x487.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!mKo-!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8558f2a9-a594-4140-a675-f65881cf84ca_1024x487.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"><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"><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"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption"><a href="https://blockchain-academy.hs-mittweida.de/courses/bitcoin-taproot/lessons/taproot-assets-2/topic/merkle-sum-sparse-merkle-tree-ms-smt/">A Merkle Sum Tree</a></figcaption></figure></div><h3>Merkle Trees</h3><p>So what are those &#8216;Merkle tree-based techniques&#8217; where (self declared) Cyberpunk <a href="https://academy.bit2me.com/en/who-is-gregory-maxwell/">Greg Maxwell</a> was referring to in 2014? Merkle trees are a fundamental data structure in cryptography and blockchain technology. They allow for efficient and secure verification of large data sets. In the context of POR (specifically for exchanges), a variant of the Merkle Tree is often used called a Merkle Sum Tree. In such a tree, leaves are one-way hashes of user account private data.</p><p>The Merkle Sum Tree works as follows:</p><ol><li><p>Each leaf node contains a hash of a user's account data (e.g., account ID, balance) and the actual balance value.</p></li><li><p>As we move up the tree, each parent node contains: a) A hash of its child nodes' hashes b) The sum of its child nodes' balances</p></li></ol><p>This structure allows for two critical features:</p><ul><li><p>Efficient verification of individual account inclusion (through Merkle proofs)</p></li><li><p>Verification of the total sum of all account balances</p></li></ul><p>The root of the Merkle Sum Tree represents both the cryptographic proof of all included accounts and the total sum of all balances. This allows exchanges to prove they have sufficient reserves to cover all user balances without revealing individual account details.</p><p>However, this approach faces a privacy challenge: to verify a proof in a summation tree, one needs to know the balances of neighboring nodes. This is where Zero-Knowledge Proofs come into play.</p><p></p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!Ync-!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F74eb1383-55d7-4868-b37d-bdb8d6619863_773x541.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!Ync-!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F74eb1383-55d7-4868-b37d-bdb8d6619863_773x541.png 424w, https://substackcdn.com/image/fetch/$s_!Ync-!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F74eb1383-55d7-4868-b37d-bdb8d6619863_773x541.png 848w, https://substackcdn.com/image/fetch/$s_!Ync-!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F74eb1383-55d7-4868-b37d-bdb8d6619863_773x541.png 1272w, https://substackcdn.com/image/fetch/$s_!Ync-!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F74eb1383-55d7-4868-b37d-bdb8d6619863_773x541.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!Ync-!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F74eb1383-55d7-4868-b37d-bdb8d6619863_773x541.png" width="773" height="541" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/74eb1383-55d7-4868-b37d-bdb8d6619863_773x541.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:541,&quot;width&quot;:773,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;complexity theory - Why exactly is Zero Knowledge Proof used here? -  Computer Science Stack Exchange&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="complexity theory - Why exactly is Zero Knowledge Proof used here? -  Computer Science Stack Exchange" title="complexity theory - Why exactly is Zero Knowledge Proof used here? -  Computer Science Stack Exchange" srcset="https://substackcdn.com/image/fetch/$s_!Ync-!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F74eb1383-55d7-4868-b37d-bdb8d6619863_773x541.png 424w, https://substackcdn.com/image/fetch/$s_!Ync-!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F74eb1383-55d7-4868-b37d-bdb8d6619863_773x541.png 848w, https://substackcdn.com/image/fetch/$s_!Ync-!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F74eb1383-55d7-4868-b37d-bdb8d6619863_773x541.png 1272w, https://substackcdn.com/image/fetch/$s_!Ync-!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F74eb1383-55d7-4868-b37d-bdb8d6619863_773x541.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg 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"><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"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption"><a href="https://en.wikipedia.org/wiki/Zero-knowledge_proof">Wikipedia</a></figcaption></figure></div><h2>Zero-Knowledge Proofs</h2><p>Zero-Knowledge Proofs (ZKPs) are cryptographic protocols that allow one party (the prover) to prove to another party (the verifier) that a statement is true without revealing any information beyond the validity of the statement itself.</p><blockquote><p>The Famous Cave Diagram above illustrates a simple Zero-Knowledge Proof:</p><ul><li><p>Peggy (purple figure) claims to know a secret password that opens the magic door between paths A and B.</p></li><li><p>Victor (green figure) wants to verify this without learning the password.</p></li></ul><p>The process:</p><ol><li><p>Peggy enters the cave, choosing path A or B randomly.</p></li><li><p>Victor shouts to Peggy that he should take back path A or B.</p></li><li><p>Peggy must exit from the called path, using the door if necessary.</p></li></ol><p>Repeating this many times, Victor becomes convinced Peggy knows the password without learning it himself. This demonstrates ZKP's core principles:</p><ul><li><p>Completeness: Peggy can always convince Victor if he knows the password.</p></li><li><p>Soundness: Peggy can't trick Victor if she doesn't know it.</p></li><li><p>Zero-knowledge: Victor learns nothing about the password itself.</p></li></ul></blockquote><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://applicationlayer.substack.com/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://applicationlayer.substack.com/subscribe?"><span>Subscribe now</span></a></p><p>In the context of POR, ZKPs address the privacy concerns raised by Merkle Sum Trees. Instead of users directly validating their Merkle Proof by hashing their private data and rebuilding the root hash (which would require knowledge of other users' balances), they can validate a ZKP that's validating their Merkle Proof.</p><p>Here's how ZKPs enhance the POR process:</p><ol><li><p>The exchange generates a ZKP for each user's Merkle proof.</p></li><li><p>This ZKP proves that: a) The user's account is included in the Merkle Sum Tree b) The user's balance is correctly incorporated in the tree's total sum c) All balance values in the path are non-negative</p></li><li><p>Users can verify this ZKP without learning anything about other accounts or the specific path their account takes in the Merkle Sum Tree.</p></li></ol><p>By combining Merkle Sum Trees with ZKPs, exchanges can provide a robust POR that:</p><ul><li><p>Proves the total sum of user balances</p></li><li><p>Allows individual users to verify their account inclusion</p></li><li><p>Maintains privacy for all users</p></li><li><p>Prevents manipulation of reported balances</p></li></ul><p>This approach significantly enhances the trustworthiness and transparency of crypto exchanges and protocols, addressing many of the concerns raised by recent platform collapses.</p><h2>E7.2: Building a More Trustworthy Ecosystem With Accountable Proof of Reserves</h2><p>POR is a crucial tool for ensuring transparency in the crypto ecosystem, but the current model of infrequent reporting falls short of the needs of a fast-moving market. As we move forward, real-time PoR should become the industry standard&#8212;not just for compliance, but for securing the future of the entire crypto space.</p><h4><strong>But what if we told you that the future is already here? </strong></h4><p>At <a href="https://www.accountable.capital/">Accountable</a>, we've developed a state-of-the-art system that combines real-time data aggregation, advanced cryptography, and automated auditing processes to deliver a comprehensive and continuously updated Proof of Reserves solution - all in a trustless way. </p><p>Next week, together with CTO <a href="https://www.linkedin.com/in/ioan-moldovan/">Ioan Moldovan</a>, we're pulling back the curtain on a our solution that's set to redefine how we approach PoR. In doing so, we're working towards a more trustworthy, transparent, and efficient financial ecosystem.</p><p>Thanks for reading and see u next week!</p><p>Keep building &#128736;</p><p>Michiel</p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://applicationlayer.substack.com/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://applicationlayer.substack.com/subscribe?"><span>Subscribe now</span></a></p><p></p>]]></content:encoded></item><item><title><![CDATA[Lessons from yesterday's 27M hack]]></title><description><![CDATA[The hack happened on Penpie, a subDAO of the Penple platform. What happened and what can we learn from it?]]></description><link>https://applicationlayer.substack.com/p/lessons-from-yesterdays-27m-hack</link><guid isPermaLink="false">https://applicationlayer.substack.com/p/lessons-from-yesterdays-27m-hack</guid><dc:creator><![CDATA[Michiel Voortman]]></dc:creator><pubDate>Wed, 04 Sep 2024 11:46:37 GMT</pubDate><enclosure url="https://substack-post-media.s3.amazonaws.com/public/images/19e1ab35-0fbc-40a3-924e-e4f493e85d46_400x400.jpeg" length="0" type="image/jpeg"/><content:encoded><![CDATA[<div class="pullquote"><p>I genuinely feel sorry for everyone affected by this exploit, especially those who lost their funds and the Penpie team who worked hard to build their platform. It's heartbreaking to see the impact that such vulnerabilities can have on both individual investors, the entire project, and the DeFi ecosystem. </p><p>Despite this setback, it's important to recognize the significant contributions both Penpie and Pendle have made to advancing the DeFi ecosystem. Fortunately, the funds on the main Pendle platform were unaffected by this exploit.</p><p>Michiel</p></div><p><strong>A quick Summary</strong></p><p>On September 3, 2024, <a href="https://www.pendle.magpiexyz.io/stake">Penpie</a>, a subDAO (<a href="https://en.wikipedia.org/wiki/Decentralized_autonomous_organization">Decentralized Autonomous Organisation</a>), operating on <a href="https://www.pendle.finance/">the Pendle platform</a> (a protocol for trading tokenized yield), fell victim to a severe exploit that resulted in the loss of $27 million. The incident shows not only the technical vulnerabilities within smart contracts but also underscores the importance of acting on identified risks. In this article, we&#8217;ll explore the mechanics of the exploit, the audit, and the broader implications.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!ssnd!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9dbeaf78-0525-4451-9656-b7e71009f4f6_782x900.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!ssnd!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9dbeaf78-0525-4451-9656-b7e71009f4f6_782x900.png 424w, https://substackcdn.com/image/fetch/$s_!ssnd!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9dbeaf78-0525-4451-9656-b7e71009f4f6_782x900.png 848w, https://substackcdn.com/image/fetch/$s_!ssnd!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9dbeaf78-0525-4451-9656-b7e71009f4f6_782x900.png 1272w, https://substackcdn.com/image/fetch/$s_!ssnd!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9dbeaf78-0525-4451-9656-b7e71009f4f6_782x900.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!ssnd!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9dbeaf78-0525-4451-9656-b7e71009f4f6_782x900.png" width="782" height="900" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/9dbeaf78-0525-4451-9656-b7e71009f4f6_782x900.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:900,&quot;width&quot;:782,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:84207,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!ssnd!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9dbeaf78-0525-4451-9656-b7e71009f4f6_782x900.png 424w, https://substackcdn.com/image/fetch/$s_!ssnd!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9dbeaf78-0525-4451-9656-b7e71009f4f6_782x900.png 848w, https://substackcdn.com/image/fetch/$s_!ssnd!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9dbeaf78-0525-4451-9656-b7e71009f4f6_782x900.png 1272w, https://substackcdn.com/image/fetch/$s_!ssnd!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9dbeaf78-0525-4451-9656-b7e71009f4f6_782x900.png 1456w" sizes="100vw" fetchpriority="high"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg 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"><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"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">The function where it went wrong</figcaption></figure></div><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://applicationlayer.substack.com/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://applicationlayer.substack.com/subscribe?"><span>Subscribe now</span></a></p><p><strong>The Exploit: What Happened?</strong></p><p>The attack centered around a vulnerability in the internal <code>_harvestMarketRewards</code> function of the <a href="https://github.com/magpiexyz/penpie_contracts/blob/main/pendle/PendleStakingBaseUpg.sol">PendleStakingBaseUpg contract</a> of Penpie. This function is responsible for harvesting rewards from various markets and distributing them accordingly. The attacker exploited a (kind of) reentrancy vulnerability, allowing them to repeatedly call the function and withdraw far more rewards than they were entitled to.</p><p>The vulnerability was rooted in how the function interacted with the <code>redeemRewards</code> method of the <code>IPendleMarket</code> contract:</p><pre><code>IPendleMarket(_market).redeemRewards(address(this));</code></pre><p>This external call allowed the attacker&#8217;s malicious contract to manipulate the flow of execution, re-enter the function, and trick the contract into thinking it had more rewards to distribute than it actually did. By artificially inflating the balance of rewards, the attacker managed to drain the contract, causing significant financial loss.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!nhNA!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9ee8e454-7819-4172-8201-68f37adad299_765x866.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!nhNA!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9ee8e454-7819-4172-8201-68f37adad299_765x866.png 424w, https://substackcdn.com/image/fetch/$s_!nhNA!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9ee8e454-7819-4172-8201-68f37adad299_765x866.png 848w, https://substackcdn.com/image/fetch/$s_!nhNA!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9ee8e454-7819-4172-8201-68f37adad299_765x866.png 1272w, https://substackcdn.com/image/fetch/$s_!nhNA!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9ee8e454-7819-4172-8201-68f37adad299_765x866.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!nhNA!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9ee8e454-7819-4172-8201-68f37adad299_765x866.png" width="765" height="866" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/9ee8e454-7819-4172-8201-68f37adad299_765x866.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:866,&quot;width&quot;:765,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:132386,&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;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!nhNA!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9ee8e454-7819-4172-8201-68f37adad299_765x866.png 424w, https://substackcdn.com/image/fetch/$s_!nhNA!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9ee8e454-7819-4172-8201-68f37adad299_765x866.png 848w, https://substackcdn.com/image/fetch/$s_!nhNA!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9ee8e454-7819-4172-8201-68f37adad299_765x866.png 1272w, https://substackcdn.com/image/fetch/$s_!nhNA!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9ee8e454-7819-4172-8201-68f37adad299_765x866.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg 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"><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"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">The vulnerability found during <a href="https://github.com/magpiexyz/audit/blob/main/Penpie/WatchPug_V1.pdf">the Audit</a></figcaption></figure></div><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://applicationlayer.substack.com/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://applicationlayer.substack.com/subscribe?"><span>Subscribe now</span></a></p><p><strong>A Known Issue</strong></p><p>In June 2023, an audit conducted by <a href="https://www.watchpug.org/">WatchPlug </a>flagged a related issue with the same piece of code. The auditors identified that the <code>redeemRewards</code> function call allowed any sender to claim rewards on behalf of the user, potentially leading to inaccurate reward tracking if manipulated.</p><p>Despite this critical finding, the vulnerability was not adequately addressed, leaving Penpie exposed to the very attack that WatchPlug had warned about over a year earlier. The issue was marked as resolved. However, in the audit the repo /pendleMagpie was mentioned while I found the exploited code in repo /penpie_contracts. Therefore, I couldn&#8217;t check how the vulnerability was addressed.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!ZK-y!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6e791a60-fdec-4262-874e-ff3d54e7716e_1174x603.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!ZK-y!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6e791a60-fdec-4262-874e-ff3d54e7716e_1174x603.png 424w, https://substackcdn.com/image/fetch/$s_!ZK-y!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6e791a60-fdec-4262-874e-ff3d54e7716e_1174x603.png 848w, https://substackcdn.com/image/fetch/$s_!ZK-y!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6e791a60-fdec-4262-874e-ff3d54e7716e_1174x603.png 1272w, https://substackcdn.com/image/fetch/$s_!ZK-y!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6e791a60-fdec-4262-874e-ff3d54e7716e_1174x603.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!ZK-y!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6e791a60-fdec-4262-874e-ff3d54e7716e_1174x603.png" width="1174" height="603" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/6e791a60-fdec-4262-874e-ff3d54e7716e_1174x603.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:603,&quot;width&quot;:1174,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:53749,&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;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!ZK-y!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6e791a60-fdec-4262-874e-ff3d54e7716e_1174x603.png 424w, https://substackcdn.com/image/fetch/$s_!ZK-y!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6e791a60-fdec-4262-874e-ff3d54e7716e_1174x603.png 848w, https://substackcdn.com/image/fetch/$s_!ZK-y!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6e791a60-fdec-4262-874e-ff3d54e7716e_1174x603.png 1272w, https://substackcdn.com/image/fetch/$s_!ZK-y!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6e791a60-fdec-4262-874e-ff3d54e7716e_1174x603.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg 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"><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"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">The drop in PNP. Source: <a href="https://coinmarketcap.com/currencies/penpie/">CMC</a></figcaption></figure></div><p><strong>Market Reaction and Implications</strong></p><p>The exploit led to a dramatic 40% drop in Penpie&#8217;s native token (PNP) and an 8% decline in Pendle&#8217;s token (PENDLE). The incident not only shook investor confidence but also started discussions again about the importance of good and responsive security practices in the DeFi space.</p><p><strong>Lessons Learned</strong></p><ol><li><p><strong>Act on Audit Findings</strong>: It is crucial for DeFi projects to take audit findings seriously and implement recommended changes promptly. The Penpie incident demonstrates the potential consequences of ignoring or delaying such actions.</p></li><li><p><strong>Reentrancy Guards and Security Best Practices</strong>: Ensuring that smart contracts are protected against reentrancy attacks, using tools like reentrancy guards, is essential. So not only on external functions that call internal functions. If there is an internal function making an external call, please be cautious and take adequate steps to secure this call. Additionally, following best practices such as the <a href="https://detectors.auditbase.com/checks-effects-interactions">Check-Effects-Interactions pattern</a> can mitigate many common vulnerabilities.</p></li><li><p><strong>Ongoing alertness</strong>: As DeFi protocols continue to evolve, continuous monitoring and regular audits are necessary to maintain security. The dynamic nature of the crypto space requires projects to stay ahead of potential threats.</p></li></ol><p><strong>Conclusion</strong></p><p>The Penpie exploit serves as a harsh reminder that even well-documented vulnerabilities can lead to catastrophic outcomes if not addressed. For the DeFi space to thrive, developers and project teams must prioritize security at every stage, from initial development through to post-deployment monitoring. By learning from incidents like this, the community can work towards a more secure and resilient ecosystem.</p><p>Michiel</p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://applicationlayer.substack.com/p/lessons-from-yesterdays-27m-hack?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://applicationlayer.substack.com/p/lessons-from-yesterdays-27m-hack?utm_source=substack&utm_medium=email&utm_content=share&action=share"><span>Share</span></a></p>]]></content:encoded></item><item><title><![CDATA[A Smarter AI Assistant with Retrieval-Augmented Generation: A Case Study]]></title><description><![CDATA["I know people usually better than they know themselves." - Donna]]></description><link>https://applicationlayer.substack.com/p/a-smarter-ai-assistant-with-retrieval</link><guid isPermaLink="false">https://applicationlayer.substack.com/p/a-smarter-ai-assistant-with-retrieval</guid><dc:creator><![CDATA[Michiel Voortman]]></dc:creator><pubDate>Thu, 29 Aug 2024 15:49:44 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!hosR!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8d466a36-593c-4a80-a190-7d56c4d120c4_1024x682.jpeg" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>Retrieval-Augmented Generation, or RAG, is one of the hottest topics in AI today. The concept is widely discussed, but implementing it effectively can be more challenging than it seems. For those unfamiliar, RAG is a method that combines the retrieval of relevant data with the generation of responses, allowing AI systems to deliver more accurate and contextually relevant answers.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!hosR!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8d466a36-593c-4a80-a190-7d56c4d120c4_1024x682.jpeg" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!hosR!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8d466a36-593c-4a80-a190-7d56c4d120c4_1024x682.jpeg 424w, https://substackcdn.com/image/fetch/$s_!hosR!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8d466a36-593c-4a80-a190-7d56c4d120c4_1024x682.jpeg 848w, https://substackcdn.com/image/fetch/$s_!hosR!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8d466a36-593c-4a80-a190-7d56c4d120c4_1024x682.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!hosR!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8d466a36-593c-4a80-a190-7d56c4d120c4_1024x682.jpeg 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!hosR!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8d466a36-593c-4a80-a190-7d56c4d120c4_1024x682.jpeg" width="1024" height="682" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/8d466a36-593c-4a80-a190-7d56c4d120c4_1024x682.jpeg&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:682,&quot;width&quot;:1024,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;Donna Paulsen of 'Suits' is one of TV's most powerful women as show marks  100th episode &#8211; New York Daily News&quot;,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="Donna Paulsen of 'Suits' is one of TV's most powerful women as show marks  100th episode &#8211; New York Daily News" title="Donna Paulsen of 'Suits' is one of TV's most powerful women as show marks  100th episode &#8211; New York Daily News" srcset="https://substackcdn.com/image/fetch/$s_!hosR!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8d466a36-593c-4a80-a190-7d56c4d120c4_1024x682.jpeg 424w, https://substackcdn.com/image/fetch/$s_!hosR!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8d466a36-593c-4a80-a190-7d56c4d120c4_1024x682.jpeg 848w, https://substackcdn.com/image/fetch/$s_!hosR!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8d466a36-593c-4a80-a190-7d56c4d120c4_1024x682.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!hosR!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8d466a36-593c-4a80-a190-7d56c4d120c4_1024x682.jpeg 1456w" sizes="100vw" fetchpriority="high"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg 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"><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"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p><a href="https://www.yourownhq.com/">YourOwn</a>, inspired by the serie <a href="https://www.imdb.com/title/tt1632701/">Suits</a>, is building Donna&#8212;a powerful Whatsapp based AI assistant tailored for SMBs. Donna comes equipped with a suite of tools such as reading documents, setting reminders, and searching the internet. However, despite her capabilities, Donna had a significant limitation: she couldn&#8217;t access or utilize company-specific data. </p><h2>The Vision: Enhancing Donna with RAG</h2><p>The goal was clear: to integrate a RAG system into Donna, enabling her to access and retrieve company-specific data, thereby making her more useful and relevant to the businesses she serves.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!j2Xy!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa2025155-fd8a-42f1-a69c-4c90b2c0f9d1_875x362.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!j2Xy!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa2025155-fd8a-42f1-a69c-4c90b2c0f9d1_875x362.png 424w, https://substackcdn.com/image/fetch/$s_!j2Xy!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa2025155-fd8a-42f1-a69c-4c90b2c0f9d1_875x362.png 848w, https://substackcdn.com/image/fetch/$s_!j2Xy!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa2025155-fd8a-42f1-a69c-4c90b2c0f9d1_875x362.png 1272w, https://substackcdn.com/image/fetch/$s_!j2Xy!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa2025155-fd8a-42f1-a69c-4c90b2c0f9d1_875x362.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!j2Xy!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa2025155-fd8a-42f1-a69c-4c90b2c0f9d1_875x362.png" width="875" height="362" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/a2025155-fd8a-42f1-a69c-4c90b2c0f9d1_875x362.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:362,&quot;width&quot;:875,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;What is Retrieval-Augmented Generation (RAG)&quot;,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="What is Retrieval-Augmented Generation (RAG)" title="What is Retrieval-Augmented Generation (RAG)" srcset="https://substackcdn.com/image/fetch/$s_!j2Xy!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa2025155-fd8a-42f1-a69c-4c90b2c0f9d1_875x362.png 424w, https://substackcdn.com/image/fetch/$s_!j2Xy!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa2025155-fd8a-42f1-a69c-4c90b2c0f9d1_875x362.png 848w, https://substackcdn.com/image/fetch/$s_!j2Xy!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa2025155-fd8a-42f1-a69c-4c90b2c0f9d1_875x362.png 1272w, https://substackcdn.com/image/fetch/$s_!j2Xy!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa2025155-fd8a-42f1-a69c-4c90b2c0f9d1_875x362.png 1456w" sizes="100vw"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg 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"><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"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Source: <a href="https://pvml.com/glossary/retrieval-augmented-generation-rag/">PVML</a></figcaption></figure></div><h3>What is RAG?</h3><p>At its core, RAG consists of two primary components:</p><ol><li><p><strong>Data Retrieval</strong>: This involves fetching and storing data from various sources.</p></li><li><p><strong>Data Searching</strong>: This part involves searching through the stored data to find relevant information when needed.</p></li></ol><p>By blending these two processes, RAG allows an AI system to pull specific, relevant data on demand, significantly improving its response accuracy.</p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://applicationlayer.substack.com/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://applicationlayer.substack.com/subscribe?"><span>Subscribe now</span></a></p><h2>The Blueprint: Building a Successful RAG System</h2><h3>Step 1: Understand the Requirements</h3><p>The first step in building a successful RAG system is to thoroughly understand the project&#8217;s requirements. For Donna, this meant considering factors like:</p><ul><li><p><strong>Number of Companies</strong>: How many businesses will Donna serve?</p></li><li><p><strong>File Types</strong>: What kind of documents and file extensions will she need to handle?</p></li><li><p><strong>Latency Constraints</strong>: How quickly does the data retrieval and search need to be?</p></li></ul><p>These are just a few of the critical questions that need to be addressed upfront.</p><h3>Step 2: Identify Integration Points</h3><p>The next step was identifying where and how to integrate the RAG system with existing infrastructure. In the case of Donna:</p><ul><li><p><strong>Data Source</strong>: We agreed to use Google Drive as the primary data source.</p></li><li><p><strong>Authentication</strong>: Implementing OAuth mechanisms was essential to securely access company data.</p></li><li><p><strong>Folder Selection</strong>: There needed to be a functionality for users to select specific folders for Donna to access.</p></li><li><p><strong>File Handling</strong>: The system had to manage file changes, additions, and deletions effectively.</p></li><li><p><strong>Chatbot Integration</strong>: Donna&#8217;s chatbot was already built using <a href="https://www.langchain.com/">Langchain</a>, so seamless integration with this framework was crucial.</p></li><li><p><strong>Communication</strong>: Since Donna interacts with users via WhatsApp, integrating with the WhatsApp server was also vital.</p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://applicationlayer.substack.com/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://applicationlayer.substack.com/subscribe?"><span>Subscribe now</span></a></p></li></ul><h3>Step 3: Build the Population Pipeline</h3><p>Once the integration points were identified, the next step was building the pipeline to eventually populate the database. This involved:</p><ul><li><p><strong>Fetching the Data</strong>: Retrieving data from the identified sources, such as Google Drive, using secure access protocols like OAuth. This step is crucial for ensuring that the system has the necessary data to work with.</p></li></ul><ul><li><p><strong>Chunking and Embeddings</strong>: Splitting documents into manageable chunks and generating embeddings (vector representations) to make the data searchable.</p></li><li><p><strong>Vector Database Setup</strong>: Setting up a vector database to store these embeddings. A vector database is a specialized database designed to handle the complexities of storing and searching through vectorized data, which is crucial for efficient and accurate retrieval in a RAG system. I decided to use <a href="https://www.pinecone.io/">Pinecone </a>as it is a fully managed, cloud-based Vector database with a reasonably large free tier. A tutorial I highly recommend where you can use Pinecone together with Langchain can be found <a href="https://docs.pinecone.io/integrations/langchain">here</a>.</p></li></ul><h3>Step 4: Implement the Semantic Retriever</h3><p>The semantic retriever is the core component that powers the search functionality within the RAG system. For Donna, I implemented a hybrid retriever that combines two powerful methods: similarity search and a BM25 retriever. This combination enhances the accuracy and relevance of the search results by addressing the limitations of each method when used independently.</p><h4>Similarity Search</h4><p><strong>Similarity search</strong> is a technique that uses vector representations (embeddings) of documents to find the most similar pieces of information based on a query. In this context, each document is converted into a vector&#8212;a numerical representation that captures the semantic meaning of the text. When a query is made, the system searches for the vectors that are closest to the query vector in the high-dimensional space. This approach is highly effective for capturing the overall context and meaning of the query and the documents.</p><p>However, similarity search can sometimes miss specific keywords or exact phrases because it focuses on the broader semantic context rather than individual words. This is where the second component, BM25, comes into play.</p><h4>BM25 Retriever</h4><p><strong>BM25</strong> is a type of information retrieval model that is particularly good at keyword-based searches. It ranks documents based on the presence of query terms, considering factors like term frequency and document length. BM25 excels at finding documents that contain exact matches of the query terms, making it complementary to similarity search.</p><p>By combining BM25 with similarity search, we create a <strong>hybrid retriever</strong> that leverages the strengths of both methods. The hybrid retriever first performs a similarity search to identify documents that are semantically close to the query. Then, it uses the BM25 retriever to ensure that documents containing specific keywords or phrases are also considered. The results from both searches are merged, and duplicates are removed to provide a set of unique, highly relevant documents.</p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://applicationlayer.substack.com/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://applicationlayer.substack.com/subscribe?"><span>Subscribe now</span></a></p><h3>Step 5: Test, Iterate, and Refine</h3><p>Building a RAG system is as much an art as it is a science. After the initial implementation, we created a custom evaluation set based on real-world questions derived from documents provided by our building partners. Through continuous iteration and refinement, we significantly improved the system&#8217;s performance.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!nCzY!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff9501962-2c07-42fb-ad8f-53fe181a423c_1989x1151.jpeg" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!nCzY!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff9501962-2c07-42fb-ad8f-53fe181a423c_1989x1151.jpeg 424w, https://substackcdn.com/image/fetch/$s_!nCzY!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff9501962-2c07-42fb-ad8f-53fe181a423c_1989x1151.jpeg 848w, https://substackcdn.com/image/fetch/$s_!nCzY!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff9501962-2c07-42fb-ad8f-53fe181a423c_1989x1151.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!nCzY!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff9501962-2c07-42fb-ad8f-53fe181a423c_1989x1151.jpeg 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!nCzY!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff9501962-2c07-42fb-ad8f-53fe181a423c_1989x1151.jpeg" width="1456" height="843" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/f9501962-2c07-42fb-ad8f-53fe181a423c_1989x1151.jpeg&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:843,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:183631,&quot;alt&quot;:&quot;PA-Z on X: \&quot;Are you a 'Donna' type #PA from #Suits? Or do you work with  one? #Assistant #Secretary http://t.co/C9mV9mbFHZ\&quot; / X&quot;,&quot;title&quot;:&quot;PA-Z on X: \&quot;Are you a 'Donna' type #PA from #Suits? Or do you work with  one? #Assistant #Secretary http://t.co/C9mV9mbFHZ\&quot; / X&quot;,&quot;type&quot;:&quot;image/jpeg&quot;,&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="PA-Z on X: &quot;Are you a 'Donna' type #PA from #Suits? Or do you work with  one? #Assistant #Secretary http://t.co/C9mV9mbFHZ&quot; / X" title="PA-Z on X: &quot;Are you a 'Donna' type #PA from #Suits? Or do you work with  one? #Assistant #Secretary http://t.co/C9mV9mbFHZ&quot; / X" srcset="https://substackcdn.com/image/fetch/$s_!nCzY!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff9501962-2c07-42fb-ad8f-53fe181a423c_1989x1151.jpeg 424w, https://substackcdn.com/image/fetch/$s_!nCzY!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff9501962-2c07-42fb-ad8f-53fe181a423c_1989x1151.jpeg 848w, https://substackcdn.com/image/fetch/$s_!nCzY!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff9501962-2c07-42fb-ad8f-53fe181a423c_1989x1151.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!nCzY!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff9501962-2c07-42fb-ad8f-53fe181a423c_1989x1151.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"><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"><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"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Do you?</figcaption></figure></div><h2>The Result: A Smarter, More Capable Donna</h2><p>After numerous iterations and refinements, Donna became significantly smarter. Armed with the ability to access and retrieve company-specific data, she now offers more tailored, contextually relevant assistance to SMBs. The addition of RAG has transformed Donna into a more powerful tool, making her an invaluable asset to the businesses she serves.</p><h2>Conclusion: The Power of RAG</h2><p>Implementing RAG was a challenging but rewarding experience. It demonstrated the immense potential of combining retrieval and generation in AI, particularly for applications that require access to specific, contextually relevant data. As Donna continues to evolve, the lessons learned from this project will serve as a foundation for future advancements in AI-driven personal assistants.</p><p>For a basic implementation of populating a Pinecone database with Wikipedia articles and searching through it, please visit <a href="https://github.com/MichielMAnalytics/wikipedia_RAG/blob/main/Wikipedia_rag.ipynb">my repo</a>.</p><p>For those looking to implement similar systems, remember that the key to success lies in understanding your requirements, identifying integration points, building a robust data pipeline, and being prepared to iterate continuously. The journey can be complex, but the results are well worth the effort. </p><p><a href="https://www.linkedin.com/in/yourownai/">Bart</a>, <a href="https://www.linkedin.com/in/maartenkostwinder/">Maarten </a>en <a href="https://www.linkedin.com/in/elkanroelen/">Elkan</a>, good luck! </p><p>Michiel</p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://applicationlayer.substack.com/p/a-smarter-ai-assistant-with-retrieval?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://applicationlayer.substack.com/p/a-smarter-ai-assistant-with-retrieval?utm_source=substack&utm_medium=email&utm_content=share&action=share"><span>Share</span></a></p>]]></content:encoded></item><item><title><![CDATA[Agentic Summaries - Product Demo]]></title><description><![CDATA[After a couple of months of radio silence, finally, I am happy to introduce Agentic Summaries]]></description><link>https://applicationlayer.substack.com/p/agentic-summaries-product-demo</link><guid isPermaLink="false">https://applicationlayer.substack.com/p/agentic-summaries-product-demo</guid><dc:creator><![CDATA[Michiel Voortman]]></dc:creator><pubDate>Thu, 08 Aug 2024 10:38:57 GMT</pubDate><enclosure url="https://substack-post-media.s3.amazonaws.com/public/images/f197a34d-2d6a-41dd-929f-b8c19eaa6541_2043x2047.jpeg" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>################################################################<br>Although Substack is not a medium for product demos, I'd like to mention that Agentic Summaries, a product that arose from two blog posts I made earlier:</p><p>- E2.2: <a href="https://applicationlayer.substack.com/p/e22-welcome-agentic">Welcome Agentic</a></p><p>- E3:2: <a href="https://applicationlayer.substack.com/p/e32-bringing-agentic-to-life">Bringing Agentic to Life</a> </p><p>Therefore, I&#8217;d like to share the current state of the project with you. Enjoy! Michiel<br><br>################################################################</p><div class="native-video-embed" data-component-name="VideoPlaceholder" data-attrs="{&quot;mediaUploadId&quot;:&quot;a35e33f7-77d9-4406-902d-eb6b65059b0f&quot;,&quot;duration&quot;:null}"></div><p><strong>What is Agentic Summaries?</strong></p><p>Agentic Summaries is designed primarily for crypto enthusiasts to help you find your signals through the noise by providing tailored summaries from your favorite Telegram channels &#128309; and Subreddits &#128308;. These summaries are filtered by your interests and delivered up to three times a day &#128640;.</p><p><strong>How to Get Started:</strong></p><p>Go to our beloved <a href="https://t.me/AGENTIC_SUMMARIES_BOT?start=letsgo">Agentic Summaries Bot</a></p><p>Interact with the bot to configure your preferences and start receiving your personalized summaries.</p><p><strong>Our Vision:</strong></p><p>Our goal is to revolutionize how market players - traders and investors alike - access essential information, focusing on the most impactful insights to uncover real opportunities - alpha. We cut through the dense data in the crypto market to bring you targeted news summaries that highlight potential market moves before they become mainstream knowledge.</p><p><strong>Stay Connected:</strong></p><p>To contribute to the project, please join our <a href="https://t.me/AGENTIC_COMMUNITY">Community Channel</a>.</p><p>Welcome aboard, and let's find those signals together! &#128640;</p><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://applicationlayer.substack.com/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe&quot;,&quot;language&quot;:&quot;en&quot;}" data-component-name="SubscribeWidgetToDOM"><div class="subscription-widget show-subscribe"><div class="preamble"><p class="cta-caption">Thanks for reading The Application Layer! Subscribe for free to receive new posts and support my work.</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>]]></content:encoded></item><item><title><![CDATA[E3.2: Bringing Agentic to Life]]></title><description><![CDATA[Deploy an AI Workflow to Scrape Reddit, Distill valuable Information, and Autonomously Post Findings on Twitter.]]></description><link>https://applicationlayer.substack.com/p/e32-bringing-agentic-to-life</link><guid isPermaLink="false">https://applicationlayer.substack.com/p/e32-bringing-agentic-to-life</guid><dc:creator><![CDATA[Michiel Voortman]]></dc:creator><pubDate>Thu, 30 May 2024 16:30:27 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!pxkv!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6e441e7b-820a-4f18-8eb5-ed25ea7d5830_903x863.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!pxkv!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6e441e7b-820a-4f18-8eb5-ed25ea7d5830_903x863.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!pxkv!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6e441e7b-820a-4f18-8eb5-ed25ea7d5830_903x863.png 424w, https://substackcdn.com/image/fetch/$s_!pxkv!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6e441e7b-820a-4f18-8eb5-ed25ea7d5830_903x863.png 848w, https://substackcdn.com/image/fetch/$s_!pxkv!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6e441e7b-820a-4f18-8eb5-ed25ea7d5830_903x863.png 1272w, https://substackcdn.com/image/fetch/$s_!pxkv!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6e441e7b-820a-4f18-8eb5-ed25ea7d5830_903x863.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!pxkv!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6e441e7b-820a-4f18-8eb5-ed25ea7d5830_903x863.png" width="434" height="414.7751937984496" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/6e441e7b-820a-4f18-8eb5-ed25ea7d5830_903x863.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:863,&quot;width&quot;:903,&quot;resizeWidth&quot;:434,&quot;bytes&quot;:580421,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!pxkv!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6e441e7b-820a-4f18-8eb5-ed25ea7d5830_903x863.png 424w, https://substackcdn.com/image/fetch/$s_!pxkv!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6e441e7b-820a-4f18-8eb5-ed25ea7d5830_903x863.png 848w, https://substackcdn.com/image/fetch/$s_!pxkv!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6e441e7b-820a-4f18-8eb5-ed25ea7d5830_903x863.png 1272w, https://substackcdn.com/image/fetch/$s_!pxkv!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6e441e7b-820a-4f18-8eb5-ed25ea7d5830_903x863.png 1456w" sizes="100vw" fetchpriority="high"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg 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"><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"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><div class="pullquote"><p><a href="https://x.com/4GENTIC/status/1796200275025317967">Agentic operating fully autonomously on X</a></p></div><h3>Introduction</h3><p>In our previous blog, we explored the differences between production and non-production environments. Now, it's time to take that knowledge a step further with a practical implementation. In this post, we'll deploy a Reddit scraper that leverages Large Language Models (LLMs) and eventually posts its findings on Twitter in a fully automatic way, running once daily. Due to past experience, we'll use Microsoft Azure and VS Code for this deployment. Yet you can use a Cloud provider of choice as such deployments will be more or less similar among Clouds.</p><h3>Why Learning Cloud Deployment is Crucial</h3><p>Understanding cloud deployment is essential for modern software development. Moving your projects to a cloud environment brings numerous benefits, including scalability, reliability, and accessibility. It also equips you with skills that are highly valued in the industry. In this blog, we will take the Twitter scraper from<a href="https://applicationlayer.substack.com/p/e22-welcome-agentic"> blog E2.2</a> and deploy it, demonstrating the process step-by-step.</p><h3>Recap of the System</h3><p>Agentic consists of two agents: a Reddit researcher and an editor-in-chief. We scrape information of posts and comments on the subreddits specified in the variables.py file:</p><div class="captioned-image-container"><figure><a class="image-link image2" target="_blank" href="https://substackcdn.com/image/fetch/$s_!L7M6!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F151419ff-44e0-41fb-9148-510d01582614_761x60.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!L7M6!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F151419ff-44e0-41fb-9148-510d01582614_761x60.png 424w, https://substackcdn.com/image/fetch/$s_!L7M6!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F151419ff-44e0-41fb-9148-510d01582614_761x60.png 848w, https://substackcdn.com/image/fetch/$s_!L7M6!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F151419ff-44e0-41fb-9148-510d01582614_761x60.png 1272w, https://substackcdn.com/image/fetch/$s_!L7M6!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F151419ff-44e0-41fb-9148-510d01582614_761x60.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!L7M6!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F151419ff-44e0-41fb-9148-510d01582614_761x60.png" width="761" height="60" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/151419ff-44e0-41fb-9148-510d01582614_761x60.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:60,&quot;width&quot;:761,&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;:false,&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_!L7M6!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F151419ff-44e0-41fb-9148-510d01582614_761x60.png 424w, https://substackcdn.com/image/fetch/$s_!L7M6!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F151419ff-44e0-41fb-9148-510d01582614_761x60.png 848w, https://substackcdn.com/image/fetch/$s_!L7M6!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F151419ff-44e0-41fb-9148-510d01582614_761x60.png 1272w, https://substackcdn.com/image/fetch/$s_!L7M6!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F151419ff-44e0-41fb-9148-510d01582614_761x60.png 1456w" sizes="100vw"></picture><div></div></div></a></figure></div><p>The researcher gathers information from Reddit, and the editor checks the work of the researcher. Once done, findings are posted to Twitter. We use open-source Agentic Workflow framework <a href="https://www.crewai.com/">Crew AI</a> for this. For more information, you can check the <a href="https://github.com/MichielMAnalytics/agentic-public">GitHub repository</a> and the <a href="https://applicationlayer.substack.com/p/e22-welcome-agentic">previous blog post</a>.</p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://applicationlayer.substack.com/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://applicationlayer.substack.com/subscribe?"><span>Subscribe now</span></a></p><h3>Functional Requirements for Deployment</h3><p>Let&#8217;s use the framework as outlined in <a href="https://applicationlayer.substack.com/p/e31-bring-your-project-to-production">the previous blog</a> to better understand how to approach the deployment.</p><h4>Understanding the Production Environment</h4><ul><li><p><strong>Scalability Requirements:</strong><br>The system is designed to run locally with limited RAM and needs to operate only once per day, making extensive scalability unnecessary. A cron job will be used to schedule this daily task. A cron job is a way to set up automatic tasks on a computer to run at specific times, like setting an alarm clock for your software.</p></li><li><p><strong>Integration Points:</strong><br>As a new deployment, there are no existing systems to integrate with.</p></li><li><p><strong>Performance Constraints:</strong><br>Given the simplicity of this deployment, performance constraints are minimal.</p></li></ul><h4>Code, Versioning, and CI/CD Pipelines</h4><ul><li><p><strong>Version Control Systems (VCS):</strong><br>We'll use GitHub for version control, as it provides a free and robust platform for managing code.</p></li><li><p><strong>Model Versioning:</strong><br>Ensure the deployed version matches the most recent version on GitHub. The only exception is the <code>pysqlite3-binary</code> requirement and corresponding code in <code>function_app.py</code>, necessary for Linux deployment. Make sure to comment it out when running locally on Windows. </p></li><li><p><strong>CI/CD Tools:</strong><br>While CI/CD tools can be beneficial, they are overkill for this simple deployment.</p></li><li><p><strong>Pipeline Stages:</strong><br>For this project, automated pipelines are not required.</p></li></ul><h4>Containerisation and Orchestration</h4><p>Containerisation and orchestration are not necessary for this small-scale deployment.</p><h4>Monitoring and Logging</h4><ul><li><p><strong>Logging Practices:</strong><br>Implementing different logging levels is crucial for monitoring the bot's performance and debugging any issues. Azure's portal provides comprehensive tools for capturing and analyzing logs. Using the logging capabilities within the Azure function app suffices here. </p></li></ul><h4>Data and Model Governance</h4><p>Not applicable for this hobby project.</p><h4>Security Considerations</h4><ul><li><p><strong>API Keys:</strong><br>Store API keys in a <code>.env</code> file to follow best practices for security and configuration management.</p></li></ul><h4>Performance Optimisation</h4><p>Performance optimisation is not a priority due to the deployment's simplicity.</p><h4>Documentation and Knowledge Sharing</h4><p>Sharing your deployment experience through a blog post is an excellent way to document the process and help others. :)</p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://applicationlayer.substack.com/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://applicationlayer.substack.com/subscribe?"><span>Subscribe now</span></a></p><h3>The Deployment Process</h3><ol><li><p><strong>Download and install the prerequisites</strong></p><ol><li><p>Check out the <a href="https://learn.microsoft.com/en-us/azure/azure-functions/functions-develop-vs-code?tabs=node-v4%2Cpython-v2%2Cisolated-process&amp;pivots=programming-language-python#debugging-functions-locally">Microsoft website</a> for deployment of functions using VS code.</p><ol><li><p>Specifically, download the Core Tools and the Azure Functions extension.</p></li></ol></li></ol></li><li><p>Clone the repository from GitHub and set up your local environment.</p></li><li><p>Set up your .env file with your API keys.</p></li><li><p>If you don&#8217;t want to setup the Azure functions yourself and leverage my files, go to step 8. If you want to do it yourself, copy research_tweeting and only keep main_content.py, custom_functions.py, requirements.txt and variables.py  and perform the steps below. </p></li><li><p><strong>Create a Local Function Project:</strong><br>Use Azure Functions to create a Python-based function project with a time trigger.</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_!wLeG!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6da05117-f033-45a8-8060-c772b5c5db7e_744x790.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!wLeG!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6da05117-f033-45a8-8060-c772b5c5db7e_744x790.png 424w, https://substackcdn.com/image/fetch/$s_!wLeG!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6da05117-f033-45a8-8060-c772b5c5db7e_744x790.png 848w, https://substackcdn.com/image/fetch/$s_!wLeG!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6da05117-f033-45a8-8060-c772b5c5db7e_744x790.png 1272w, https://substackcdn.com/image/fetch/$s_!wLeG!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6da05117-f033-45a8-8060-c772b5c5db7e_744x790.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!wLeG!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6da05117-f033-45a8-8060-c772b5c5db7e_744x790.png" width="326" height="346.1559139784946" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/6da05117-f033-45a8-8060-c772b5c5db7e_744x790.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:790,&quot;width&quot;:744,&quot;resizeWidth&quot;:326,&quot;bytes&quot;:42809,&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;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!wLeG!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6da05117-f033-45a8-8060-c772b5c5db7e_744x790.png 424w, https://substackcdn.com/image/fetch/$s_!wLeG!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6da05117-f033-45a8-8060-c772b5c5db7e_744x790.png 848w, https://substackcdn.com/image/fetch/$s_!wLeG!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6da05117-f033-45a8-8060-c772b5c5db7e_744x790.png 1272w, https://substackcdn.com/image/fetch/$s_!wLeG!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6da05117-f033-45a8-8060-c772b5c5db7e_744x790.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg 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"><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"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><ol start="6"><li><p><strong>Go through the steps and finally set the Cron Job:</strong><br>Configure the cron job to run the function daily at 1 PM:</p></li></ol><div class="captioned-image-container"><figure><a class="image-link image2" target="_blank" href="https://substackcdn.com/image/fetch/$s_!ty0M!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fabc0022b-55b7-48a4-bab7-4c50ba0f9f4d_908x181.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!ty0M!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fabc0022b-55b7-48a4-bab7-4c50ba0f9f4d_908x181.png 424w, https://substackcdn.com/image/fetch/$s_!ty0M!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fabc0022b-55b7-48a4-bab7-4c50ba0f9f4d_908x181.png 848w, https://substackcdn.com/image/fetch/$s_!ty0M!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fabc0022b-55b7-48a4-bab7-4c50ba0f9f4d_908x181.png 1272w, https://substackcdn.com/image/fetch/$s_!ty0M!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fabc0022b-55b7-48a4-bab7-4c50ba0f9f4d_908x181.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!ty0M!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fabc0022b-55b7-48a4-bab7-4c50ba0f9f4d_908x181.png" width="454" height="90.5" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/abc0022b-55b7-48a4-bab7-4c50ba0f9f4d_908x181.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:181,&quot;width&quot;:908,&quot;resizeWidth&quot;:454,&quot;bytes&quot;:37028,&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;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!ty0M!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fabc0022b-55b7-48a4-bab7-4c50ba0f9f4d_908x181.png 424w, https://substackcdn.com/image/fetch/$s_!ty0M!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fabc0022b-55b7-48a4-bab7-4c50ba0f9f4d_908x181.png 848w, https://substackcdn.com/image/fetch/$s_!ty0M!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fabc0022b-55b7-48a4-bab7-4c50ba0f9f4d_908x181.png 1272w, https://substackcdn.com/image/fetch/$s_!ty0M!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fabc0022b-55b7-48a4-bab7-4c50ba0f9f4d_908x181.png 1456w" sizes="100vw" loading="lazy"></picture><div></div></div></a></figure></div><p>The default setting is that the system also runs at startup. If not desired, change it in function_app.py. </p><ol start="7"><li><p><strong>Directory Structure:</strong><br>A lot of files are automatically being created now. Ensure your project directory is correctly structured. At this point, you Azure function files are at the same level as the research_tweeting folder. Unfortunately, your gitignore and requirements.txt function may be overwritten by Azure. Check this. Make sure to add the right lines back. </p><p></p></li><li><p><strong>Local Function Testing:</strong></p><ol><li><p>Use Azurite for local testing. Hit crl + Shift + P and Start Azurite.</p></li></ol><div class="captioned-image-container"><figure><a class="image-link image2" target="_blank" href="https://substackcdn.com/image/fetch/$s_!wGrs!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbbfd6654-8890-4e5d-a702-d75dd0445de9_895x182.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!wGrs!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbbfd6654-8890-4e5d-a702-d75dd0445de9_895x182.png 424w, https://substackcdn.com/image/fetch/$s_!wGrs!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbbfd6654-8890-4e5d-a702-d75dd0445de9_895x182.png 848w, https://substackcdn.com/image/fetch/$s_!wGrs!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbbfd6654-8890-4e5d-a702-d75dd0445de9_895x182.png 1272w, https://substackcdn.com/image/fetch/$s_!wGrs!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbbfd6654-8890-4e5d-a702-d75dd0445de9_895x182.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!wGrs!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbbfd6654-8890-4e5d-a702-d75dd0445de9_895x182.png" width="895" height="182" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/bbfd6654-8890-4e5d-a702-d75dd0445de9_895x182.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:182,&quot;width&quot;:895,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:23904,&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;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!wGrs!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbbfd6654-8890-4e5d-a702-d75dd0445de9_895x182.png 424w, https://substackcdn.com/image/fetch/$s_!wGrs!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbbfd6654-8890-4e5d-a702-d75dd0445de9_895x182.png 848w, https://substackcdn.com/image/fetch/$s_!wGrs!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbbfd6654-8890-4e5d-a702-d75dd0445de9_895x182.png 1272w, https://substackcdn.com/image/fetch/$s_!wGrs!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbbfd6654-8890-4e5d-a702-d75dd0445de9_895x182.png 1456w" sizes="100vw" loading="lazy"></picture><div></div></div></a></figure></div><ol><li><p><strong>UTF Encoding:</strong><br>When you&#8217;re on a Windows, you will get an UTF encoding error. You can fix this by running Set <code>$env:PYTHONIOENCODING = "utf-8"</code> for proper encoding. </p></li><li><p><strong>Run the Function Locally:</strong><br>Execute <code>func start --verbose</code> to test your function locally (the verbose flag is for verbose logging). </p></li></ol></li><li><p><strong>Deploy to Azure:</strong></p><ol><li><p>Create a resource group and storage account on Azure.</p></li><li><p>Run your version of the following command with your resource group and storage account you just made:</p></li></ol><pre><code>az functionapp create --resource-group agentic --consumption-plan-location westeurope --runtime python --os-type Linux --functions-version 4 --name agentic-twitter-app --storage-account agenticstorage</code></pre></li><li><p><strong>Publish to Azure</strong></p><ol><li><p>Run the following command to publish your app to the app you just created. For any code changes, you can run this command as well.</p></li></ol></li></ol><pre><code>func azure functionapp publish agentic-twitter-app</code></pre><ol start="5"><li><p><strong>Check Logs:</strong><br>Monitor the logs in the <code>agentic-twitter-app</code> function app via the Azure portal which you can find under the section Monitoring within your function app. If you see you&#8217;re Crew AI logs, you&#8217;re up and running and your crew will start posting on Twitter soon. </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_!M9jI!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F63435368-b5dc-4905-9aed-d1a961cdb071_927x659.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!M9jI!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F63435368-b5dc-4905-9aed-d1a961cdb071_927x659.png 424w, https://substackcdn.com/image/fetch/$s_!M9jI!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F63435368-b5dc-4905-9aed-d1a961cdb071_927x659.png 848w, https://substackcdn.com/image/fetch/$s_!M9jI!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F63435368-b5dc-4905-9aed-d1a961cdb071_927x659.png 1272w, https://substackcdn.com/image/fetch/$s_!M9jI!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F63435368-b5dc-4905-9aed-d1a961cdb071_927x659.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!M9jI!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F63435368-b5dc-4905-9aed-d1a961cdb071_927x659.png" width="927" height="659" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/63435368-b5dc-4905-9aed-d1a961cdb071_927x659.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:659,&quot;width&quot;:927,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:448611,&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;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!M9jI!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F63435368-b5dc-4905-9aed-d1a961cdb071_927x659.png 424w, https://substackcdn.com/image/fetch/$s_!M9jI!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F63435368-b5dc-4905-9aed-d1a961cdb071_927x659.png 848w, https://substackcdn.com/image/fetch/$s_!M9jI!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F63435368-b5dc-4905-9aed-d1a961cdb071_927x659.png 1272w, https://substackcdn.com/image/fetch/$s_!M9jI!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F63435368-b5dc-4905-9aed-d1a961cdb071_927x659.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg 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"><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"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><div class="pullquote"><p><a href="https://x.com/4GENTIC/status/1796200303181648240">Agentic on X</a></p></div><h3>Conclusion</h3><p>Deploying a bot like Agentic to a cloud environment like Azure demonstrates the practical application of cloud deployment skills. This process not only enhances the functionality and reliability of your projects but also equips you with essential knowledge for real-world applications. By following this guide, you can confidently take your projects from local development to production, ensuring they deliver value effectively and efficiently.</p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://applicationlayer.substack.com/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://applicationlayer.substack.com/subscribe?"><span>Subscribe now</span></a></p><h3>Call to Action</h3><p>Ready to deploy your own projects? Leverage the approach in this blog to set up your own scraper that posts to Twitter. Embrace the power of cloud deployment and see how it transforms your workflow. The full code can be found in the <a href="https://github.com/MichielMAnalytics/agentic-public">GitHub repository</a>.</p><p>Thanks and enjoy coding!</p><p>Michiel</p><p>Please reach out to chat about potential applications of the system. </p><div class="directMessage button" data-attrs="{&quot;userId&quot;:175577962,&quot;userName&quot;:&quot;Michiel Voortman&quot;,&quot;canDm&quot;:null,&quot;dmUpgradeOptions&quot;:null,&quot;isEditorNode&quot;:true}" data-component-name="DirectMessageToDOM"></div><p></p>]]></content:encoded></item><item><title><![CDATA[E3.1: Bring your Project to Production: Where 'Works on My Machine' Meets Reality]]></title><description><![CDATA[Production experience is often missing from scholars, juniors, and sometimes from medior Data Scientists. How do you get your model out of a Jupyter notebook? Or your project from a local host?]]></description><link>https://applicationlayer.substack.com/p/e31-bring-your-project-to-production</link><guid isPermaLink="false">https://applicationlayer.substack.com/p/e31-bring-your-project-to-production</guid><dc:creator><![CDATA[Michiel Voortman]]></dc:creator><pubDate>Tue, 14 May 2024 07:18:48 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!Lq4U!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9b758fb2-cdce-4c99-9a77-e489e2f7ca86_655x413.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>Deploying to production is a crucial step that bridges the gap between theoretical research/side projects and real-world applications. Many data scientists and analysts, especially those transitioning from academia or early in their careers, often find this process challenging. What most of them are missing, which is generally not taught in university, is basic <strong>SOFTWARE DEVELOPMENT SKILLS.</strong> This guide goes over important aspects of the production deployment process, covering essential practices and considerations to ensure a smooth transition from development to production.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!Lq4U!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9b758fb2-cdce-4c99-9a77-e489e2f7ca86_655x413.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!Lq4U!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9b758fb2-cdce-4c99-9a77-e489e2f7ca86_655x413.png 424w, https://substackcdn.com/image/fetch/$s_!Lq4U!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9b758fb2-cdce-4c99-9a77-e489e2f7ca86_655x413.png 848w, https://substackcdn.com/image/fetch/$s_!Lq4U!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9b758fb2-cdce-4c99-9a77-e489e2f7ca86_655x413.png 1272w, https://substackcdn.com/image/fetch/$s_!Lq4U!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9b758fb2-cdce-4c99-9a77-e489e2f7ca86_655x413.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!Lq4U!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9b758fb2-cdce-4c99-9a77-e489e2f7ca86_655x413.png" width="655" height="413" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/9b758fb2-cdce-4c99-9a77-e489e2f7ca86_655x413.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:413,&quot;width&quot;:655,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:59316,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!Lq4U!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9b758fb2-cdce-4c99-9a77-e489e2f7ca86_655x413.png 424w, https://substackcdn.com/image/fetch/$s_!Lq4U!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9b758fb2-cdce-4c99-9a77-e489e2f7ca86_655x413.png 848w, https://substackcdn.com/image/fetch/$s_!Lq4U!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9b758fb2-cdce-4c99-9a77-e489e2f7ca86_655x413.png 1272w, https://substackcdn.com/image/fetch/$s_!Lq4U!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9b758fb2-cdce-4c99-9a77-e489e2f7ca86_655x413.png 1456w" sizes="100vw" fetchpriority="high"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg 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"><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"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><div class="pullquote"><p><em>@imjosef</em></p></div><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://applicationlayer.substack.com/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://applicationlayer.substack.com/subscribe?"><span>Subscribe now</span></a></p><p><strong>1. Understanding the Production Environment</strong></p><p>Before deploying a system, it&#8217;s essential to understand the production environment where the system will operate. Key considerations include:</p><ul><li><p><strong>Scalability Requirements:</strong> Assess if the system needs to handle large volumes of data or concurrent requests. </p><p></p><p>For example, for an e-commerce platform predicting user behaviour, the model may need to scale to handle thousands of predictions per second, especially during peak shopping periods. This requires robust infrastructure and possibly load balancing to distribute the computational load.</p></li><li><p><strong>Integration Points:</strong> Identify how the system will integrate with existing systems and data sources. As an example, deploying a credit risk model often involves logistic regression. </p><p><br>Big financial organisations generally make use of a SQL database (provided by those lovely SAP guys). Once the model is finalised, the model&#8217;s (transformed) weights, coefficients, and buckets must be translated into SQL code to be shared with the SQL team. Pretty manual unfortunately. </p></li><li><p><strong>Performance Constraints:</strong> Ensure the model meets performance benchmarks, such as response time and throughput. </p><p></p><p>For a real-time fraud detection system, the model needs to process transactions within milliseconds to prevent fraudulent activities. This requires optimising the model&#8217;s inference time and ensuring the underlying infrastructure can support such low-latency requirements without compromising accuracy.</p></li></ul><p>If there is no production environment yet, e.g. for your side project, choose the cloud of your preference. If not familiar with any cloud environment, make sure to learn one. If no appetite to learn or if it&#8217;s a simple deployment, stick with <a href="https://www.heroku.com/">Heroku</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_!mKKJ!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7ed4d10c-b331-47b7-825a-284debcb2d60_430x539.jpeg" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!mKKJ!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7ed4d10c-b331-47b7-825a-284debcb2d60_430x539.jpeg 424w, https://substackcdn.com/image/fetch/$s_!mKKJ!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7ed4d10c-b331-47b7-825a-284debcb2d60_430x539.jpeg 848w, https://substackcdn.com/image/fetch/$s_!mKKJ!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7ed4d10c-b331-47b7-825a-284debcb2d60_430x539.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!mKKJ!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7ed4d10c-b331-47b7-825a-284debcb2d60_430x539.jpeg 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!mKKJ!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7ed4d10c-b331-47b7-825a-284debcb2d60_430x539.jpeg" width="430" height="539" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/7ed4d10c-b331-47b7-825a-284debcb2d60_430x539.jpeg&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:539,&quot;width&quot;:430,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;Production Testing Memes - Turning Mishaps into Laughter | ConfigCat Blog&quot;,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="Production Testing Memes - Turning Mishaps into Laughter | ConfigCat Blog" title="Production Testing Memes - Turning Mishaps into Laughter | ConfigCat Blog" srcset="https://substackcdn.com/image/fetch/$s_!mKKJ!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7ed4d10c-b331-47b7-825a-284debcb2d60_430x539.jpeg 424w, https://substackcdn.com/image/fetch/$s_!mKKJ!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7ed4d10c-b331-47b7-825a-284debcb2d60_430x539.jpeg 848w, https://substackcdn.com/image/fetch/$s_!mKKJ!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7ed4d10c-b331-47b7-825a-284debcb2d60_430x539.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!mKKJ!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7ed4d10c-b331-47b7-825a-284debcb2d60_430x539.jpeg 1456w" sizes="100vw"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg 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"><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"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><div class="pullquote"><p>don&#8217;t do this</p></div><p><strong>2. Code, Versioning, and CI/CD Pipelines</strong></p><p>Effective version control and automated deployment processes are critical for maintaining reproducibility, collaboration, and efficiency in bringing systems and models to production.</p><ul><li><p><strong>Version Control Systems (VCS):</strong> Use systems like <a href="https://git-scm.com/">Git</a> to track changes in code and data. This ensures that every modification is documented, allowing teams to collaborate seamlessly and maintain a history of changes. As a tip, from now on never use the UI anymore. Teach yourself to work with the terminal. </p></li><li><p><strong>Model Versioning:</strong> Implement a strategy to version models, enabling rollback to previous versions if needed. This is crucial for tracing model performance over time and ensuring that any updates or changes can be easily managed and reverted if necessary. If you don&#8217;t use a CI/CD tool, make sure that your deployed version is always the same as the most recent version on your VCS. </p></li><li><p><strong>CI/CD Tools:</strong> Use tools like Jenkins, GitLab CI, or CircleCI to automate the testing and deployment processes. CI/CD pipelines help in maintaining code quality and facilitate continuous integration and delivery. Not really necessary for a small/moderate size project yet using them will save you time. </p></li><li><p><strong>Pipeline Stages:</strong> Include stages such as build, test, and deploy in your CI/CD pipeline. Automating these stages reduces manual errors and enhances efficiency, ensuring that the code and models are consistently tested and deployed in a reliable manner.</p><ul><li><p><strong>Build Stage:</strong> Compile and prepare the code for deployment.</p></li><li><p><strong>Test Stage:</strong> Run automated tests to validate code and model performance.</p></li><li><p><strong>Deploy Stage:</strong> Deploy the code and models to the production environment.</p></li></ul></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_!4w9G!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4648165f-33a7-40eb-a730-b422d471da0d_1084x724.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!4w9G!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4648165f-33a7-40eb-a730-b422d471da0d_1084x724.png 424w, https://substackcdn.com/image/fetch/$s_!4w9G!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4648165f-33a7-40eb-a730-b422d471da0d_1084x724.png 848w, https://substackcdn.com/image/fetch/$s_!4w9G!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4648165f-33a7-40eb-a730-b422d471da0d_1084x724.png 1272w, https://substackcdn.com/image/fetch/$s_!4w9G!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4648165f-33a7-40eb-a730-b422d471da0d_1084x724.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!4w9G!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4648165f-33a7-40eb-a730-b422d471da0d_1084x724.png" width="1084" height="724" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/4648165f-33a7-40eb-a730-b422d471da0d_1084x724.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:724,&quot;width&quot;:1084,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;Demystifying Kubernetes: how to get comfortable with complexity - Spectro  Cloud&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="Demystifying Kubernetes: how to get comfortable with complexity - Spectro  Cloud" title="Demystifying Kubernetes: how to get comfortable with complexity - Spectro  Cloud" srcset="https://substackcdn.com/image/fetch/$s_!4w9G!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4648165f-33a7-40eb-a730-b422d471da0d_1084x724.png 424w, https://substackcdn.com/image/fetch/$s_!4w9G!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4648165f-33a7-40eb-a730-b422d471da0d_1084x724.png 848w, https://substackcdn.com/image/fetch/$s_!4w9G!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4648165f-33a7-40eb-a730-b422d471da0d_1084x724.png 1272w, https://substackcdn.com/image/fetch/$s_!4w9G!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4648165f-33a7-40eb-a730-b422d471da0d_1084x724.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg 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"><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"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p><strong>3. Containerisation and Orchestration</strong></p><p>Containerisation simplifies deployment and ensures consistency across environments:</p><ul><li><p><strong>Docker:</strong> Containerise the model and its dependencies using Docker. I highly recommend you familiarise yourself with using Docker. </p></li><li><p><strong>Kubernetes:</strong> Use Kubernetes for orchestrating and managing containerised applications at scale. For small projects, please don&#8217;t bother. Check <a href="https://airwalkreply.com/kubernetes-when-not-to-use-it-and-when-to-use-it">this blog</a> is you are in doubt. </p></li></ul><p><strong>5. Monitoring and Logging</strong></p><p>Continuous monitoring and logging are essential for maintaining model performance:</p><ul><li><p><strong>Logging Practices:</strong> Implement structured logging to capture relevant information for debugging and analysis. For Python, I&#8217;d recommend setting up a basic logger and replace all print statements with it:</p></li></ul><pre><code>import logging
logging.basicConfig(level=logging.INFO)
logger = logging.getLogger(__name__)  # It's good practice to use __name__ to get the correct logger</code></pre><p>Most monitoring systems will recognise this type of logging perfectly. You can set different levels as well (warning/bug). Pretty sweet. In addition, make sure to catch as much errors as possible within your code. Leverage Try Except statements as much as you can.</p><ul><li><p><strong>Monitoring Tools:</strong> Mostly depends on your choice of cloud. You can leverage stand alone tools like <a href="https://prometheus.io/">Prometheus</a>, <a href="https://grafana.com/docs/grafana/latest/setup-grafana/set-up-grafana-monitoring/">Grafana</a>, or <a href="https://www.elastic.co/elastic-stack">ELK stack</a> for monitoring.</p></li><li><p><strong>Alerting:</strong> Set up alerts to notify the team of any anomalies or performance issues. Your cloud provider generally has some options in place.</p></li></ul><p><strong>6. Data and Model Governance</strong></p><p>Governance ensures compliance and ethical use of data and models:</p><ul><li><p><strong>Data Privacy:</strong> Adhere to data privacy regulations like <a href="https://gdpr-info.eu/">GDPR</a>/<a href="https://autoriteitpersoonsgegevens.nl/themas/basis-avg/avg-algemeen">AVG</a> (Dutch).</p></li><li><p><strong>Audit Trails:</strong> Maintain detailed records of data processing and model changes.</p></li></ul><p><strong>7. Security Considerations</strong></p><p>Securing the model and data is important:</p><ul><li><p><strong>Authentication and Authorization:</strong> Implement robust authentication and authorization mechanisms.</p></li><li><p><strong>Data Encryption:</strong> Encrypt data in transit and at rest.</p></li><li><p><strong>Vulnerability Scanning:</strong> Regularly scan for vulnerabilities in code and dependencies.</p></li></ul><p><strong>8. Performance Optimisation</strong></p><p>Optimize the model and infrastructure to meet performance requirements:</p><ul><li><p><strong>Profiling and Tuning:</strong> Profile the software system to identify bottlenecks and optimize performance. Use profiling tools to analyse CPU, memory, and I/O usage, and make necessary adjustments to improve efficiency and speed.</p></li><li><p><strong>Hardware Acceleration:</strong> Leverage hardware accelerators like <a href="https://en.wikipedia.org/wiki/Tensor_Processing_Unit">TPUs</a> for inference, if necessary. Consider using specialised hardware to enhance processing power and handle intensive computational tasks more efficiently.</p><p></p></li></ul><p><strong>9. Documentation and Knowledge Sharing</strong></p><p>Not the nicest task but comprehensive documentation facilitates maintenance and collaboration:</p><ul><li><p><strong>API Documentation:</strong> Document APIs using tools like Swagger or Postman.</p></li><li><p><strong>User Guides:</strong> Create detailed guides for users and stakeholders.</p></li><li><p><strong>Knowledge Sharing:</strong> Encourage knowledge sharing through workshops, seminars, or wikis.</p></li></ul><p>Fortunately, you can leverage your gen AI counterparts to do at least 80 pct of the work for you. What a time to be alive. </p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://applicationlayer.substack.com/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://applicationlayer.substack.com/subscribe?"><span>Subscribe now</span></a></p><p><strong>Conclusion</strong></p><p>Bringing software systems, including data science models, to production involves more than just development. It requires careful planning, robust infrastructure, and continuous monitoring to ensure they deliver value in real-world settings. By following these best practices, developers and data scientists can bridge the gap between development and production, ensuring their systems are scalable, reliable, and secure.</p><p><strong>Call to Action</strong></p><p>Are you ready to take your software systems and models to production? Start by assessing your current workflow against these best practices and identify areas for improvement. Yet the most important thing here is to get your hands dirty as quickly as possible. Deploy something and get experience. Embrace automation, continuous monitoring, and robust governance to ensure your projects are production-ready and deliver sustained value to you and/or your organisation. </p><p><strong>E3.2: Bringing Agentic to Life.</strong> </p><p>In the next edition, I&#8217;ll demonstrate how to deploy Agentic - <a href="https://twitter.com/4GENTIC">a Telegram bot that scrapes Reddit and post its findings to Twitter</a> - and use a <a href="https://en.wikipedia.org/wiki/Cron">Cron job </a>to let it run once per day. We&#8217;re using Microsoft Azure for this. Stay tuned and thanks for reading. </p><p>Michiel</p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://applicationlayer.substack.com/p/e31-bring-your-project-to-production?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://applicationlayer.substack.com/p/e31-bring-your-project-to-production?utm_source=substack&utm_medium=email&utm_content=share&action=share"><span>Share</span></a></p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://applicationlayer.substack.com/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://applicationlayer.substack.com/subscribe?"><span>Subscribe now</span></a></p>]]></content:encoded></item><item><title><![CDATA[E2.2: Welcome Agentic]]></title><description><![CDATA[Agentic is live - an Agentic Workflow that scrapes Reddit, formats the scraped content, and posts its findings on X daily. Check it out at X: @4GENTIC.]]></description><link>https://applicationlayer.substack.com/p/e22-welcome-agentic</link><guid isPermaLink="false">https://applicationlayer.substack.com/p/e22-welcome-agentic</guid><dc:creator><![CDATA[Michiel Voortman]]></dc:creator><pubDate>Thu, 11 Apr 2024 12:51:49 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!dNIj!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fecd18d98-eb22-428a-ba94-4cb05fb0df07_1024x1024.webp" length="0" type="image/jpeg"/><content:encoded><![CDATA[<div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!dNIj!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fecd18d98-eb22-428a-ba94-4cb05fb0df07_1024x1024.webp" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!dNIj!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fecd18d98-eb22-428a-ba94-4cb05fb0df07_1024x1024.webp 424w, https://substackcdn.com/image/fetch/$s_!dNIj!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fecd18d98-eb22-428a-ba94-4cb05fb0df07_1024x1024.webp 848w, https://substackcdn.com/image/fetch/$s_!dNIj!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fecd18d98-eb22-428a-ba94-4cb05fb0df07_1024x1024.webp 1272w, https://substackcdn.com/image/fetch/$s_!dNIj!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fecd18d98-eb22-428a-ba94-4cb05fb0df07_1024x1024.webp 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!dNIj!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fecd18d98-eb22-428a-ba94-4cb05fb0df07_1024x1024.webp" width="1024" height="1024" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/ecd18d98-eb22-428a-ba94-4cb05fb0df07_1024x1024.webp&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1024,&quot;width&quot;:1024,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:386526,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/webp&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&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_!dNIj!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fecd18d98-eb22-428a-ba94-4cb05fb0df07_1024x1024.webp 424w, https://substackcdn.com/image/fetch/$s_!dNIj!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fecd18d98-eb22-428a-ba94-4cb05fb0df07_1024x1024.webp 848w, https://substackcdn.com/image/fetch/$s_!dNIj!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fecd18d98-eb22-428a-ba94-4cb05fb0df07_1024x1024.webp 1272w, https://substackcdn.com/image/fetch/$s_!dNIj!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fecd18d98-eb22-428a-ba94-4cb05fb0df07_1024x1024.webp 1456w" sizes="100vw" fetchpriority="high"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg 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"><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"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><div class="pullquote"><p><a href="https://twitter.com/4GENTIC">4GENTIC ON X</a></p></div><p>Welcome back to <a href="https://applicationlayer.substack.com/">The Application Layer</a>. Remember how we talked about a future where systems could do almost anything for us, just like in that movie &#8220;Her&#8221;? Well, today's not about dreaming anymore&#8212;it's about making some of that stuff happen for real. We're going to roll up our sleeves and get our hands dirty with a project that's as exciting as it is useful. Imagine having a little digital helper that can read stuff from the internet, make it look nice, and share customised content to your favorite medium, all by itself.  Inspired by <a href="https://www.youtube.com/watch?v=kJvXT25LkwA">this tutorial</a>, I'm here to show you how we can do this with scraping Reddit, formatting the content, and posting in on X. </p><p>Out of personal interest, I go down the rabbit hole of crypto. We specify the Agent to scrape the CryptoCurrency subreddit. This subreddit is highly active, contains valuable information but it takes time to split through all the nonsense. The Agent is doing this for me. The result of this is the creature that has come to life - Agentic (<a href="https://twitter.com/4GENTIC">4GENTIC</a>)</p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://applicationlayer.substack.com/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://applicationlayer.substack.com/subscribe?"><span>Subscribe now</span></a></p><p>For this adventure, we're teaming up with <a href="https://www.crewai.com/">Crew AI</a>, a AI Agent framework created by <a href="https://www.linkedin.com/in/joaomdmoura/">Jo&#227;o Moura</a>. It's open for everyone to use, which means you, me, and anyone with a curious mind can see how it works and even tweak it to do new things. Let's explore how to put together our own little digital assembly line using Crew AI, and remember, this is just the start. The real magic happens when you start playing with these ideas yourself. Let's get started!</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!kTPC!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc9a42512-25e1-460b-87a3-ef7723bef7fb_2000x973.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!kTPC!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc9a42512-25e1-460b-87a3-ef7723bef7fb_2000x973.png 424w, https://substackcdn.com/image/fetch/$s_!kTPC!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc9a42512-25e1-460b-87a3-ef7723bef7fb_2000x973.png 848w, https://substackcdn.com/image/fetch/$s_!kTPC!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc9a42512-25e1-460b-87a3-ef7723bef7fb_2000x973.png 1272w, https://substackcdn.com/image/fetch/$s_!kTPC!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc9a42512-25e1-460b-87a3-ef7723bef7fb_2000x973.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!kTPC!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc9a42512-25e1-460b-87a3-ef7723bef7fb_2000x973.png" width="1456" height="708" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/c9a42512-25e1-460b-87a3-ef7723bef7fb_2000x973.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:708,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;How to build LLM agent to automate your code review workflow using crewAI?&quot;,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="How to build LLM agent to automate your code review workflow using crewAI?" title="How to build LLM agent to automate your code review workflow using crewAI?" srcset="https://substackcdn.com/image/fetch/$s_!kTPC!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc9a42512-25e1-460b-87a3-ef7723bef7fb_2000x973.png 424w, https://substackcdn.com/image/fetch/$s_!kTPC!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc9a42512-25e1-460b-87a3-ef7723bef7fb_2000x973.png 848w, https://substackcdn.com/image/fetch/$s_!kTPC!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc9a42512-25e1-460b-87a3-ef7723bef7fb_2000x973.png 1272w, https://substackcdn.com/image/fetch/$s_!kTPC!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc9a42512-25e1-460b-87a3-ef7723bef7fb_2000x973.png 1456w" sizes="100vw"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg 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"><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"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><div class="pullquote"><p><a href="https://www.ionio.ai/blog/how-to-build-llm-agent-to-automate-your-code-review-workflow-using-crewai">Source: ionia.ai</a></p></div><h1>Crew AI: An Open Source Agent Framework</h1><p>Crew AI offers a framework specifically designed to orchestrate the creation and management of AI agents. At its core, Crew AI facilitates the development of autonomous agents capable of performing a wide range of tasks, from data scraping to content formatting and even social media management. </p><p>By leveraging Crew AI, users can assemble teams of digital agents, each with specialised roles or tasks. These could include an <em>Explorer Crew</em> tasked with gathering data from the internet, a <em>Formatting Crew</em> responsible for organising this data in a readable or presentable format, and a <em>Social Media Crew</em> designed to distribute content across various social media platforms. This modular approach allows for flexibility and customisation, catering to the specific needs or goals of any project.</p><p>The framework's design encourages experimentation and innovation, serving not just as a tool but as a platform for learning and exploration in the field of AI. Whether it's for educational purposes, personal projects, or professional development, Crew AI offers a solid foundation for building and deploying AI agents in the real world.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!fPdB!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F46897192-ec8f-44a5-80bf-fc24dec357eb_618x913.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!fPdB!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F46897192-ec8f-44a5-80bf-fc24dec357eb_618x913.png 424w, https://substackcdn.com/image/fetch/$s_!fPdB!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F46897192-ec8f-44a5-80bf-fc24dec357eb_618x913.png 848w, https://substackcdn.com/image/fetch/$s_!fPdB!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F46897192-ec8f-44a5-80bf-fc24dec357eb_618x913.png 1272w, https://substackcdn.com/image/fetch/$s_!fPdB!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F46897192-ec8f-44a5-80bf-fc24dec357eb_618x913.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!fPdB!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F46897192-ec8f-44a5-80bf-fc24dec357eb_618x913.png" width="618" height="913" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/46897192-ec8f-44a5-80bf-fc24dec357eb_618x913.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:913,&quot;width&quot;:618,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:560567,&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;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!fPdB!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F46897192-ec8f-44a5-80bf-fc24dec357eb_618x913.png 424w, https://substackcdn.com/image/fetch/$s_!fPdB!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F46897192-ec8f-44a5-80bf-fc24dec357eb_618x913.png 848w, https://substackcdn.com/image/fetch/$s_!fPdB!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F46897192-ec8f-44a5-80bf-fc24dec357eb_618x913.png 1272w, https://substackcdn.com/image/fetch/$s_!fPdB!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F46897192-ec8f-44a5-80bf-fc24dec357eb_618x913.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg 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"><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"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://applicationlayer.substack.com/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://applicationlayer.substack.com/subscribe?"><span>Subscribe now</span></a></p><h1>Tutorial Overview: Scraping Reddit, Formatting, and Posting on X</h1><p>The plan is clear. There are three tasks: Browse Reddit, format the output and post to X. I will create a single Crew to browse Reddit and format the output. It doesn&#8217;t require any creativity to post the result to X. Therefore, I apply a posting function to the formatted output instead of adding it to the workflow. </p><p>The steps to take are:</p><ol><li><p><strong>Browse Reddit: create Agent and Task</strong></p></li><li><p><strong>Format the output: create Agent and Task</strong></p></li><li><p><strong>Kickoff the Crew</strong></p></li><li><p><strong>Post to X</strong></p></li></ol><p>The project consists of four files:</p><ul><li><p>main.py which contains the workflow</p></li><li><p>custom_functions.py which contains the X posting code</p></li><li><p>.env which contains your environment API keys</p></li><li><p>requirements.txt which contains all the necessary packages</p></li></ul><ol><li><p><strong>Browse Reddit: create Agent and Task</strong></p></li></ol><ul><li><p>We need to setup a BrowseTool class to prepare the browsing:</p></li></ul><pre><code>class BrowserTool:
    @tool("Scrape reddit content")
    def scrape_reddit(max_comments_per_post=7):
        """Useful to scrape a reddit content"""
        reddit = praw.Reddit(
            client_id=client_id_re,
            client_secret=client_secret_re,
            user_agent="user-agent",
        )
        subreddit = reddit.subreddit("CryptoCurrency")
        scraped_data = []

        for post in subreddit.hot(limit=12):
            post_data = {"title": post.title, "url": post.url, "comments": []}

            try:
                post.comments.replace_more(limit=0)  # Load top-level comments only
                comments = post.comments.list()
                if max_comments_per_post is not None:
                    comments = comments[:7]

                for comment in comments:
                    post_data["comments"].append(comment.body)

                scraped_data.append(post_data)

            except praw.exceptions.APIException as e:
                print(f"API Exception: {e}")
                time.sleep(60)  # Sleep for 1 minute before retrying

        return scraped_data</code></pre><ul><li><p>Define an Agent (explorer) and a Task (task_report):</p></li></ul><pre><code>explorer = Agent(
    role="Senior Researcher",
    goal="Find and explore the most exciting developments on CryptoCurrency subreddit today",
    backstory="""You are and Expert strategist that knows how to spot emerging trends and important events in Crypto, blockchain and web3 TODAY. 
    You're great at finding exciting projects on CryptoCurrency subreddit. You turned scraped data into detailed reports with titles
    of the most exciting developments in the crypto world. ONLY use scraped data from CryptoCurrency subreddit for the report. Make sure not to forget the links to the posts.
    """,
    verbose=True,
    allow_delegation=False,
    tools=[BrowserTool().scrape_reddit] + human_tools,
   llm=llm,  
)</code></pre><pre><code>task_report = Task(
    description="""Use and summarize scraped data from subreddit CryptoCurrency to make a detailed report on today's developments in crypto. Use ONLY 
    scraped data from CryptoCurrency to generate the report. Your final answer MUST be a full analysis report, text only, ignore any code or anything that 
    isn't text except for links. The report has to have bullet points and with 5-10 exciting crypto developments. 
    Each bullet point MUST contain 3 sentences that refer to one specific development you found on subreddit CryptoCurrency. Each bullet point must contain a link to the post.  
    """,
    agent=explorer,
    expected_output="""A detailed report with bullet points each containing 3 sentences about a specific crypto development found on the CryptoCurrency subreddit."""
)
</code></pre><ol start="2"><li><p><strong>Format the output: create Agent and Task</strong></p></li></ol><ul><li><p>Define an Agent (formatter) and a Task (task_formatter):</p></li></ul><pre><code>formatter = Agent(
    role="Expert Writing formatter",
    goal="Make sure the output is in the right format. Make sure that the tone and writing style is compelling, simple and concise",
    backstory="""You are an Expert at formatting text from technical writers. You can tell when a report text isn't concise,
    simple or engaging enough. You know how to make sure that text stays technical and insightful by using layman terms. You know how to format a report properly.
    """,
    verbose=True,
    allow_delegation=True,
    llm=llm,
)</code></pre><pre><code>task_formatter = Task(
    description="""
        Format the explorer's output for Twitter posting by structuring the information according to the following template:
        
        - For each news item, begin with the title.
        - Follow the title with a bullet point listing interesting facts about the news item.
        - Ensure each fact is compelling, engaging, and provides value to the reader.
        - Conclude each news item summary with a bullet point that includes a link to the original post.
        
        The output must be clearly structured, contain accurate and engaging information, and each news item must have a corresponding link. Your task is to verify the structure, assess the compelling nature of the text, and ensure all links are correctly included.
    """,
    agent=formatter,
    expected_output="""
        The formatted output should look like this for each news item:
        
        [Title of News Item]
        - An interesting and engaging fact about the news item. The fact should be compelling and present the news in an engaging way.
        - A direct link to the original post for readers to find more information.
        
        "Title of News Item" should be replaced with the actual title. This format should be repeated for each news item included in the explorer's output, ensuring a consistent and engaging reader experience.
    """,
)</code></pre><ol start="3"><li><p><strong>Kickoff the Crew</strong></p></li></ol><pre><code># instantiate crew of agents
crew = Crew(
    agents=[explorer, formatter],
    tasks=[task_report, task_formatter],
    verbose=2,
    process=Process.sequential,  # Sequential process will have tasks executed one after the other and the outcome of the previous one is passed as extra content into this next.
)

# Get your crew to work!
result = crew.kickoff()</code></pre><ol start="4"><li><p><strong>Post to X</strong></p></li></ol><ul><li><p>Split the result into sections to respect the limit rules of X:</p></li></ul><pre><code>def split_section_into_tweets(section, limit=280):
    """Splits a section of the message into parts that fit within the tweet limit, accounting for URL shortening."""
    url_placeholder = "https://t.co/xxxxxxxxxx"  # Placeholder for URLs, adjust length as needed
    urls = re.findall(r'(https?://\S+)', section)
    adjusted_section = re.sub(r'(https?://\S+)', url_placeholder, section)  # Replace URLs with placeholder

    if len(adjusted_section) &lt;= limit:
        return [section]  # Return the original section if it fits
    
    # Adjust the splitting logic to account for item markers
    item_pattern = re.compile(r'\d+\.\s')  # Pattern to detect item numbering
    sentences = adjusted_section.split('. ')
    tweets = []
    current_tweet = ""
    
    for sentence in sentences:
        if len(current_tweet) + len(sentence) + 1 &gt; limit or item_pattern.match(sentence):
            if current_tweet:
                # Replace placeholders with actual URLs when adding tweet to list
                for url in urls:
                    current_tweet = current_tweet.replace(url_placeholder, url, 1)
                    urls = [u for u in urls if u != url]  # Remove used URL
                    break
                tweets.append(current_tweet)
                current_tweet = sentence
            else:
                # Directly add if alone it exceeds the limit
                tweets.append(sentence)
        else:
            if current_tweet:
                current_tweet += ". "
            current_tweet += sentence
    
    # Replace placeholders with actual URLs for the last tweet
    for url in urls:
        current_tweet = current_tweet.replace(url_placeholder, url, 1)
    if current_tweet:
        tweets.append(current_tweet)
    
    return tweets</code></pre><ul><li><p>Post the split Tweets</p></li></ul><pre><code>def post_to_twitter_callback(task_output):
    print("Callback function has been triggered.")
    # Initialize Tweepy client (assuming bearer_token, api_key, etc. are defined)
    client = tweepy.Client(bearer_token=bearer_token_tw,
                        consumer_key=api_key_tw,
                        consumer_secret=api_key_secret_tw,
                        access_token=access_token_tw,
                        access_token_secret=access_token_secret_tw)


    # Assuming 'result' contains the content to be tweeted
    tweets = split_section_into_tweets(task_output)
    total_tweets = len(tweets) + 1  # +1 for the initial header tweet
    sleep_duration = 0.4
    reply_to_tweet_id = None

    # Prepare the initial tweet
    today_date = datetime.datetime.now().strftime("%B %d, %Y")
    initial_tweet_text = f"Your Daily Crypto Updates of {today_date}  (1/{total_tweets})"

    try:
        # Post the initial header tweet
        response = client.create_tweet(text=initial_tweet_text)
        reply_to_tweet_id = response.data['id']
        print(f"Posted initial Tweet ID: {response.data['id']}")
        time.sleep(sleep_duration)
    except Exception as e:
        print(f"Error posting initial tweet: {e}")

    # Post the rest of the tweets
    for index, tweet in enumerate(tweets, start=2):  # Start from 2 since the first tweet is the header
        tweet_with_count = f"{tweet} ({index}/{total_tweets})"
        if len(tweet_with_count) &gt; 270:
            allowed_length = 270 - len(f" ({index}/{total_tweets})") - 3
            tweet_with_count = tweet[:allowed_length] + "..." + f" ({index}/{total_tweets})"
            print(tweet_with_count)
        try:
            response = client.create_tweet(text=tweet_with_count, in_reply_to_tweet_id=reply_to_tweet_id)
            
            reply_to_tweet_id = response.data['id']
            
            print(f"Posted Tweet ID: {response.data['id']}")
            print(f'sleeping for {sleep_duration} sec...')
            time.sleep(sleep_duration)
        except Exception as e:
            print(f"Error posting tweet: {e}")
</code></pre><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://applicationlayer.substack.com/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://applicationlayer.substack.com/subscribe?"><span>Subscribe now</span></a></p><h1>Results and Future Development</h1><p>It&#8217;s running for three days now and the results can be find here:</p><ul><li><p><a href="https://x.com/4GENTIC/status/1777631709963374962">Daily Crypto Update 9 April</a></p></li><li><p><a href="https://x.com/4GENTIC/status/1777989083542798825">Daily Crypto Update 10 April</a></p></li><li><p><a href="https://x.com/4GENTIC/status/1778390949887963201">Daily Crypto Update 11 April</a></p></li></ul><p>As can be seen, formatting can be better. Nevertheless, interesting findings are posted over the last few days. One can imagine that such Agentic workflows open up opportunities for more complex tasks. In <a href="https://github.com/MichielMAnalytics/agentic-public/tree/main">my Github,</a> the full code can be found for the first iteration. My plan is to build this project out in the following way:</p><ul><li><p>Set up three Crews: </p><ul><li><p>An <em>Explorer Crew</em> which consists of multiple Agents scraping the depths of the internet looking for Crypto developments (think about Telegram and Discord channels)</p></li><li><p>A <em>Formatter Crew</em> which takes responsibility for formatting the scraped content into the desired format for a specific social media platform (think about a blog for Substack and a bullet-point list for Discord)</p></li><li><p>A <em>Social Media Crew</em> which makes sure the formatted content is posted at a predetermined frequency to several social media channels. </p></li></ul></li></ul><p>In addition, currently, I run the main.py file once per day. Once I&#8217;m satisfied, I&#8217;ll place the code into a while loop and deploy it to a cloud service to let it run automatically. </p><h1>Call to Action</h1><p>I&#8217;ll encourage you to explore such Agentic Workflows yourself. These workflows start to get more and more traction. Try to automate something. Just play around with it. </p><p>Now, I invite you to dive into the world of Agentic Workflows on your own. As these powerful tools gain momentum in the tech world, there&#8217;s no better time than now to get your hands dirty. Challenge yourself to automate a task, big or small. Experiment, tinker, and see what you can create - it's still a playground for the curious. So, take the leap and start playing around with Agentic Workflows today. Who knows what you might discover or achieve?</p><p>Thanks, </p><p>Michiel &amp; Agentic</p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://applicationlayer.substack.com/p/e22-welcome-agentic?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://applicationlayer.substack.com/p/e22-welcome-agentic?utm_source=substack&utm_medium=email&utm_content=share&action=share"><span>Share</span></a></p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://applicationlayer.substack.com/p/e22-welcome-agentic/comments&quot;,&quot;text&quot;:&quot;Leave a comment&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://applicationlayer.substack.com/p/e22-welcome-agentic/comments"><span>Leave a comment</span></a></p><p></p><p></p><p></p><p></p>]]></content:encoded></item><item><title><![CDATA[E2.1: Beyond 'Her': How AI Agents Get Things Done, No Romance Required]]></title><description><![CDATA[What are these Agents, where do they come from, who are the key players, and how might they impact our lives?]]></description><link>https://applicationlayer.substack.com/p/e21-beyond-her-how-ai-agents-get</link><guid isPermaLink="false">https://applicationlayer.substack.com/p/e21-beyond-her-how-ai-agents-get</guid><dc:creator><![CDATA[Michiel Voortman]]></dc:creator><pubDate>Thu, 28 Mar 2024 07:38:49 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!nRVr!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6250cec5-63d8-407b-835b-8b4ecae928fa_1920x1080.jpeg" length="0" type="image/jpeg"/><content:encoded><![CDATA[<div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!nRVr!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6250cec5-63d8-407b-835b-8b4ecae928fa_1920x1080.jpeg" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!nRVr!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6250cec5-63d8-407b-835b-8b4ecae928fa_1920x1080.jpeg 424w, https://substackcdn.com/image/fetch/$s_!nRVr!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6250cec5-63d8-407b-835b-8b4ecae928fa_1920x1080.jpeg 848w, https://substackcdn.com/image/fetch/$s_!nRVr!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6250cec5-63d8-407b-835b-8b4ecae928fa_1920x1080.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!nRVr!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6250cec5-63d8-407b-835b-8b4ecae928fa_1920x1080.jpeg 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!nRVr!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6250cec5-63d8-407b-835b-8b4ecae928fa_1920x1080.jpeg" width="1456" height="819" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/6250cec5-63d8-407b-835b-8b4ecae928fa_1920x1080.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;:null,&quot;alt&quot;:&quot;Her - Movies on Google Play&quot;,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="Her - Movies on Google Play" title="Her - Movies on Google Play" srcset="https://substackcdn.com/image/fetch/$s_!nRVr!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6250cec5-63d8-407b-835b-8b4ecae928fa_1920x1080.jpeg 424w, https://substackcdn.com/image/fetch/$s_!nRVr!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6250cec5-63d8-407b-835b-8b4ecae928fa_1920x1080.jpeg 848w, https://substackcdn.com/image/fetch/$s_!nRVr!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6250cec5-63d8-407b-835b-8b4ecae928fa_1920x1080.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!nRVr!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6250cec5-63d8-407b-835b-8b4ecae928fa_1920x1080.jpeg 1456w" sizes="100vw" fetchpriority="high"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg 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"><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"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><div class="pullquote"><p>A snippet from the movie <a href="https://npo.nl/start/video/her">Her</a> (2013), a science-fiction romantic drama film, where Theodore develops a relationship with Samantha, an AI virtual assistent, designed to meet him in every need.</p></div><p>Imagine a future where you're brainstorming for a new project at work, and you say, "Generate a project plan based on the latest trends in renewable energy technologies." Instantly, an AI Agent scours the internet, reviews the most recent academic papers, synthesizes market reports, and compiles a comprehensive plan complete with potential challenges, innovators in the field, and a timeline for development. This isn't a simple task automation; it's an AI Agent performing, arguably, creative thinking and strategic planning&#8212;a capability we're just starting to <em>scratch the service</em> of.</p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://applicationlayer.substack.com/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://applicationlayer.substack.com/subscribe?"><span>Subscribe now</span></a></p><p><strong>Understanding AI Agents: The Basics</strong></p><p>In the simplest terms, an AI Agent is a piece of software designed to perform tasks, some as simple as sending an email on your command, others as complex as navigating a car through city traffic. These Agents are a bit like invisible helpers, living in our smartphones, cars, home appliances, and even on websites, making decisions, and taking actions to assist us in our daily lives.</p><p>Unlike zeroshotting an LLM (prompting a model like GPT to generate final output without revising its work), an Agent can autonomously iterate over a series of tasks. It can learn from data, make decisions, validate those decisions and go back to an earlier stage based upon new information it got from experience. </p><p>Think about how you write a document like an essay. You make an outline, do research, write a draft, evaluate the draft, revise the draft, and repeat this process until you&#8217;re satisfied. This is how Agent workflows can work as well. </p><p>Yet these Agents didn&#8217;t come out of nowhere. Let&#8217;s move on to explore their development history and how they've gradually become more integrated into our (digital) lives.</p><p><strong>The Evolution of AI Agents</strong></p><p>AI Agents have come a long way from their inception, evolving through stages of development that reflect broader shifts in the field of AI. The journey from simple automated systems to the complex, autonomous Agents we see today is a testament to decades of research and technological advancement.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!gZkk!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2b22c9c9-e0b7-44b8-9b98-483f74cbcd73_517x364.jpeg" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!gZkk!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2b22c9c9-e0b7-44b8-9b98-483f74cbcd73_517x364.jpeg 424w, https://substackcdn.com/image/fetch/$s_!gZkk!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2b22c9c9-e0b7-44b8-9b98-483f74cbcd73_517x364.jpeg 848w, https://substackcdn.com/image/fetch/$s_!gZkk!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2b22c9c9-e0b7-44b8-9b98-483f74cbcd73_517x364.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!gZkk!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2b22c9c9-e0b7-44b8-9b98-483f74cbcd73_517x364.jpeg 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!gZkk!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2b22c9c9-e0b7-44b8-9b98-483f74cbcd73_517x364.jpeg" width="517" height="364" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/2b22c9c9-e0b7-44b8-9b98-483f74cbcd73_517x364.jpeg&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:364,&quot;width&quot;:517,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;undefined&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="undefined" title="undefined" srcset="https://substackcdn.com/image/fetch/$s_!gZkk!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2b22c9c9-e0b7-44b8-9b98-483f74cbcd73_517x364.jpeg 424w, https://substackcdn.com/image/fetch/$s_!gZkk!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2b22c9c9-e0b7-44b8-9b98-483f74cbcd73_517x364.jpeg 848w, https://substackcdn.com/image/fetch/$s_!gZkk!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2b22c9c9-e0b7-44b8-9b98-483f74cbcd73_517x364.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!gZkk!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2b22c9c9-e0b7-44b8-9b98-483f74cbcd73_517x364.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"><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"><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"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><div class="pullquote"><p><a href="https://nl.wikipedia.org/wiki/ELIZA">ELIZA</a>, an early natural language processing (NLP) computer program (mid-1960s)</p></div><p>The early days of Agent evolution were marked by rule-based systems, where Agents operated under a set of predefined rules. These were straightforward but limited in scope, as their ability to handle tasks was strictly bound by the instructions programmed into them. For example, <a href="https://nl.wikipedia.org/wiki/ELIZA">ELIZA</a>, an early NLP computer program created in the mid-1960s, could simulate conversation but lacked any genuine understanding or ability to learn.</p><p>The introduction of machine learning algorithms in the latter part of the 20th century marked a significant leap forward. Agents began to learn from data, improving their performance over time without being explicitly programmed for every possible scenario. This shift from rule-based to learning-based Agents enabled more flexible and adaptive applications, from recommendation systems like those used by Netflix to the more sophisticated virtual assistants we interact with today.</p><p>In recent years, the emergence of neural networks and deep learning has further accelerated the capabilities of Agents. These technologies allow them to process and interpret vast amounts of unstructured data, leading to unprecedented levels of understanding and autonomy. Agents can now recognize speech, interpret complex patterns, and make decisions with a degree of nuance that closely mirrors, and often surpasses, human cognition (and latency, which enables real-time inference. See <a href="https://wow.groq.com/why-groq/">Groq</a>).</p><p>As we look at the evolution of AI Agents, it's clear that their development parallels key advancements in AI itself, with each stage bringing us closer to creating Agents that can seamlessly integrate into our lives, providing assistance, and making decisions with a high level of sophistication. Let&#8217;s take a look at the industry nowadays.</p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://applicationlayer.substack.com/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://applicationlayer.substack.com/subscribe?"><span>Subscribe now</span></a></p><p><strong>Current Landscape and Key Players</strong></p><p>The autonomous AI and autonomous agents market, <a href="https://www.grandviewresearch.com/industry-analysis/autonomous-ai-autonomous-agents-market-report">currently valued at approximately USD 4.2 billion, is forecasted to soar to USD 88.1 billion by 2032</a>, thanks to advancements in AI itself. </p><p>Important to understand is that an Agent uses an LLM as its &#8216;brain&#8217;. Therefore, the companies that have there own LLM are likely to be in the center of the Agent industry as well. </p><p>Below a couple of these companies and their flagship models:</p><ol><li><p><strong><a href="https://openai.com/gpt-4">Microsoft</a></strong><a href="https://openai.com/gpt-4">/</a><strong><a href="https://openai.com/gpt-4">OpenAI - GPT4</a> </strong></p></li><li><p><strong><a href="https://www.anthropic.com/claude">Anthropic &#8211; Claude</a> </strong></p></li><li><p><strong><a href="https://cohere.com/models/command">Cohere - Command</a> </strong></p></li><li><p><strong><a href="https://www.ai21.com/studio">AI21Labs &#8211; Jurassic-2</a> </strong></p></li><li><p><strong><a href="https://gemini.google.com/">Google</a></strong><a href="https://gemini.google.com/">: </a><strong><a href="https://gemini.google.com/">Gemini</a> </strong></p></li></ol><p>Nevertheless, there are plenty of decent Open Source &#8216;brains&#8217; that can be used by third parties to build custom solutions on top of them. On top of this, due to the open source nature, newcomers can join the space with relative ease by forking such an open source model and start developing it based upon their specific preferences. </p><p>Below a couple of companies which opened up their code for the public:</p><ol><li><p><strong><a href="https://www.databricks.com/blog/announcing-dbrx-new-standard-efficient-open-source-customizable-llms">Databricks: DBRX</a></strong> (just came out)</p></li><li><p><strong><a href="https://mistral.ai/news/mistral-large/">Mistral AI: Mistral Large</a></strong></p></li><li><p><strong><a href="https://www.eleuther.ai/artifacts/gpt-neo">EleutherAI: GPT-Neo</a> </strong></p></li><li><p><strong><a href="https://llama.meta.com/">Meta: Llama 2</a> </strong></p></li><li><p><strong><a href="https://grok.x.ai/">X &#8211; Grok</a> </strong></p></li></ol><p>Narrowing down to Agents, interesting projects are popping up from different companies from all sorts of sizes. While there is Microsoft&#8217;s <a href="https://www.microsoft.com/en-us/research/project/autogen/">AutoGen</a> as framework for multi-agent conversations, start- and scaleups are entering the space rapidly. At website <a href="https://easywithai.com/ai-agents/">Easy With AI</a>, there is a nice overview of Agents, both close and open sourced. A standout example of innovation in this space is <a href="https://www.cognition-labs.com/introducing-devin">Devin</a>, an AI software engineer that exemplifies the complex decision-making and learning capabilities of modern AI agents (if <a href="https://www.cognition-labs.com/">Cognition</a> can move the <a href="https://www.youtube.com/watch?v=fjHtjT7GO1c">demo</a> qualities to production). </p><div class="captioned-image-container"><figure><a class="image-link image2" target="_blank" href="https://substackcdn.com/image/fetch/$s_!lTa-!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7aba8a12-40e6-4153-ba52-698bf21ea0e8_795x213.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!lTa-!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7aba8a12-40e6-4153-ba52-698bf21ea0e8_795x213.png 424w, https://substackcdn.com/image/fetch/$s_!lTa-!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7aba8a12-40e6-4153-ba52-698bf21ea0e8_795x213.png 848w, https://substackcdn.com/image/fetch/$s_!lTa-!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7aba8a12-40e6-4153-ba52-698bf21ea0e8_795x213.png 1272w, https://substackcdn.com/image/fetch/$s_!lTa-!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7aba8a12-40e6-4153-ba52-698bf21ea0e8_795x213.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!lTa-!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7aba8a12-40e6-4153-ba52-698bf21ea0e8_795x213.png" width="795" height="213" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/7aba8a12-40e6-4153-ba52-698bf21ea0e8_795x213.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:213,&quot;width&quot;:795,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:28525,&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;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!lTa-!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7aba8a12-40e6-4153-ba52-698bf21ea0e8_795x213.png 424w, https://substackcdn.com/image/fetch/$s_!lTa-!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7aba8a12-40e6-4153-ba52-698bf21ea0e8_795x213.png 848w, https://substackcdn.com/image/fetch/$s_!lTa-!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7aba8a12-40e6-4153-ba52-698bf21ea0e8_795x213.png 1272w, https://substackcdn.com/image/fetch/$s_!lTa-!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7aba8a12-40e6-4153-ba52-698bf21ea0e8_795x213.png 1456w" sizes="100vw" loading="lazy"></picture><div></div></div></a></figure></div><p>Some other cool examples I came across:</p><ul><li><p><a href="https://relevanceai.com/">Relevance AI</a>: Workforce Automation. I recommend <a href="https://www.youtube.com/watch?v=niw7qRaY318">the following tutorial</a> where an entire team of Agents is working on creating the morning news for a company. No interns necessary anymore :) </p></li><li><p><a href="https://www.hyperwriteai.com/">Hyper Write</a>: from a writing assistent to a full PA. Booking flights, ordering a pizza, and many more possibilities. </p></li><li><p><a href="https://www.crewai.io/">Crew AI</a>: Open source framework for orchestrating role-playing, autonomous AI agents. In the next edition, we are going to use Crew AI to build an Agent Workflow ourselves. </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_!RJvn!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd24656b9-5b61-4263-ad95-d51d097f02db_2000x1125.jpeg" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!RJvn!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd24656b9-5b61-4263-ad95-d51d097f02db_2000x1125.jpeg 424w, https://substackcdn.com/image/fetch/$s_!RJvn!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd24656b9-5b61-4263-ad95-d51d097f02db_2000x1125.jpeg 848w, https://substackcdn.com/image/fetch/$s_!RJvn!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd24656b9-5b61-4263-ad95-d51d097f02db_2000x1125.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!RJvn!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd24656b9-5b61-4263-ad95-d51d097f02db_2000x1125.jpeg 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!RJvn!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd24656b9-5b61-4263-ad95-d51d097f02db_2000x1125.jpeg" width="1456" height="819" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/d24656b9-5b61-4263-ad95-d51d097f02db_2000x1125.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;:null,&quot;alt&quot;:&quot;Klarna AI-assistant&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="Klarna AI-assistant" title="Klarna AI-assistant" srcset="https://substackcdn.com/image/fetch/$s_!RJvn!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd24656b9-5b61-4263-ad95-d51d097f02db_2000x1125.jpeg 424w, https://substackcdn.com/image/fetch/$s_!RJvn!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd24656b9-5b61-4263-ad95-d51d097f02db_2000x1125.jpeg 848w, https://substackcdn.com/image/fetch/$s_!RJvn!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd24656b9-5b61-4263-ad95-d51d097f02db_2000x1125.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!RJvn!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd24656b9-5b61-4263-ad95-d51d097f02db_2000x1125.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"><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"><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"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>One of the best business cases I&#8217;ve seen so far is the <a href="https://www.klarna.com/international/press/klarna-ai-assistant-handles-two-thirds-of-customer-service-chats-in-its-first-month/">AI Assistant of Klarna</a> (a shop now pay later fintech). Powered by OpenAI, this Assistent has had 2.3 million conversations (two-thirds of Klarna&#8217;s customer service chats), <strong>doing the work of</strong> <strong>700 full-time human agents</strong>, and is on par with human agents in regard to customer satisfaction score. It is estimated that this Agent alone adds a 40 million USD profit to Klarna in 2024. Well done on you <a href="https://en.wikipedia.org/wiki/Sebastian_Siemiatkowski">Sebastian</a> and team!</p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://applicationlayer.substack.com/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://applicationlayer.substack.com/subscribe?"><span>Subscribe now</span></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_!htxK!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4ce06d4c-2a0d-455f-9168-8cca49a92560_2998x1666.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!htxK!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4ce06d4c-2a0d-455f-9168-8cca49a92560_2998x1666.png 424w, https://substackcdn.com/image/fetch/$s_!htxK!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4ce06d4c-2a0d-455f-9168-8cca49a92560_2998x1666.png 848w, https://substackcdn.com/image/fetch/$s_!htxK!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4ce06d4c-2a0d-455f-9168-8cca49a92560_2998x1666.png 1272w, https://substackcdn.com/image/fetch/$s_!htxK!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4ce06d4c-2a0d-455f-9168-8cca49a92560_2998x1666.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!htxK!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4ce06d4c-2a0d-455f-9168-8cca49a92560_2998x1666.png" width="493" height="273.926510989011" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/4ce06d4c-2a0d-455f-9168-8cca49a92560_2998x1666.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:809,&quot;width&quot;:1456,&quot;resizeWidth&quot;:493,&quot;bytes&quot;:3041960,&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;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!htxK!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4ce06d4c-2a0d-455f-9168-8cca49a92560_2998x1666.png 424w, https://substackcdn.com/image/fetch/$s_!htxK!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4ce06d4c-2a0d-455f-9168-8cca49a92560_2998x1666.png 848w, https://substackcdn.com/image/fetch/$s_!htxK!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4ce06d4c-2a0d-455f-9168-8cca49a92560_2998x1666.png 1272w, https://substackcdn.com/image/fetch/$s_!htxK!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4ce06d4c-2a0d-455f-9168-8cca49a92560_2998x1666.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg 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"><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"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p><strong>Potential and Pitfalls</strong></p><p>I had the chance to chat with <a href="https://www.linkedin.com/in/daoud-abdelhadi/overlay/about-this-profile/">Daoud Abdel Hadi</a> about his <a href="https://www.youtube.com/watch?v=z7-fPFtgRE4">Ted Talk on AI Agents</a>. Daoud is the <a href="https://www.google.com/search?q=eastnests&amp;oq=eastnests&amp;gs_lcrp=EgZjaHJvbWUyBggAEEUYOTIJCAEQABgKGIAEMgkIAhAAGAoYgAQyCQgDEAAYChiABDIJCAQQABgKGIAEMgkIBRAAGAoYgAQyCQgGEAAYChiABDIGCAcQRRhA0gEIMTQ2MGowajmoAgCwAgE&amp;sourceid=chrome&amp;ie=UTF-8">Data Science lead</a> at <a href="https://www.google.com/search?q=eastnests&amp;oq=eastnests&amp;gs_lcrp=EgZjaHJvbWUyBggAEEUYOTIJCAEQABgKGIAEMgkIAhAAGAoYgAQyCQgDEAAYChiABDIJCAQQABgKGIAEMgkIBRAAGAoYgAQyCQgGEAAYChiABDIGCAcQRRhA0gEIMTQ2MGowajmoAgCwAgE&amp;sourceid=chrome&amp;ie=UTF-8">Eastnets</a>, a payment solutions company for the financial services sector. At Eastnets, he is exploring the options to use Agents to create co-pilots that can help investigators investigate fraud and other financial crimes. In addition, he is the co-founder of an AI automation platform. He is using all sorts of things like retrieving information from documents, to researching competitors, to writing content.</p><p>We both hold the position that Agents have the potential to revolutionize how we interact with technology, automate repeating tasks, and analyze complex data sets with unprecedented speed and accuracy. By acting as personal assistants, data analysts, and decision-makers, they can significantly enhance productivity, provide personalized experiences, and open new avenues for innovation across industries. </p><p>But as much as AI Agents can represent a leap forward in technology, they also bring up important questions. How do they make decisions? What ensures they act in our best interest? And what does their presence mean for the future of work, privacy, and ethical considerations in technology?</p><div class="pullquote"><p>&#8220;Let every eye negotiate for itself and trust no agent.&#8221;<br>William Shakespeare </p></div><p>With Shakespeares quote, he highlights the importance of personal judgement and skepticism towards intermediaries. This applies to outsourcing tasks to AI Agents as well. It&#8217;s important to start formulating answers to the aforementioned questions early on to prepare ourselves for the next generation of models to come. Similar to AI, there are significant ethical challenges, particularly concerning <a href="https://aiagent.app/blog/impact-of-ai-agents-on-societal-issues-privacy-bias-and-ethical-concerns">privacy, bias, and discrimination</a>:</p><ul><li><p><strong>Privacy Concerns:</strong> AI Agents' reliance on vast data pools raises questions about the security and protection of personal information. Issues like data misuse, surveillance, and unauthorized information sharing highlight the need for robust privacy protections&#8203;&#8203;.</p></li><li><p><strong>Bias and Discrimination:</strong> The risk of perpetuating existing societal biases through AI Agents is a pressing concern. Algorithms may display racial, gender, socioeconomic, and cultural biases, leading to unfair treatment of certain groups. These biases can affect everything from facial recognition technology to hiring processes and loan approvals, potentially reinforcing societal inequalities&#8203;&#8203;.</p></li></ul><p>To mitigate these concerns, transparency in data collection, rigorous bias detection and mitigation, the development of ethical guidelines and regulations, and public awareness are crucial. Transparent data practices, diverse training datasets, and public education can help ensure AI Agents contribute positively to society without compromising ethical standards&#8203;&#8203;. </p><p><strong>E2.2: Create your own Agent Workflow</strong></p><p>As we've explored the evolving world of AI Agents, we've uncovered both the incredible potential and the significant challenges they present. Yet the single most important thing is that we should familiarize ourselves with the techniques and do the actual building. Therefore, in the next edition, we are going to create a project with true impact straight away. Using Crew AI, we are going to build an Agent Workflow that does research into a particular niche, writes a blog, summarizes the blog, and finally posts its findings on X on a daily basis. I&#8217;m pretty excited, I hope you as well. Thanks for reading, and I hope to see you back in two weeks. </p><div class="captioned-image-container"><figure><a class="image-link image2" target="_blank" href="https://substackcdn.com/image/fetch/$s_!mIp8!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F95382de3-f343-4c8b-8c66-8a0da725d684_903x133.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!mIp8!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F95382de3-f343-4c8b-8c66-8a0da725d684_903x133.png 424w, https://substackcdn.com/image/fetch/$s_!mIp8!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F95382de3-f343-4c8b-8c66-8a0da725d684_903x133.png 848w, https://substackcdn.com/image/fetch/$s_!mIp8!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F95382de3-f343-4c8b-8c66-8a0da725d684_903x133.png 1272w, https://substackcdn.com/image/fetch/$s_!mIp8!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F95382de3-f343-4c8b-8c66-8a0da725d684_903x133.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!mIp8!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F95382de3-f343-4c8b-8c66-8a0da725d684_903x133.png" width="903" height="133" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/95382de3-f343-4c8b-8c66-8a0da725d684_903x133.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:133,&quot;width&quot;:903,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:28211,&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;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!mIp8!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F95382de3-f343-4c8b-8c66-8a0da725d684_903x133.png 424w, https://substackcdn.com/image/fetch/$s_!mIp8!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F95382de3-f343-4c8b-8c66-8a0da725d684_903x133.png 848w, https://substackcdn.com/image/fetch/$s_!mIp8!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F95382de3-f343-4c8b-8c66-8a0da725d684_903x133.png 1272w, https://substackcdn.com/image/fetch/$s_!mIp8!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F95382de3-f343-4c8b-8c66-8a0da725d684_903x133.png 1456w" sizes="100vw" loading="lazy"></picture><div></div></div></a></figure></div><p>Thanks!</p><p>Michiel </p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://applicationlayer.substack.com/p/e21-beyond-her-how-ai-agents-get?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://applicationlayer.substack.com/p/e21-beyond-her-how-ai-agents-get?utm_source=substack&utm_medium=email&utm_content=share&action=share"><span>Share</span></a></p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://applicationlayer.substack.com/?utm_source=substack&amp;utm_medium=email&amp;utm_content=share&amp;action=share&quot;,&quot;text&quot;:&quot;Share The Application Layer&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://applicationlayer.substack.com/?utm_source=substack&amp;utm_medium=email&amp;utm_content=share&amp;action=share"><span>Share The Application Layer</span></a></p>]]></content:encoded></item><item><title><![CDATA[E1.2: Exploring Diffusion Models: From Concept to Code in Text-to-Video]]></title><description><![CDATA[What are diffusion models, how are they being built, and how can we create a video ourselves?]]></description><link>https://applicationlayer.substack.com/p/e12-exploring-diffusion-models-from</link><guid isPermaLink="false">https://applicationlayer.substack.com/p/e12-exploring-diffusion-models-from</guid><dc:creator><![CDATA[Michiel Voortman]]></dc:creator><pubDate>Wed, 13 Mar 2024 10:43:31 GMT</pubDate><enclosure url="https://substack-post-media.s3.amazonaws.com/public/images/ca2bee54-9369-4ae4-9828-b23ebee24942_1098x702.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>Welcome back to <em><a href="https://applicationlayer.substack.com/">The Application Layer</a></em>, for the second edition of our bi-weekly series that takes you into the heart of technological progress. Building on the previous edition, <a href="https://applicationlayer.substack.com/p/from-text-to-snowy-puppies-unleashing">Unleashing the Future of Video Creation</a>, in this edition, we&#8217;re diving deeper into the world of text-to-video generation with diffusion models - arguably, at the moment, the most promising models in terms of quality. While <a href="https://openai.com/sora">OpenAI&#8217;s Sora model</a> is not open for the public yet, after this edition, you&#8217;re able to generate a video from your own text. </p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://applicationlayer.substack.com/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://applicationlayer.substack.com/subscribe?"><span>Subscribe now</span></a></p><p>In this edition, we'll focussing on what diffusion models are, a brief explanation of the training process and finally show how you can use a pre-trained model to create your own video from a text prompt in Python. This hands-on approach will show you how accessible this technology has become for creators and developers alike.</p><p><strong>What are these models?</strong></p><p>Diffusion models, a subset of generative models, are designed to create new data that resembles the training data, such as producing unique human faces from a dataset of faces. They achieve this by gradually evolving from a basic, often normal, distribution to the complex distribution of the training data, using reversible steps. The process involves starting from a simple noise distribution and progressively transforming it to emulate the detailed features of the target data distribution.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!DDrx!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcc1af2f6-20da-4b71-ab7c-80dba497b2e1_1407x446.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!DDrx!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcc1af2f6-20da-4b71-ab7c-80dba497b2e1_1407x446.png 424w, https://substackcdn.com/image/fetch/$s_!DDrx!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcc1af2f6-20da-4b71-ab7c-80dba497b2e1_1407x446.png 848w, https://substackcdn.com/image/fetch/$s_!DDrx!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcc1af2f6-20da-4b71-ab7c-80dba497b2e1_1407x446.png 1272w, https://substackcdn.com/image/fetch/$s_!DDrx!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcc1af2f6-20da-4b71-ab7c-80dba497b2e1_1407x446.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!DDrx!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcc1af2f6-20da-4b71-ab7c-80dba497b2e1_1407x446.png" width="1407" height="446" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/cc1af2f6-20da-4b71-ab7c-80dba497b2e1_1407x446.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:446,&quot;width&quot;:1407,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:1079498,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!DDrx!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcc1af2f6-20da-4b71-ab7c-80dba497b2e1_1407x446.png 424w, https://substackcdn.com/image/fetch/$s_!DDrx!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcc1af2f6-20da-4b71-ab7c-80dba497b2e1_1407x446.png 848w, https://substackcdn.com/image/fetch/$s_!DDrx!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcc1af2f6-20da-4b71-ab7c-80dba497b2e1_1407x446.png 1272w, https://substackcdn.com/image/fetch/$s_!DDrx!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcc1af2f6-20da-4b71-ab7c-80dba497b2e1_1407x446.png 1456w" sizes="100vw" fetchpriority="high"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg 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"><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"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><div class="pullquote"><p><em>Diffusion model processes moving to and from data and noise</em><br>Source: <a href="https://www.assemblyai.com/blog/diffusion-models-for-machine-learning-introduction/">Nvidia</a></p></div><p>Though models often blend various components, we generally categorise them into four main types:</p><ol><li><p><strong><a href="https://arxiv.org/abs/2006.11239">Denoising Diffusion Probabilistic Models (DDPMs)</a>:</strong> These are the foundational models that simulate the reverse process of gradually removing noise from a signal to generate samples. Their uniqueness lies in their straightforward approach to model the data generation as a reverse diffusion process, primarily applied in generating images and other data types from pure noise.</p></li><li><p><strong>Conditional Diffusion Models:</strong> Characterised by their ability to generate data based on specific conditions or contexts (e.g., generating images from textual descriptions), these models differentiate themselves by using additional information to guide the generation process, making them suitable for tasks requiring targeted output.</p></li><li><p><strong>Latent Diffusion Models:</strong> These models operate uniquely in a compressed, latent space instead of directly in the data space (like a ZIP file reduces file size without losing information). This approach makes them efficient for dealing with high-dimensional data, distinguishing them by their use of latent space transformations for the diffusion process.</p></li><li><p><strong>Score-Based Generative Models (SBGMs):</strong> These models share the fundamental principle of generating data by transforming a noise distribution into a data distribution but focus specifically on modelling the score of the data distribution. The score here implies the direction in which to adjust noise to more closely resemble the target data. SGMs use this score, or gradient, in a continuous framework (instead of discrete steps) guided by stochastic differential equations (SDEs), distinguishing them within the broader category of diffusion models.</p></li></ol><p>These models, or combinations of them, have the ability to generate highly realistic images and videos, each employing a unique approach to manage and manipulate the diffusion process.</p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://applicationlayer.substack.com/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://applicationlayer.substack.com/subscribe?"><span>Subscribe now</span></a></p><p><strong>Training a diffusion model: A Quick Guide</strong></p><p>Training diffusion models is a resource-intensive task often beyond the reach of individual devs. Yet, understanding the process from a high level provides valuable insights into how these models learn to transform text into video. Therefore, below the general steps of training such models:</p><ul><li><p><em>Data Gathering and Preparation:</em> Begin by gathering a good dataset, ideally with diverse examples. For diffusion models focusing on text-to-video, ensure your dataset includes video clips along with corresponding textual descriptions. Preprocessing steps like normalisation and resizing may be necessary to align with model input requirements. </p></li><li><p><em>Model Selection:</em> Choose a diffusion model architecture that best fits your project, considering factors like the complexity of data and desired output. Setting up your development environment will involve libraries specific to your chosen model, such as PyTorch for computational graph management and model training.</p></li><li><p><em>Model Training:</em> Training diffusion models demands robust hardware, typically GPUs, due to their intensive computational requirements. The training phase encompasses initialising the model, defining a suitable loss function to measure how well the model's output matches the target data, and selecting an optimiser to adjust model parameters and minimise the loss. Regular checkpoints are crucial for monitoring progress and facilitating model recovery.</p></li><li><p><em>Model Evaluation:</em> Evaluate the model's effectiveness using a mix of quantitative metrics (such as loss reduction over time) and qualitative assessment (visual inspection of generated videos). Feedback from this stage is essential for refining model parameters and training approaches.</p></li><li><p><em>Implementation:</em> Once satisfied with the model's performance, prepare it for deployment. This step may involve converting the model for compatibility with different platforms or optimising it for faster inference. Continually update the model with new data and insights to maintain and improve its performance over time.</p></li></ul><p>If you want to train a diffusion model from scratch (to generate images), I&#8217;d recommend <a href="https://huggingface.co/docs/diffusers/en/tutorials/basic_training">this tutorial</a> (which uses a Butterfly dataset). Yet, generally, the best results, and with less hardware requirements, come from finetuning a base model on your own data. An excellent tutorial can be found <a href="https://huggingface.co/docs/diffusers/v0.13.0/en/training/text2image">here</a>. However, it could also be the case that there is already a model in place for your need. That&#8217;s where inferencing comes into play. </p><p><strong>Inferencing a diffusion model: A Coding Example</strong></p><p>Inferencing is the phase where a trained diffusion model applies what it has learned to generate new data from given inputs, such as turning text prompts into videos. This process uses the model's knowledge to predict or "infer" outputs without additional training, showcasing the model's ability to create realistic and coherent visuals based on the initial textual description. We are going to use a stable diffusion tex-to-video model (a combination of a latent and conditional diffusion model) from the <a href="https://huggingface.co/">Hugging Face website</a>. The aim is to generate a short video based on our own textual input.</p><ol><li><p>Create your virtual environment</p></li></ol><p>For Mac, create a new folder, navigate to this folder via the terminal and run the following:</p><pre><code>virtualenv venv
source venv/bin/activate</code></pre><p>For Windows, create a new folder, navigate to this folder via Command Prompt and run the following:</p><pre><code>virtualenv venv
venv\Scripts\activate</code></pre><p>If virtualenv is not recognised, you can install it using pip3 install virtualenv. If it still doesn&#8217;t work, you probably need to add virtualenv to your path. </p><ol start="2"><li><p>Install the libraries</p></li></ol><pre><code>pip3 install diffusers transformers opencv-python numpy torch</code></pre><ol start="3"><li><p>Do the imports</p></li></ol><pre><code>#imports
from diffusers import DiffusionPipeline, DPMSolverMultistepScheduler
from diffusers.utils import export_to_video
import cv2
import numpy as np
import torch</code></pre><ol start="3"><li><p>Initialise the pipeline </p></li></ol><pre><code>pipe = DiffusionPipeline.from_pretrained("damo-vilab/text-to-video-ms-1.7b", torch_dtype=torch.float32)
pipe.scheduler = DPMSolverMultistepScheduler.from_config(pipe.scheduler.config)</code></pre><p>This code initializes a pre-trained diffusion model for generating videos from textual descriptions. The first line line loads a specific model trained to create videos based on input text, setting it to operate in floating-point precision for computational efficiency. Following that, the second line configures the model's scheduler, which manages the diffusion steps during video generation, ensuring the process aligns with the model's training configuration for optimal performance.</p><p>We use model <a href="https://huggingface.co/ali-vilab/text-to-video-ms-1.7b">damo-vilab/text-to-video-ms-1.7b</a> made by <a href="https://huggingface.co/ali-vilab">Alibaba / DAMO Vision Intelligence Lab</a>. Yet you can take any other model of your choice (and make some minor code changes). Important to know here is that we use a CPU instead of a GPU implementation. Therefore, everyone can execute the code on its own device. </p><ol start="4"><li><p>Define your prompt</p></li></ol><pre><code>num_inference_steps = 25
prompt = "A panda eating bamboo on a rock"
video_frames = pipe(prompt, num_inference_steps=num_inference_steps).frames</code></pre><p>Define your input in the prompt line. The video_frames line line triggers the model to start the generation process, ultimately producing a sequence of video frames that visually interprets the given prompt. You can increase the number of inference steps to improve quality at the expense of processing time. </p><ol start="5"><li><p>Define the video properties</p></li></ol><pre><code>fps = 16  # Frames per second
height, width, channels = video_frames[0].shape[1:]  # Get shape from the first batch
vid_name = f"{prompt[:50]}" + " nis" + f"{num_inference_steps}" + ".mp4"
video_writer = cv2.VideoWriter(vid_name, fourcc, fps, (width, height))</code></pre><p>This code sets the frame rate (in frames per second) for the video, extracting the height, width, and number of color channels for each frame from the first batch of generated frames. It defines the video codec (that manage how videos are compressed) as 'mp4v', a common format for video files. The Video Writer object is then initialized to write the video file.</p><ol start="6"><li><p>Write frames to video</p></li></ol><pre><code>for batch in video_frames:
    for frame in batch:
        # Ensure frame is normalized and in uint8
        frame_uint8 = (frame * 255).astype(np.uint8)
        video_writer.write(frame_uint8)

video_writer.release()
print(f"{vid_name} done")</code></pre><p>This code snippet normalises each frame in the video by scaling the pixel values of each frame to span the full range of 0 to 255, a common scale for digital images, ensuring compatibility with video codecs. Converting to 8-bit unsigned integer format specifies that each pixel's color intensity is represented by a value between 0 and 255, fitting the standard format for image and video files. It then writes each frame to a video file using OpenCV, finalises the video writing process.</p><p>What we get out is the following video:</p><div class="native-video-embed" data-component-name="VideoPlaceholder" data-attrs="{&quot;mediaUploadId&quot;:&quot;c5828d06-afc9-4939-a76d-3317e1af92c7&quot;,&quot;duration&quot;:null}"></div><div class="pullquote"><p>Prompt: &#8220;A panda eating bamboo on a rock&#8221;</p></div><p>As can be seen, this video is short and not meeting production quality standards yet. You can increase the length by using a <a href="https://huggingface.co/ali-vilab/text-to-video-ms-1.7b">GPU implementation</a> and play around with the number of inference steps to improve the quality. If not satisfied, try another model or consider finetuning a model on your own data.  At the bottom of this post, other video examples can be found. For playing around with prompts without code (and, depending on your machine, probably higher processing speed), you can leverage the UI <a href="https://huggingface.co/spaces/ali-vilab/modelscope-text-to-video-synthesis">here</a>.</p><p>To wrap up, this edition demonstrates how to leverage open-source diffusion models to generate video content, showcasing a practical application of such models. As the field evolves, we can expect the quality of these models to improve, potentially making open-source solutions a standard in the industry. This not only democratises access to powerful generative tools but also encourages innovation and collaboration in the development of high-quality video content.</p><p>The future is bright. See you in two weeks. Thanks for reading. </p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://applicationlayer.substack.com/?utm_source=substack&amp;utm_medium=email&amp;utm_content=share&amp;action=share&quot;,&quot;text&quot;:&quot;Share The Application Layer&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://applicationlayer.substack.com/?utm_source=substack&amp;utm_medium=email&amp;utm_content=share&amp;action=share"><span>Share The Application Layer</span></a></p><p></p><div class="native-video-embed" data-component-name="VideoPlaceholder" data-attrs="{&quot;mediaUploadId&quot;:&quot;d1d5dc76-6673-42b6-ba4d-e901a6751ea1&quot;,&quot;duration&quot;:null}"></div><div class="pullquote"><p>Prompt: &#8220;A pirate riding a horse&#8221;</p></div><div class="native-video-embed" data-component-name="VideoPlaceholder" data-attrs="{&quot;mediaUploadId&quot;:&quot;6197e707-f699-4b81-8f89-f4c5cf09a1cb&quot;,&quot;duration&quot;:null}"></div><div class="pullquote"><p>Prompt: &#8220;A sunny beach with palm trees&#8221;</p></div><div class="native-video-embed" data-component-name="VideoPlaceholder" data-attrs="{&quot;mediaUploadId&quot;:&quot;5b2fe264-d2d0-4c1e-ae5f-d2e74da2c35e&quot;,&quot;duration&quot;:null}"></div><div class="pullquote"><p>Prompt: &#8220;A dog on a surfboard catching a wave&#8221;</p><div><hr></div><div class="native-video-embed" data-component-name="VideoPlaceholder" data-attrs="{&quot;mediaUploadId&quot;:&quot;15a4fbd4-6f11-4ba0-ae73-05f063a3bda6&quot;,&quot;duration&quot;:null}"></div><div><hr></div><p>Prompt: &#8220;Spiderman bungeejumping from a tower&#8221;</p></div><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://applicationlayer.substack.com/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe&quot;,&quot;language&quot;:&quot;en&quot;}" data-component-name="SubscribeWidgetToDOM"><div class="subscription-widget show-subscribe"><div class="preamble"><p class="cta-caption">See you in two weeks for the next chapter!</p></div><form class="subscription-widget-subscribe"><input type="email" class="email-input" name="email" placeholder="Type your email&#8230;" tabindex="-1"><input type="submit" class="button primary" value="Subscribe"><div class="fake-input-wrapper"><div class="fake-input"></div><div class="fake-button"></div></div></form></div></div><p></p>]]></content:encoded></item><item><title><![CDATA[E1.1: From Text to Snowy Puppies: Unleashing the Future of Video Creation]]></title><description><![CDATA[What are text-to-video models, where do they come from, and how do they shape the path towards personalised content creation?]]></description><link>https://applicationlayer.substack.com/p/from-text-to-snowy-puppies-unleashing</link><guid isPermaLink="false">https://applicationlayer.substack.com/p/from-text-to-snowy-puppies-unleashing</guid><dc:creator><![CDATA[Michiel Voortman]]></dc:creator><pubDate>Thu, 29 Feb 2024 07:46:17 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!CA54!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9127e83d-52f6-491d-954c-ab2d1117bf1b_2012x1780.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<div class="native-video-embed" data-component-name="VideoPlaceholder" data-attrs="{&quot;mediaUploadId&quot;:&quot;d9ca15dc-a6f0-41f0-bb05-db1c83353a1d&quot;,&quot;duration&quot;:null}"></div><div class="pullquote"><p>Prompt: &#8220;A litter of golden retriever puppies playing in the snow. Their heads pop out of the snow, covered in.&#8221;<br>Source: <a href="https://openai.com/sora">OpenAI</a>. </p></div><p>In today's world, making videos from text is a game-changer. This tech lets us turn any written idea into a video quickly. You type something, and boom, you have a video of it. It's going to change how we work and play. Smart tech folks are all over this, making it better every day. And guess what? We're going to dive deep into how this all started and where it's going, especially looking at the most recent breakthrough of OpenAI. So, let's get into it and see how words turn into moving pictures.</p><h3><strong>Unlocking Personalised Video Content Creation</strong></h3><p>One of the most groundbreaking applications of text-to-video technology lies in its power to create highly personalised video content. This isn't just about choosing your adventure in movies or games; it's about crafting entirely unique experiences for each viewer or player. Here's how this tech is starting to change the game:</p><ul><li><p><strong>Personalised Movies and Shows</strong>: Imagine watching a film where the storyline adapts based on your preferences, or where you can see yourself as a character in the plot. Text-to-video technology could make this possible by generating scenes on-the-fly, tailored to the viewer's choices or interests.</p></li><li><p><strong>Customised Gaming Experiences</strong>: In gaming, this technology can be used to create dynamic narratives where the game's world and story change based on the player's actions or decisions, providing a truly personalised adventure that's different each time you play.</p></li><li><p><strong>Educational Content</strong>: For education, it means lessons that adapt to each student's learning style or interests, making learning more engaging by incorporating elements that resonate personally with them.</p></li><li><p><strong>Marketing and Advertising</strong>: Brands can create customised video messages for their customers, making each interaction personal and increasing engagement by speaking directly to the individual's preferences and behaviours.</p></li></ul><p>The potential for personalised video content is big, ranging from entertainment to education, and beyond. By harnessing text-to-video technology, creators and developers have a powerful tool at their disposal to craft experiences that are not just immersive but deeply personal. But why is this relevant now? Let&#8217;s explore the evolution of the models that make this all possible. </p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://applicationlayer.substack.com/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://applicationlayer.substack.com/subscribe?"><span>Subscribe now</span></a></p><h3><strong>The Evolution of Generative Models</strong></h3><p>Generative models have come a long way since their inception. Initially, computer graphics and simple algorithms were used to create digital images and animations. These early models required extensive manual input and were limited in their complexity and realism.</p><ul><li><p><strong>Early Days (1970s-1980s)</strong>: The journey began with basic computer graphics, where the creation of digital content was heavily manual and time-consuming. Artists and programmers had to painstakingly design each element, limiting the scope and scale of projects.</p></li><li><p><strong>Rise of Machine Learning (1990s-2000s)</strong>: The introduction of machine learning models marked a significant turning point. Algorithms could now learn from huge datasets, creating more complex and realistic images. However, these models still struggled with understanding and generating coherent long-form content.</p></li><li><p><strong>Deep Learning Revolution (2010s)</strong>: The advent of deep learning marked a significant transformation. Neural networks, particularly Generative Adversarial Networks (GANs) and Variational Autoencoders (VAEs), started producing high-quality images that were increasingly realistic. These models learned to mimic the distribution of real images, generating new content that was often indistinguishable from real-world examples.</p></li><li><p><strong>From Images to Video (late 2010s)</strong>: Transitioning from generating static images to dynamic videos was a natural progression but posed significant challenges. Videos require a temporal coherence and a much higher level of complexity, as they are essentially sequences of images that need to maintain consistency and tell a story.</p></li><li><p><strong>Recent Breakthroughs in text-to-video (2020s)</strong>: The latest breakthroughs in text-to-video generation represent a culmination of years of research and development. Leveraging advancements in natural language processing (NLP) and deep learning, current models can now understand textual descriptions and generate corresponding video content. This involves not just creating visually appealing frames but ensuring that these frames are woven together into a coherent and compelling narrative.</p></li></ul><h3><strong>Breakthroughs in Text-to-Video Generation</strong></h3><p>The journey from text to vivid, moving images represents an exciting frontier in AI. This transformation didn't happen overnight; it's the result of years of incremental breakthroughs. The evolution has been particularly rapid in recent years, with several key developments pushing the boundaries of what's possible.</p><p><strong>The Foundation: GANs and Transformers</strong></p><p>Generative Adversarial Networks (GANs), introduced in 2014, marked a significant milestone. GANs use two neural networks&#8212;the generator and the discriminator&#8212;in a competitive setup, where the generator learns to create data increasingly indistinguishable from real data, while the discriminator learns to tell the difference. Although initially focused on images, the concept proved pivotal for video generation, teaching machines not just to replicate but to imagine.</p><p>The advent of transformers in 2017, in the famous paper <a href="https://arxiv.org/abs/1706.03762">&#8220;Attention is All You Need&#8221;</a>, initially for natural language processing tasks, revolutionised AI's capacity to understand and generate human-like text. Transformers' ability to handle sequential data made them prime candidates for adaptation in video generation, where both the narrative (text) and the sequence (video frames) are crucial.</p><p><strong>The Role of Diffusion Models</strong></p><p>As the field evolved, diffusion models emerged as a significant breakthrough, enhancing the realism and coherence of generated video content. Unlike GANs, diffusion models generate high-quality images and videos by gradually refining noise into structured visual data. This process, akin to reverse diffusion, allows for the creation of complex, dynamic scenes with unprecedented detail and fidelity. The adaptability of diffusion models to video generation marked a pivotal advancement, offering new possibilities for creating seamless, temporally coherent video sequences from textual prompts (like the one you see below). </p><div class="native-video-embed" data-component-name="VideoPlaceholder" data-attrs="{&quot;mediaUploadId&quot;:&quot;7caa3d1d-4b97-4d3f-bc0e-5f9f6c38130e&quot;,&quot;duration&quot;:null}"></div><div class="pullquote"><p>Prompt: &#8220;An extreme close-up of an gray-haired man with a beard in his 60s, he is deep in thought pondering the history of the universe as he sits at a cafe in Paris, his eyes focus on people offscreen as they walk as he sits mostly motionless, he is dressed in a wool coat suit coat with a button-down shirt , he wears a brown beret and glasses and has a very professorial appearance, and the end he offers a subtle closed-mouth smile as if he found the answer to the mystery of life, the lighting is very cinematic with the golden light and the Parisian streets and city in the background, depth of field, cinematic 35mm film.&#8221;</p><p>Source: <a href="https://openai.com/sora">OpenAI</a>. </p></div><h3>OpenAI's DALL&#183;E and Sora: Milestones in Generative AI</h3><p>The path to sophisticated text-to-video generation was significantly paved by OpenAI's developments in text-to-image models, most notably with the <a href="https://openai.com/research/dall-e">DALL&#183;E series</a>. DALL&#183;E, introduced in 2021, showcased the ability to generate highly detailed and contextually relevant images from textual descriptions. This breakthrough demonstrated the potential of combining natural language understanding with generative models to create visual content that closely aligns with human imagination and descriptions.</p><p>Building on the success and principles of DALL&#183;E, OpenAI introduced <a href="https://openai.com/sora">the Sora model</a>, a leap forward in text-to-video generation. Sora exemplifies how far the technology has come, capable of generating high-quality, contextually relevant video clips from textual prompts. This achievement highlights the potential of combining advanced natural language understanding with cutting-edge video generation techniques.</p><h3><strong>Challenges and future Directions</strong></h3><p>The advancement of text-to-video generation technology faces both technical challenges and ethical considerations, even as it opens new possibilities in media creation.</p><p><strong>Key Challenges</strong></p><ul><li><p><strong>Temporal Coherence</strong>: Maintaining consistency over longer videos is difficult, as early mistakes can propagate, affecting overall quality.</p></li><li><p><strong>Computational Demands</strong>: High-quality video generation requires substantial computational resources, limiting accessibility.</p></li><li><p><strong>Ethical Concerns</strong>: The potential for misuse, such as creating misleading content or deepfakes, and questions around copyright and creative ownership are significant. As a potential solution, legal reforms could mandate disclosure of AI involvement in content creation, ensuring transparency and accountability. Technically, investing in detection tools could help differentiate between genuine and manipulated content, safeguarding against misinformation.</p></li></ul><p><strong>Looking Ahead</strong></p><ul><li><p><strong>Efficiency and Accessibility</strong>: Future efforts will likely focus on reducing computational requirements to make these technologies more accessible to a wider range of users.</p></li><li><p><strong>Enhanced Realism</strong>: Improving the emotional depth and realism of generated content will be crucial for more engaging and relatable videos.</p></li><li><p><strong>Interactive Generation</strong>: Advancements may enable real-time, interactive video generation, expanding possibilities in gaming, virtual reality, and live broadcasts. </p></li></ul><p>As we navigate these challenges, the goal will be to leverage text-to-video technologies responsibly, enhancing creative expression while addressing ethical concerns.</p><h3><strong>P2: Create Your Own Video from a Text Prompt</strong></h3><p>In two weeks, in the second part of the article series, we'll dive deep into the practical application of diffusion models, guiding you through the process of transforming your imaginative text prompts into captivating video content using your own Python code. Stay tuned!</p><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://applicationlayer.substack.com/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe&quot;,&quot;language&quot;:&quot;en&quot;}" data-component-name="SubscribeWidgetToDOM"><div class="subscription-widget show-subscribe"><div class="preamble"><p class="cta-caption">Subscribe to The Application Layer to not miss <em>P2: Create Your Own Video from a Text Prompt</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><div class="captioned-image-container"><figure><a class="image-link image2" target="_blank" href="https://substackcdn.com/image/fetch/$s_!CA54!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9127e83d-52f6-491d-954c-ab2d1117bf1b_2012x1780.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!CA54!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9127e83d-52f6-491d-954c-ab2d1117bf1b_2012x1780.png 424w, https://substackcdn.com/image/fetch/$s_!CA54!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9127e83d-52f6-491d-954c-ab2d1117bf1b_2012x1780.png 848w, https://substackcdn.com/image/fetch/$s_!CA54!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9127e83d-52f6-491d-954c-ab2d1117bf1b_2012x1780.png 1272w, https://substackcdn.com/image/fetch/$s_!CA54!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9127e83d-52f6-491d-954c-ab2d1117bf1b_2012x1780.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!CA54!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9127e83d-52f6-491d-954c-ab2d1117bf1b_2012x1780.png" width="48" height="42.46153846153846" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/9127e83d-52f6-491d-954c-ab2d1117bf1b_2012x1780.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1288,&quot;width&quot;:1456,&quot;resizeWidth&quot;:48,&quot;bytes&quot;:3760827,&quot;alt&quot;:&quot;&quot;,&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;: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_!CA54!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9127e83d-52f6-491d-954c-ab2d1117bf1b_2012x1780.png 424w, https://substackcdn.com/image/fetch/$s_!CA54!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9127e83d-52f6-491d-954c-ab2d1117bf1b_2012x1780.png 848w, https://substackcdn.com/image/fetch/$s_!CA54!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9127e83d-52f6-491d-954c-ab2d1117bf1b_2012x1780.png 1272w, https://substackcdn.com/image/fetch/$s_!CA54!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9127e83d-52f6-491d-954c-ab2d1117bf1b_2012x1780.png 1456w" sizes="100vw" loading="lazy"></picture><div></div></div></a><figcaption class="image-caption">Bye!</figcaption></figure></div><div class="captioned-button-wrap" data-attrs="{&quot;url&quot;:&quot;https://applicationlayer.substack.com/p/from-text-to-snowy-puppies-unleashing?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">Thank you for reading The Application Layer. </p></div><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://applicationlayer.substack.com/p/from-text-to-snowy-puppies-unleashing?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://applicationlayer.substack.com/p/from-text-to-snowy-puppies-unleashing?utm_source=substack&utm_medium=email&utm_content=share&action=share"><span>Share</span></a></p></div><p></p>]]></content:encoded></item><item><title><![CDATA[The Application Layer]]></title><description><![CDATA[Where Technology Meets Practicality &#8211; from Sector Shifts to Software Scripts.]]></description><link>https://applicationlayer.substack.com/p/the-application-layer</link><guid isPermaLink="false">https://applicationlayer.substack.com/p/the-application-layer</guid><dc:creator><![CDATA[Michiel Voortman]]></dc:creator><pubDate>Thu, 29 Feb 2024 07:38:56 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!0b6D!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8e4c2f62-2293-4120-a61c-818e7e436e31_1024x1024.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!0b6D!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8e4c2f62-2293-4120-a61c-818e7e436e31_1024x1024.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!0b6D!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8e4c2f62-2293-4120-a61c-818e7e436e31_1024x1024.png 424w, https://substackcdn.com/image/fetch/$s_!0b6D!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8e4c2f62-2293-4120-a61c-818e7e436e31_1024x1024.png 848w, https://substackcdn.com/image/fetch/$s_!0b6D!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8e4c2f62-2293-4120-a61c-818e7e436e31_1024x1024.png 1272w, https://substackcdn.com/image/fetch/$s_!0b6D!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8e4c2f62-2293-4120-a61c-818e7e436e31_1024x1024.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!0b6D!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8e4c2f62-2293-4120-a61c-818e7e436e31_1024x1024.png" width="250" height="250" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/8e4c2f62-2293-4120-a61c-818e7e436e31_1024x1024.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1024,&quot;width&quot;:1024,&quot;resizeWidth&quot;:250,&quot;bytes&quot;:340986,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!0b6D!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8e4c2f62-2293-4120-a61c-818e7e436e31_1024x1024.png 424w, https://substackcdn.com/image/fetch/$s_!0b6D!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8e4c2f62-2293-4120-a61c-818e7e436e31_1024x1024.png 848w, https://substackcdn.com/image/fetch/$s_!0b6D!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8e4c2f62-2293-4120-a61c-818e7e436e31_1024x1024.png 1272w, https://substackcdn.com/image/fetch/$s_!0b6D!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8e4c2f62-2293-4120-a61c-818e7e436e31_1024x1024.png 1456w" sizes="100vw" fetchpriority="high"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg 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"><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"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://applicationlayer.substack.com/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://applicationlayer.substack.com/subscribe?"><span>Subscribe now</span></a></p><p><strong>The Application Layer</strong> is a bi-monthly series that takes you into the heart of technological progress, where the real magic isn't in the raw power of GPUs or complex infrastructure, but in the realm where ideas come to life: <em>The Application Layer</em>. </p><p>In the first edition of each month, we explore high-level concepts, industry trends, and groundbreaking ideas&#8212;perfect for everyone, regardless of your technical background. This is where we unpack how AI is influencing various sectors and what it may mean for the future.</p><p>The second edition each month is where we roll up our sleeves. Designed for those with a technical interest, it focuses on building and implementing the concepts discussed in the first edition. It's an in-depth look at the application of these ideas, ideal for tech enthusiasts keen on understanding the 'how' behind the 'what.' Ideally, one further builds on top of these implementations and creates value out of it. </p><h3><strong>Clarifying the Buzzword</strong></h3><p>In an attempt to prevent ambiguity along the way, I&#8217;d like to share the definition that <a href="https://en.wikipedia.org/wiki/Marc_Andreessen">Marc Andreessen</a>, general partner of legendary Venture Capital firm <a href="https://a16z.com/">a16z</a>, holds about AI:</p><p><em>&#8220;A short description of what AI is: The application of mathematics and software code to teach computers how to understand, synthesize, and generate knowledge in ways similar to how people do it. AI is a computer program like any other &#8211; it runs, takes input, processes, and generates output. AI&#8217;s output is useful across a wide range of fields, ranging from coding to medicine to law to the creative arts. It is owned by people and controlled by people, like any other technology.</em></p><p><em>A shorter description of what AI isn&#8217;t: Killer software and robots that will spring to life and decide to murder the human race or otherwise ruin everything, like you see in <a href="https://movieweb.com/best-killer-robot-horror-movies-ranked/">the movies</a>.</em></p><p><em>An even shorter description of what AI could be: A way to make everything we care about better.&#8221;</em></p><p>In my opinion, until proven wrong (which I don&#8217;t hope), by and large, this definition is valid. </p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://applicationlayer.substack.com/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://applicationlayer.substack.com/subscribe?"><span>Subscribe now</span></a></p><h3><strong>Rethinking Our Priorities</strong></h3><p>Think of how common software is in our lives now. That&#8217;s where AI is heading to. It&#8217;s going to be everywhere, helping us do all kinds of things. This is what's happening in the Application Layer. It's being used by businesses to reinvent how they work. For example, educators are leveraging AI to offer high-quality learning solutions to virtually everyone at nearly zero marginal costs, doctors are enhancing patient treatment quality with the support of AI assistants, and software engineers are building companies at a fraction of the costs of the incumbents by leveraging Copilot and ChatGPT (and soon <a href="https://arxiv.org/abs/2402.09171">automated unit testing using Meta's TestGen-LLM!</a>). </p><p>All these different uses of AI are just as important as making it smarter. They're about finding new ways to improve things we do every day. This is how this technology will become a normal part of life, not just something tech bro&#8217;s talk about.</p><h3><strong>The Application Layer Pivot</strong></h3><p>Venture capitalist <a href="https://en.wikipedia.org/wiki/Chamath_Palihapitiya">Chamath Palihapitiya</a> made a point on <a href="https://open.spotify.com/episode/4DnvtKAwJA8oVZfvCZqiCe?si=8ce0c29951fd40f9">The All In Podcast E167 (16:30 onwards)</a> that's really about where the big opportunities are with AI. He mentioned how, back in the day, Cisco was a big deal because of the internet boom. But then, the real winners became the ones who used the internet to build new things&#8212;like all the apps and services we use today (Cisco was still doing great back then btw). He sees the same thing happening with AI. It's not just about the companies making the chips, like NVIDIA, but more about what people do with AI. One could thus argue that the true potential resides in the Application Layer&#8212;the myriad ways we can apply these tools to solve real-world problems.</p><p>The Application Layer isn't just about leveraging AI; it's about augmenting human potential. It's where entrepreneurs will find their next venture, where educators will discover new teaching tools, and where artists will birth new forms of expression. We are witnessing <a href="https://www.brookings.edu/articles/machines-of-mind-how-generative-ai-will-power-the-coming-productivity-boom/">an increase in individual productivity</a> that we have rarely seen historically. It's the playground for practical innovation, the bedrock of businesses that haven't been dreamed of yet, and the frontier for an inclusive technology revolution.</p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://applicationlayer.substack.com/?utm_source=substack&amp;utm_medium=email&amp;utm_content=share&amp;action=share&quot;,&quot;text&quot;:&quot;Share The Application Layer&quot;,&quot;action&quot;:null,&quot;class&quot;:&quot;button-wrapper&quot;}" data-component-name="ButtonCreateButton"><a class="button primary button-wrapper" href="https://applicationlayer.substack.com/?utm_source=substack&amp;utm_medium=email&amp;utm_content=share&amp;action=share"><span>Share The Application Layer</span></a></p><h3>A Collective Journey</h3><p>Life's fast, and technology's even faster. One day, we're all about green energy, and the next, we're figuring out how AI fits into our lives. It's a lot, and I'm here to help us both keep track.</p><p>In this newsletter, I&#8217;m aiming to break down the big stuff. We'll look at where business is going and what that means for us. Plus, I'll share how I'm using code to turn ideas into something real.</p><p>I'm keeping an eye on the big picture and the small details. I&#8217;m not just following the latest trends; I&#8217;m getting my hands dirty understanding them. And I'm not just using new tech; I&#8217;m learning it inside and out to see how it can help us.</p><p>But I'm not doing this alone. While I'm the one putting this together, it's about all of us. I want to start conversations, share what I learn, and hear from you too. I&#8217;m reaching out to pros, hobbyists, and anyone who&#8217;s curious to join in.</p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://applicationlayer.substack.com/p/the-application-layer/comments&quot;,&quot;text&quot;:&quot;Leave a comment&quot;,&quot;action&quot;:null,&quot;class&quot;:&quot;button-wrapper&quot;}" data-component-name="ButtonCreateButton"><a class="button primary button-wrapper" href="https://applicationlayer.substack.com/p/the-application-layer/comments"><span>Leave a comment</span></a></p><p>Every two weeks, I'll share what I've found. We&#8217;ll start with the broad view of what&#8217;s new in tech and business, and then get into the practical side of how it all works.</p><p>Let&#8217;s go on this tech adventure together.</p><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://applicationlayer.substack.com/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe&quot;,&quot;language&quot;:&quot;en&quot;}" data-component-name="SubscribeWidgetToDOM"><div class="subscription-widget show-subscribe"><div class="preamble"><p class="cta-caption">Thanks for reading The Application Layer! Subscribe to receive new posts and support my work.</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><h3>A Personal Note</h3><p>I&#8217;m an Amsterdam based Data Scientist that is gradually moving towards Software Development. After leaving Microsoft last year, I started my own company: Melchior Analytics. At MA, we're developing software solutions tailored for the financial sector, with our most notable clients being Booking.com and Maven11. On top of this, I&#8217;m co-developing an IOS application, which we aim to launch in H1, that let individuals keep track of their expenses in the easiest and most complete way. In my downtime, I enjoy the strategic game of chess and the endurance challenge of running marathons. Feel free to reach out if you want to chat about the newsletter or just have something fascinating to talk about.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!LOFj!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5efcb9c0-f141-41af-b07f-00daf75bc54a_876x896.jpeg" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!LOFj!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5efcb9c0-f141-41af-b07f-00daf75bc54a_876x896.jpeg 424w, https://substackcdn.com/image/fetch/$s_!LOFj!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5efcb9c0-f141-41af-b07f-00daf75bc54a_876x896.jpeg 848w, https://substackcdn.com/image/fetch/$s_!LOFj!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5efcb9c0-f141-41af-b07f-00daf75bc54a_876x896.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!LOFj!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5efcb9c0-f141-41af-b07f-00daf75bc54a_876x896.jpeg 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!LOFj!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5efcb9c0-f141-41af-b07f-00daf75bc54a_876x896.jpeg" width="314" height="321.1689497716895" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/5efcb9c0-f141-41af-b07f-00daf75bc54a_876x896.jpeg&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:896,&quot;width&quot;:876,&quot;resizeWidth&quot;:314,&quot;bytes&quot;:191852,&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;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!LOFj!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5efcb9c0-f141-41af-b07f-00daf75bc54a_876x896.jpeg 424w, https://substackcdn.com/image/fetch/$s_!LOFj!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5efcb9c0-f141-41af-b07f-00daf75bc54a_876x896.jpeg 848w, https://substackcdn.com/image/fetch/$s_!LOFj!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5efcb9c0-f141-41af-b07f-00daf75bc54a_876x896.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!LOFj!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5efcb9c0-f141-41af-b07f-00daf75bc54a_876x896.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"><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"><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"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://applicationlayer.substack.com/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe&quot;,&quot;language&quot;:&quot;en&quot;}" data-component-name="SubscribeWidgetToDOM"><div class="subscription-widget show-subscribe"><div class="preamble"><p class="cta-caption">Thanks for reading The Application Layer. Subscribe to receive the Application Layer and become part of the Community</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 class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://applicationlayer.substack.com/?utm_source=substack&amp;utm_medium=email&amp;utm_content=share&amp;action=share&quot;,&quot;text&quot;:&quot;Share The Application Layer&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://applicationlayer.substack.com/?utm_source=substack&amp;utm_medium=email&amp;utm_content=share&amp;action=share"><span>Share The Application Layer</span></a></p><div><hr></div>]]></content:encoded></item></channel></rss>