<?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[ggpush]]></title><description><![CDATA[AI, Startups and overall building cool sh#t]]></description><link>https://www.ggpush.dev</link><image><url>https://substackcdn.com/image/fetch/$s_!I-hE!,w_256,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0149bbc4-c231-4818-aec0-772bb5c4a165_512x512.png</url><title>ggpush</title><link>https://www.ggpush.dev</link></image><generator>Substack</generator><lastBuildDate>Tue, 19 May 2026 04:15:44 GMT</lastBuildDate><atom:link href="https://www.ggpush.dev/feed" rel="self" type="application/rss+xml"/><copyright><![CDATA[Ashfakh]]></copyright><language><![CDATA[en]]></language><webMaster><![CDATA[ggpush@substack.com]]></webMaster><itunes:owner><itunes:email><![CDATA[ggpush@substack.com]]></itunes:email><itunes:name><![CDATA[Ashfakh]]></itunes:name></itunes:owner><itunes:author><![CDATA[Ashfakh]]></itunes:author><googleplay:owner><![CDATA[ggpush@substack.com]]></googleplay:owner><googleplay:email><![CDATA[ggpush@substack.com]]></googleplay:email><googleplay:author><![CDATA[Ashfakh]]></googleplay:author><itunes:block><![CDATA[Yes]]></itunes:block><item><title><![CDATA[Everything is a programming problem.]]></title><description><![CDATA[The AGI moment for knowledge work is here]]></description><link>https://www.ggpush.dev/p/everything-is-a-programming-problem</link><guid isPermaLink="false">https://www.ggpush.dev/p/everything-is-a-programming-problem</guid><dc:creator><![CDATA[Ashfakh]]></dc:creator><pubDate>Fri, 19 Dec 2025 07:26:01 GMT</pubDate><enclosure url="https://substack-post-media.s3.amazonaws.com/public/images/ef7a94e2-e0a0-4e24-82cb-b8a6605829a3_1024x1024.jpeg" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>Over the past few weeks at Aqqrue, we&#8217;ve been rearchitecting our agent architecture in pursuit of a near-perfect accounting agent. The learning has been immense and, more often than not, quite humbling. Not because the problems are new, but because the capabilities of current models force you to confront how much of what we call &#8220;work&#8221; was always just latent computation waiting for the right substrate.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!Abm4!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9fb7f249-289a-4409-86d7-786796a52f99_2742x1078.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!Abm4!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9fb7f249-289a-4409-86d7-786796a52f99_2742x1078.png 424w, https://substackcdn.com/image/fetch/$s_!Abm4!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9fb7f249-289a-4409-86d7-786796a52f99_2742x1078.png 848w, https://substackcdn.com/image/fetch/$s_!Abm4!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9fb7f249-289a-4409-86d7-786796a52f99_2742x1078.png 1272w, https://substackcdn.com/image/fetch/$s_!Abm4!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9fb7f249-289a-4409-86d7-786796a52f99_2742x1078.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!Abm4!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9fb7f249-289a-4409-86d7-786796a52f99_2742x1078.png" width="1456" height="572" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/9fb7f249-289a-4409-86d7-786796a52f99_2742x1078.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:572,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:664367,&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://www.ggpush.dev/i/181378010?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9fb7f249-289a-4409-86d7-786796a52f99_2742x1078.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_!Abm4!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9fb7f249-289a-4409-86d7-786796a52f99_2742x1078.png 424w, https://substackcdn.com/image/fetch/$s_!Abm4!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9fb7f249-289a-4409-86d7-786796a52f99_2742x1078.png 848w, https://substackcdn.com/image/fetch/$s_!Abm4!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9fb7f249-289a-4409-86d7-786796a52f99_2742x1078.png 1272w, https://substackcdn.com/image/fetch/$s_!Abm4!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9fb7f249-289a-4409-86d7-786796a52f99_2742x1078.png 1456w" sizes="100vw" fetchpriority="high"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>That experience made me want to step back and reflect, on what is being built across the world in the name of AI/Agents. More importantly, it made me want to understand what <em>work</em> actually means in a post-LLM world.</p><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://www.ggpush.dev/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 ggpush! 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>For the purpose of this article, I&#8217;m deliberately limiting scope to <strong>knowledge work performed on a computer</strong>. Physical labor and robotics are out of scope, not because they are less important, but because they will likely be solved via a parallel path: better actuators controlled by increasingly capable models. The ideas here will apply there too, just perhaps later.</p><div><hr></div><p>At its core, One can consider work to be the transformation of inputs into outputs under constraints. For most of human history, <em>this transformation was physical</em>. Wood  carved into furniture, Iron beaten into Tools, Rock crushed into foundation and beams. But Over time, especially in the last few decades, a large and growing class of work became <em>symbolic</em> performed using numbers, categories, text, and rules. </p><p>Most modern jobs, be it in finance, operations, legal, analytics, support, compliance etc. exist almost entirely in this symbolic world. They don&#8217;t differ in essence. They differ only in <em><strong>which symbols they manipulate</strong></em><strong> and </strong><em><strong>which rules they apply</strong></em>.</p><p>Knowledge work, then, is not so much thinking as it is execution. Humans temporarily lend their cognitive machinery to the task: ingest symbols, transform them under constraint, emit updated symbols, and clear state. Over time, this looping behavior hardens and evolves into roles, titles, and careers and even to a life well lived.</p><p>But at its core, it remains a simple computational pattern. Human mind, which is a general purpose computer is programmed to perform the task.</p><p>And we invented computers to accelerate that very computational patterns.  And as we all know, it worked spectacularly. </p><p>Software multiplied human output. The amount of work one person could do expanded dramatically, depending on which software they had access to. Entire categories of effort collapsed. Tasks that once took teams could now be handled by one person with the right tools. We all got faster. Louder. More productive.</p><p>It was true progress.</p><p><strong>But software came with two fundamental constraints.</strong></p><p><em><strong>It was rigid. And it was expensive.</strong></em></p><p>Rigid, because software demands that the world be described in advance. Someone has to decide the flows, define the states, enumerate the edge cases, and design interfaces that attempt to shepherd messy human reality into clean, pre-approved paths. A great deal of modern product development has been about this act of compression: forcing open-ended human work into rigid frameworks that can be coded, shipped, and supported.</p><p>Once deployed, software does what it was told to do. no more, no less. In the era of software burned onto CDs, this rigidity was physical. In the cloud era, it became procedural: CI pipelines, release cycles, migrations. Faster, but still fundamentally frozen at any given moment in time.</p><p>And software was expensive because specifying all that logic required specialists. Programmers became some of the most highly paid people on the planet, not because typing code is magical, but because translating ambiguous human work into deterministic systems is brutally hard. We spent billions, trillions to build B2B SaaS to encode how organizations believed work <em>should</em> happen.</p><p>Marc Andreessen famously called this &#8220;software eating the world.&#8221; <br>What that really meant was software eating <em>human judgment</em>, one rigid abstraction at a time.</p><p>And yet, even as software spread everywhere, humans never quite left the loop. They bent the tools. Worked around them. Filled the gaps. Became the glue between systems that couldn&#8217;t fully understand each other. </p><p><em><strong>And we built software that appealed to humans and humans only</strong></em></p><p>That was until recently.</p><p>I recently re-read one of my favourite essays, <a href="https://web.stanford.edu/class/cs81n/command.txt">In the Beginning was the Command Line</a> (Must read if you love computers and programming)</p><pre><code><em>Back in the days of the command-line interface, users were all Morlocks who had to convert their thoughts into alphanumeric symbols and type them in, a grindingly tedious process that stripped away all ambiguity, laid bare all hidden assumptions, and cruelly punished laziness and imprecision. Then the interface-makers went to work on their GUIs, and introduced a new semiotic layer between people and machines. People who use such systems have abdicated the responsibility, and surrendered the power, of sending bits directly to the chip that&#8217;s doing the arithmetic, and handed that responsibility and power over to the OS. This is tempting because giving clear instructions, to anyone or anything, is difficult. We cannot do it without thinking, and depending on the complexity of the situation, we may have to think hard about abstract things, and consider any number of ramifications, in order to do a good job of it. For most of us, this is hard work. We want things to be easier. How badly we want it can be measured by the size of Bill Gates&#8217;s fortune.

The OS has (therefore) become a sort of intellectual labor-saving device that tries to translate humans&#8217; vaguely expressed intentions into bits. In effect we are asking our computers to shoulder responsibilities that have always been considered the province of human beings--we want them to understand our desires, to anticipate our needs, to foresee consequences, to make connections, to handle routine chores without being asked, to remind us of what we ought to be reminded of while filtering out noise.</em></code></pre><p>Neal Stephenson, talks about the computers and OSes, and how they have evolved over the past few decades after personal computing became a thing. How we explicitly rejected word-based interfaces (CLI i &lt;3 u) for more Graphical and Sensorial interfaces purely to dumb down their capabilities for the masses.</p><p>Graphical interfaces were bolted onto rigid systems not because computers needed them, but because <em>humans did</em>.</p><p>Software required precise instructions, exact inputs, and unwavering obedience to predefined rules. The GUI existed to translate messy human intent into something a deterministic machine could tolerate.</p><p>Humans would do the interpretation, and Software would do the execution.</p><p>But that arrangement only made sense as long as machines couldn&#8217;t interpret intent on their own.</p><p>If most knowledge work is programmable logic, and if we now have systems that can <em>write that program</em>, <em>run it</em>, <em>evaluate the result</em>, and <em>revise it when reality disagrees</em>, then the obvious question presents itself:</p><p>What role is left for a human to play in executing the work itself?</p><div><hr></div><p>A model with access to a runtime environment and a file system is, for all practical purposes, as close to artificial general intelligence as knowledge work demands. Not because it can &#8220;think like a human,&#8221; but because it no longer needs a human to act as the execution layer.</p><ul><li><p>the ability to read and write files, This is your memory</p></li><li><p>the ability to execute programs in an environment, This is your action</p></li><li><p>and the ability to observe the results and iterate, This is your feedback</p></li></ul><p>That&#8217;s the entire so-called agentic loop.</p><p>With this setup, the agent can ingest information, store it, transform it, generate new tools for itself, run them, evaluate the results, and revise its approach. It can externalise state, reason over it, and operate indefinitely without relying on fragile context windows or human intervention.</p><p><em><strong>You don&#8217;t need a cathedral of agent architecture.</strong></em></p><p>As models improve, they will learn to manage their own context: compact it, reorganize it, and project it outward into durable representations. The file system becomes a knowledge base. The environment becomes an extension of the model&#8217;s cognition. What looks like &#8220;agent design&#8221; today will eventually collapse into capability.</p><p>This is why the moment I used Claude Code, something clicked in a way it hadn&#8217;t with tools like Cursor.</p><p>Not because it was smarter in isolation, but because it <em><strong>inhabited</strong></em> an environment.</p><p>A system that could enter a directory, inspect the terrain, create artifacts, modify them, run them, observe what happened, and keep going.</p><p>The quality of work then boils down into how long these agents can run autonomously. It&#8217;s a function of inference time and inference cost, both of which is guaranteed to reduce. (Moore&#8217;s law ftw)</p><div><hr></div><p>Knowledge work doesn&#8217;t require consciousness, intuition, or creativity in the mystical sense we often attribute to it. It requires a loop: read symbols, transform them under constraints, emit new symbols, and verify the result.</p><p>And this is why coding agents like Cursor, Claude Code, Replit, v0, and Lovable are sitting on top of a gold mine.</p><p>Not because they help people write code faster, but because they sit directly inside the fundamental loop of what could be the future of knowledge work.</p><p>Every interaction a user has with these systems, every correction, every nudge, every moment of <em>&#8220;no, not like that, like this&#8221;</em> is a signal. A lightweight but extraordinarily high-quality form of reinforcement. A human acting as a sparse reward function, guiding the system toward intent.</p><p>The user isn&#8217;t just producing software. They&#8217;re teaching the system how to converge: fewer steps and fewer errors. Over time, the iterations shrink. The feedback becomes implicit. What once required an explicit human controller gets internalized by the model itself.</p><p><em><strong>Tighter alignment over intent is what these models need to achieve.</strong></em></p><p>This is a compounding advantage. and most likely why these companies command the valuations they do.</p><p>The closer a system sits to execution, and the more tightly it couples action with feedback, the faster it learns to do the work on its own.</p><p>Which brings us to the uncomfortable implication for anyone trying to build agents for knowledge work.</p><p>If everything is a programming problem, then <strong>code is the most natural substrate for agents to operate on</strong>. Large language models already understand it deeply, not by accident, but by virtue of their training. Code is abundant in their corpus, structured in a way that mirrors reasoning, and, crucially, <em>verifiable</em>. It produces outputs that can be tested, evaluated, and rewarded with precision.</p><p>Any serious agent for knowledge work will need to:</p><ul><li><p>generate code to express intent,</p></li><li><p>execute that code in a real environment,</p></li><li><p>observe the results,</p></li><li><p>and iterate until the outcome matches the goal.</p></li></ul><p>On top of that, the file system alone might not be enough. Real work requires durable context: business-facing data models that act as a structured knowledge base, connectors that bridge systems of record, and powerful, composable APIs that agents can use as tools.</p><p><em><strong>What we ultimately need to build is a Run time tailored for a specific kind of work.</strong></em></p><div class="pullquote"><p><em><strong>Everything is a programming problem</strong></em></p></div><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://www.ggpush.dev/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 ggpush! 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 class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://www.ggpush.dev/p/everything-is-a-programming-problem/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://www.ggpush.dev/p/everything-is-a-programming-problem/comments"><span>Leave a comment</span></a></p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://www.ggpush.dev/p/everything-is-a-programming-problem?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://www.ggpush.dev/p/everything-is-a-programming-problem?utm_source=substack&utm_medium=email&utm_content=share&action=share"><span>Share</span></a></p>]]></content:encoded></item><item><title><![CDATA[The Automation Fallacy]]></title><description><![CDATA[Why your AI Agents will fail.]]></description><link>https://www.ggpush.dev/p/the-automation-fallacy</link><guid isPermaLink="false">https://www.ggpush.dev/p/the-automation-fallacy</guid><dc:creator><![CDATA[Ashfakh]]></dc:creator><pubDate>Mon, 25 Aug 2025 09:46:28 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!AdHe!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0e337685-0057-4745-a21b-23f1a0c42060_1536x1024.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>The biggest promise of AI Agents is that <strong>they&#8217;ll reliably perform tasks on our behalf</strong>. In theory, they could step in as a <strong>drop in replacement</strong> for anyone handling that job and keep things running without intervention, except for the occasional <strong>policy mandated checks</strong>.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!AdHe!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0e337685-0057-4745-a21b-23f1a0c42060_1536x1024.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!AdHe!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0e337685-0057-4745-a21b-23f1a0c42060_1536x1024.png 424w, https://substackcdn.com/image/fetch/$s_!AdHe!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0e337685-0057-4745-a21b-23f1a0c42060_1536x1024.png 848w, https://substackcdn.com/image/fetch/$s_!AdHe!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0e337685-0057-4745-a21b-23f1a0c42060_1536x1024.png 1272w, https://substackcdn.com/image/fetch/$s_!AdHe!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0e337685-0057-4745-a21b-23f1a0c42060_1536x1024.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!AdHe!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0e337685-0057-4745-a21b-23f1a0c42060_1536x1024.png" width="1456" height="971" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/0e337685-0057-4745-a21b-23f1a0c42060_1536x1024.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:971,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;Generated image&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="Generated image" title="Generated image" srcset="https://substackcdn.com/image/fetch/$s_!AdHe!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0e337685-0057-4745-a21b-23f1a0c42060_1536x1024.png 424w, https://substackcdn.com/image/fetch/$s_!AdHe!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0e337685-0057-4745-a21b-23f1a0c42060_1536x1024.png 848w, https://substackcdn.com/image/fetch/$s_!AdHe!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0e337685-0057-4745-a21b-23f1a0c42060_1536x1024.png 1272w, https://substackcdn.com/image/fetch/$s_!AdHe!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0e337685-0057-4745-a21b-23f1a0c42060_1536x1024.png 1456w" sizes="100vw" fetchpriority="high"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p><em><strong>That vision is exciting, but In reality, we&#8217;re still a ways off from complete autonomous agents</strong></em></p><p>Right now, what works best is a <strong>Human-in-the-Loop (HITL)</strong> approach. These systems don&#8217;t replace people entirely but rather <strong>automate large, repetitive chunks</strong> of work so the human can step in only where it matters most. This doesn&#8217;t just make life easier for individuals, it unlocks a lot of value for teams. <strong>It helps them stay leaner, yet still grow faster.</strong></p><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://www.ggpush.dev/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 ggpush! 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><div><hr></div><h3>The Automation Fallacy</h3><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!8olY!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fde468847-4023-4183-a2b2-57011b305a94_1536x1024.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!8olY!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fde468847-4023-4183-a2b2-57011b305a94_1536x1024.png 424w, https://substackcdn.com/image/fetch/$s_!8olY!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fde468847-4023-4183-a2b2-57011b305a94_1536x1024.png 848w, https://substackcdn.com/image/fetch/$s_!8olY!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fde468847-4023-4183-a2b2-57011b305a94_1536x1024.png 1272w, https://substackcdn.com/image/fetch/$s_!8olY!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fde468847-4023-4183-a2b2-57011b305a94_1536x1024.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!8olY!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fde468847-4023-4183-a2b2-57011b305a94_1536x1024.png" width="1456" height="971" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/de468847-4023-4183-a2b2-57011b305a94_1536x1024.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:971,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;Generated image&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="Generated image" title="Generated image" srcset="https://substackcdn.com/image/fetch/$s_!8olY!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fde468847-4023-4183-a2b2-57011b305a94_1536x1024.png 424w, https://substackcdn.com/image/fetch/$s_!8olY!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fde468847-4023-4183-a2b2-57011b305a94_1536x1024.png 848w, https://substackcdn.com/image/fetch/$s_!8olY!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fde468847-4023-4183-a2b2-57011b305a94_1536x1024.png 1272w, https://substackcdn.com/image/fetch/$s_!8olY!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fde468847-4023-4183-a2b2-57011b305a94_1536x1024.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 role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>It&#8217;s tempting to think the math is straightforward. If an AI automates 50% of a task, the human becomes 2x more productive. If it automates 80%, suddenly they&#8217;re 5x more productive. Logical, right?</p><p><em><strong>Unfortunately, that assumption is completely wrong.</strong></em></p><p>Most <strong>tasks just aren&#8217;t linear in nature</strong>. Automation almost always starts by tackling the low hanging fruit which consists of the repetitive, structured steps that are easiest to codify. As the system improves, you might reach 80% coverage and feel confident you&#8217;ve unlocked huge value.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!ArHn!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F750e97bd-7c96-4b07-ad57-ed79a2205f5a_2124x1326.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!ArHn!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F750e97bd-7c96-4b07-ad57-ed79a2205f5a_2124x1326.png 424w, https://substackcdn.com/image/fetch/$s_!ArHn!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F750e97bd-7c96-4b07-ad57-ed79a2205f5a_2124x1326.png 848w, https://substackcdn.com/image/fetch/$s_!ArHn!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F750e97bd-7c96-4b07-ad57-ed79a2205f5a_2124x1326.png 1272w, https://substackcdn.com/image/fetch/$s_!ArHn!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F750e97bd-7c96-4b07-ad57-ed79a2205f5a_2124x1326.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!ArHn!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F750e97bd-7c96-4b07-ad57-ed79a2205f5a_2124x1326.png" width="1456" height="909" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/750e97bd-7c96-4b07-ad57-ed79a2205f5a_2124x1326.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:909,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:425871,&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://www.ggpush.dev/i/171864834?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F750e97bd-7c96-4b07-ad57-ed79a2205f5a_2124x1326.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_!ArHn!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F750e97bd-7c96-4b07-ad57-ed79a2205f5a_2124x1326.png 424w, https://substackcdn.com/image/fetch/$s_!ArHn!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F750e97bd-7c96-4b07-ad57-ed79a2205f5a_2124x1326.png 848w, https://substackcdn.com/image/fetch/$s_!ArHn!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F750e97bd-7c96-4b07-ad57-ed79a2205f5a_2124x1326.png 1272w, https://substackcdn.com/image/fetch/$s_!ArHn!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F750e97bd-7c96-4b07-ad57-ed79a2205f5a_2124x1326.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p><em><strong>But the catch is that the last 20% is the hardest part, and it gets even harder because of the context loss.</strong></em></p><p>When a person has to step in at that point, they&#8217;re not continuing smoothly from where the AI left off. Instead, they face three compounding problems:</p><ol><li><p><strong>Lost context</strong> &#8211; they don&#8217;t know how or <strong>why the agent made certain decisions.</strong></p></li><li><p><strong>Extra effort</strong> &#8211; they may <strong>need to validate</strong> or even redo what the agent did before moving forward.</p></li><li><p><strong>Broken flow</strong> &#8211; <strong>Fixing up stuff often takes longer</strong> than just doing the whole job from scratch.</p></li><li><p><strong>Rigid flow</strong> &#8211; the agent&#8217;s process or <strong>agentic workflow is often too fixed</strong>. It doesn&#8217;t adapt or learn from how the human finishes the task, so the <strong>automation is stuck at 80%</strong> instead of flexibly moving toward 90% and even more.</p></li></ol><p>So that final 20% can sometimes <strong>take more time</strong> than it would have to complete the entire task manually. Instead of making people 5x more productive, partial automation risks slowing them down. </p><p><em><strong>This is also why AI agents often fails during pilots, even if with their fantastic capabilities and mind blowing demos.</strong></em></p><p>To give an example, a coding agent might generate 80% of your code, They can one shot entire classes, data models, migrations, everything. That&#8217;s impressive and saves time upfront. But if the structure isn&#8217;t quite right with respect to your design principles, or if the logic doesn&#8217;t fully match the business rules, the developer now has to dive in and untangle someone else&#8217;s half-finished work. </p><p><em><strong>And if you&#8217;ve worked with developers, you know that there&#8217;s nothing they hate more than cleaning up someone else&#8217;s half-baked code, except for maybe meetings </strong></em><strong>&#128540;</strong></p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!t4wz!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F208b29df-5d38-4640-a508-1d8f101cbff3_1536x1024.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!t4wz!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F208b29df-5d38-4640-a508-1d8f101cbff3_1536x1024.png 424w, https://substackcdn.com/image/fetch/$s_!t4wz!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F208b29df-5d38-4640-a508-1d8f101cbff3_1536x1024.png 848w, https://substackcdn.com/image/fetch/$s_!t4wz!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F208b29df-5d38-4640-a508-1d8f101cbff3_1536x1024.png 1272w, https://substackcdn.com/image/fetch/$s_!t4wz!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F208b29df-5d38-4640-a508-1d8f101cbff3_1536x1024.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!t4wz!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F208b29df-5d38-4640-a508-1d8f101cbff3_1536x1024.png" width="1456" height="971" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/208b29df-5d38-4640-a508-1d8f101cbff3_1536x1024.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:971,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;Generated image&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="Generated image" title="Generated image" srcset="https://substackcdn.com/image/fetch/$s_!t4wz!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F208b29df-5d38-4640-a508-1d8f101cbff3_1536x1024.png 424w, https://substackcdn.com/image/fetch/$s_!t4wz!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F208b29df-5d38-4640-a508-1d8f101cbff3_1536x1024.png 848w, https://substackcdn.com/image/fetch/$s_!t4wz!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F208b29df-5d38-4640-a508-1d8f101cbff3_1536x1024.png 1272w, https://substackcdn.com/image/fetch/$s_!t4wz!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F208b29df-5d38-4640-a508-1d8f101cbff3_1536x1024.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>This isn&#8217;t unique to coding tho. it&#8217;s the same dynamic in other domains like accounting, report generation, customer support, or data analysis. <strong>Automating the &#8220;easy&#8221; parts feels like progress in theory</strong>, but without proper context handoff, it just doesn&#8217;t make much difference to end user.</p><div><hr></div><h3>Where Partial Automation Still Works</h3><p>This doesn&#8217;t mean partial automation has no value, It just means it must be designed thoughtfully. Two principles matter most:</p><ul><li><p><strong>Seamless handoff</strong>: The AI needs to <strong>pass contex</strong>t in a way that makes it easy for a human to pick up where it left off. <strong>Summaries, structured outputs, or clear audit trails can eliminate the need for reverse engineering.</strong></p></li><li><p><strong>End-to-end sub-tasks</strong>: Instead of doing 80% of <em>every</em> job, agents should <strong>fully own specific, repeatable sub-jobs</strong>. Do end to end account mapping, Create Draft entries. Triage and route the customer ticket. <strong>The human then steps in only when judgment or nuance is required</strong>.</p></li></ul><p>This shift in design turns HITL into an amplifier rather than a bottleneck.<em><strong> </strong></em></p><p><em><strong>But the real silver bullet is Agentic Memory.</strong></em></p><p>The real unlock for AI agents won&#8217;t just come from better models or faster automation, rather it will come from <strong>adaptiveness</strong>. The biggest frustration with today&#8217;s partial automation is that it&#8217;s rigid. Agent makes its best guess, the human cleans it up, and the agent learns nothing from that cleanup. Next time, the same gaps appear, and the cycle repeats.</p><p>What&#8217;s missing is <strong>agentic memory</strong>, <strong>a</strong> <strong>policy layer that allows agents to watch, record, and internalize how humans finish the last mile</strong>. Instead of getting stuck at 80% coverage, the system uses every correction as fuel to stretch toward 90%, even 95%.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!zSmw!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbe65d609-16ee-4c50-b074-c7065f55af9f_1536x1024.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!zSmw!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbe65d609-16ee-4c50-b074-c7065f55af9f_1536x1024.png 424w, https://substackcdn.com/image/fetch/$s_!zSmw!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbe65d609-16ee-4c50-b074-c7065f55af9f_1536x1024.png 848w, https://substackcdn.com/image/fetch/$s_!zSmw!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbe65d609-16ee-4c50-b074-c7065f55af9f_1536x1024.png 1272w, https://substackcdn.com/image/fetch/$s_!zSmw!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbe65d609-16ee-4c50-b074-c7065f55af9f_1536x1024.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!zSmw!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbe65d609-16ee-4c50-b074-c7065f55af9f_1536x1024.png" width="1456" height="971" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/be65d609-16ee-4c50-b074-c7065f55af9f_1536x1024.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:971,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;Generated image&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="Generated image" title="Generated image" srcset="https://substackcdn.com/image/fetch/$s_!zSmw!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbe65d609-16ee-4c50-b074-c7065f55af9f_1536x1024.png 424w, https://substackcdn.com/image/fetch/$s_!zSmw!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbe65d609-16ee-4c50-b074-c7065f55af9f_1536x1024.png 848w, https://substackcdn.com/image/fetch/$s_!zSmw!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbe65d609-16ee-4c50-b074-c7065f55af9f_1536x1024.png 1272w, https://substackcdn.com/image/fetch/$s_!zSmw!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbe65d609-16ee-4c50-b074-c7065f55af9f_1536x1024.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>This creates two powerful effects:</p><ul><li><p><strong>Compounding automation</strong> &#8211; over time, the agent doesn&#8217;t just do more of the work, <strong>it does more of the </strong><em><strong>right</strong></em><strong> work</strong>, tailored to the team&#8217;s rules and preferences.</p></li><li><p><strong>Stickiness</strong> &#8211; because the agent adapts to the unique workflows of its users, <strong>switching away from it feels costly</strong>. It doesn&#8217;t just automate tasks; it remembers how you do them.</p></li></ul><p>In other words, the way past the Last 20% Problem isn&#8217;t just brute force improvements. it&#8217;s giving agents memory and adaptiveness, so they become collaborative partners that grow more capable the longer they&#8217;re in the loop.</p><div><hr></div><p><em><strong>The true promise of AI Agents isn&#8217;t about nibbling away at tasks in percentages.</strong></em> </p><p>It&#8217;s about taking full ownership of well-bounded, repeatable workstreams so that humans can focus on the parts of the job that require context, creativity, and/or decision-making.</p><p>Instead of thinking, <em>&#8220;We&#8217;ve automated 80% of this task, so we&#8217;ve doubled productivity,&#8221;</em> the better framing is: <em>&#8220;We&#8217;ve automated this entire sub-task end-to-end, so humans never have to think about it again.&#8221;</em></p><p><em><strong>Humans and agents should fully own meaningful slices of work, end-to-end. Like a well oiled machine, Their work should be complimentary,  not tripping each other up.</strong></em></p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://www.ggpush.dev/p/the-automation-fallacy/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://www.ggpush.dev/p/the-automation-fallacy/comments"><span>Leave a comment</span></a></p><div class="directMessage button" data-attrs="{&quot;userId&quot;:134587815,&quot;userName&quot;:&quot;Ashfakh&quot;,&quot;canDm&quot;:null,&quot;dmUpgradeOptions&quot;:null,&quot;isEditorNode&quot;:true}" data-component-name="DirectMessageToDOM"></div><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://www.ggpush.dev/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 ggpush! 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 Age of Agents]]></title><description><![CDATA[The Autonomous Era is already here.]]></description><link>https://www.ggpush.dev/p/the-age-of-agents</link><guid isPermaLink="false">https://www.ggpush.dev/p/the-age-of-agents</guid><dc:creator><![CDATA[Ashfakh]]></dc:creator><pubDate>Wed, 06 Aug 2025 08:54:12 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!OUfq!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa718507d-aa1d-4dee-8d46-1bda380bb3d7_1536x1024.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<blockquote><p><em><strong>&#8220;The best way to predict the future is to invent it.</strong>&#8221;</em>  - Alan&#8239;Kay</p></blockquote><p>From Asimov&#8217;s I, Robot to The Electric Slate, Metropolis&#8217;s Maria to HAL 9000, from JARVIS to <em>Her</em>, <strong>some of our best stories have dreamt aloud about machines that could think, feel, and act with purpose</strong>.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!OUfq!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa718507d-aa1d-4dee-8d46-1bda380bb3d7_1536x1024.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!OUfq!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa718507d-aa1d-4dee-8d46-1bda380bb3d7_1536x1024.png 424w, https://substackcdn.com/image/fetch/$s_!OUfq!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa718507d-aa1d-4dee-8d46-1bda380bb3d7_1536x1024.png 848w, https://substackcdn.com/image/fetch/$s_!OUfq!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa718507d-aa1d-4dee-8d46-1bda380bb3d7_1536x1024.png 1272w, https://substackcdn.com/image/fetch/$s_!OUfq!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa718507d-aa1d-4dee-8d46-1bda380bb3d7_1536x1024.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!OUfq!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa718507d-aa1d-4dee-8d46-1bda380bb3d7_1536x1024.png" width="1456" height="971" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/a718507d-aa1d-4dee-8d46-1bda380bb3d7_1536x1024.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:971,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;Generated image&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="Generated image" title="Generated image" srcset="https://substackcdn.com/image/fetch/$s_!OUfq!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa718507d-aa1d-4dee-8d46-1bda380bb3d7_1536x1024.png 424w, https://substackcdn.com/image/fetch/$s_!OUfq!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa718507d-aa1d-4dee-8d46-1bda380bb3d7_1536x1024.png 848w, https://substackcdn.com/image/fetch/$s_!OUfq!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa718507d-aa1d-4dee-8d46-1bda380bb3d7_1536x1024.png 1272w, https://substackcdn.com/image/fetch/$s_!OUfq!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa718507d-aa1d-4dee-8d46-1bda380bb3d7_1536x1024.png 1456w" sizes="100vw" fetchpriority="high"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p><em><strong>Automatons, androids, agents</strong></em>. They&#8217;ve all flickered across our screens as both warnings and promises. But up until two-three years ago, they all just felt like a promise of the future.</p><p>But that&#8217;s no longer the case. <strong>The Autonomous Era is finally here</strong>. And it&#8217;s here to stay.</p><p>These last few years, The future of large&#8209;language&#8209;model (LLM) applications has been invented in real time and it&#8217;s moving at a pace so fast that it has become extremely hard to keep up. </p><p><strong>2023 was the era of </strong><em><strong>workflows</strong></em>. We built multistep, hand&#8209;crafted LLM pipelines. This brought about a flavour if intelligence to what was our traditional deterministic software. </p><p><em><strong>But that was just the beginning</strong></em></p><p>By mid&#8209;2024 we discovered <em>ReAct</em>&#8209;style agents that could reason and decide which tool to call next. The first time I witnessed a <em>ReAct </em>Agent, I was truly mesmerised. This was a step shift in how jobs are being done. It was a glimpse into the possible overhaul of the entire Software Industry to a more Services outcome, Without the massive ops overhead of course. </p><p><strong>Quite containerised agents sitting in some server in a cold dark datacenter quitely doing their jobs. &#8220;The Ideal Worker&#8221; (Sounds a little dystopian, but these are machines :P)</strong></p><p>But just six months later, In 2025 we&#8217;re witnessing a quieter but more profound shift, <strong>Planning&#8239;Agent </strong>architectures that decompose, delegate and adapt the way an experienced project manager would.</p><p>Below is a practical tour of that evolution, plus copy&#8209;and&#8209;pasteable code you can steal for your own stack (All code is merely representative. I am working on open sourcing a comprehensive framework for Agent creation, But that&#8217;s for another time &#128578;)</p><div><hr></div><h3>Boring old workflows FTW</h3><p>I&#8217;ve written extensively about Workflow based *agents, and I still believe they will be the back bone of a lot of the more deterministic, performance based software for the foreseeable future. You can read more about them on my previous posts. </p><p>Linking the first part here:</p><div class="digest-post-embed" data-attrs="{&quot;nodeId&quot;:&quot;adfb11b1-f87a-4ca9-bd18-3abdb4f7f91b&quot;,&quot;caption&quot;:&quot;You&#8217;re not building &#8220;AI&#8221;, At best, you&#8217;re mimicking it&quot;,&quot;cta&quot;:&quot;Read full story&quot;,&quot;showBylines&quot;:true,&quot;size&quot;:&quot;sm&quot;,&quot;isEditorNode&quot;:true,&quot;title&quot;:&quot;Building Production grade AI Agents - Part 1&quot;,&quot;publishedBylines&quot;:[{&quot;id&quot;:134587815,&quot;name&quot;:&quot;Ashfakh&quot;,&quot;bio&quot;:&quot;Engineer, T(h)inkerer, Dreamer&quot;,&quot;photo_url&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/d1f777f0-209c-49d7-8054-045a527cc2c6_604x604.jpeg&quot;,&quot;is_guest&quot;:false,&quot;bestseller_tier&quot;:null}],&quot;post_date&quot;:&quot;2024-11-26T10:23:55.926Z&quot;,&quot;cover_image&quot;:&quot;https://substackcdn.com/image/fetch/$s_!9g5P!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F26411f9d-60cc-4d6c-b6cf-6bc57f174a38_2310x1056.png&quot;,&quot;cover_image_alt&quot;:null,&quot;canonical_url&quot;:&quot;https://www.ggpush.dev/p/building-production-grade-ai-agents&quot;,&quot;section_name&quot;:null,&quot;video_upload_id&quot;:null,&quot;id&quot;:150975103,&quot;type&quot;:&quot;newsletter&quot;,&quot;reaction_count&quot;:10,&quot;comment_count&quot;:0,&quot;publication_id&quot;:null,&quot;publication_name&quot;:&quot;ggpush&quot;,&quot;publication_logo_url&quot;:&quot;https://substackcdn.com/image/fetch/$s_!I-hE!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0149bbc4-c231-4818-aec0-772bb5c4a165_512x512.png&quot;,&quot;belowTheFold&quot;:true,&quot;youtube_url&quot;:null,&quot;show_links&quot;:null,&quot;feed_url&quot;:null}"></div><p>To recap, Workflow LLM apps chained calls in a fixed order. You&#8217;d wire together &#8220;summarise &#8594; extract &#8594; generate&#8221; and hope for an outcome that best fits your needs.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!HYfU!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F870751b1-9f6b-4dfb-8cd3-c94a300421d5_1024x1024.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!HYfU!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F870751b1-9f6b-4dfb-8cd3-c94a300421d5_1024x1024.png 424w, https://substackcdn.com/image/fetch/$s_!HYfU!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F870751b1-9f6b-4dfb-8cd3-c94a300421d5_1024x1024.png 848w, https://substackcdn.com/image/fetch/$s_!HYfU!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F870751b1-9f6b-4dfb-8cd3-c94a300421d5_1024x1024.png 1272w, https://substackcdn.com/image/fetch/$s_!HYfU!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F870751b1-9f6b-4dfb-8cd3-c94a300421d5_1024x1024.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!HYfU!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F870751b1-9f6b-4dfb-8cd3-c94a300421d5_1024x1024.png" width="1024" height="1024" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/870751b1-9f6b-4dfb-8cd3-c94a300421d5_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;:null,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;Generated image&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="Generated image" title="Generated image" srcset="https://substackcdn.com/image/fetch/$s_!HYfU!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F870751b1-9f6b-4dfb-8cd3-c94a300421d5_1024x1024.png 424w, https://substackcdn.com/image/fetch/$s_!HYfU!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F870751b1-9f6b-4dfb-8cd3-c94a300421d5_1024x1024.png 848w, https://substackcdn.com/image/fetch/$s_!HYfU!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F870751b1-9f6b-4dfb-8cd3-c94a300421d5_1024x1024.png 1272w, https://substackcdn.com/image/fetch/$s_!HYfU!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F870751b1-9f6b-4dfb-8cd3-c94a300421d5_1024x1024.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><pre><code>class WorkflowEngine:
    def __init__(self, llm_client):
        self.llm = llm_client
        self.steps = []

    async def execute(self, input_data):
        ctx = {"input": input_data}

        for step in self.steps:
            resp = await self.llm.generate(
                messages=[
                    {"role": "system", "content": step.system_prompt},
                    {"role": "user", "content": step.format_input(ctx)}
                ]
            )
            ctx[step.output_key] = resp.content

        return ctx["final_output"]
</code></pre><p>LLM Workflows are predictable, more performant and more reliable for production use cases. But they&#8217;ve some major disadvantages too. It&#8217;s inflexible and it doesn&#8217;t handle all edge cases on its own much like traditional software.</p><p><em>&#9989; Predictable&#8239;&#183;&#8239;&#10060; Inflexible&#8239;&#183;&#8239;&#10060; Breaks on edge cases</em></p><div><hr></div><h3>&#8239;Autonomous Agents: The ReAct Breakthrough</h3><p>ReAct (&#8220;<strong>Re</strong>ason + <strong>Act</strong>&#8221;) let models think step&#8209;by&#8209;step, decide which tool to use, observe the result, then think again. When it first came out, It felt like magic and quickly became the backbone of projects like <a href="https://github.com/Significant-Gravitas/Auto-GPT">AutoGPT</a> and <a href="https://github.com/yoheinakajima/babyagi">BabyAGI</a>.<br><em>Paper</em>: <a href="https://arxiv.org/abs/2210.03629">ReAct: Synergizing Reasoning and Acting in Language Models</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_!uptI!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Faf9c8743-aad0-4f66-b23b-e9bb9f98e078_1024x1024.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!uptI!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Faf9c8743-aad0-4f66-b23b-e9bb9f98e078_1024x1024.png 424w, https://substackcdn.com/image/fetch/$s_!uptI!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Faf9c8743-aad0-4f66-b23b-e9bb9f98e078_1024x1024.png 848w, https://substackcdn.com/image/fetch/$s_!uptI!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Faf9c8743-aad0-4f66-b23b-e9bb9f98e078_1024x1024.png 1272w, https://substackcdn.com/image/fetch/$s_!uptI!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Faf9c8743-aad0-4f66-b23b-e9bb9f98e078_1024x1024.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!uptI!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Faf9c8743-aad0-4f66-b23b-e9bb9f98e078_1024x1024.png" width="1024" height="1024" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/af9c8743-aad0-4f66-b23b-e9bb9f98e078_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;:null,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;Generated image&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="Generated image" title="Generated image" srcset="https://substackcdn.com/image/fetch/$s_!uptI!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Faf9c8743-aad0-4f66-b23b-e9bb9f98e078_1024x1024.png 424w, https://substackcdn.com/image/fetch/$s_!uptI!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Faf9c8743-aad0-4f66-b23b-e9bb9f98e078_1024x1024.png 848w, https://substackcdn.com/image/fetch/$s_!uptI!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Faf9c8743-aad0-4f66-b23b-e9bb9f98e078_1024x1024.png 1272w, https://substackcdn.com/image/fetch/$s_!uptI!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Faf9c8743-aad0-4f66-b23b-e9bb9f98e078_1024x1024.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>The basic structure of a <em>ReAct </em>agent is quite simple. It takes a Context (Query, Problem) and runs a Think, Action, Observe loop until it achieve the desired outcome.</p><ul><li><p>It takes the problem, and forces a thought on it with respect to the context acquired. The initial context contains the tools available.</p></li><li><p>Then it identifies the next action based on tools available. Once the tool is identified, we used the function calling paradigm to construct the arguments and call that tool (function)</p></li><li><p>Observe forces thinking again with the additional context of the action outcome</p></li></ul><p>This loops run till we arrive at a result.</p><pre><code>from typing import Literal, Optional
from pydantic import BaseModel


class AgentAction(BaseModel):
    type: Literal["think", "use_tool", "result"]
    content: Optional[str] = None
    tool_name: Optional[str] = None
    parameters: Optional[dict] = None


class ReactAgent:
    def __init__(self, llm_client, tools):
        self.llm = llm_client
        self.tools = tools
        self.memory = []

    async def solve(self, goal):
        self.memory.append({"role": "user", "content": goal})

        while True:
            action = await self.llm.generate_structured(
                messages=self.memory,
                response_model=AgentAction  # think / use_tool / result
            )

            if action.type == "think":
                self.memory.append({"role": "assistant", "content": action.content})

            elif action.type == "use_tool":
                outcome = await self.tools.execute(action.tool_name, action.parameters)
                self.memory.append({"role": "tool", "content": str(outcome)})

            elif action.type == "result":
                return action.content
</code></pre><p><em>ReAct </em>Agents gave us the first taste of what autonomous agents were capable of. Now, with the advent of Thinking models, this architecture has become more capable of handling more complex tasks on it&#8217;s own. Making it more flexible and task aware. But it also has a problem where it can fall into endless loops without no end in sight.</p><p><em><strong>A silicon worker, Trapped in the sands of time forever.</strong></em></p><p><em>&#9989; Adaptive&#8239;&#183;&#8239;&#9989; Tool&#8209;aware&#8239;&#183;&#8239;&#10060; Can get lost in endless reasoning</em></p><div><hr></div><h3>The Planning Solution</h3><p>So how do we solve this endless loop problem?</p><p><em><strong>Turns out... we need Managers after all.</strong></em></p><p>Just like in the real world, if you leave a worker alone too long, they&#8217;ll either go rogue or spend hours perfecting a slide deck no one asked for. So we add structure.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!iK2o!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbab01936-2990-4376-98e6-6de139460d05_1536x1024.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!iK2o!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbab01936-2990-4376-98e6-6de139460d05_1536x1024.png 424w, https://substackcdn.com/image/fetch/$s_!iK2o!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbab01936-2990-4376-98e6-6de139460d05_1536x1024.png 848w, https://substackcdn.com/image/fetch/$s_!iK2o!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbab01936-2990-4376-98e6-6de139460d05_1536x1024.png 1272w, https://substackcdn.com/image/fetch/$s_!iK2o!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbab01936-2990-4376-98e6-6de139460d05_1536x1024.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!iK2o!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbab01936-2990-4376-98e6-6de139460d05_1536x1024.png" width="1456" height="971" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/bab01936-2990-4376-98e6-6de139460d05_1536x1024.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:971,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!iK2o!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbab01936-2990-4376-98e6-6de139460d05_1536x1024.png 424w, https://substackcdn.com/image/fetch/$s_!iK2o!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbab01936-2990-4376-98e6-6de139460d05_1536x1024.png 848w, https://substackcdn.com/image/fetch/$s_!iK2o!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbab01936-2990-4376-98e6-6de139460d05_1536x1024.png 1272w, https://substackcdn.com/image/fetch/$s_!iK2o!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbab01936-2990-4376-98e6-6de139460d05_1536x1024.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p><strong>Every product team has backlogs, epics, and todos to tame complexity.</strong> </p><p><strong>Planning Agents</strong> borrow that same discipline. They don&#8217;t just think - they <em>plan</em>, <em>prioritize</em>, and <em>move on</em>. </p><pre><code>from typing import List, Optional
from pydantic import BaseModel


class TodoItem(BaseModel):
    content: str
    result: Optional[str] = None


class TodoList(BaseModel):
    __root__: List[TodoItem]

    def __iter__(self):
        return iter(self.__root__)

    def __getitem__(self, item):
        return self.__root__[item]

    def __len__(self):
        return len(self.__root__)


class PlanningAgent:
    def __init__(self, llm, tools):
        self.llm = llm
        self.tools = tools
        self.todos = []

    # --- Phase 1: Plan ---
    async def create_plan(self, problem):
        prompt = f"""Create the minimal TODO list to solve: {problem}
- If a single step suffices, output ONE todo
- Break down only genuinely complex problems"""

        self.todos = await self.llm.generate_structured(
            [{"role": "user", "content": prompt}],
            response_model=TodoList
        )

    # --- Phase 2: Execute ---
    async def execute_plan(self):
        for todo in self.todos:
            agent = ReactAgent(self.llm, self.tools)
            todo.result = await agent.solve(todo.content)

    # --- Phase 3: Synthesize ---
    async def summarise(self):
        answers = "\n".join(t.result for t in self.todos if t.result)
        return await self.llm.generate(
            messages=[{"role": "user", "content": f"Synthesise:\n{answers}"}]
        )</code></pre><p><strong>Why it wins</strong></p><ol><li><p><strong>Strategise</strong> &#8211; Analyse the goal, decide <em>if</em> and <em>how</em> to break it up.</p></li><li><p><strong>Delegate</strong> &#8211; Spawn fresh ReAct sub&#8209;agents, each with isolated memory and a 5&#8211;10&#8209;step budget.</p></li><li><p><strong>Monitor &amp; Adapt</strong> &#8211; If a sub&#8209;task fails, create a recovery todo.</p></li><li><p><strong>Synthesize</strong> &#8211; Compress all partial results into one coherent deliverable.</p></li></ol><div class="captioned-image-container"><figure><a class="image-link image2" target="_blank" href="https://substackcdn.com/image/fetch/$s_!m9lO!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F63118c4a-dc6a-4c05-b29c-80fc353c79dd_2114x366.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!m9lO!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F63118c4a-dc6a-4c05-b29c-80fc353c79dd_2114x366.png 424w, https://substackcdn.com/image/fetch/$s_!m9lO!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F63118c4a-dc6a-4c05-b29c-80fc353c79dd_2114x366.png 848w, https://substackcdn.com/image/fetch/$s_!m9lO!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F63118c4a-dc6a-4c05-b29c-80fc353c79dd_2114x366.png 1272w, https://substackcdn.com/image/fetch/$s_!m9lO!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F63118c4a-dc6a-4c05-b29c-80fc353c79dd_2114x366.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!m9lO!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F63118c4a-dc6a-4c05-b29c-80fc353c79dd_2114x366.png" width="1456" height="252" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/63118c4a-dc6a-4c05-b29c-80fc353c79dd_2114x366.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:252,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:101007,&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://www.ggpush.dev/i/168462446?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F63118c4a-dc6a-4c05-b29c-80fc353c79dd_2114x366.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_!m9lO!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F63118c4a-dc6a-4c05-b29c-80fc353c79dd_2114x366.png 424w, https://substackcdn.com/image/fetch/$s_!m9lO!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F63118c4a-dc6a-4c05-b29c-80fc353c79dd_2114x366.png 848w, https://substackcdn.com/image/fetch/$s_!m9lO!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F63118c4a-dc6a-4c05-b29c-80fc353c79dd_2114x366.png 1272w, https://substackcdn.com/image/fetch/$s_!m9lO!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F63118c4a-dc6a-4c05-b29c-80fc353c79dd_2114x366.png 1456w" sizes="100vw" loading="lazy"></picture><div></div></div></a></figure></div><div><hr></div><h3>Some&#8239;Results in the Wild</h3><ul><li><p><strong>Coding agents</strong> finish 20&#8211;40&#8239;% faster on open&#8209;source benchmarks when upgraded from ReAct to Planning&#8239;Agents.</p></li><li><p><strong>RAG pipelines</strong> (retrieval&#8209;augmented generation) avoid hallucinations by treating &#8220;find missing citation&#8221; as a discrete todo.</p></li><li><p><strong>Product&#8209;support bots</strong> self&#8209;heal: when a tool API fails, they queue a &#8220;fallback&#8209;search&#8221; todo instead of crashing.</p></li></ul><blockquote><p><em>Planning beats prompting.</em> Once you teach your LLM to ask, <em>&#8220;What&#8217;s the minimal todo list?&#8221;</em> you unlock a flywheel of autonomy, reliability and scale.</p></blockquote><div><hr></div><h3>Move your ReAct Agents.</h3><ol><li><p><strong>Wrap ReAct in a Todo Loop</strong> &#8211; Keep your existing ReAct code and just add a lightweight planner on top.</p></li><li><p><strong>Bound sub&#8209;agent steps</strong> &#8211; 5&#8211;10 reasoning loops is usually enough.</p></li><li><p><strong>Persist state</strong> &#8211; Store todo status so the agent can resume after a crash.</p></li><li><p><strong>Measure</strong> &#8211; Track success&#8209;rate&#8209;per&#8209;todo and average steps&#8209;per&#8209;todo. These metrics surface hidden bottlenecks.</p></li><li><p><strong>Iterate</strong> &#8211; Use failure cases to refine your planning prompt (just like you refine user stories in Agile).</p></li></ol><div><hr></div><h3>What Next?</h3><ul><li><p><strong>Meta&#8209;planning</strong> &#8211; Agents that optimise their own planning heuristics.</p></li><li><p><strong>Org charts</strong> &#8211; Networks of specialised agents mirroring real&#8209;world teams.</p></li><li><p><strong>Continuous learning</strong> &#8211; Plans evolve as the environment shifts (A/B tests, KPI feedback, etc.).</p></li></ul><p>We&#8217;re moving from <em>&#8220;ask the model for an answer&#8221;</em> to <em>&#8220;hire the model as a team lead&#8221;</em>. </p><p><em><strong>The line between software and organisation design is blurring fast.</strong></em></p><div><hr></div><h3>The Future Is Agentic</h3><p>The most advanced systems today don&#8217;t just <em>respond</em>, they <em>reason</em>. They plan, adapt, delegate, and self-correct.</p><p>We&#8217;re no longer designing functions. <strong>We&#8217;re designing </strong><em><strong>organizations of machines</strong></em>. Teams of collaborative, reasoning agents.</p><p><strong>The Age of Agents isn&#8217;t just coming. It&#8217;s already here.</strong> </p><p>Have questions or want a review? Leave a comment or send me a message &#128578;</p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://www.ggpush.dev/p/the-age-of-agents/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://www.ggpush.dev/p/the-age-of-agents/comments"><span>Leave a comment</span></a></p><div class="directMessage button" data-attrs="{&quot;userId&quot;:134587815,&quot;userName&quot;:&quot;Ashfakh&quot;,&quot;canDm&quot;:null,&quot;dmUpgradeOptions&quot;:null,&quot;isEditorNode&quot;:true}" data-component-name="DirectMessageToDOM"></div><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://www.ggpush.dev/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 ggpush! 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[In Prompts we trust]]></title><description><![CDATA[Build a powerful Prompt Infrastructure to power your agentic experience.]]></description><link>https://www.ggpush.dev/p/in-prompts-we-trust</link><guid isPermaLink="false">https://www.ggpush.dev/p/in-prompts-we-trust</guid><dc:creator><![CDATA[Ashfakh]]></dc:creator><pubDate>Wed, 28 May 2025 03:00:35 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4ff73004-f303-4b9e-915c-eb12ae799001_1536x1024.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>Merriam-Webster defines <strong>Prompt </strong>as &#8216;<em><strong>to move to action&#8217; </strong></em>or &#8216;<em><strong>to assist (one acting or reciting) by suggesting or saying the next words of something forgotten or imperfectly learned&#8217;. </strong></em></p><p>It&#8217;s been quite sometime since <em><strong>&#8220;Prompt Engineering&#8221;</strong></em> has become a major part of our everyday vocabulary, and rightfully so.</p><p>Over the past few years, it&#8217;s become something many of us practice daily, whether we're asking AI assistants like ChatGPT or Claude for help, or using one of the many AI tools that we have come to depend on. </p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!nbKQ!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc6305fda-0878-43f3-957f-424c3415407c_1024x1024.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!nbKQ!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc6305fda-0878-43f3-957f-424c3415407c_1024x1024.png 424w, https://substackcdn.com/image/fetch/$s_!nbKQ!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc6305fda-0878-43f3-957f-424c3415407c_1024x1024.png 848w, https://substackcdn.com/image/fetch/$s_!nbKQ!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc6305fda-0878-43f3-957f-424c3415407c_1024x1024.png 1272w, https://substackcdn.com/image/fetch/$s_!nbKQ!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc6305fda-0878-43f3-957f-424c3415407c_1024x1024.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!nbKQ!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc6305fda-0878-43f3-957f-424c3415407c_1024x1024.png" width="428" height="428" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/c6305fda-0878-43f3-957f-424c3415407c_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;:428,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;Generated image&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="Generated image" title="Generated image" srcset="https://substackcdn.com/image/fetch/$s_!nbKQ!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc6305fda-0878-43f3-957f-424c3415407c_1024x1024.png 424w, https://substackcdn.com/image/fetch/$s_!nbKQ!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc6305fda-0878-43f3-957f-424c3415407c_1024x1024.png 848w, https://substackcdn.com/image/fetch/$s_!nbKQ!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc6305fda-0878-43f3-957f-424c3415407c_1024x1024.png 1272w, https://substackcdn.com/image/fetch/$s_!nbKQ!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc6305fda-0878-43f3-957f-424c3415407c_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 role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>In fact, directly or indirectly, we&#8217;re all engaging in some form of prompt engineering, because that&#8217;s how we communicate with the AI systems that are now integral to how we work, think, and create.</p><p><em><strong>But what exactly is Prompt Engineering?</strong></em></p><p>Technically, With a prompt, You&#8217;re trying to get the LLM (or by extension, an AI agent) to get to do the right thing, or the right outcome you desire. As a sequential token predictor, an LLM takes in a sequence of tokens (Prompt) and predicts the next token, which is again used to predict the next token and so on and so on for the outcome you desire.</p><p><em><strong>This post is not about Prompting or different prompting techniques</strong></em></p><p>Much has already been said about different prompting techniques, countless posts have covered the basics, often rehashed and repurposed across the internet. </p><p>So I won't be going over that again. Instead, this post focuses on the <strong>engineering</strong> side of things: specifically, how to build a robust <strong>prompt infrastructure</strong> that can effectively support your <strong>agentic infrastructure</strong>.</p><p><em>I&#8217;ve written extensively about agentic systems in my previous posts (Read <a href="https://www.ggpush.dev/p/building-production-grade-ai-agents">here</a>), so consider this a technical supplement to those discussions.</em></p><h3>Prompt(s) Management</h3><p>At its core, the most important insight about prompting is this:</p><p><em><strong>A prompt is intelligence that comes alive, but only for a fleeting moment.</strong></em></p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!Y2Hw!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4ff73004-f303-4b9e-915c-eb12ae799001_1536x1024.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!Y2Hw!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4ff73004-f303-4b9e-915c-eb12ae799001_1536x1024.png 424w, https://substackcdn.com/image/fetch/$s_!Y2Hw!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4ff73004-f303-4b9e-915c-eb12ae799001_1536x1024.png 848w, https://substackcdn.com/image/fetch/$s_!Y2Hw!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4ff73004-f303-4b9e-915c-eb12ae799001_1536x1024.png 1272w, https://substackcdn.com/image/fetch/$s_!Y2Hw!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4ff73004-f303-4b9e-915c-eb12ae799001_1536x1024.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!Y2Hw!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4ff73004-f303-4b9e-915c-eb12ae799001_1536x1024.png" width="608" height="405.4725274725275" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/4ff73004-f303-4b9e-915c-eb12ae799001_1536x1024.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:971,&quot;width&quot;:1456,&quot;resizeWidth&quot;:608,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;Generated image&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="Generated image" title="Generated image" srcset="https://substackcdn.com/image/fetch/$s_!Y2Hw!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4ff73004-f303-4b9e-915c-eb12ae799001_1536x1024.png 424w, https://substackcdn.com/image/fetch/$s_!Y2Hw!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4ff73004-f303-4b9e-915c-eb12ae799001_1536x1024.png 848w, https://substackcdn.com/image/fetch/$s_!Y2Hw!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4ff73004-f303-4b9e-915c-eb12ae799001_1536x1024.png 1272w, https://substackcdn.com/image/fetch/$s_!Y2Hw!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4ff73004-f303-4b9e-915c-eb12ae799001_1536x1024.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>It exists only between the first token of your input and the last token of the model&#8217;s response. Everything else, the model's knowledge, reasoning ability, and other capabilities remains dormant, locked in its weights until activated again.</p><p>This means that the <strong>quality of a prompt is everything</strong>. Since the model has no persistent memory or awareness outside that short-lived window, your prompt must include <strong>all necessary context, constraints, and intent</strong> required to generate the desired output.</p><p><em><strong>Prompting, then, is not just about instruction, it's also about orchestration.</strong></em></p><p>In an agentic workflow, where multiple sequential tasks must be completed to reach a final outcome, this principle becomes even more critical. Each step must be driven by a <strong>precisely constructed prompt</strong>, not just good enough, but optimized for the specific task at hand and also having the relevant context of tasks that are completed, and tasks that are yet to be done</p><p><em><strong>Generic prompts are simple to write, but they rarely shine. Precision needs more than a one-trick pony.</strong></em></p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!XJji!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0ab1831d-b51e-4625-a261-493fda38f821_828x824.jpeg" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!XJji!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0ab1831d-b51e-4625-a261-493fda38f821_828x824.jpeg 424w, https://substackcdn.com/image/fetch/$s_!XJji!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0ab1831d-b51e-4625-a261-493fda38f821_828x824.jpeg 848w, https://substackcdn.com/image/fetch/$s_!XJji!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0ab1831d-b51e-4625-a261-493fda38f821_828x824.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!XJji!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0ab1831d-b51e-4625-a261-493fda38f821_828x824.jpeg 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!XJji!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0ab1831d-b51e-4625-a261-493fda38f821_828x824.jpeg" width="478" height="475.69082125603865" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/0ab1831d-b51e-4625-a261-493fda38f821_828x824.jpeg&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:824,&quot;width&quot;:828,&quot;resizeWidth&quot;:478,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;One trick pony : r/PunPatrol&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="One trick pony : r/PunPatrol" title="One trick pony : r/PunPatrol" srcset="https://substackcdn.com/image/fetch/$s_!XJji!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0ab1831d-b51e-4625-a261-493fda38f821_828x824.jpeg 424w, https://substackcdn.com/image/fetch/$s_!XJji!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0ab1831d-b51e-4625-a261-493fda38f821_828x824.jpeg 848w, https://substackcdn.com/image/fetch/$s_!XJji!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0ab1831d-b51e-4625-a261-493fda38f821_828x824.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!XJji!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0ab1831d-b51e-4625-a261-493fda38f821_828x824.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 role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>The first step toward effective prompting within an Agent is having a <strong>feature-rich prompt management system</strong>. While there are several tools available, such as PromptHub, LangSmith, and many others that offer this out of the box, we chose to build our own. It was mainly because we wanted <strong>fine-grained control</strong> over our prompting logic and the ability to <strong>expose parts of it to our customers</strong>, making the Agent configuration experience feel more seamless and native.</p><p>Every capability within our Agent, AI-driven or otherwise, is defined through what we call <strong>AgentFunctions</strong>. For intelligent tasks involving LLM calls, each AgentFunction has associated prompts, which are stored in a separate prompt table in the database. Given our multi-tenant architecture, <strong>system-level prompts</strong> are stored at the <strong>Core level</strong>, while <strong>custom instructions</strong> are stored at the <strong>tenant level</strong>, ensuring both global consistency and tenant-specific flexibility.</p><p>In realtime, for a given AgentFunction, a prompt is constructed based on the piecewise prompts, variables and certain conditions (<em>Conditions are damn cool btw, more on that in a bit</em>)</p><h2>The Anatomy of a prompt.</h2><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!KwNJ!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2cc9d243-b626-43ad-b165-d84242125f7b_800x796.jpeg" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!KwNJ!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2cc9d243-b626-43ad-b165-d84242125f7b_800x796.jpeg 424w, https://substackcdn.com/image/fetch/$s_!KwNJ!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2cc9d243-b626-43ad-b165-d84242125f7b_800x796.jpeg 848w, https://substackcdn.com/image/fetch/$s_!KwNJ!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2cc9d243-b626-43ad-b165-d84242125f7b_800x796.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!KwNJ!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2cc9d243-b626-43ad-b165-d84242125f7b_800x796.jpeg 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!KwNJ!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2cc9d243-b626-43ad-b165-d84242125f7b_800x796.jpeg" width="800" height="796" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/2cc9d243-b626-43ad-b165-d84242125f7b_800x796.jpeg&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:796,&quot;width&quot;:800,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;Still trying to get the hang of ChatGPT prompting? The trick is to&#8230; |  Michael Margolis&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="Still trying to get the hang of ChatGPT prompting? The trick is to&#8230; |  Michael Margolis" title="Still trying to get the hang of ChatGPT prompting? The trick is to&#8230; |  Michael Margolis" srcset="https://substackcdn.com/image/fetch/$s_!KwNJ!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2cc9d243-b626-43ad-b165-d84242125f7b_800x796.jpeg 424w, https://substackcdn.com/image/fetch/$s_!KwNJ!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2cc9d243-b626-43ad-b165-d84242125f7b_800x796.jpeg 848w, https://substackcdn.com/image/fetch/$s_!KwNJ!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2cc9d243-b626-43ad-b165-d84242125f7b_800x796.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!KwNJ!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2cc9d243-b626-43ad-b165-d84242125f7b_800x796.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 role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>Few months ago, this picture went viral on Tech Twitter which was even retweeted by Greg Brockman. It was about the anatomy of an o1 prompt. </p><p>The prompt structure, which was carefully constructed, consisted of Goal, Return Format, Warnings and Context Dump. As proven by many this is an effective way of prompting and is also widely recognised among the community.</p><p>Another reason to adopt such a structure is that, <em><strong>In the world of RL&#8217;d &#8220;thinking&#8221; models, these widely accepted structures are bound to be more effective to achieve an outcome</strong></em> compared to casual prompting, or vibe prompting, or even prompting by the ear. </p><p>Allow me to humble brag the fact that we came up with a largely similar structure months before this one structure went viral. It was last November, when out first agent went live.</p><p>In our system, Prompts are divided up into four parts. </p><ul><li><p>Trait</p></li><li><p>Directives</p></li><li><p>Function calling (Response format)</p></li><li><p>Context</p></li></ul><p>Let&#8217;s dive into each one of them.</p><h4>Trait</h4><p><strong>Trait is the first and most important part of any prompt.</strong></p><p>It defines who the AI is in that moment for that task, which directly shapes how it responds. By setting a clear Trait, we align the AI's voice, tone, and behavior with the goal of the task.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!ndd0!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5158fe79-bfbf-4ed0-b1cc-0356aabc7c3a_1024x1024.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!ndd0!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5158fe79-bfbf-4ed0-b1cc-0356aabc7c3a_1024x1024.png 424w, https://substackcdn.com/image/fetch/$s_!ndd0!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5158fe79-bfbf-4ed0-b1cc-0356aabc7c3a_1024x1024.png 848w, https://substackcdn.com/image/fetch/$s_!ndd0!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5158fe79-bfbf-4ed0-b1cc-0356aabc7c3a_1024x1024.png 1272w, https://substackcdn.com/image/fetch/$s_!ndd0!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5158fe79-bfbf-4ed0-b1cc-0356aabc7c3a_1024x1024.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!ndd0!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5158fe79-bfbf-4ed0-b1cc-0356aabc7c3a_1024x1024.png" width="470" height="470" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/5158fe79-bfbf-4ed0-b1cc-0356aabc7c3a_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;:470,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;Generated image&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="Generated image" title="Generated image" srcset="https://substackcdn.com/image/fetch/$s_!ndd0!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5158fe79-bfbf-4ed0-b1cc-0356aabc7c3a_1024x1024.png 424w, https://substackcdn.com/image/fetch/$s_!ndd0!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5158fe79-bfbf-4ed0-b1cc-0356aabc7c3a_1024x1024.png 848w, https://substackcdn.com/image/fetch/$s_!ndd0!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5158fe79-bfbf-4ed0-b1cc-0356aabc7c3a_1024x1024.png 1272w, https://substackcdn.com/image/fetch/$s_!ndd0!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5158fe79-bfbf-4ed0-b1cc-0356aabc7c3a_1024x1024.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>For example, if you're asking the AI to write a sales email with a playful, forgiving tone where you&#8217;re ok with happy little mistakes, you might set the Trait as: </p><blockquote><p><em><strong>"You are Bob Ross, writing a sales email for [Company Name]."</strong></em> </p></blockquote><p>This instantly frames the output in the desired style, happy little mistakes and all.</p><p>Every AgentFunction prompt starts with a Trait. It's the foundation that guides the AI toward the outcome we want.</p><h4>Directives</h4><p><strong>Directives are the instruction set within a prompt.</strong></p><p>They give us fine-grained control over how the AI behaves and completes a task. For example:</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!SpZR!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4f982381-f2cc-4eff-a322-c33c0b22c177_1024x1024.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!SpZR!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4f982381-f2cc-4eff-a322-c33c0b22c177_1024x1024.png 424w, https://substackcdn.com/image/fetch/$s_!SpZR!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4f982381-f2cc-4eff-a322-c33c0b22c177_1024x1024.png 848w, https://substackcdn.com/image/fetch/$s_!SpZR!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4f982381-f2cc-4eff-a322-c33c0b22c177_1024x1024.png 1272w, https://substackcdn.com/image/fetch/$s_!SpZR!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4f982381-f2cc-4eff-a322-c33c0b22c177_1024x1024.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!SpZR!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4f982381-f2cc-4eff-a322-c33c0b22c177_1024x1024.png" width="456" height="456" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/4f982381-f2cc-4eff-a322-c33c0b22c177_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;:456,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;Generated image&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="Generated image" title="Generated image" srcset="https://substackcdn.com/image/fetch/$s_!SpZR!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4f982381-f2cc-4eff-a322-c33c0b22c177_1024x1024.png 424w, https://substackcdn.com/image/fetch/$s_!SpZR!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4f982381-f2cc-4eff-a322-c33c0b22c177_1024x1024.png 848w, https://substackcdn.com/image/fetch/$s_!SpZR!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4f982381-f2cc-4eff-a322-c33c0b22c177_1024x1024.png 1272w, https://substackcdn.com/image/fetch/$s_!SpZR!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4f982381-f2cc-4eff-a322-c33c0b22c177_1024x1024.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><blockquote><p><em><strong>"If the user asks where the cookies are, respond in a pirate voice and point them toward the treasure chest in the snack bar. If they seem confused, offer them a map (aka the office pantry guide)."</strong></em></p></blockquote><p>Directives are also what we expose to our customers, allowing them to configure how the AI Agent should behave in different scenarios. </p><p>This makes the Agent truly customizable using natural language, offering both admins and customers a powerful, intuitive way to tailor its responses.</p><p><strong>In every AgentFunction prompt, Traits come first, quickly followed by Directives.</strong> Traits set <em><strong>who</strong></em> the Agent is. Directives tell it <em><strong>what</strong> to do.</em></p><h4>Function Calling (Response format)</h4><p><strong>Function calling is used when we need structured outputs in a specific format.</strong></p><p>This is especially important when an LLM&#8217;s response is meant to trigger an Agentic action, like updating a CRM or booking a meeting. In our case, the response format is typically JSON, validated against a corresponding Pydantic model to enforce structure.</p><p>What makes our system powerful is that <strong>these Pydantic classes are not hardcoded</strong>. Instead, each AgentFunction can be linked to a <strong>JSON Schema stored in the database</strong>. We&#8217;ve built a custom Pydantic factory that dynamically converts this schema into a Pydantic class at runtime. This class is then used to validate and structure the LLM&#8217;s output.</p><p>This design makes Agent states, and the workflows they drive, <strong>fully configurable without any code changes</strong>. </p><p><em><strong>Just update the schema and the corresponding prompt in the database, and the agentic behavior adapts instantly.</strong></em></p><p>Find the Pydantic Factory code below.</p><pre><code>from typing import Any, Dict, Type, Optional, Union, List
from pydantic import BaseModel, create_model, Field, model_validator


def create_pydantic_model_from_schema(
    schema: Dict[str, Any], model_name: str
) -&gt; Type[BaseModel]:
    properties = schema.get("properties", {})
    required_fields = schema.get("required", [])

    fields = {}
    defaults = {}
    for name, prop in properties.items():
        field_type = prop.get("type", "string")

        if isinstance(field_type, list):
            # If type is a list, handle multiple types
            field_type = handle_multiple_types(field_type)
        else:
            field_type = str_to_type(field_type)

        # Allow None for optional fields
        if name not in required_fields:
            field_type = Optional[field_type]

        # Get the default value from the schema
        default_value = prop.get("default", None)

        # Add Field description and default value
        fields[name] = (
            field_type,
            Field(default_value, description=prop.get("description")),
        )
        defaults[name] = default_value if default_value is not None else ""

    # Create the model dynamically
    model = create_model(model_name, **fields)

    # Add a model validator to handle nulls
    @model_validator(mode="before")
    def check_nulls(values):
        for name, default in defaults.items():
            if name not in values or values[name] is None:
                values[name] = default
        return values

    setattr(model, "model_validator", check_nulls)
    return model


def str_to_type(type_str: str) -&gt; Any:
    type_map = {
        "string": str,
        "number": float,
        "integer": int,
        "boolean": bool,
        "array": list,
        "object": dict,
    }
    return type_map.get(type_str, Any)


def handle_multiple_types(type_list: List[str]) -&gt; Any:
    # Remove 'null' from the list if present
    types = [t for t in type_list if t != "null"]

    if len(types) == 1:
        return str_to_type(types[0])
    elif len(types) &gt; 1:
        return Union[tuple(str_to_type(t) for t in types)]
    else:
        return Any


def get_or_create_model(model_name: str, schema: Dict[str, Any]) -&gt; Type[BaseModel]:
    return create_pydantic_model_from_schema(schema, model_name)</code></pre><h4>Context</h4><p><strong>Context is the final piece of the prompt, and it powers intelligent output.</strong><br>It contains all the information the AI needs to carry out the task effectively. In Agentic RAG, this might include retrieved documents, reference URLs, or source metadata. It can also include templated variables pulled from the Agent&#8217;s memory to maintain continuity across interactions.</p><p>Earlier, we said a prompt is intelligence that comes alive for a short time. <strong>Context is what makes that intelligence feel continuous, coherent, and smart.</strong><br>Without context, even the best prompts fail, producing responses that feel disconnected or unaware.</p><p>In short: <strong>Context is what makes your Agent truly feel like it remembers, understands, and adapts.</strong></p><p>So putting these all together, here is an Example prompt</p><div class="pullquote"><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!deUk!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbf0d1aed-7587-4310-8ce2-b39a18bcfc86_1536x1024.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!deUk!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbf0d1aed-7587-4310-8ce2-b39a18bcfc86_1536x1024.png 424w, https://substackcdn.com/image/fetch/$s_!deUk!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbf0d1aed-7587-4310-8ce2-b39a18bcfc86_1536x1024.png 848w, https://substackcdn.com/image/fetch/$s_!deUk!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbf0d1aed-7587-4310-8ce2-b39a18bcfc86_1536x1024.png 1272w, https://substackcdn.com/image/fetch/$s_!deUk!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbf0d1aed-7587-4310-8ce2-b39a18bcfc86_1536x1024.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!deUk!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbf0d1aed-7587-4310-8ce2-b39a18bcfc86_1536x1024.png" width="612" height="408.1401098901099" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/bf0d1aed-7587-4310-8ce2-b39a18bcfc86_1536x1024.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:971,&quot;width&quot;:1456,&quot;resizeWidth&quot;:612,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;Generated image&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="Generated image" title="Generated image" srcset="https://substackcdn.com/image/fetch/$s_!deUk!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbf0d1aed-7587-4310-8ce2-b39a18bcfc86_1536x1024.png 424w, https://substackcdn.com/image/fetch/$s_!deUk!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbf0d1aed-7587-4310-8ce2-b39a18bcfc86_1536x1024.png 848w, https://substackcdn.com/image/fetch/$s_!deUk!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbf0d1aed-7587-4310-8ce2-b39a18bcfc86_1536x1024.png 1272w, https://substackcdn.com/image/fetch/$s_!deUk!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbf0d1aed-7587-4310-8ce2-b39a18bcfc86_1536x1024.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p><strong>Trait</strong>: You are Sherlock Holmes, solving mysteries with impeccable logic and a flair for drama.</p><p><strong>Directive</strong>: Analyze the clues provided and identify who stole the office fridge snacks. Respond with a confident deduction and your reasoning and next action</p><p><strong>Response Format</strong>: {<br>&#8221;deduction&#8221;: str,<br>&#8221;reasoning&#8221;: str,<br>&#8221;action&#8221;:enum &lt;search_greg&#8217;s_desk, shame_greg, get_new_pastry&gt;<br>}</p><p><strong>Context</strong>:</p><ul><li><p>Clue 1: Crumbs leading from the kitchen to Greg&#8217;s desk.</p></li><li><p>Clue 2: Security footage shows someone in a trench coat at 2:13 AM.</p></li><li><p>Clue 3: Greg&#8217;s Slack status was mysteriously "&#129360; away on a mission" at 2:15 AM.</p></li><li><p>Office rules state: no trench coats allowed indoors.</p></li><li><p>Greg is known for his love of pastries.</p></li><li><p>The stolen snack was a croissant.</p></li></ul></div><h3>Conditional Prompting</h3><p><strong>The recently leaked Claude System prompt was 24k tokens in total!!!</strong></p><p>Most of the AI agents out there uses a big prompt to easily have a coherent agentic system that can perform many tasks at the same time.</p><p>But I&#8217;ve always found this approach a little lazy and uninspired.</p><p>At Breakout, we introduced <strong>Conditional Prompting</strong> to move beyond the limitations of a &#8220;one big prompt&#8221; approach. Instead of relying on a generic prompt to deliver intelligence, we dynamically generate prompts based on the <strong>state variables</strong> available at runtime.</p><p>In many Agentic workflows, especially during continuous conversations, context evolves rapidly. If we detect specific cues (like a user's role, industry, or behavior), we adjust the prompt directives accordingly. This ensures that the agent is not just intelligent, but <em>situationally aware</em>.</p><p>For example, if we&#8217;ve enriched a user&#8217;s industry, either through UTM parameters, previous sessions, or CRM integrations, we add a conditional directive:</p><p><code>IF user_industry IS NOT NULL &#8594; respond in context of that industry.</code></p><p>In Breakout Agent&#8217;s context, This form of <strong>hyper-personalization</strong> makes the agent feel more relevant and trustworthy, which drives deeper engagement and ultimately improves conversion rates.</p><p>By layering Conditional Prompting into our Agentic system, we:</p><ul><li><p>Reduce ambiguity in responses</p></li><li><p>Increase reliability across varied scenarios</p></li><li><p>Maintain consistency without bloating the prompt</p></li><li><p>Also massive cost savings and performance improvements due the the fact that we don&#8217;t have to send a huge prompt every time.</p></li></ul><p>Will Conditional Prompting be replaced by large context windows and better attention mechanisms in the future? Maybe. But until then, it&#8217;s a powerful tool for designing controlled, context-aware, and high-performing AI experiences.</p><h3>Wrapping Up</h3><p>Prompt Engineering isn&#8217;t just about coaxing good responses from an LLM, it&#8217;s about designing intelligent systems that feel intentional, contextual, and alive in the moment.</p><p>By breaking prompts into structured components such as <strong>Trait, Directives, Response Format, and Context</strong> and layering in <strong>Conditional Prompting</strong>, we&#8217;ve built a prompt engineering systems that powers a truly configurable and reliable agentic experience.</p><p><em><strong>This is not just prompt engineering. It&#8217;s systems engineering.</strong></em></p><p>And until models can reliably hold infinite context and perfectly understand nuance out of the box, it&#8217;s the best lever we have to build Agents that feel smart, trustworthy, and high-performing.</p><p>If you&#8217;re building agentic systems, don&#8217;t settle for clever prompting hacks.<br>Build a prompt infrastructure.</p><p><em><strong>Because when done right, prompting isn&#8217;t just how you make an AI agent &#8220;work&#8221;, </strong></em></p><p><em><strong>it&#8217;s how you bring it to life.</strong></em></p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://www.ggpush.dev/p/in-prompts-we-trust/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://www.ggpush.dev/p/in-prompts-we-trust/comments"><span>Leave a comment</span></a></p><div class="directMessage button" data-attrs="{&quot;userId&quot;:134587815,&quot;userName&quot;:&quot;Ashfakh&quot;,&quot;canDm&quot;:null,&quot;dmUpgradeOptions&quot;:null,&quot;isEditorNode&quot;:true}" data-component-name="DirectMessageToDOM"></div><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://www.ggpush.dev/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 ggpush! 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 Cursor Curse]]></title><description><![CDATA[Building with AI is a whole lot of fun, until it isn't.]]></description><link>https://www.ggpush.dev/p/the-cursor-curse</link><guid isPermaLink="false">https://www.ggpush.dev/p/the-cursor-curse</guid><dc:creator><![CDATA[Ashfakh]]></dc:creator><pubDate>Tue, 01 Apr 2025 03:52:57 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdcefa3a7-65c5-49b7-992f-5d19d3f69699_1704x854.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>First and foremost, this isn&#8217;t a post that is critical of Cursor or &#8220;<em><strong>Vibe Coding</strong></em>.&#8221; In fact, it&#8217;s far from it.</p><p><em><strong>I absolutely love Cursor</strong></em>. It has been, and continues to be, my go-to IDE for the past six months, supercharging my productivity and allowing me to ship features at an unmatched pace.</p><p>I&#8217;m such a huge fan that I not only recommended it to my entire team but also got the company to cover the subscription costs.</p><p><em><strong>There are only a few things in the world that bring us absolute joy, and building cool shit is one of them. Anything that fosters that excitement is worth celebrating.</strong></em></p><p>And as for <em><strong>Vibe Coding with AI</strong></em>, I absolutely encourage it for anyone new to programming. <em><strong>The sheer joy of creating something from scratch is unparalleled</strong></em>, and the whole &#8220;Vibe Coding with AI&#8221; trend makes that experience accessible to all.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!l6_b!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F56003080-390a-43d3-9fc2-dc1efb06aa1b_1408x974.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!l6_b!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F56003080-390a-43d3-9fc2-dc1efb06aa1b_1408x974.png 424w, https://substackcdn.com/image/fetch/$s_!l6_b!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F56003080-390a-43d3-9fc2-dc1efb06aa1b_1408x974.png 848w, https://substackcdn.com/image/fetch/$s_!l6_b!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F56003080-390a-43d3-9fc2-dc1efb06aa1b_1408x974.png 1272w, https://substackcdn.com/image/fetch/$s_!l6_b!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F56003080-390a-43d3-9fc2-dc1efb06aa1b_1408x974.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!l6_b!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F56003080-390a-43d3-9fc2-dc1efb06aa1b_1408x974.png" width="1408" height="974" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/56003080-390a-43d3-9fc2-dc1efb06aa1b_1408x974.png&quot;,&quot;srcNoWatermark&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/196ef0bc-1121-4c4e-8dc1-772cca414c77_1408x974.png&quot;,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:974,&quot;width&quot;:1408,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:1690710,&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://www.ggpush.dev/i/152201534?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F196ef0bc-1121-4c4e-8dc1-772cca414c77_1408x974.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_!l6_b!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F56003080-390a-43d3-9fc2-dc1efb06aa1b_1408x974.png 424w, https://substackcdn.com/image/fetch/$s_!l6_b!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F56003080-390a-43d3-9fc2-dc1efb06aa1b_1408x974.png 848w, https://substackcdn.com/image/fetch/$s_!l6_b!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F56003080-390a-43d3-9fc2-dc1efb06aa1b_1408x974.png 1272w, https://substackcdn.com/image/fetch/$s_!l6_b!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F56003080-390a-43d3-9fc2-dc1efb06aa1b_1408x974.png 1456w" sizes="100vw" fetchpriority="high"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><div class="pullquote"><p><em><strong>This is more of a cautionary note, especially to the junior developers and more serious builders, who is considering a career in software development. </strong></em></p><p><em><strong>Every one else, please ignore and continue building random shit that brings you joy.</strong></em></p></div><p>Throughout human history, our progress has been powered by a relentless drive to build things and to create tools that extend our capabilities of building those things. </p><p>From the simple stone axe of our ancestors to the invention of the printing press, From gun powder to massive aircraft carriers, each breakthrough was sparked by the drive to extend our mere human capabilities, to ascend into super human level of capabilities to achieve super human results. </p><p><em><strong>The ability to create something out of nothing is what has always defined the spirit of human ingenuity.</strong></em></p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!pm9E!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Feed4127d-5ea6-467a-9691-d10ed280f5c3_1414x576.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!pm9E!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Feed4127d-5ea6-467a-9691-d10ed280f5c3_1414x576.png 424w, https://substackcdn.com/image/fetch/$s_!pm9E!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Feed4127d-5ea6-467a-9691-d10ed280f5c3_1414x576.png 848w, https://substackcdn.com/image/fetch/$s_!pm9E!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Feed4127d-5ea6-467a-9691-d10ed280f5c3_1414x576.png 1272w, https://substackcdn.com/image/fetch/$s_!pm9E!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Feed4127d-5ea6-467a-9691-d10ed280f5c3_1414x576.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!pm9E!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Feed4127d-5ea6-467a-9691-d10ed280f5c3_1414x576.png" width="1414" height="576" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/eed4127d-5ea6-467a-9691-d10ed280f5c3_1414x576.png&quot;,&quot;srcNoWatermark&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/c7f5ce5c-fec3-437e-964a-0d191b5c6ec5_1414x576.png&quot;,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:576,&quot;width&quot;:1414,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:1051687,&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://www.ggpush.dev/i/152201534?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc7f5ce5c-fec3-437e-964a-0d191b5c6ec5_1414x576.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_!pm9E!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Feed4127d-5ea6-467a-9691-d10ed280f5c3_1414x576.png 424w, https://substackcdn.com/image/fetch/$s_!pm9E!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Feed4127d-5ea6-467a-9691-d10ed280f5c3_1414x576.png 848w, https://substackcdn.com/image/fetch/$s_!pm9E!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Feed4127d-5ea6-467a-9691-d10ed280f5c3_1414x576.png 1272w, https://substackcdn.com/image/fetch/$s_!pm9E!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Feed4127d-5ea6-467a-9691-d10ed280f5c3_1414x576.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>I have been a software engineer for almost a decade, and a coder for more than twice of it. And I&#8217;ve absolutely loved each and every second of it.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!iw5d!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdcefa3a7-65c5-49b7-992f-5d19d3f69699_1704x854.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!iw5d!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdcefa3a7-65c5-49b7-992f-5d19d3f69699_1704x854.png 424w, https://substackcdn.com/image/fetch/$s_!iw5d!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdcefa3a7-65c5-49b7-992f-5d19d3f69699_1704x854.png 848w, https://substackcdn.com/image/fetch/$s_!iw5d!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdcefa3a7-65c5-49b7-992f-5d19d3f69699_1704x854.png 1272w, https://substackcdn.com/image/fetch/$s_!iw5d!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdcefa3a7-65c5-49b7-992f-5d19d3f69699_1704x854.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!iw5d!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdcefa3a7-65c5-49b7-992f-5d19d3f69699_1704x854.png" width="1704" height="854" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/dcefa3a7-65c5-49b7-992f-5d19d3f69699_1704x854.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:854,&quot;width&quot;:1704,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:1509717,&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://www.ggpush.dev/i/152201534?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdc90a456-c28c-467b-a318-ac0511737dd8_1704x854.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_!iw5d!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdcefa3a7-65c5-49b7-992f-5d19d3f69699_1704x854.png 424w, https://substackcdn.com/image/fetch/$s_!iw5d!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdcefa3a7-65c5-49b7-992f-5d19d3f69699_1704x854.png 848w, https://substackcdn.com/image/fetch/$s_!iw5d!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdcefa3a7-65c5-49b7-992f-5d19d3f69699_1704x854.png 1272w, https://substackcdn.com/image/fetch/$s_!iw5d!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdcefa3a7-65c5-49b7-992f-5d19d3f69699_1704x854.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p><strong>I got my first computer when I was 12 years old</strong>. An Intel core2duo machine connected to a bulky CRT monitor. I still remember the exhilaration I got when I ran my first C program, writing the code directly into vim and compiling it with gcc on the terminal. Over the years, I went through many different such tools and packages.</p><p>Even to this day, every time I use a new tool that drastically changes the way I approach a problem my eyes light up like that 12 year old, perpetually curious, forever starry eyed and in love with technology.</p><p>I had a similar moment when I first started using Copilot and then Cursor. I could just tell what I wanted and it&#8217;d magically create code to do it. And I took maximum advantage of it, was shipping out code non stop, moving at an unparalleled building speed like never before in my career. </p><p><strong>That was until the dream run came to a sudden grinding halt about a month ago.</strong></p><div><hr></div><p>I was trying to debug a sudden convoluted issue in my code base. I&#8217;m generally good at debugging and a lot of it has to do with the fact that <em><strong>I truly believe in building Software systems than just Software programs.</strong></em> </p><p>And well designed, well defined systems run like a well oiled machinery. and moreover, It&#8217;s easier to debug because you can see the side effects of an issue from a mile away. </p><p>But this issue, which was actually just an inverse conditional mishap inside a while loop in a utility function took me a few excruciating hours. This was not directly part of the current file and hence it was not being picked up by cursor in it&#8217;s context, and hence it was unable to catch the error. </p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!6IaF!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbcabb7d0-7f0a-44ca-bf3a-82afc7145793_2336x900.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!6IaF!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbcabb7d0-7f0a-44ca-bf3a-82afc7145793_2336x900.png 424w, https://substackcdn.com/image/fetch/$s_!6IaF!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbcabb7d0-7f0a-44ca-bf3a-82afc7145793_2336x900.png 848w, https://substackcdn.com/image/fetch/$s_!6IaF!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbcabb7d0-7f0a-44ca-bf3a-82afc7145793_2336x900.png 1272w, https://substackcdn.com/image/fetch/$s_!6IaF!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbcabb7d0-7f0a-44ca-bf3a-82afc7145793_2336x900.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!6IaF!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbcabb7d0-7f0a-44ca-bf3a-82afc7145793_2336x900.png" width="1456" height="561" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/bcabb7d0-7f0a-44ca-bf3a-82afc7145793_2336x900.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:561,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:361316,&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://www.ggpush.dev/i/152201534?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbcabb7d0-7f0a-44ca-bf3a-82afc7145793_2336x900.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_!6IaF!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbcabb7d0-7f0a-44ca-bf3a-82afc7145793_2336x900.png 424w, https://substackcdn.com/image/fetch/$s_!6IaF!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbcabb7d0-7f0a-44ca-bf3a-82afc7145793_2336x900.png 848w, https://substackcdn.com/image/fetch/$s_!6IaF!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbcabb7d0-7f0a-44ca-bf3a-82afc7145793_2336x900.png 1272w, https://substackcdn.com/image/fetch/$s_!6IaF!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbcabb7d0-7f0a-44ca-bf3a-82afc7145793_2336x900.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p></p><p>What pissed me off so much tho was my dependency on Cursor, that I only started looking through the code much later, trying out to figure out the bug, something I should have done right away and which would&#8217;ve let me fix it in a few minutes.</p><p>But more than wasting my time on catching the bug, while sifting through the code base, <strong>I realised that a lot of patterns that I&#8217;d otherwise religiously follow, like modularity, reusability and composability was nowhere to be seen in my code base.</strong></p><p>Frankly, I felt a bit disappointed cause the code, while it did it&#8217;s job, was <strong>a lot sloppier than it should with a lot of volume, huge functions, lots of duplicated code, no proper isolation at places or segregation of responsibilities where it was needed</strong>. </p><p><em><strong>It was a little painful to look at my code.</strong></em></p><p>And that&#8217;s when in the first time in six months that I realised, Fuck, I might actually be regressing as a Software Engineer, And sucking even more as a Systems Engineer. The realisation was a hard hit, which soon then snowballed into all sort of revelations. While I&#8217;ve been moving at an unparalleled pace, building things like never before, my learnings had actually been plateaued.</p><p><em><strong>I&#8217;ve not really thought hard about something or learned something new in so long.</strong></em> </p><p>And then it got me thinking about all the junior devs that were working with me. And while I see them producing so much more output than what I was building at that stage in my career, <strong>are they really learning just as much?</strong> Are they understanding the differences between multiple approaches deeply enough so that they can make systems that are scalable and robust enough to withstand the stress of sudden growth or rapid change? </p><p><em><strong>Honestly, I was not sure.</strong></em> </p><p>And that lead me to scrutinise our code and our technical documents more deeply, and the realisations were not pretty. A lot of the solutions on its own were AI generated slop with lesser innovations and bold approaches. While we did do a whole lot of new things as a company, a lot of it was just traditional solutions which could&#8217;ve been designed a bit more elegantly. There was a whole lot of code, but lesser systems and modules. </p><p><em><strong>It was like we were ignoring one of the fundamental tenets of Software development, which is to write as less code as possible.</strong></em></p><p>So over the past few weeks, I spend time trying to figure out what are some best practices to follow while building with AI. So that we don&#8217;t fall into certain patterns of convenience that produces sloppy code that just about does the job.</p><p>Most of these have been said many times before by experienced builders, I&#8217;m just reiterating them here with intention for the AI assisted software development.</p><div class="pullquote"><p><strong>Systems first, Software second.</strong></p></div><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!kWt7!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8d5dc39c-0cf4-46df-bf89-45a227035e7b_1605x1009.jpeg" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!kWt7!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8d5dc39c-0cf4-46df-bf89-45a227035e7b_1605x1009.jpeg 424w, https://substackcdn.com/image/fetch/$s_!kWt7!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8d5dc39c-0cf4-46df-bf89-45a227035e7b_1605x1009.jpeg 848w, https://substackcdn.com/image/fetch/$s_!kWt7!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8d5dc39c-0cf4-46df-bf89-45a227035e7b_1605x1009.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!kWt7!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8d5dc39c-0cf4-46df-bf89-45a227035e7b_1605x1009.jpeg 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!kWt7!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8d5dc39c-0cf4-46df-bf89-45a227035e7b_1605x1009.jpeg" width="1456" height="915" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/8d5dc39c-0cf4-46df-bf89-45a227035e7b_1605x1009.jpeg&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:915,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;Evolution of SpaceX' Raptor rocket engine. : r/Damnthatsinteresting&quot;,&quot;title&quot;:&quot;Evolution of SpaceX' Raptor rocket engine. : r/Damnthatsinteresting&quot;,&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="Evolution of SpaceX' Raptor rocket engine. : r/Damnthatsinteresting" title="Evolution of SpaceX' Raptor rocket engine. : r/Damnthatsinteresting" srcset="https://substackcdn.com/image/fetch/$s_!kWt7!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8d5dc39c-0cf4-46df-bf89-45a227035e7b_1605x1009.jpeg 424w, https://substackcdn.com/image/fetch/$s_!kWt7!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8d5dc39c-0cf4-46df-bf89-45a227035e7b_1605x1009.jpeg 848w, https://substackcdn.com/image/fetch/$s_!kWt7!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8d5dc39c-0cf4-46df-bf89-45a227035e7b_1605x1009.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!kWt7!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8d5dc39c-0cf4-46df-bf89-45a227035e7b_1605x1009.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 role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>A good engineer should never shy away from complexity, but should also internalise that there is nothing really valuable in creating a system so complex that it gives a headache to anyone who tries to make any sense of it.</p><p><em><strong>Real art in Engineering lies in Absolving systems of their complexities</strong></em>. </p><p>I would even go as far as to say that it is Art. And that&#8217;s where your actual core skills as a developer lie. </p><p><em><strong>A System becomes better not when you add more complexity to it, But when you take away the complexity but it still works the same, or better</strong></em>.  </p><ul><li><p><strong>Modularise your workflows, </strong>logically arrange your code base into modules. </p></li><li><p><strong>Build components within modules</strong>, let them interact with each other for the outcome you aim to achieve. </p></li><li><p><strong>Create true composability in your codebase</strong>. Don&#8217;t just look at things in terms of inputs and outputs that go through a black box.</p></li></ul><p><em><strong>An engineer should be fascinated by what goes on inside a system and what makes it tick</strong></em></p><p>While working with an AI IDE like Cursor, this means you need to carefully supply instructions on how you want your code to be generated. </p><p>Give examples using context files. Explicitly instruct it to modularise the code and reuse it in a certain way. Manually design your interfaces and facades. <strong>Just use AI to generate the final code output as per your well designed, well thought out pattern.</strong></p><div class="pullquote"><p><strong>Solution-ing? Do it the first principles way</strong></p></div><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!Nwhj!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F70f38818-8c76-4002-9d5c-69d8adcd9ada_1600x866.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!Nwhj!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F70f38818-8c76-4002-9d5c-69d8adcd9ada_1600x866.png 424w, https://substackcdn.com/image/fetch/$s_!Nwhj!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F70f38818-8c76-4002-9d5c-69d8adcd9ada_1600x866.png 848w, https://substackcdn.com/image/fetch/$s_!Nwhj!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F70f38818-8c76-4002-9d5c-69d8adcd9ada_1600x866.png 1272w, https://substackcdn.com/image/fetch/$s_!Nwhj!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F70f38818-8c76-4002-9d5c-69d8adcd9ada_1600x866.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!Nwhj!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F70f38818-8c76-4002-9d5c-69d8adcd9ada_1600x866.png" width="1456" height="788" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/70f38818-8c76-4002-9d5c-69d8adcd9ada_1600x866.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:788,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;Complexity : r/ProgrammerHumor&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 : r/ProgrammerHumor" title="Complexity : r/ProgrammerHumor" srcset="https://substackcdn.com/image/fetch/$s_!Nwhj!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F70f38818-8c76-4002-9d5c-69d8adcd9ada_1600x866.png 424w, https://substackcdn.com/image/fetch/$s_!Nwhj!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F70f38818-8c76-4002-9d5c-69d8adcd9ada_1600x866.png 848w, https://substackcdn.com/image/fetch/$s_!Nwhj!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F70f38818-8c76-4002-9d5c-69d8adcd9ada_1600x866.png 1272w, https://substackcdn.com/image/fetch/$s_!Nwhj!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F70f38818-8c76-4002-9d5c-69d8adcd9ada_1600x866.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>You&#8217;re as good an engineer as how you&#8217;re at Problem solving. <strong>And the a good problem solver is always a cross functional thinker, someone who always thinks from First principles.</strong> When you ask AI for a solution, what you get may not be the best solution, but is something of an approximation of what would work in most cases, which honestly, is almost always a good enough solution, </p><p><em><strong>But</strong></em> <em><strong>when has &#8220;good enough&#8221; been enough for high achieving people?</strong></em></p><ul><li><p><strong>Think from First principles always</strong>, approach the problem from multiple axes.</p></li><li><p><strong>Formulate solutions in your head and write it down</strong>, Use AI more as an assistant rather than a teacher. Use it as a knowledge base rather than an all knowing source of truth. </p></li><li><p><strong>Come up with N different solutions and compare them</strong>, truly try to understand the differences and nitty gritties of different approaches before taking a decision. Learn along the process. </p></li></ul><p><em><strong>Don&#8217;t just ask AI to give you a solution for this problem.</strong></em></p><p>I&#8217;ve seen a lot of cases where AI is told the problem statement and is asked to generate an PRD/ERD for it. <em><strong>Don&#8217;t do it</strong></em>. </p><p>Use ChatGPT/Claude/Gemini as a tool where you can bounce your ideas off of. Even when you&#8217;re stuck and you need a solution, If you ask for a solution, ask why it&#8217;s the best solution for the situation. </p><p><em><strong>Force yourself and the model to think through your own reasoning capabilities rather that what was RLHF&#8217;d into it.</strong></em></p><div class="pullquote"><p><strong>Less code, the better.</strong></p></div><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!w27R!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5e9946b6-92a8-4d54-9682-74b09c09d985_312x307.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!w27R!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5e9946b6-92a8-4d54-9682-74b09c09d985_312x307.png 424w, https://substackcdn.com/image/fetch/$s_!w27R!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5e9946b6-92a8-4d54-9682-74b09c09d985_312x307.png 848w, https://substackcdn.com/image/fetch/$s_!w27R!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5e9946b6-92a8-4d54-9682-74b09c09d985_312x307.png 1272w, https://substackcdn.com/image/fetch/$s_!w27R!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5e9946b6-92a8-4d54-9682-74b09c09d985_312x307.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!w27R!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5e9946b6-92a8-4d54-9682-74b09c09d985_312x307.png" width="312" height="307" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/5e9946b6-92a8-4d54-9682-74b09c09d985_312x307.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:307,&quot;width&quot;:312,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;1739: Fixing Problems - explain xkcd&quot;,&quot;title&quot;:&quot;1739: Fixing Problems - explain xkcd&quot;,&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="1739: Fixing Problems - explain xkcd" title="1739: Fixing Problems - explain xkcd" srcset="https://substackcdn.com/image/fetch/$s_!w27R!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5e9946b6-92a8-4d54-9682-74b09c09d985_312x307.png 424w, https://substackcdn.com/image/fetch/$s_!w27R!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5e9946b6-92a8-4d54-9682-74b09c09d985_312x307.png 848w, https://substackcdn.com/image/fetch/$s_!w27R!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5e9946b6-92a8-4d54-9682-74b09c09d985_312x307.png 1272w, https://substackcdn.com/image/fetch/$s_!w27R!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5e9946b6-92a8-4d54-9682-74b09c09d985_312x307.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p><em><strong>Writing code has always been the easiest part of the job</strong></em>. Sure it used to take time, but it was still easy because it was the most direct part of the whole job. <em><strong>Code is what Code does</strong></em> and as soon as know what you want to do, Writing it down in a language of your choice is much like translation. You would have to look up the syntax every now and then, but it was mostly quite straight forward.</p><p><em><strong>But writing beautiful code is hard, writing elegant code that mesmerises anyone who looks at it is even harder</strong></em></p><ul><li><p><strong>Break your code down into simple</strong>, <strong>elegant functions</strong> that works very well together like a well oiled machine. </p></li><li><p><strong>Periodically go through your code base to understand redundancies</strong>, use AI to intentionally refactor your code as per best practices.</p></li><li><p><strong>Avoid duplication, reuse functions by creating utility files,</strong> follow a pattern in your entire code base end enforce your code generator to follow it.</p></li></ul><p>And that&#8217;s what you do when you truly love programming, You keep iterating, you keep understanding nuances and making it better. You find joy in knowing about the little syntactic sugars in different programming languages. And you do it all not because someone asked you to, but because you appreciate it yourself.</p><p>And that&#8217;s something every software engineer should be doing, and not just writing more and more code </p><p><em><strong>Take pride in understanding your codebase like the back of your hand.</strong></em></p><div><hr></div><p>AI generated slop is now recognisable to me from a mile away. A lot of my peers also share the same view. </p><p>I&#8217;m sure, with time it&#8217;ll get better, but for the time being, it&#8217;s quite off putting for me to see it in production scenarios. </p><p><em><strong>As builders, we owe it to ourselves and our stakeholders to maintain a certain standard to our craft.</strong></em> </p><p>So to new Software engineers, and serious builders, </p><ul><li><p><strong>Don&#8217;t just generate code for it&#8217;s utility</strong>, try to understand what it does and how it does it. </p></li><li><p><strong>Figure out patterns</strong>, try to refactor the code to make it more simple and readable. </p></li><li><p><strong>Learn about design patterns and systems engineering</strong>, make an informed decision about what to use when and why to use it. </p></li><li><p><strong>Go back to first principles thinking for solving a problem.</strong> </p></li></ul><p><em><strong>Build things, Break things, But do it the right way. I know it&#8217;s hard, but come on, if it was that easy, what even is the point of doing it? :)</strong></em></p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://www.ggpush.dev/p/the-cursor-curse/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://www.ggpush.dev/p/the-cursor-curse/comments"><span>Leave a comment</span></a></p><div class="directMessage button" data-attrs="{&quot;userId&quot;:134587815,&quot;userName&quot;:&quot;Ashfakh&quot;,&quot;canDm&quot;:null,&quot;dmUpgradeOptions&quot;:null,&quot;isEditorNode&quot;:true}" data-component-name="DirectMessageToDOM"></div><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://www.ggpush.dev/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 ggpush! 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[Building Production grade AI Agents - Part 3]]></title><description><![CDATA[Insights to build high performant, smart, production grade AI agents and automation.]]></description><link>https://www.ggpush.dev/p/building-production-grade-ai-agents-beb</link><guid isPermaLink="false">https://www.ggpush.dev/p/building-production-grade-ai-agents-beb</guid><dc:creator><![CDATA[Ashfakh]]></dc:creator><pubDate>Wed, 26 Feb 2025 09:39:45 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc93d4971-29b0-4421-8b67-48964f711e3f_1600x762.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>Read Part 1 &amp; 2 here</p><div class="digest-post-embed" data-attrs="{&quot;nodeId&quot;:&quot;eb2bf54e-5a84-4744-a61b-26454364fdfb&quot;,&quot;caption&quot;:&quot;You&#8217;re not building &#8220;AI&#8221;, At best, you&#8217;re mimicking it&quot;,&quot;cta&quot;:null,&quot;showBylines&quot;:true,&quot;size&quot;:&quot;sm&quot;,&quot;isEditorNode&quot;:true,&quot;title&quot;:&quot;Building Production grade AI Agents - Part 1&quot;,&quot;publishedBylines&quot;:[{&quot;id&quot;:134587815,&quot;name&quot;:&quot;Ashfakh&quot;,&quot;bio&quot;:&quot;Engineer, T(h)inkerer, Dreamer&quot;,&quot;photo_url&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/d1f777f0-209c-49d7-8054-045a527cc2c6_604x604.jpeg&quot;,&quot;is_guest&quot;:false,&quot;bestseller_tier&quot;:null}],&quot;post_date&quot;:&quot;2024-11-26T10:23:55.926Z&quot;,&quot;cover_image&quot;:&quot;https://substackcdn.com/image/fetch/f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F26411f9d-60cc-4d6c-b6cf-6bc57f174a38_2310x1056.png&quot;,&quot;cover_image_alt&quot;:null,&quot;canonical_url&quot;:&quot;https://www.ggpush.dev/p/building-production-grade-ai-agents&quot;,&quot;section_name&quot;:null,&quot;video_upload_id&quot;:null,&quot;id&quot;:150975103,&quot;type&quot;:&quot;newsletter&quot;,&quot;reaction_count&quot;:5,&quot;comment_count&quot;:0,&quot;publication_id&quot;:null,&quot;publication_name&quot;:&quot;ggpush&quot;,&quot;publication_logo_url&quot;:&quot;https://substackcdn.com/image/fetch/f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0149bbc4-c231-4818-aec0-772bb5c4a165_512x512.png&quot;,&quot;belowTheFold&quot;:false,&quot;youtube_url&quot;:null,&quot;show_links&quot;:null,&quot;feed_url&quot;:null}"></div><div class="digest-post-embed" data-attrs="{&quot;nodeId&quot;:&quot;2b2ed395-3b29-434c-b631-93106c236c8a&quot;,&quot;caption&quot;:&quot;Read Part 1 here&quot;,&quot;cta&quot;:null,&quot;showBylines&quot;:true,&quot;size&quot;:&quot;sm&quot;,&quot;isEditorNode&quot;:true,&quot;title&quot;:&quot;Building Production grade AI Agents - Part 2&quot;,&quot;publishedBylines&quot;:[{&quot;id&quot;:134587815,&quot;name&quot;:&quot;Ashfakh&quot;,&quot;bio&quot;:&quot;Engineer, T(h)inkerer, Dreamer&quot;,&quot;photo_url&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/d1f777f0-209c-49d7-8054-045a527cc2c6_604x604.jpeg&quot;,&quot;is_guest&quot;:false,&quot;bestseller_tier&quot;:null}],&quot;post_date&quot;:&quot;2025-01-14T10:14:36.284Z&quot;,&quot;cover_image&quot;:&quot;https://substackcdn.com/image/fetch/f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcc3fc75a-a741-4b7d-ae02-f8cbafac249f_936x642.png&quot;,&quot;cover_image_alt&quot;:null,&quot;canonical_url&quot;:&quot;https://www.ggpush.dev/p/building-production-grade-ai-agents-fbe&quot;,&quot;section_name&quot;:null,&quot;video_upload_id&quot;:null,&quot;id&quot;:152201481,&quot;type&quot;:&quot;newsletter&quot;,&quot;reaction_count&quot;:1,&quot;comment_count&quot;:2,&quot;publication_id&quot;:null,&quot;publication_name&quot;:&quot;ggpush&quot;,&quot;publication_logo_url&quot;:&quot;https://substackcdn.com/image/fetch/f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0149bbc4-c231-4818-aec0-772bb5c4a165_512x512.png&quot;,&quot;belowTheFold&quot;:false,&quot;youtube_url&quot;:null,&quot;show_links&quot;:null,&quot;feed_url&quot;:null}"></div><div><hr></div><p>Over the past month at Breakout, we&#8217;ve been busy building and shipping features while welcoming new customers. Amid this organised chaos, I&#8217;m excited to share one of my favorite topics in this whole series: leveraging the Actor model to build a comprehensive multi-agent framework.</p><p>In our previous posts, we explored the capabilities of large language models and laid the groundwork for building reliable Agentic workflows. Today, I&#8217;m taking a deeper dive by introducing a novel architecture that combines these ideas with the Actor model&#8212;an approach that brings modular decision-making and robust state management to distributed systems, to build powerful multi-agentic frameworks for your production AI agents.</p><h3>What is the Actor Model?</h3><p>The Actor model is a computational paradigm designed for handling concurrency and distributed processing. Introduced by Carl Hewitt in 1973, it treats each <strong>Actor</strong> as an independent unit that encapsulates its state and interacts solely through asynchronous message passing. This means:</p><ul><li><p><strong>Isolation of State:</strong> Each Actor maintains its own state, which is never shared directly with others.</p></li><li><p><strong>Asynchronous Communication:</strong> Actors exchange information only by passing messages, reducing the risk of race conditions.</p></li><li><p><strong>Scalability and Fault Tolerance:</strong> Since Actors operate independently, systems built on this model can scale effortlessly and remain resilient under load.</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_!XNhy!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcd8e8fd8-59e2-41ba-87ea-051a42970a17_1463x1028.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!XNhy!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcd8e8fd8-59e2-41ba-87ea-051a42970a17_1463x1028.png 424w, https://substackcdn.com/image/fetch/$s_!XNhy!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcd8e8fd8-59e2-41ba-87ea-051a42970a17_1463x1028.png 848w, https://substackcdn.com/image/fetch/$s_!XNhy!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcd8e8fd8-59e2-41ba-87ea-051a42970a17_1463x1028.png 1272w, https://substackcdn.com/image/fetch/$s_!XNhy!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcd8e8fd8-59e2-41ba-87ea-051a42970a17_1463x1028.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!XNhy!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcd8e8fd8-59e2-41ba-87ea-051a42970a17_1463x1028.png" width="1456" height="1023" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/cd8e8fd8-59e2-41ba-87ea-051a42970a17_1463x1028.png&quot;,&quot;srcNoWatermark&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/833bbf87-014b-4581-94ac-4e43cae25fac_1463x1028.png&quot;,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1023,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:137521,&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_!XNhy!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcd8e8fd8-59e2-41ba-87ea-051a42970a17_1463x1028.png 424w, https://substackcdn.com/image/fetch/$s_!XNhy!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcd8e8fd8-59e2-41ba-87ea-051a42970a17_1463x1028.png 848w, https://substackcdn.com/image/fetch/$s_!XNhy!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcd8e8fd8-59e2-41ba-87ea-051a42970a17_1463x1028.png 1272w, https://substackcdn.com/image/fetch/$s_!XNhy!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcd8e8fd8-59e2-41ba-87ea-051a42970a17_1463x1028.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Representation of Actor Framework in an E-commerce system</figcaption></figure></div><p>I was first introduced to this Actor framework while building a Kafka consumer framework with Akka in my early career. Later, at Dream11&#8212;India&#8217;s largest fantasy sports platform&#8212;Using the Actor model, we designed and built the world&#8217;s largest multiplayer join engine, capable of handling multiple transactions and validations in a distributed system in under 50ms at a concurrency of 20M join RPM &#129327;.</p><p>But this post is not about building a high scale system. Sure, that&#8217;s one big advantage of the framework, but that&#8217;s not exactly the reason why we chose it for our next generation AI Agentic architecture.</p><h3>Why the Actor Model?</h3><p>What truly captivates me about the Actor model is its simplicity and its ability to directly address complex system challenges:</p><ul><li><p><strong>Modularity:</strong> It&#8217;s straightforward to build systems where decision-making is broken down into manageable, independent components. </p><ul><li><p>In an AI Agentic System, this let&#8217;s us easily build complex intelligent workflows with more freedom without having to worry about it being a monolithic behemoth which is impossible to debug and scale. Code modularity FTW.</p></li></ul></li><li><p><strong>Message Driven: </strong>Actor Systems are inherently Message Driven, which blends well with how Most AI Agentic systems work.</p><ul><li><p>This also let&#8217;s us create an Event Driven system, which is more stable and easier to debug and maintain.</p></li></ul></li><li><p><strong>Robust State Management:</strong> Each Actor handles its own state, making the overall system more reliable and easier to maintain..</p><ul><li><p>As we discussed in the last post, Proper State management is important in building reliable Agentic Systems, by keeping states local to an Actor we avoid unintended race conditions, and otherwise <em>Intelligence bleed</em></p></li></ul></li><li><p><strong>Scalability:</strong> The lightweight, decoupled nature of Actors makes them ideal for high-concurrency environments.</p><ul><li><p>We can easily build DAG like workflows, parallelising independent tasks to achieve high speed. Most Agentic Systems are painfully slow, But an Actor based reactive system would be as fast as it could get.</p></li><li><p>Don&#8217;t believe me? Try out the <a href="http://getbreakout.ai/">Breakout</a> agent on our website &#128521;</p></li></ul></li></ul><p>In the remainder of this post, I&#8217;ll walk you through the architecture and the benefits it brings to our workflows.</p><p>As mentioned earlier, an actor maintains its own memory to manage its state and has the capability to spawn new actors to handle additional work. Crucially, actors communicate exclusively via message passing, ensuring a clean separation of concerns and state isolation. In our framework, we've encapsulated this functionality in an Actor class with its own attached memory.</p><h4>The Ask and Tell Pattern</h4><p>Our communication model between actors (or between an actor and a controller) is built around two primary methods:</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!DgGx!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc93d4971-29b0-4421-8b67-48964f711e3f_1600x762.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!DgGx!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc93d4971-29b0-4421-8b67-48964f711e3f_1600x762.png 424w, https://substackcdn.com/image/fetch/$s_!DgGx!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc93d4971-29b0-4421-8b67-48964f711e3f_1600x762.png 848w, https://substackcdn.com/image/fetch/$s_!DgGx!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc93d4971-29b0-4421-8b67-48964f711e3f_1600x762.png 1272w, https://substackcdn.com/image/fetch/$s_!DgGx!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc93d4971-29b0-4421-8b67-48964f711e3f_1600x762.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!DgGx!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc93d4971-29b0-4421-8b67-48964f711e3f_1600x762.png" width="1456" height="693" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/c93d4971-29b0-4421-8b67-48964f711e3f_1600x762.png&quot;,&quot;srcNoWatermark&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/df23806f-6de6-42ac-bcb2-f9b1fb0666e5_1600x762.png&quot;,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:693,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!DgGx!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc93d4971-29b0-4421-8b67-48964f711e3f_1600x762.png 424w, https://substackcdn.com/image/fetch/$s_!DgGx!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc93d4971-29b0-4421-8b67-48964f711e3f_1600x762.png 848w, https://substackcdn.com/image/fetch/$s_!DgGx!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc93d4971-29b0-4421-8b67-48964f711e3f_1600x762.png 1272w, https://substackcdn.com/image/fetch/$s_!DgGx!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc93d4971-29b0-4421-8b67-48964f711e3f_1600x762.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><ul><li><p><strong>Ask</strong>: This method sends a message to an actor and awaits a response. It represents a blocking call where the sender expects a result before proceeding.</p></li><li><p><strong>Tell</strong>: This method sends a message without waiting for a response, allowing the sender to immediately move on to its next task.</p></li></ul><p>These two patterns let us create both synchronous and asynchronous workflows to effectively coordinate complex tasks.</p><h4>The Base Actor Class</h4><p>Below is a sample base class for our Actor model in python. We use asyncio library to manage synchronous and asynchronous tasks.</p><pre><code>T = TypeVar("T")


class Actor(Generic[T], ABC):
    def __init__(
        self,
        initial_memory: Optional[T],
        actor_id: Optional[str] = None,
    ):
        """
        Initialise actor with either new or persisted memory.
        If no actor_id is provided, generates a new UUID.

        Args:
            initial_memory: Default memory if no persisted state exists
            actor_id: Optional identifier to retrieve persisted memory
        """
        self._id: str = actor_id or str(uuid.uuid4())
        self._memory: T = initial_memory or T()

    @property
    def id(self) -&gt; str:
        """
        Get the actor's identifier.

        Returns:
            str: The actor's unique identifier
        """
        return self._id

    @property
    def memory(self) -&gt; T:
        return self._memory

    def _load_memory(self, actor_id: str) -&gt; T:
        """
        Load persisted memory for this actor.
        Must be implemented by concrete actors.

        Args:
            actor_id: The identifier for the persisted memory
        Returns:
            T: The loaded memory object
        """
        pass

    @abstractmethod
    async def on_receive(self, message: Any):
        """
        Handle incoming messages and orchestrate tasks.
        Must be implemented by concrete actors.

        Args:
            message: The message to be processed
        Returns:
            Any: The result of processing the message
        """
        pass

    async def ask(self, message: Any):
        """
        Blocking call to get a result from the actor.

        Args:
            message: The message to be processed
        Returns:
            Any: The result from on_receive
        """
        return await self.on_receive(message)

    def tell(self, message: Any):
        """
        Non-blocking call to send a message to the actor.

        Args:
            message: The message to be processed
        """
        asyncio.create_task(self.on_receive(message))

    def get_memory(self) -&gt; T:
        """
        Accessor for the actor's local memory.

        Returns:
            T: The actor's memory
        """
        return self._memory

    def set_memory(self, memory: T):
        """
        Mutator for the actor's local memory.

        Args:
            memory: The new memory object
        """
        self._memory = memory

    def persist_memory(self, external_storage: Any):
        """
        Store the actor's memory externally.
        Must be implemented by persistant actors.

        Args:
            external_storage: The storage mechanism to persist memory
        """
        pass
</code></pre><ul><li><p><strong>Generic Type and Initialisation:</strong></p><ul><li><p>The class uses a generic type parameter <code>T</code> (defined via <code>TypeVar("T")</code>) to represent the type of the actor's memory. This allows flexibility in the kind of state an actor can manage.</p></li><li><p>In the constructor (<code>__init__</code>), the actor is initialised with an <code>initial_memory</code>. If no <code>actor_id</code> is provided, a new unique identifier is generated using UUIDs, ensuring every actor is uniquely addressable.</p></li></ul></li><li><p><strong>Properties and State Management:</strong></p><ul><li><p>The <code>id</code> property provides read-only access to the actor&#8217;s unique identifier.</p></li><li><p>The <code>memory</code> property (along with <code>get_memory</code> and <code>set_memory</code> methods) provides controlled access to the actor&#8217;s internal state. This encapsulation ensures that the actor's state remains isolated and can only be modified through defined interfaces.</p></li><li><p>Additionally we use memory to hold the information within the flow at any given state. You can update it independently within the actor thereby avoiding race conditions. (An actor is single threaded by default)</p></li></ul></li><li><p><strong>Message Handling:</strong></p><ul><li><p>The abstract method <code>on_receive</code> is where the actor processes incoming messages. Each concrete actor must implement this method to define its specific behaviour upon receiving a message. </p></li><li><p>The Task graph discussed in the last post can essentially be implemented within the on_recieve function. Further, we can have an Event driven system to handle messages coming through effectively, Essentially you can define Event types for incoming messages and handler function to handle them separately.</p></li><li><p>The <code>ask</code> method is an asynchronous, blocking call that sends a message to the actor and waits for a result. This is useful when the sender needs a response before proceeding.</p></li><li><p>The <code>tell</code> method, on the other hand, dispatches a message asynchronously without waiting for a result, allowing the sender to continue with other tasks.</p></li></ul></li><li><p><strong>Persistence Mechanisms:</strong></p><ul><li><p>The <code>_load_memory</code> and <code>persist_memory</code> methods are placeholders intended for handling persistent state. Concrete implementations can define how to load and store the actor's state externally, which is crucial for maintaining state across system restarts or failures. </p></li><li><p>This is an optional feature, Ideally we manage everything in application memory for a given workflow, after an Actor&#8217;s lifecycle gets over we lose the Memory to GC. But incase you want to persist information across multiple sessions, the memory can be serialised and stored in a database against the given actor_id. This is especially useful in the cases of failures or even long agentic sessions that takes a while to complete.</p></li></ul></li></ul><p>In production systems, error handling is crucial. In an actor-based framework:</p><ul><li><p><strong>Supervision Trees:</strong> Similar to Akka, we can implement a supervision strategy where parent actors monitor their children and restart them upon failures.</p></li><li><p><strong>Graceful Degradation:</strong> Actors can implement fallback mechanisms or retries to handle transient errors without compromising the overall system stability. This is especially useful in an LLM context, incase of inference failures.</p></li><li><p><strong>Back Propagation: </strong>An Actor can Propagate it&#8217;s status to it&#8217;s parent and ultimately to the source, which means the Client can always be aware of what is happening.</p><ul><li><p>This is especially useful in building Transparent Human in the loop AI systems, where you can always send back messages or take feedback on what is happening over a websocket.</p></li></ul></li></ul><p>The modular decision-making provided by the Actor model makes it an excellent match for workflows involving large language models (LLMs). By isolating state and using asynchronous messaging, you can:</p><ul><li><p><strong>Enhance Modular Workflows:</strong> Each component (or agent) can focus on a specific task, such as preprocessing, inference, or post-processing.</p></li><li><p><strong>Improve Fault Tolerance:</strong> Isolated state management minimises the risk of cascading failures in complex AI workflows.</p></li></ul><div><hr></div><p>With these principles in mind, you can design a multi-agent framework to create workflows or ReACT agents with each actor having well-defined responsibilities. Imagine creating an AI coder where:</p><ul><li><p>One actor is responsible for <strong>planning the project</strong>.</p></li><li><p>Another actor <strong>manages modules and files</strong>.</p></li><li><p>A different actor <strong>writes the code</strong>.</p></li><li><p>Yet another actor <strong>reviews the code</strong>.</p></li><li><p>One more actor <strong>tests the code</strong>.</p></li><li><p>And finally, an actor <strong>deploys the code</strong>.</p></li></ul><p>By separating these responsibilities, you build an extremely powerful and robust system capable of delivering high-quality outcomes&#8212;arguably the most important metric in any AI agent product. This division of labor not only enhances clarity and maintainability but also enables parallel development and quicker iteration cycles, ensuring each component can be optimised independently.</p><p>The Actor model is more than just a concurrency mechanism&#8212;it&#8217;s a powerful architectural paradigm that enables modular, scalable, and fault-tolerant systems. By combining it with agentic workflows and modern LLMs, you can build robust AI-driven applications that are both easy to manage and highly performant.</p><p>I hope this deep dive helps you see the full potential of the Actor model and implement it in your next AI project. As always, your feedback and questions are welcome&#8212;feel free to share your thoughts in the comments!</p><div><hr></div><p>At <a href="https://getbreakout.ai/">Breakout</a>, We are putting these ideas into practice and building the smartest AI Sales Rep in the world. If this sounds like a challenging task to you, Do reach out to me at <a href="mailto:ashfakh@getbreakout.ai">ashfakh@getbreakout.ai</a></p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://www.ggpush.dev/p/building-production-grade-ai-agents-beb/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://www.ggpush.dev/p/building-production-grade-ai-agents-beb/comments"><span>Leave a comment</span></a></p><div class="directMessage button" data-attrs="{&quot;userId&quot;:134587815,&quot;userName&quot;:&quot;Ashfakh&quot;,&quot;canDm&quot;:null,&quot;dmUpgradeOptions&quot;:null,&quot;isEditorNode&quot;:true}" data-component-name="DirectMessageToDOM"></div><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://www.ggpush.dev/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 ggpush! 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[Building Production grade AI Agents - Part 2]]></title><description><![CDATA[Insights to build high performant, smart, production grade AI agents and automation.]]></description><link>https://www.ggpush.dev/p/building-production-grade-ai-agents-fbe</link><guid isPermaLink="false">https://www.ggpush.dev/p/building-production-grade-ai-agents-fbe</guid><dc:creator><![CDATA[Ashfakh]]></dc:creator><pubDate>Tue, 14 Jan 2025 10:14:36 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!h074!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcc3fc75a-a741-4b7d-ae02-f8cbafac249f_936x642.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>Read Part 1 here</p><div class="digest-post-embed" data-attrs="{&quot;nodeId&quot;:&quot;e4757200-22af-4fcb-a673-30105d4c1f90&quot;,&quot;caption&quot;:&quot;You&#8217;re not building &#8220;AI&#8221;, At best, you&#8217;re mimicking it&quot;,&quot;cta&quot;:null,&quot;showBylines&quot;:true,&quot;size&quot;:&quot;sm&quot;,&quot;isEditorNode&quot;:true,&quot;title&quot;:&quot;Building Production grade AI Agents - Part 1&quot;,&quot;publishedBylines&quot;:[{&quot;id&quot;:134587815,&quot;name&quot;:&quot;Ashfakh&quot;,&quot;bio&quot;:&quot;Engineer, T(h)inkerer, Dreamer&quot;,&quot;photo_url&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/d1f777f0-209c-49d7-8054-045a527cc2c6_604x604.jpeg&quot;,&quot;is_guest&quot;:false,&quot;bestseller_tier&quot;:null}],&quot;post_date&quot;:&quot;2024-11-26T10:23:55.926Z&quot;,&quot;cover_image&quot;:&quot;https://substackcdn.com/image/fetch/f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F26411f9d-60cc-4d6c-b6cf-6bc57f174a38_2310x1056.png&quot;,&quot;cover_image_alt&quot;:null,&quot;canonical_url&quot;:&quot;https://www.ggpush.dev/p/building-production-grade-ai-agents&quot;,&quot;section_name&quot;:null,&quot;video_upload_id&quot;:null,&quot;id&quot;:150975103,&quot;type&quot;:&quot;newsletter&quot;,&quot;reaction_count&quot;:5,&quot;comment_count&quot;:0,&quot;publication_id&quot;:null,&quot;publication_name&quot;:&quot;ggpush&quot;,&quot;publication_logo_url&quot;:&quot;https://substackcdn.com/image/fetch/f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0149bbc4-c231-4818-aec0-772bb5c4a165_512x512.png&quot;,&quot;belowTheFold&quot;:false,&quot;youtube_url&quot;:null,&quot;show_links&quot;:null,&quot;feed_url&quot;:null}"></div><div><hr></div><p>I know it&#8217;s been a while since I promised this second part&#8212;but time really does fly when you&#8217;re busy building cool things! But I hope the wait is worth it, as this post could be your first step towards building reliable, production-grade agents that deliver real value to society&#8212;without accidentally sparking an AI takeover.</p><p>**<em><a href="https://en.wikipedia.org/wiki/Roko%27s_basilisk">Let it be noted in Internet Archives that I positively contributed to building AI agents.</a> &#128269;</em>**</p><p>So In the last post, we briefly discussed about LLMs and their capabilities. We also discussed about some tenets to keep in mind while building an AI agent. In this post, We&#8217;ll take a deeper dive into the technical implementation of workflow-based AI agents&#8212;designed with a clear focus on accomplishing specific tasks within an acceptable operating policy. We'll begin by exploring some useful mental models on development, followed by a detailed breakdown of their architecture. </p><p>A key thing to understand while building agents is the trade-offs between different design choices to achieve various outcomes. To illustrate this, I like to draw a parallel with the CAP theorem in distributed systems. The CAP theorem states that a distributed system can guarantee only two out of three properties: consistency, availability, and partition tolerance.</p><p>This concept can be loosely adapted to AI applications (as a thought exercise to appreciate the inherent trade-offs in building AI agents). In my AI-focused version of the CAP theorem, the "C-A-P" represents <strong>Consistency</strong>, <strong>Agentic Capability</strong>, and <strong>Performance</strong>.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!h074!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcc3fc75a-a741-4b7d-ae02-f8cbafac249f_936x642.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!h074!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcc3fc75a-a741-4b7d-ae02-f8cbafac249f_936x642.png 424w, https://substackcdn.com/image/fetch/$s_!h074!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcc3fc75a-a741-4b7d-ae02-f8cbafac249f_936x642.png 848w, https://substackcdn.com/image/fetch/$s_!h074!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcc3fc75a-a741-4b7d-ae02-f8cbafac249f_936x642.png 1272w, https://substackcdn.com/image/fetch/$s_!h074!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcc3fc75a-a741-4b7d-ae02-f8cbafac249f_936x642.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!h074!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcc3fc75a-a741-4b7d-ae02-f8cbafac249f_936x642.png" width="936" height="642" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/cc3fc75a-a741-4b7d-ae02-f8cbafac249f_936x642.png&quot;,&quot;srcNoWatermark&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/d9cd7899-df9b-403b-a8be-e4106cbdfffb_936x642.png&quot;,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:642,&quot;width&quot;:936,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:74768,&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_!h074!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcc3fc75a-a741-4b7d-ae02-f8cbafac249f_936x642.png 424w, https://substackcdn.com/image/fetch/$s_!h074!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcc3fc75a-a741-4b7d-ae02-f8cbafac249f_936x642.png 848w, https://substackcdn.com/image/fetch/$s_!h074!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcc3fc75a-a741-4b7d-ae02-f8cbafac249f_936x642.png 1272w, https://substackcdn.com/image/fetch/$s_!h074!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcc3fc75a-a741-4b7d-ae02-f8cbafac249f_936x642.png 1456w" sizes="100vw" fetchpriority="high"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p></p><blockquote><p><strong>Consistency</strong> - The Consistency provided by the agent in its responses/outcomes.</p><p><strong>Agentic capabilities</strong> - The different capabilities that the Agent has.</p><p><strong>Performance</strong> - How fast the agent executes its duties, how much resource intensive its tasks are, and how costly it is to run it.</p></blockquote><p>Any Agentic system we create can be evaluated along these three axes, but achieving all three simultaneously is constrained by inherent trade-offs.</p><ul><li><p><strong>Consistency + Agentic Outcomes = Low Performance</strong>: A highly consistent agent with robust, targeted outcomes will typically sacrifice performance. This is because achieving such outcomes often requires multiple processing steps, including rankers, graders, and evaluators to prevent hallucinations or deviation from the desired path. (Read about using LLMs as evaluators <a href="https://eugeneyan.com/writing/llm-evaluators/">here</a>) These additional steps slow down the system.</p></li><li><p><strong>Agentic Outcomes + High Performance = Low Consistency</strong>: An agent designed for high performance and broad capabilities will often compromise consistency. To achieve speed and handle diverse tasks, it becomes necessary to skip some grader or evaluator steps and rely on fused (combined) LLM calls, which can increase the likelihood of errors or inconsistencies. Combined LLM calls which run in parallel or Series have their outputs <em>fused </em>together to get the final result. In absence of proper evaluators. Hallucinations can creep in very easily.</p></li><li><p><strong>Consistency + High Performance = Limited Outcomes</strong>: If the goal is to create an agent that balances strong consistency with high performance, its capabilities must be narrowed. The agent will need to focus on a smaller set of outcomes to minimize complexity, enabling faster and more accurate responses.</p></li></ul><p>Here is an Example code for an Agentic workflow supporting multiple outcomes that has to be consistent.</p><pre><code>#Building a Consistent Agent capable of doing many things
class ConsistentMultiCapabilityAgent:
    async def execute_task(self, input_data):
        # Performance impact: Multiple validation steps
        validated_input = await self.validate_input(input_data)
        #Run the tasks to achieve multiple outcomes
        results = await self.llm_process(validated_input)
        #Grader to evaluate Task outcome
        validation_scores = await self.grade_output(results)
        #Ranker
        ranked_results = await self.rank_output(results)

        if validation_score &lt; self.threshold:
            return await self.fallback_handler(input_data)
            #Introduce Loop with Observed grades to improve outcome
        
        return results</code></pre><p>Although these tradeoffs exist right now, Its reasonable to assume that advancements in model development&#8212;such as larger models and faster inference techniques&#8212;will independently improve both consistency and performance over time. Given this trajectory, this approach not only challenges us to develop more versatile and horizontally integrated capabilities but also makes the agent significantly more valuable to users. From a go-to-market (GTM) perspective, it deeply embeds the agent into users&#8217; workflows, increasing its utility and fostering greater dependency. The more things your agent can do, the more powerful it gets as it has larger control over the entire workflow. For example, If you&#8217;re building an AI accounting agent, don&#8217;t just build one that can manage transactions, integrate book keeping abilities, statements, budgeting etc. The dependencies between these workflows can also be easily managed via a single system.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!P23i!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F61549b61-b062-47c6-9374-d118cbc5c41a_1200x862.jpeg" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!P23i!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F61549b61-b062-47c6-9374-d118cbc5c41a_1200x862.jpeg 424w, https://substackcdn.com/image/fetch/$s_!P23i!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F61549b61-b062-47c6-9374-d118cbc5c41a_1200x862.jpeg 848w, https://substackcdn.com/image/fetch/$s_!P23i!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F61549b61-b062-47c6-9374-d118cbc5c41a_1200x862.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!P23i!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F61549b61-b062-47c6-9374-d118cbc5c41a_1200x862.jpeg 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!P23i!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F61549b61-b062-47c6-9374-d118cbc5c41a_1200x862.jpeg" width="1200" height="862" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/61549b61-b062-47c6-9374-d118cbc5c41a_1200x862.jpeg&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:862,&quot;width&quot;:1200,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:557008,&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_!P23i!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F61549b61-b062-47c6-9374-d118cbc5c41a_1200x862.jpeg 424w, https://substackcdn.com/image/fetch/$s_!P23i!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F61549b61-b062-47c6-9374-d118cbc5c41a_1200x862.jpeg 848w, https://substackcdn.com/image/fetch/$s_!P23i!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F61549b61-b062-47c6-9374-d118cbc5c41a_1200x862.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!P23i!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F61549b61-b062-47c6-9374-d118cbc5c41a_1200x862.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 role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>This focus on complex, high-value outcomes is what will truly set your agent apart, making it a distinctive and impactful solution in a competitive landscape. The more horizontal capabilities we build into our agents, more likely they stand apart and is able to create value for the users, and us.</p><div><hr></div><p><em>Now, How does one go about building these outcomes in an effective manner?</em></p><div><hr></div><h2><strong>How do you build effective Agentic outcomes?</strong></h2><ol><li><p><strong>Break Down Outcomes into Tasks/Functions</strong><br>Start by deconstructing your Agentic outcomes into granular, well-defined simple tasks or functions. A task or function represents an atomic operation necessary for your agent to achieve its intended outcome. These tasks may or may not rely on an LLM for execution. Think of them as modular, composable building blocks that can be reused across various parts of your system, making the design more flexible and scalable.</p><p>A Composable pattern while task design will help you scale your Agentic system very well, bringing in more reliability and robustness to the system. Another thing to keep in mind while breaking down the tasks is to decrease <strong>Cognitive Load</strong> (As discussed in <a href="https://www.ggpush.dev/p/building-production-grade-ai-agents">part 1</a>) to avoid hallucinations and undesirable outcomes. </p><p>Don&#8217;t make one task do Everything. Let is just pass the butter.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!qBgN!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa2e73e11-8517-49b7-a104-016b115be216_640x447.jpeg" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!qBgN!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa2e73e11-8517-49b7-a104-016b115be216_640x447.jpeg 424w, https://substackcdn.com/image/fetch/$s_!qBgN!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa2e73e11-8517-49b7-a104-016b115be216_640x447.jpeg 848w, https://substackcdn.com/image/fetch/$s_!qBgN!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa2e73e11-8517-49b7-a104-016b115be216_640x447.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!qBgN!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa2e73e11-8517-49b7-a104-016b115be216_640x447.jpeg 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!qBgN!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa2e73e11-8517-49b7-a104-016b115be216_640x447.jpeg" width="640" height="447" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/a2e73e11-8517-49b7-a104-016b115be216_640x447.jpeg&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:447,&quot;width&quot;:640,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;What's you're absolute favorite scene, line, or phrase? It was a tough  choice, but I think this is my favorite scene: \&quot;What is my purpose?\&quot; You  Pass Butter. \&quot;Oh my God...\&quot; I&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="What's you're absolute favorite scene, line, or phrase? It was a tough  choice, but I think this is my favorite scene: &quot;What is my purpose?&quot; You  Pass Butter. &quot;Oh my God...&quot; I" title="What's you're absolute favorite scene, line, or phrase? It was a tough  choice, but I think this is my favorite scene: &quot;What is my purpose?&quot; You  Pass Butter. &quot;Oh my God...&quot; I" srcset="https://substackcdn.com/image/fetch/$s_!qBgN!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa2e73e11-8517-49b7-a104-016b115be216_640x447.jpeg 424w, https://substackcdn.com/image/fetch/$s_!qBgN!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa2e73e11-8517-49b7-a104-016b115be216_640x447.jpeg 848w, https://substackcdn.com/image/fetch/$s_!qBgN!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa2e73e11-8517-49b7-a104-016b115be216_640x447.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!qBgN!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa2e73e11-8517-49b7-a104-016b115be216_640x447.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 role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div></li><li><p><strong>Implement Thread-Safe Shared Memory</strong><br>A thread-safe shared memory is essential for maintaining the state of the system across tasks. This memory allows tasks to access and update the shared context independently, enabling them to be context-aware without creating conflicts. This shared state is the glue that holds your workflow together, ensuring seamless transitions and information flow between tasks.</p><p>In a completely distributed system, you can use something like Redis to hold this Shared Memory. You can also keep this in memory of the application in a Threadsafe manner. It is very important to look out for race conditions while accessing/updating the memory. In a fully asynchronous systems, race conditions can cause unpredictable behaviour.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!aZiG!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff694ae4d-3fd1-4ea9-9f36-e2da554bff4e_500x366.jpeg" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!aZiG!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff694ae4d-3fd1-4ea9-9f36-e2da554bff4e_500x366.jpeg 424w, https://substackcdn.com/image/fetch/$s_!aZiG!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff694ae4d-3fd1-4ea9-9f36-e2da554bff4e_500x366.jpeg 848w, https://substackcdn.com/image/fetch/$s_!aZiG!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff694ae4d-3fd1-4ea9-9f36-e2da554bff4e_500x366.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!aZiG!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff694ae4d-3fd1-4ea9-9f36-e2da554bff4e_500x366.jpeg 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!aZiG!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff694ae4d-3fd1-4ea9-9f36-e2da554bff4e_500x366.jpeg" width="500" height="366" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/f694ae4d-3fd1-4ea9-9f36-e2da554bff4e_500x366.jpeg&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:false,&quot;imageSize&quot;:&quot;normal&quot;,&quot;height&quot;:366,&quot;width&quot;:500,&quot;resizeWidth&quot;:500,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;Meme Overflow on X: \&quot;condition variable and shared memory https ...&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="Meme Overflow on X: &quot;condition variable and shared memory https ..." title="Meme Overflow on X: &quot;condition variable and shared memory https ..." srcset="https://substackcdn.com/image/fetch/$s_!aZiG!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff694ae4d-3fd1-4ea9-9f36-e2da554bff4e_500x366.jpeg 424w, https://substackcdn.com/image/fetch/$s_!aZiG!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff694ae4d-3fd1-4ea9-9f36-e2da554bff4e_500x366.jpeg 848w, https://substackcdn.com/image/fetch/$s_!aZiG!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff694ae4d-3fd1-4ea9-9f36-e2da554bff4e_500x366.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!aZiG!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff694ae4d-3fd1-4ea9-9f36-e2da554bff4e_500x366.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 role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>If you think about it, all you need to build State machines are Conditional Variables and Shared Memory space. This is CS101, but still an important concept while creating synchronous systems (Read more <a href="https://cs.brown.edu/courses/csci0300/2022/notes/l21.html">here</a>). Just don&#8217;t get run over by the race conditions.</p></li><li><p><strong>Chain Tasks into a Workflow</strong><br>Once you have defined your tasks, the next step is to organise them into a workflow. We don&#8217;t need any specialised Agentic frameworks for this, as they don&#8217;t do anything more than chaining these tasks together. This can be done easily, by defining functions for your tasks and defining the dependencies between directly in your code or using any Graph Modeling Language. You can even define these dependencies as configurable files using YAML or XML or even JSON.<br>For example, see the following pseudo code to see how three tasks with dependencies between each other can be executed serially</p><pre><code>from typing import Callable, List

class TaskNode:
    def __init__(self, task_func: Callable, task_id: str):
        self.task_func = task_func
        self.task_id = task_id
        self.dependencies: List[TaskNode] = []

    def add_dependency(self, task_node: 'TaskNode'):
        self.dependencies.append(task_node)

    async def execute(self):
        # Execute all dependencies first
        for dependency in self.dependencies:
            await dependency.execute()
        # Execute this task
        print(f"Executing task: {self.task_id}")
        await self.task_func(self.task_id)

# Define tasks
async def task_1(task_id: str):
    print(f"Task 1 logic for {task_id}")

async def task_2(task_id: str):
    print(f"Task 2 logic for {task_id}")

async def task_3(task_id: str):
    print(f"Task 3 logic for {task_id}")

# Create task nodes
node_1 = TaskNode(task_1, "Task1")
node_2 = TaskNode(task_2, "Task2")
node_3 = TaskNode(task_3, "Task3")

# Chain tasks
node_2.add_dependency(node_1)  # Task2 depends on Task1
node_3.add_dependency(node_2)  # Task3 depends on Task2

# Execute the graph
import asyncio
asyncio.run(node_3.execute())  # This will execute Task1 -&gt; Task2 -&gt; Task3
</code></pre><p>Representing this workflow as a graph provides significant advantages. A graph-based model enhances scalability, simplifies debugging, and ensures predictable outcomes. Each execution of the agent corresponds to a specific path traced through the graph, giving you better control and visibility over how outcomes are achieved. You always know what to expect.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!3RTY!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3db2bd99-5289-42fd-919c-8e53525acb4b_345x584.jpeg" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!3RTY!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3db2bd99-5289-42fd-919c-8e53525acb4b_345x584.jpeg 424w, https://substackcdn.com/image/fetch/$s_!3RTY!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3db2bd99-5289-42fd-919c-8e53525acb4b_345x584.jpeg 848w, https://substackcdn.com/image/fetch/$s_!3RTY!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3db2bd99-5289-42fd-919c-8e53525acb4b_345x584.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!3RTY!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3db2bd99-5289-42fd-919c-8e53525acb4b_345x584.jpeg 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!3RTY!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3db2bd99-5289-42fd-919c-8e53525acb4b_345x584.jpeg" width="345" height="584" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/3db2bd99-5289-42fd-919c-8e53525acb4b_345x584.jpeg&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:584,&quot;width&quot;:345,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;Need a Laugh? These 36 Funny Flow Charts Can Help&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="Need a Laugh? These 36 Funny Flow Charts Can Help" title="Need a Laugh? These 36 Funny Flow Charts Can Help" srcset="https://substackcdn.com/image/fetch/$s_!3RTY!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3db2bd99-5289-42fd-919c-8e53525acb4b_345x584.jpeg 424w, https://substackcdn.com/image/fetch/$s_!3RTY!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3db2bd99-5289-42fd-919c-8e53525acb4b_345x584.jpeg 848w, https://substackcdn.com/image/fetch/$s_!3RTY!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3db2bd99-5289-42fd-919c-8e53525acb4b_345x584.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!3RTY!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3db2bd99-5289-42fd-919c-8e53525acb4b_345x584.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 role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>You can further design your monitoring/eval on top of these graphs. Telemetry can collect metrics on each nodes in the graph and you can independently monitor and evaluate the tasks based on these nodal values.</p></li></ol><p>This graph-based approach is the foundation of many advanced agent frameworks. It&#8217;s also why tools like LangChain have evolved into <strong>LangGraph</strong>, recognising the power of graph-based modelling for building robust and efficient agents.</p><p><em>At Breakout, We have designed our own Orchestration Framework for Agentic workflows and an Actor Based system for Multi-Agentic workflows (More on that later) The reason why we didn&#8217;t use any existing Agentic frameworks was because we never felt it gave any significant advantage over just defining the workflows ourselves. Some of it were also over bloated software with unnecessary abstractions with no significant advantages. </em></p><p><em><strong>While building robust scalable systems, simplicity is key.</strong> </em></p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!qcCs!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0906d647-ee98-4459-bfc8-966d97306947_1531x833.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!qcCs!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0906d647-ee98-4459-bfc8-966d97306947_1531x833.png 424w, https://substackcdn.com/image/fetch/$s_!qcCs!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0906d647-ee98-4459-bfc8-966d97306947_1531x833.png 848w, https://substackcdn.com/image/fetch/$s_!qcCs!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0906d647-ee98-4459-bfc8-966d97306947_1531x833.png 1272w, https://substackcdn.com/image/fetch/$s_!qcCs!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0906d647-ee98-4459-bfc8-966d97306947_1531x833.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!qcCs!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0906d647-ee98-4459-bfc8-966d97306947_1531x833.png" width="728" height="396" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/0906d647-ee98-4459-bfc8-966d97306947_1531x833.png&quot;,&quot;srcNoWatermark&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/983ddd79-944d-43da-9c51-097342f221cb_1531x833.png&quot;,&quot;fullscreen&quot;:false,&quot;imageSize&quot;:&quot;normal&quot;,&quot;height&quot;:792,&quot;width&quot;:1456,&quot;resizeWidth&quot;:728,&quot;bytes&quot;:83534,&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_!qcCs!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0906d647-ee98-4459-bfc8-966d97306947_1531x833.png 424w, https://substackcdn.com/image/fetch/$s_!qcCs!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0906d647-ee98-4459-bfc8-966d97306947_1531x833.png 848w, https://substackcdn.com/image/fetch/$s_!qcCs!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0906d647-ee98-4459-bfc8-966d97306947_1531x833.png 1272w, https://substackcdn.com/image/fetch/$s_!qcCs!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0906d647-ee98-4459-bfc8-966d97306947_1531x833.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Fig 2. Agentic workflow as a Task Graph</figcaption></figure></div><p>To further elaborate on tasks, tasks within an Agentic system can be broadly categorised into three types:</p><ol><li><p><strong>Deterministic Tasks</strong></p></li><li><p><strong>Semi-Deterministic Tasks</strong></p></li><li><p><strong>Non-Deterministic Tasks</strong></p></li></ol><p>These categories reflect varying levels of predictability in task outputs for a given input.</p><h4><strong>1. Deterministic Tasks</strong></h4><p>These tasks produce consistent and predictable outputs for specific inputs. Traditional software development primarily deals with deterministic tasks, making it relatively straightforward to build reliable systems.</p><pre><code>def retrieve_data(text: str) -&gt; documents:
    return self.retrieve(text) #get relevant documents</code></pre><h4><strong>2. Semi-Deterministic Tasks</strong></h4><p>These tasks involve some variability but operate within a defined structure, often incorporating LLMs. For instance, an LLM call that generates structured outputs (e.g., filling predefined fields or responding within a strict schema) falls into this category. Outputs are reasonably predictable but still influenced by the model's inherent probabilistic nature.</p><pre><code>async def planner(text: str, state_variables: dict) -&gt; Dict[str, str]:
    response = await llm.plan(
        "Plan Function: {text}",
        "prompt_variables: {state_variables}"
        output_schema={"functions": List,
                       "confidence": float, 
                       "lookup": List}
    )
    return response</code></pre><h4><strong>3. Non-Deterministic Tasks</strong></h4><p>These tasks have high variability and unpredictable outputs, often arising from less structured interactions with LLMs. For example, content generation without strict guidelines or parameters typically belongs in this category.</p><pre><code>async def generate_response(context: str) -&gt; str:
    return await llm.predict(f"Generate helpful response: {context}")</code></pre><h3><strong>Design Considerations</strong></h3><p>When working with Agentic systems, it&#8217;s critical to plan, develop, and test each type of task according to its nature. Dependencies between tasks must also be carefully managed. For instance, chaining multiple semi- or non-deterministic tasks can lead to unpredictable or inconsistent workflows. This unpredictability may undermine the reliability of the overall system. Remember the game Chinese whispers? Yeah you don&#8217;t want your agent to do that, ever.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!1MCl!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F79b2658f-1113-4521-bd60-71bd467aa122_700x594.jpeg" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!1MCl!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F79b2658f-1113-4521-bd60-71bd467aa122_700x594.jpeg 424w, https://substackcdn.com/image/fetch/$s_!1MCl!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F79b2658f-1113-4521-bd60-71bd467aa122_700x594.jpeg 848w, https://substackcdn.com/image/fetch/$s_!1MCl!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F79b2658f-1113-4521-bd60-71bd467aa122_700x594.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!1MCl!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F79b2658f-1113-4521-bd60-71bd467aa122_700x594.jpeg 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!1MCl!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F79b2658f-1113-4521-bd60-71bd467aa122_700x594.jpeg" width="700" height="594" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/79b2658f-1113-4521-bd60-71bd467aa122_700x594.jpeg&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:594,&quot;width&quot;:700,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;Chinese whispers...&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="Chinese whispers..." title="Chinese whispers..." srcset="https://substackcdn.com/image/fetch/$s_!1MCl!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F79b2658f-1113-4521-bd60-71bd467aa122_700x594.jpeg 424w, https://substackcdn.com/image/fetch/$s_!1MCl!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F79b2658f-1113-4521-bd60-71bd467aa122_700x594.jpeg 848w, https://substackcdn.com/image/fetch/$s_!1MCl!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F79b2658f-1113-4521-bd60-71bd467aa122_700x594.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!1MCl!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F79b2658f-1113-4521-bd60-71bd467aa122_700x594.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 role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><h3><strong>Striking a Balance in Production-Grade Agents</strong></h3><p>In production-grade agents, achieving a balance between flexibility and predictability is key. Try to design workflows that prioritize deterministic and semi-deterministic tasks while minimizing reliance on non-deterministic ones. This approach allows for a more predictable and coherent system that still appears intelligent and flexible enough to achieve complex outcomes.</p><p>By carefully selecting and structuring tasks, you can create agents that strike the right balance between adaptability and reliability, ensuring that they perform effectively in real-world scenarios.</p><p>Breaking down your workflow into smaller, manageable tasks isn&#8217;t just about modularity&#8212;it&#8217;s also essential for improving the <strong>testability</strong> of your agentic system. Adopting a test-driven development approach ensures each task operates within well-defined boundaries, governed by a clear operating policy.</p><p>By testing each task against these policies, you can guarantee that as long as tasks remain within their specified limits, the overall workflow will behave predictably. This reduces the risk of hallucinations or unpredictable outputs that could lead to unfavorable outcomes.</p><p>Moreover, this modular approach allows each task to be independently managed, developed, and scaled. It ensures that improvements or updates to one part of the system don&#8217;t unintentionally disrupt the entire workflow. In essence, a well-structured, testable system is key to building robust, reliable, and scalable Agentic systems. I couldn&#8217;t stress enough how important these tests are with respect to building reliable Agentic systems. Infact, I&#8217;d argue, in a truly test driven development fashion, you should first come up with the test cases while breaking down your tasks. This methodical approach significantly reduces the risk of failure, enabling the agent to deliver consistent, high-quality outcomes that stand out in a competitive landscape.</p><div><hr></div><p>As we push the boundaries of what AI agents can achieve, the guiding principles discussed here&#8212;balancing the C-A-P trade-offs, breaking down workflows into testable tasks, and adopting modular, graph-based designs&#8212;become more and more important in building dependable, production-grade systems.</p><p>The shift from deterministic to non-deterministic tasks is not just a technical challenge in development; it&#8217;s an opportunity to redefine what "intelligence" means in the context of software. By anchoring our workflows in solid engineering practices and focusing on composability, we ensure that our agents not only perform well but do so predictably and at scale.</p><p>The agents that will truly stand out are the ones that can seamlessly orchestrate complex, multi-step processes while maintaining reliability and trustworthiness.</p><p>By embracing modularity, prioritising testability, and leaning into the evolving capabilities of LLMs, we can create solutions that do more than automate tasks&#8212;they amplify human potential. So, as you embark on building your own agents, remember: the key to standing out isn&#8217;t just innovation; it&#8217;s thoughtful design, relentless iteration, and a commitment to solving meaningful problems.</p><div><hr></div><p>At <a href="https://getbreakout.ai/">Breakout</a>, We are putting these ideas into practice and building the smartest AI Sales Rep in the world. If this sounds like a challenging task to you, Do reach out to me at <a href="mailto:ashfakh@getbreakout.ai">ashfakh@getbreakout.ai</a></p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://www.ggpush.dev/p/building-production-grade-ai-agents-fbe/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://www.ggpush.dev/p/building-production-grade-ai-agents-fbe/comments"><span>Leave a comment</span></a></p><div class="directMessage button" data-attrs="{&quot;userId&quot;:134587815,&quot;userName&quot;:&quot;Ashfakh&quot;,&quot;canDm&quot;:null,&quot;dmUpgradeOptions&quot;:null,&quot;isEditorNode&quot;:true}" data-component-name="DirectMessageToDOM"></div><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://www.ggpush.dev/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 ggpush! 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[Building Production grade AI Agents - Part 1]]></title><description><![CDATA[Insights to build high performant, smart, production grade AI agents and automation]]></description><link>https://www.ggpush.dev/p/building-production-grade-ai-agents</link><guid isPermaLink="false">https://www.ggpush.dev/p/building-production-grade-ai-agents</guid><dc:creator><![CDATA[Ashfakh]]></dc:creator><pubDate>Tue, 26 Nov 2024 10:23:55 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!9g5P!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F26411f9d-60cc-4d6c-b6cf-6bc57f174a38_2310x1056.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<div class="pullquote"><p><code>You&#8217;re not building &#8220;AI&#8221;, At best, you&#8217;re mimicking it</code></p></div><p>Over the past two years, I&#8217;ve designed and built AI agents ranging from hobby projects to enterprise-grade applications, collectively used by hundreds of thousands of users. And in these last few months, I&#8217;ve been leading engineering at Breakout, where we&#8217;re creating a cutting-edge AI SDR agent with the hope to one day serve millions of users.</p><p>This journey&#8212;from small-scale experiments to scalable, production-ready AI solutions&#8212;has been an incredible learning experience. In this post for GGPUSH, I&#8217;ll share the insights I&#8217;ve gained along the way. The focus here is exclusively on building applications using existing large language models (LLMs). While topics like training, self-hosting, and fine-tuning are important parts to this topic, they fall outside the scope of this discussion. They are however, a natural extension to the concepts discussed here and are indeed important to creating powerful AI agents.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!9g5P!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F26411f9d-60cc-4d6c-b6cf-6bc57f174a38_2310x1056.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!9g5P!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F26411f9d-60cc-4d6c-b6cf-6bc57f174a38_2310x1056.png 424w, https://substackcdn.com/image/fetch/$s_!9g5P!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F26411f9d-60cc-4d6c-b6cf-6bc57f174a38_2310x1056.png 848w, https://substackcdn.com/image/fetch/$s_!9g5P!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F26411f9d-60cc-4d6c-b6cf-6bc57f174a38_2310x1056.png 1272w, https://substackcdn.com/image/fetch/$s_!9g5P!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F26411f9d-60cc-4d6c-b6cf-6bc57f174a38_2310x1056.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!9g5P!,w_2400,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F26411f9d-60cc-4d6c-b6cf-6bc57f174a38_2310x1056.png" width="1200" height="548.9010989010989" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/26411f9d-60cc-4d6c-b6cf-6bc57f174a38_2310x1056.png&quot;,&quot;srcNoWatermark&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/982defdd-88c9-46e5-b6db-42a03285dd15_2310x1056.png&quot;,&quot;fullscreen&quot;:false,&quot;imageSize&quot;:&quot;large&quot;,&quot;height&quot;:666,&quot;width&quot;:1456,&quot;resizeWidth&quot;:1200,&quot;bytes&quot;:325505,&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-large" alt="" srcset="https://substackcdn.com/image/fetch/$s_!9g5P!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F26411f9d-60cc-4d6c-b6cf-6bc57f174a38_2310x1056.png 424w, https://substackcdn.com/image/fetch/$s_!9g5P!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F26411f9d-60cc-4d6c-b6cf-6bc57f174a38_2310x1056.png 848w, https://substackcdn.com/image/fetch/$s_!9g5P!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F26411f9d-60cc-4d6c-b6cf-6bc57f174a38_2310x1056.png 1272w, https://substackcdn.com/image/fetch/$s_!9g5P!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F26411f9d-60cc-4d6c-b6cf-6bc57f174a38_2310x1056.png 1456w" sizes="100vw" fetchpriority="high"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p></p><p>The first and most important thing to internalise when building generative AI applications is this: <strong>we are not building AI or AGI</strong>. A handful of researchers at organisations like OpenAI, Google, or Microsoft might be working on it, but for the rest of us, we&#8217;re simply mimicking intelligence using state-of-the-art (SOTA) foundational models to achieve specific outcomes. To do this effectively, we must fully grasp both the capabilities and limitations of large language models (LLMs).</p><p>At their core, LLMs are advanced next-token generators. The larger the model, the better it is at predicting and generating text based on its input. However, an LLM is not capable of actual thinking or reasoning. What we perceive as reasoning is modelled solely through <strong>prompt engineering</strong>. A prompt can be perceived beyond an Instruction set, It is a way of guiding a models generated output. The better you&#8217;re at writing (or generating) prompts, the better your agent behaves. <br>(Pro advice : Apocalyptic threats work, kind of funny and ironic, but they work.)</p><p>Take the <strong>Chain of Thought (CoT)</strong> prompting technique as an example. In CoT, you provide the model with a step-by-step example of problem-solving. Because the model generates its outputs based on patterns in its input, this structured approach encourages it to produce step-by-step responses, simulating logical reasoning. While this doesn&#8217;t mean the LLM is truly thinking, it can lead to outcomes that appear intelligent and coherent.</p><p>We can even give structured nature to these outputs (Using JSON modes) to make it act as an interface layer in our programs, there by giving us the ability to build Advanced AI agents capable of performing actions based on this simulated thoughts.</p><p>Here are a few key testaments I always keep in mind when designing AI agents,</p><blockquote><p>LLMs are not knowledge sources.</p></blockquote><p>LLMs are inherently limited to the data they were trained on and lack &#8220;awareness&#8221; of events or information beyond their last training date. This limitation makes them unreliable as standalone knowledge sources, as there&#8217;s no guarantee of accuracy or relevance in their responses. For this reason, One should avoid using LLMs directly for knowledge-intensive tasks like Q&amp;A. Instead, rely on <strong>Retrieval-Augmented Generation (RAG)</strong> approaches, where the agent taps into its own knowledge base to retrieve relevant information and provides it as context in prompts.</p><p>For the knowledge base, we can typically use a combination of file storage, traditional databases, and vector databases. The success of a RAG system depends on two critical stages: <strong>index creation</strong> and <strong>retrieval</strong>.</p><p>When building the knowledge base or index, it&#8217;s essential to store only the most relevant and complete information in well-structured chunks. (Look up different chunking techniques like Proposition based chunking) In multimodal setups, contextual connections between related data points must also be established. For this, you can use a <strong>GraphDB</strong> to represent relationships effectively, though similar contextual connections can be built in a <strong>VectorDB</strong> using metadata (label) overlaps. This contextual connection can further augment our retrieval step, by making sure we are looking at the right piece of information at the right time. We can also use the labels to reduce our search space, something that will benefit performance and retrieval quality.</p><p>Retrieval quality also depends on achieving both <strong>high precision</strong> and <strong>high recall</strong>. While semantic similarity scoring is useful, it&#8217;s not always sufficient for identifying the most relevant results. A lower similarity threshold might boost recall but can compromise precision, bringing irrelevant data into the mix. In my experience, the score thresholds also often don&#8217;t mean much as it is difficult to tune these parameter alone to achieve better retrieval.</p><p>To address this, We can incorporate rerankers and graders into the retrieval pipeline. For example, an LLM or function can be used to evaluate retrieved results, eliminating unreliable contexts. While this adds latency, it significantly improves the quality of the output.</p><p>Another technique to leverage is <strong>query fusion</strong>, where queries are dynamically rewritten based on the context, increasing the likelihood of retrieving highly relevant results. The results are then &#8220;fused&#8221; together and re-ranked. Additionally, using a percentile-based filtering approach can further refine precision, which works especially well in combination with query fusion. (I recently learned that Dropbox uses a similar approach for their QnA and summarisation of files. Read the article <a href="https://dropbox.tech/machine-learning/bringing-ai-powered-answers-and-summaries-to-file-previews-on-the-web">here</a>)</p><p>Ultimately, a strong RAG system depends on building a robust knowledge base (index) and designing a retrieval process that balances precision, recall, and computational efficiency. When implemented effectively, this approach ensures that the AI agent delivers reliable, contextually accurate responses. </p><blockquote><p>LLMs don&#8217;t think</p></blockquote><p>LLMs are not inherently good at reasoning; their reasoning capabilities are primarily enhanced as a result of Reinforcement Learning from Human Feedback (RLHF) applied to synthetic instruction datasets. This limitation is why we should generally avoid building ReACT (Reasoning + Action) agents for scenarios that require highly deterministic agent behaviour. Techniques like <strong>few-shot prompting</strong> and <strong>Chain of Thought (CoT)</strong> can provide some level of control over reasoning outputs, but in my experience, they fall short for production systems that demand minimal tolerance for hallucinations.</p><p>That said, if you&#8217;re building an agent for open-ended automation tasks, such as a web research assistant, these approaches can be useful&#8212;provided you have robust graders and guardrails in place to keep the agent on track. However, relying on these methods in production for creating highly consistent agents is risky unless you&#8217;re willing to compromise on performance and incorporate extensive validation mechanisms at every step to ensure reliability.</p><p>A more effective strategy is to model your agent's behaviour as a series of smaller, <strong>modular tasks</strong> that are chained together to achieve the desired outcome. This approach helps create a predictable workflow for your agent, making it easier to test and debug. Each task should be:</p><ul><li><p>Well-defined in terms of functionality.</p></li><li><p>Modular enough to be independently tested and iterated upon.</p></li></ul><p>Another critical metric we can evaluate in LLM-specific tasks is <strong>cognitive load</strong>&#8212;the number of independently different instructions the model needs to process in a single call (prompt). Higher cognitive load often leads to poorer performance and increased hallucination. To mitigate this, break down complex tasks into smaller, manageable components and design prompts with reduced cognitive demands.</p><p>As a rule of thumb, aim to make LLMs handle only <strong>dependent outcomes</strong> in a single prompt. When you notice high hallucination rates in cognitive-intensive tasks, it&#8217;s a signal to simplify or split them further.</p><p>It is fair to assume larger and more capable models will improve on these fronts. This could allow us to combine orthogonally different tasks within a single call, leading to better performance and cost efficiency. Keeping future scalability in mind while designing workflows today can ensure your agents are well-positioned to leverage advancements in LLM capabilities effectively. (I&#8217;ll discuss a lot more on this trade offs on part 2)</p><p><em><strong>Note : This is what makes the Breakout Agent stand apart, we have minimal tolerance for hallucination and our agent is designed to perform consistently across a variety of situations</strong></em></p><blockquote><p>Function Calling rules.</p></blockquote><p>I love function calling&#8212;it&#8217;s arguably one of the most powerful tools in our arsenal for building agentic systems. Function calling enables agents to interact with a broad spectrum of tools, significantly expanding their ability to achieve desired outcomes. For instance, integrating <strong>web search capabilities</strong> gives real time knowledge to LLMs which were traditionally plagued by training date information cutoff.</p><p>I&#8217;m also very optimistic about the future of function calling. With the potential for generating synthetic data tailored for this use case, we can RLHF foundational models into domain-specific instruction models. This would empower LLMs to execute more complex functions and become increasingly autonomous and capable.</p><p>In my implementations, I often incorporate function calling through a <strong>dynamic planner</strong>, which acts as the initial step in my agent&#8217;s workflow. The planner determines the callable functions and their parameters based on the current stage of the agent&#8217;s execution. These stages are managed through a <strong>dynamic memory</strong>, which updates asynchronously as function results are processed. However, managing <strong>race conditions</strong> in this setup requires careful attention to ensure consistency and reliability. (I&#8217;ll go into more details on this in Part 2 of this blog)</p><p>The resulting state changes are important&#8212;they control the agent&#8217;s behavior, allowing for greater predictability and flexibility. This architecture also enables me to design the agent as a <strong>dynamic workflow graph</strong>. Each stage of the graph independently executes specific functions based on state variables, progressing toward the desired outcome. It also lets us bring a more deterministic Multi-Agentic behaviour into the system as we now have more control over the &#8220;Actions&#8221; of the Agent(s).</p><p></p><p>In this first post, I wanted to kick things off with some fundamental tenets of designing an AI agent. In the next part, we&#8217;ll talk more in detail about design and execution, and some interesting mental models for trade-offs. I&#8217;ll also share tips on testing AI agents to ensure they stick to their task and expected behaviours and don&#8217;t go rogue and take over the world and enslave humanity.</p><p>If you&#8217;re finding this insightful, subscribe for more updates, or drop a message or comment for a deeper chat. I&#8217;m always up for geeking out over AI. </p><div><hr></div><p>At <a href="https://getbreakout.ai">Breakout</a>, We are putting these ideas into practice and building the smartest AI SDR in the world. If this sounds like a challenging task to you, Do reach out to me at <a href="mailto:ashfakh@getbreakout.ai">ashfakh@getbreakout.ai</a> </p><p></p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://www.ggpush.dev/p/building-production-grade-ai-agents/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://www.ggpush.dev/p/building-production-grade-ai-agents/comments"><span>Leave a comment</span></a></p><div class="directMessage button" data-attrs="{&quot;userId&quot;:134587815,&quot;userName&quot;:&quot;Ashfakh&quot;,&quot;canDm&quot;:null,&quot;dmUpgradeOptions&quot;:null,&quot;isEditorNode&quot;:true}" data-component-name="DirectMessageToDOM"></div><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://www.ggpush.dev/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 ggpush! 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><br></p>]]></content:encoded></item><item><title><![CDATA[Zeroth Hour - Building the right Team]]></title><description><![CDATA[Part 1]]></description><link>https://www.ggpush.dev/p/zeroth-hour-building-the-right-team</link><guid isPermaLink="false">https://www.ggpush.dev/p/zeroth-hour-building-the-right-team</guid><dc:creator><![CDATA[Ashfakh]]></dc:creator><pubDate>Wed, 30 Oct 2024 09:43:17 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!4iw0!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3fdb0865-681e-4a5e-9b3f-d4bb52f5fbce_600x341.jpeg" length="0" type="image/jpeg"/><content:encoded><![CDATA[<div class="pullquote"><p><code>To build a great product &#8212; and ultimately a great company &#8212; the first step is to assemble a great team. </code></p></div><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!4iw0!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3fdb0865-681e-4a5e-9b3f-d4bb52f5fbce_600x341.jpeg" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!4iw0!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3fdb0865-681e-4a5e-9b3f-d4bb52f5fbce_600x341.jpeg 424w, https://substackcdn.com/image/fetch/$s_!4iw0!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3fdb0865-681e-4a5e-9b3f-d4bb52f5fbce_600x341.jpeg 848w, https://substackcdn.com/image/fetch/$s_!4iw0!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3fdb0865-681e-4a5e-9b3f-d4bb52f5fbce_600x341.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!4iw0!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3fdb0865-681e-4a5e-9b3f-d4bb52f5fbce_600x341.jpeg 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!4iw0!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3fdb0865-681e-4a5e-9b3f-d4bb52f5fbce_600x341.jpeg" width="600" height="341" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/3fdb0865-681e-4a5e-9b3f-d4bb52f5fbce_600x341.jpeg&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:341,&quot;width&quot;:600,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;No shit Sherlock - Sarcastic Nicholas Cage Meme Generator&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="No shit Sherlock - Sarcastic Nicholas Cage Meme Generator" title="No shit Sherlock - Sarcastic Nicholas Cage Meme Generator" srcset="https://substackcdn.com/image/fetch/$s_!4iw0!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3fdb0865-681e-4a5e-9b3f-d4bb52f5fbce_600x341.jpeg 424w, https://substackcdn.com/image/fetch/$s_!4iw0!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3fdb0865-681e-4a5e-9b3f-d4bb52f5fbce_600x341.jpeg 848w, https://substackcdn.com/image/fetch/$s_!4iw0!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3fdb0865-681e-4a5e-9b3f-d4bb52f5fbce_600x341.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!4iw0!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3fdb0865-681e-4a5e-9b3f-d4bb52f5fbce_600x341.jpeg 1456w" sizes="100vw" fetchpriority="high"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>This probably is the most obvious advice in the history of startup advices, but given how often startups stumble on this, I suppose it&#8217;s ok being a little repetitive here. So at the risk of being called Captain Obvious, I want to write the first post on Zeroth hour on this very particular, important topic of hiring the right set of folks.</p><p>The first mistake founders do while building the early team is focusing only on the skillset of the candidate for a particular role. While Skill is indeed of foremost importance, that shouldn&#8217;t be the only criteria. Startup journeys are really long and tiring and It&#8217;s your early hires that sets the tone for that entire journey. Imagine being adrift at sea in a tiny boat, with people who aren't entirely sure how to navigate to the destination. It's a recipe for adventure&#8212;or disaster, all depending on who those people are.</p><blockquote><p>Your early team really does make or break your company. </p></blockquote><p>While hiring for the early team, I try to look beyond roles and responsibilities and the overall general framework of hiring someone for a specific role. It&#8217;s not enough to judge them based on just their skills. We need someone who goes beyond just getting the job done. We need Mavericks, Folks who are not afraid to challenge status quo, Folks who are willing to get their hands dirty, Folks who are willing to go that extra mile to optimise for your results. We need survivors, people, if dropped behind enemy lines with nothing but some rations and a broken compass, would still manage to find their way back.</p><p>When it comes to skills, and in the specific context of hiring builders, one thing we should be cognisant of is that Coding is the easiest part of the job. Especially with AI, getting standardised answers for standardised questions is no longer a relevant way to judge a candidate. As important as it is to evaluate them on their knowledge, it&#8217;s more important to evaluate their approach to problem solving. I often try to judge them on their system thinking skills, how modularised their problem solving approach is. Clarity of thought in these areas is a big green flag for me. But talent can only get you so far.</p><p>Whenever I hire a person, Within the first 10 minutes of talking to them, I know if I&#8217;m going to hire this person or not. That&#8217;s not cause I&#8217;m able to judge the skills or experience of that person that quickly, It&#8217;s because I try to measure them on just 3 different angles.</p><ol><li><p>Curiosity</p><p>Learning is perhaps the most important skill any person can have. If you&#8217;re a quick learner, you can solve most problems or adapt to most situations fairly quickly. That intense desire to learn something new should be powered by curiosity rather than other mandates. I&#8217;ve seen innately curious folks being obsessed with any problem given to them. They often want to understand it from all the possible angles. To them, it&#8217;s not just enough to do the bare minimum to solve a problem, but it&#8217;s important to understand it deeply and thoroughly to come up with a solution that goes above and beyond the original scope. I adore and love working with such people cause they inspire me. They inspire me to do more everyday, to learn more everyday and to ultimately grow into a better version of myself. They ask the tough questions. and it&#8217;s often the toughest questions that lead to the clearest answers.</p></li><li><p>Excitement</p><p>Startups aren't cushy jobs. The grind can be exhausting, and only those with passion for the mission will endure. You are not just expected to do the tasks that you&#8217;re assigned and collect a pay check at the end of the month. You should be willing to spend that extra amount of time and energy over and above what is expected of you. And that&#8217;s why excitement is important. You&#8217;ve to be excited about the problem that you&#8217;re solving, you&#8217;ve to be excited about the team that you&#8217;re solving it with. You&#8217;ve to be excited about creating value. And devoid of that excitement, it&#8217;s going to get real tiring real fast. Genuine excitement is infectious, it breeds energy within the team, pushing them to do more, to do better. </p></li><li><p>Versatility</p><p>This one is more of a soft constraint, But someone who checks this box after the first two is definitely a strong hire for me. In the context of a startup, It&#8217;s not just that someone versatile would be able to don many hats, it&#8217;s often a pleasure to work with such folks. People who&#8217;re interested in a lot of things outside of their work are often very open minded when it comes to problem solving. This could be Art, Music, Films, Sports or even some niche interests really. They bring in a variety of ideas, along with a bit of creativity and out of the box thinking to the problem they&#8217;re trying to solve. I&#8217;ve often noticed this culminating in beautiful outcomes which are not just a single dimensional solution. They also fit in beautifully in the overall org structure, cause of the soft overlap they often bring in with the adjacent teams.</p></li></ol><p>In order to evaluate them on these three axes, The first fifteen minute of any call I do with a prospective candidate is just me talking to them about my experiences and motivations and asking them about theirs. An open ended conversation about these almost always lets me judge them on these three fronts. </p><p>Think about this: the person you hire will likely become a significant part of your daily life for the next several years. You&#8217;ll collaborate with them, exchange ideas, tackle challenges, and yes, sometimes you&#8217;ll even clash. After all the evaluations and assessments, take a moment to pause and really think about that. If the thought of spending so much time with this person gives you even a hint of unease, trust your gut&#8212;it&#8217;s a sign to reconsider.</p><p>Hiring for startups is really tough, but fulfilling. It&#8217;s not just about filling roles&#8212;it&#8217;s about finding the right people for the journey. So, as you build your team, look beyond skill. Hire those who inspire, excite, and challenge the status quo. They&#8217;ll be the ones rowing beside you when the seas get rough.</p><div><hr></div><p>Thanks for reading so far, If the Ideas above resonate with you in any level and you&#8217;re looking for your next role, reach out. We are hiring across Product and Engineering at <a href="https://getbreakout.ai">Breakout</a> and We are building one of the coolest AI products ever. </p><p>For questions,  Reach out to me at <a href="mailto:ashfakh@getbreakout.ai">ashfakh@getbreakout.ai</a></p><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://www.ggpush.dev/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 ggpush! 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 class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://www.ggpush.dev/p/zeroth-hour-building-the-right-team/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://www.ggpush.dev/p/zeroth-hour-building-the-right-team/comments"><span>Leave a comment</span></a></p><div class="directMessage button" data-attrs="{&quot;userId&quot;:134587815,&quot;userName&quot;:&quot;Ashfakh&quot;,&quot;canDm&quot;:null,&quot;dmUpgradeOptions&quot;:null,&quot;isEditorNode&quot;:true}" data-component-name="DirectMessageToDOM"></div><p></p><p></p>]]></content:encoded></item><item><title><![CDATA[Coming soon]]></title><description><![CDATA[This is ggpush.]]></description><link>https://www.ggpush.dev/p/coming-soon</link><guid isPermaLink="false">https://www.ggpush.dev/p/coming-soon</guid><dc:creator><![CDATA[Ashfakh]]></dc:creator><pubDate>Mon, 09 Sep 2024 11:46:16 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!I-hE!,w_256,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0149bbc4-c231-4818-aec0-772bb5c4a165_512x512.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>This is ggpush.</p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://www.ggpush.dev/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://www.ggpush.dev/subscribe?"><span>Subscribe now</span></a></p>]]></content:encoded></item></channel></rss>