<?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[Compute - A Blog on Computation]]></title><description><![CDATA[A blog by Anshaj on various facets of modern computing.]]></description><link>https://compute.anshaj.dev</link><image><url>https://substackcdn.com/image/fetch/$s_!ShJo!,w_256,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F05083da4-de89-4989-8e93-c51efdadef86_750x750.png</url><title>Compute - A Blog on Computation</title><link>https://compute.anshaj.dev</link></image><generator>Substack</generator><lastBuildDate>Thu, 09 Apr 2026 19:51:31 GMT</lastBuildDate><atom:link href="https://compute.anshaj.dev/feed" rel="self" type="application/rss+xml"/><copyright><![CDATA[Anshaj]]></copyright><language><![CDATA[en]]></language><webMaster><![CDATA[thecomputeblog@substack.com]]></webMaster><itunes:owner><itunes:email><![CDATA[thecomputeblog@substack.com]]></itunes:email><itunes:name><![CDATA[Anshaj]]></itunes:name></itunes:owner><itunes:author><![CDATA[Anshaj]]></itunes:author><googleplay:owner><![CDATA[thecomputeblog@substack.com]]></googleplay:owner><googleplay:email><![CDATA[thecomputeblog@substack.com]]></googleplay:email><googleplay:author><![CDATA[Anshaj]]></googleplay:author><itunes:block><![CDATA[Yes]]></itunes:block><item><title><![CDATA[RAG Architect’s Handbook]]></title><description><![CDATA[A Deep Dive into Next-Gen RAG Patterns]]></description><link>https://compute.anshaj.dev/p/rag-architects-handbook</link><guid isPermaLink="false">https://compute.anshaj.dev/p/rag-architects-handbook</guid><dc:creator><![CDATA[Anshaj]]></dc:creator><pubDate>Fri, 09 Jan 2026 04:00:40 GMT</pubDate><enclosure url="https://images.unsplash.com/photo-1457694587812-e8bf29a43845?crop=entropy&amp;cs=tinysrgb&amp;fit=max&amp;fm=jpg&amp;ixid=M3wzMDAzMzh8MHwxfHNlYXJjaHwxMnx8ZG9jdW1lbnRzfGVufDB8fHx8MTc2NTE4MTM1MHww&amp;ixlib=rb-4.1.0&amp;q=80&amp;w=1080" length="0" type="image/jpeg"/><content:encoded><![CDATA[<div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://images.unsplash.com/photo-1457694587812-e8bf29a43845?crop=entropy&amp;cs=tinysrgb&amp;fit=max&amp;fm=jpg&amp;ixid=M3wzMDAzMzh8MHwxfHNlYXJjaHwxMnx8ZG9jdW1lbnRzfGVufDB8fHx8MTc2NTE4MTM1MHww&amp;ixlib=rb-4.1.0&amp;q=80&amp;w=1080" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://images.unsplash.com/photo-1457694587812-e8bf29a43845?crop=entropy&amp;cs=tinysrgb&amp;fit=max&amp;fm=jpg&amp;ixid=M3wzMDAzMzh8MHwxfHNlYXJjaHwxMnx8ZG9jdW1lbnRzfGVufDB8fHx8MTc2NTE4MTM1MHww&amp;ixlib=rb-4.1.0&amp;q=80&amp;w=1080 424w, https://images.unsplash.com/photo-1457694587812-e8bf29a43845?crop=entropy&amp;cs=tinysrgb&amp;fit=max&amp;fm=jpg&amp;ixid=M3wzMDAzMzh8MHwxfHNlYXJjaHwxMnx8ZG9jdW1lbnRzfGVufDB8fHx8MTc2NTE4MTM1MHww&amp;ixlib=rb-4.1.0&amp;q=80&amp;w=1080 848w, https://images.unsplash.com/photo-1457694587812-e8bf29a43845?crop=entropy&amp;cs=tinysrgb&amp;fit=max&amp;fm=jpg&amp;ixid=M3wzMDAzMzh8MHwxfHNlYXJjaHwxMnx8ZG9jdW1lbnRzfGVufDB8fHx8MTc2NTE4MTM1MHww&amp;ixlib=rb-4.1.0&amp;q=80&amp;w=1080 1272w, https://images.unsplash.com/photo-1457694587812-e8bf29a43845?crop=entropy&amp;cs=tinysrgb&amp;fit=max&amp;fm=jpg&amp;ixid=M3wzMDAzMzh8MHwxfHNlYXJjaHwxMnx8ZG9jdW1lbnRzfGVufDB8fHx8MTc2NTE4MTM1MHww&amp;ixlib=rb-4.1.0&amp;q=80&amp;w=1080 1456w" sizes="100vw"><img src="https://images.unsplash.com/photo-1457694587812-e8bf29a43845?crop=entropy&amp;cs=tinysrgb&amp;fit=max&amp;fm=jpg&amp;ixid=M3wzMDAzMzh8MHwxfHNlYXJjaHwxMnx8ZG9jdW1lbnRzfGVufDB8fHx8MTc2NTE4MTM1MHww&amp;ixlib=rb-4.1.0&amp;q=80&amp;w=1080" width="4898" height="3265" data-attrs="{&quot;src&quot;:&quot;https://images.unsplash.com/photo-1457694587812-e8bf29a43845?crop=entropy&amp;cs=tinysrgb&amp;fit=max&amp;fm=jpg&amp;ixid=M3wzMDAzMzh8MHwxfHNlYXJjaHwxMnx8ZG9jdW1lbnRzfGVufDB8fHx8MTc2NTE4MTM1MHww&amp;ixlib=rb-4.1.0&amp;q=80&amp;w=1080&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:3265,&quot;width&quot;:4898,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;assorted-color book lot&quot;,&quot;title&quot;:null,&quot;type&quot;:&quot;image/jpg&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="assorted-color book lot" title="assorted-color book lot" srcset="https://images.unsplash.com/photo-1457694587812-e8bf29a43845?crop=entropy&amp;cs=tinysrgb&amp;fit=max&amp;fm=jpg&amp;ixid=M3wzMDAzMzh8MHwxfHNlYXJjaHwxMnx8ZG9jdW1lbnRzfGVufDB8fHx8MTc2NTE4MTM1MHww&amp;ixlib=rb-4.1.0&amp;q=80&amp;w=1080 424w, https://images.unsplash.com/photo-1457694587812-e8bf29a43845?crop=entropy&amp;cs=tinysrgb&amp;fit=max&amp;fm=jpg&amp;ixid=M3wzMDAzMzh8MHwxfHNlYXJjaHwxMnx8ZG9jdW1lbnRzfGVufDB8fHx8MTc2NTE4MTM1MHww&amp;ixlib=rb-4.1.0&amp;q=80&amp;w=1080 848w, https://images.unsplash.com/photo-1457694587812-e8bf29a43845?crop=entropy&amp;cs=tinysrgb&amp;fit=max&amp;fm=jpg&amp;ixid=M3wzMDAzMzh8MHwxfHNlYXJjaHwxMnx8ZG9jdW1lbnRzfGVufDB8fHx8MTc2NTE4MTM1MHww&amp;ixlib=rb-4.1.0&amp;q=80&amp;w=1080 1272w, https://images.unsplash.com/photo-1457694587812-e8bf29a43845?crop=entropy&amp;cs=tinysrgb&amp;fit=max&amp;fm=jpg&amp;ixid=M3wzMDAzMzh8MHwxfHNlYXJjaHwxMnx8ZG9jdW1lbnRzfGVufDB8fHx8MTc2NTE4MTM1MHww&amp;ixlib=rb-4.1.0&amp;q=80&amp;w=1080 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><figcaption class="image-caption">Photo by <a href="https://unsplash.com/@mvdheuvel">Maarten van den Heuvel</a> on <a href="https://unsplash.com">Unsplash</a></figcaption></figure></div><p>If you have been building with Large Language Models over the last two years, you have likely walked the same path as the rest of us. You started with a simple API call to GPT-5 or similar. Then, you realized the model didn&#8217;t know about your company&#8217;s private data or the events of last week. So, you built a simple Retrieval-Augmented Generation (RAG) pipeline: chunk a PDF, throw it into a vector database, look up the top-3 similar chunks, and feed them to the LLM. It felt like magic until you put it into production.</p><p>Suddenly, the cracks appeared. Users asked vague questions, and the vector search returned noise. They asked complex comparison questions, and the system failed because the answer wasn&#8217;t in a single chunk. Or worse, the model confidently hallucinated an answer based on irrelevant retrieval results.</p><p>We are now in the <em>Post-Naive RAG</em> era. The industry has moved beyond simple semantic search into complex, architectural patterns designed to handle ambiguity, reason over data, and self-correct. We aren&#8217;t just building pipelines anymore; we are building <em>cognitive architectures</em>.</p><p>This post is a deep technical dive into these emerging architectures. We will look at <strong>GraphRAG</strong>, which structures data for global reasoning; <strong>Speculative RAG</strong>, which trades compute for speed and accuracy; <strong>Agentic RAG</strong>, which gives the model autonomy; and <strong>Adaptive RAG</strong>, which routes traffic like a smart load balancer. We will explore the <em>why</em> and <em>how</em> of each pattern, looking at the algorithms, the implementation strategies, and the hard trade-offs you will face as a developer.</p><h2>Naive RAG and the Bag of Chunks Problem</h2><p>Before we appreciate the complex architectures, we need to understand exactly why the baseline fails. <em>Naive RAG</em> is the standard Retrieve-then-Generate workflow.</p><h3>The Architecture</h3><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!-BxR!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fae75e51e-086a-4ac0-9a53-62fc7587336c_1376x768.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!-BxR!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fae75e51e-086a-4ac0-9a53-62fc7587336c_1376x768.png 424w, https://substackcdn.com/image/fetch/$s_!-BxR!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fae75e51e-086a-4ac0-9a53-62fc7587336c_1376x768.png 848w, https://substackcdn.com/image/fetch/$s_!-BxR!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fae75e51e-086a-4ac0-9a53-62fc7587336c_1376x768.png 1272w, https://substackcdn.com/image/fetch/$s_!-BxR!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fae75e51e-086a-4ac0-9a53-62fc7587336c_1376x768.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!-BxR!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fae75e51e-086a-4ac0-9a53-62fc7587336c_1376x768.png" width="1376" height="768" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/ae75e51e-086a-4ac0-9a53-62fc7587336c_1376x768.png&quot;,&quot;srcNoWatermark&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/20550b91-2e2c-4115-8eb1-ec50b7d80f00_1376x768.jpeg&quot;,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:768,&quot;width&quot;:1376,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:676854,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/jpeg&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://compute.anshaj.dev/i/181021868?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F20550b91-2e2c-4115-8eb1-ec50b7d80f00_1376x768.jpeg&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!-BxR!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fae75e51e-086a-4ac0-9a53-62fc7587336c_1376x768.png 424w, https://substackcdn.com/image/fetch/$s_!-BxR!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fae75e51e-086a-4ac0-9a53-62fc7587336c_1376x768.png 848w, https://substackcdn.com/image/fetch/$s_!-BxR!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fae75e51e-086a-4ac0-9a53-62fc7587336c_1376x768.png 1272w, https://substackcdn.com/image/fetch/$s_!-BxR!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fae75e51e-086a-4ac0-9a53-62fc7587336c_1376x768.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><figcaption class="image-caption">Architecture of Naive RAG</figcaption></figure></div><p>The workflow is linear and rigid</p><ol><li><p><strong>Indexing</strong>: You take your documents, split them into fixed-size chunks (e.g., 512 tokens), and embed them using a model like OpenAI&#8217;s text-embedding-3-small or similar</p></li><li><p><strong>Retrieval</strong>: The user&#8217;s query is embedded. You perform a k-Nearest Neighbors search in the vector space using Cosine Similarity.</p></li><li><p><strong>Generation</strong>: You take the top  k chunks (usually 3 to 5), paste them into a prompt template and hit the LLM generation endpoint.</p></li></ol><p>While this works for simple lookup tasks, it treats knowledge as a bag of chunks and can lead to a couple of problems</p><ul><li><p><strong>Semantic Mismatch</strong>: A user might ask, &#8220;What goes wrong when the engine overheats?&#8221; The document might say, &#8220;Thermal throttling induces system shutdown.&#8221; A naive vector search might miss this connection if the embedding model hasn&#8217;t seen that specific terminology linkage.</p></li><li><p><strong>The </strong><em><strong>Lost in the Middle</strong></em><strong> Phenomenon</strong>: LLMs are not perfect readers. Research shows that models tend to focus on the beginning and end of their context window. If the crucial answer is buried in the middle of retrieved chunk #3 out of 5, the model might ignore it.</p></li><li><p><strong>Lack of Global Context</strong>: If you ask, &#8220;What are the main themes in this 100-page report?&#8221;, Naive RAG fails. It will retrieve 5 random chunks mentioning &#8220;themes&#8221; or specific details, but it cannot &#8220;read&#8221; the whole document to synthesize a summary. It suffers from a narrow field of view.</p></li></ul><p>These limitations have driven the research community to develop the Advanced and Modular patterns we will discuss next.</p><h2>Pre-Retrieval Optimization</h2><p>The first line of defense against bad RAG performance is better inputs. If the user asks a bad question, a vector database will give you bad answers. Pre-retrieval strategies focus on <strong>Query Transformation</strong> - rewriting the user&#8217;s intent into a format the machine understands better.</p><h3>RAG-Fusion: Multi-Query Triangulation</h3><p>One of the most robust patterns to emerge is RAG-Fusion. It addresses the problem of user queries being too specific, too vague, or just poorly phrased.</p><p>The Developer&#8217;s Perspective: Imagine a user asks, &#8220;Why is the system slow?&#8221; In your vector DB, the relevant docs might be about &#8220;latency,&#8221; &#8220;throughput bottlenecks,&#8221; or &#8220;database locking.&#8221; A single query for &#8220;slow&#8221; might miss the &#8220;locking&#8221; document entirely.</p><p><strong>How RAG-Fusion Works</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_!G8g1!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa7412b1d-ae05-4a38-86a4-9080401de148_1376x768.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!G8g1!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa7412b1d-ae05-4a38-86a4-9080401de148_1376x768.png 424w, https://substackcdn.com/image/fetch/$s_!G8g1!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa7412b1d-ae05-4a38-86a4-9080401de148_1376x768.png 848w, https://substackcdn.com/image/fetch/$s_!G8g1!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa7412b1d-ae05-4a38-86a4-9080401de148_1376x768.png 1272w, https://substackcdn.com/image/fetch/$s_!G8g1!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa7412b1d-ae05-4a38-86a4-9080401de148_1376x768.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!G8g1!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa7412b1d-ae05-4a38-86a4-9080401de148_1376x768.png" width="1376" height="768" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/a7412b1d-ae05-4a38-86a4-9080401de148_1376x768.png&quot;,&quot;srcNoWatermark&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/969ff9fa-e5e2-468a-8d20-74d93b329479_1376x768.jpeg&quot;,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:768,&quot;width&quot;:1376,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:654098,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/jpeg&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://compute.anshaj.dev/i/181021868?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F969ff9fa-e5e2-468a-8d20-74d93b329479_1376x768.jpeg&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!G8g1!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa7412b1d-ae05-4a38-86a4-9080401de148_1376x768.png 424w, https://substackcdn.com/image/fetch/$s_!G8g1!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa7412b1d-ae05-4a38-86a4-9080401de148_1376x768.png 848w, https://substackcdn.com/image/fetch/$s_!G8g1!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa7412b1d-ae05-4a38-86a4-9080401de148_1376x768.png 1272w, https://substackcdn.com/image/fetch/$s_!G8g1!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa7412b1d-ae05-4a38-86a4-9080401de148_1376x768.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><ol><li><p><strong>Query Generation</strong>: Instead of searching for the user&#8217;s raw query, we use an LLM to generate N (usually 3-5) variations of that query from different perspectives.</p><ul><li><p><em>User Query</em>: &#8220;Why is the system slow?&#8221;</p></li><li><p><em>Generated Q1</em>: &#8220;Common causes of latency in the application.&#8221;</p></li><li><p><em>Generated Q2</em>: &#8220;Database locking and performance bottlenecks.&#8221;</p></li><li><p><em>Generated Q3</em>: &#8220;Network throughput issues in the infrastructure.&#8221;</p></li></ul></li><li><p><strong>Parallel Vector Search</strong>: We run <em>all</em> these queries against the vector database. This casts a wider net, retrieving a diverse set of documents that might not overlap.</p></li><li><p><strong>Reciprocal Rank Fusion (RRF)</strong>: Now we have 5 lists of documents. We don&#8217;t just append them; we fuse them. RRF is a standard algorithm from information retrieval that ranks documents based on their position in multiple lists. If &#8220;Doc A&#8221; appears in the top 3 for <em>all</em> generated queries, it&#8217;s highly likely to be relevant.</p></li></ol><p>The score for a document d is calculated as:</p><div class="latex-rendered" data-attrs="{&quot;persistentExpression&quot;:&quot;RRF(d) = \\sum_{q \\in Q} \\frac{1}{k + r_q(d)}&quot;,&quot;id&quot;:&quot;NMYMUGCHZV&quot;}" data-component-name="LatexBlockToDOM"></div><p></p><p>where k is a smoothing constant (often 60) and rq(d) is the rank of the document in query q&#8217;s list.</p><div class="pullquote"><p>&#10024; <strong>Implementation Note</strong> &#10024;</p><p>This increases your retrieval latency because you are making N vector DB calls (though you can do them in parallel). However, the increase in recall (finding the right document) is often worth the extra milliseconds.</p></div><h3>HyDE: Hypothetical Document Embeddings</h3><p><strong>HyDE</strong> takes a fascinating approach: &#8220;Fake it till you make it.&#8221;</p><p>The Problem: Vector search works best when the query and the document look similar. But a question (&#8221;How do I reset my password?&#8221;) looks very different from a procedural document (&#8221;To initiate a credential reset, navigate to settings...&#8221;). They have different lengths, structures, and vocabularies. This is the semantic gap.</p><p><strong>The HyDE Solution</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_!yUqx!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1ac1d3cf-3f97-47e6-ab3c-b8e43c5caa38_1376x768.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!yUqx!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1ac1d3cf-3f97-47e6-ab3c-b8e43c5caa38_1376x768.png 424w, https://substackcdn.com/image/fetch/$s_!yUqx!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1ac1d3cf-3f97-47e6-ab3c-b8e43c5caa38_1376x768.png 848w, https://substackcdn.com/image/fetch/$s_!yUqx!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1ac1d3cf-3f97-47e6-ab3c-b8e43c5caa38_1376x768.png 1272w, https://substackcdn.com/image/fetch/$s_!yUqx!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1ac1d3cf-3f97-47e6-ab3c-b8e43c5caa38_1376x768.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!yUqx!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1ac1d3cf-3f97-47e6-ab3c-b8e43c5caa38_1376x768.png" width="1376" height="768" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/1ac1d3cf-3f97-47e6-ab3c-b8e43c5caa38_1376x768.png&quot;,&quot;srcNoWatermark&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/d4a7f2af-c4c8-4e74-b6f0-013d3dda6730_1376x768.jpeg&quot;,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:768,&quot;width&quot;:1376,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:786927,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/jpeg&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://compute.anshaj.dev/i/181021868?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd4a7f2af-c4c8-4e74-b6f0-013d3dda6730_1376x768.jpeg&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!yUqx!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1ac1d3cf-3f97-47e6-ab3c-b8e43c5caa38_1376x768.png 424w, https://substackcdn.com/image/fetch/$s_!yUqx!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1ac1d3cf-3f97-47e6-ab3c-b8e43c5caa38_1376x768.png 848w, https://substackcdn.com/image/fetch/$s_!yUqx!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1ac1d3cf-3f97-47e6-ab3c-b8e43c5caa38_1376x768.png 1272w, https://substackcdn.com/image/fetch/$s_!yUqx!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1ac1d3cf-3f97-47e6-ab3c-b8e43c5caa38_1376x768.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">HyDE information flow</figcaption></figure></div><ol><li><p><strong>Hallucinate an Answer</strong>: We ask an LLM to write a <em>hypothetical</em> answer to the user&#8217;s question. We don&#8217;t care if the facts are wrong; we care about the <em>patterns</em>.</p><ul><li><p><em>Prompt</em>: &#8220;Write a short passage explaining how to reset a password in this system.&#8221;</p></li><li><p><em>Hypothetical Doc</em>: &#8220;To reset your password, go to the user profile tab, click on security settings, and select the &#8216;Forgot Password&#8217; link. You will receive an email...&#8221;</p></li></ul></li><li><p><strong>Embed the Hallucination</strong>: We encode this hypothetical document into a vector.</p></li><li><p><strong>Retrieve Real Documents</strong>: We search the vector DB using this vector.</p></li></ol><p>The hypothetical document is semantically much closer to the real manual than the user&#8217;s short question was. It acts as a bridge. HyDE aligns the retrieval task to be <em>Answer-to-Answer</em> rather than <em>Question-to-Answer</em>.</p><div class="pullquote"><p>&#10024; <strong>Implementation Note</strong> &#10024;</p><p>If the LLM hallucinates something completely off-base (e.g., it invents a feature that doesn&#8217;t exist), the vector search will look for documents about that non-existent feature, leading to a total retrieval failure.7 HyDE is powerful but risky for domain-specific queries where the LLM has no prior training (e.g., proprietary internal APIs).</p></div><h3>Semantic Routing</h3><p>Sometimes, you don&#8217;t need RAG at all. If a user says &#8220;Hi&#8221;, retrieving documents is a waste of money. <strong>Semantic Routing </strong>acts as a traffic controller.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!PD9w!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe2590f0c-50bf-48b1-a63f-34517af11906_2752x1536.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!PD9w!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe2590f0c-50bf-48b1-a63f-34517af11906_2752x1536.png 424w, https://substackcdn.com/image/fetch/$s_!PD9w!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe2590f0c-50bf-48b1-a63f-34517af11906_2752x1536.png 848w, https://substackcdn.com/image/fetch/$s_!PD9w!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe2590f0c-50bf-48b1-a63f-34517af11906_2752x1536.png 1272w, https://substackcdn.com/image/fetch/$s_!PD9w!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe2590f0c-50bf-48b1-a63f-34517af11906_2752x1536.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!PD9w!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe2590f0c-50bf-48b1-a63f-34517af11906_2752x1536.png" width="1456" height="813" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/e2590f0c-50bf-48b1-a63f-34517af11906_2752x1536.png&quot;,&quot;srcNoWatermark&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/295a952a-a9f4-4218-965d-74a8e2a2f8b5_2752x1536.jpeg&quot;,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:813,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!PD9w!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe2590f0c-50bf-48b1-a63f-34517af11906_2752x1536.png 424w, https://substackcdn.com/image/fetch/$s_!PD9w!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe2590f0c-50bf-48b1-a63f-34517af11906_2752x1536.png 848w, https://substackcdn.com/image/fetch/$s_!PD9w!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe2590f0c-50bf-48b1-a63f-34517af11906_2752x1536.png 1272w, https://substackcdn.com/image/fetch/$s_!PD9w!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe2590f0c-50bf-48b1-a63f-34517af11906_2752x1536.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 mechanism works as such. You train a classifier (or use a zero-shot LLM call) to categorize the incoming query into buckets:</p><ul><li><p><em>Chit-chat</em>: Route to a simple LLM (no RAG).</p></li><li><p><em>Fact Retrieval</em>: Route to Vector Search.</p></li><li><p><em>Summarization</em>: Route to a specialized summarization pipeline.</p></li><li><p><em>Coding</em>: Route to a code-specialized model.</p></li></ul><p>This is the first step towards <strong>Adaptive RAG</strong>, which we will discuss later. It prevents the system from blindly running expensive retrieval pipelines for every input.</p><h2>Post-Retrieval Optimization</h2><p>Once you have retrieved a set of documents, your job isn&#8217;t done. The raw results from a vector database are often noisy. You might get 20 documents, but only 3 are useful. Post-retrieval steps refine this context.</p><h3>Reranking: The Quality Filter</h3><p>This is arguably the highest ROI upgrade you can make to a Naive RAG system.</p><p>Regular Vector search is fast but fuzzy. It compresses all meaning into a single vector. A Cross-Encoder is a different type of model (like a BERT classifier) that takes a pair of texts (Query, Document) and outputs a similarity score from 0 to 1.10</p><p><strong>The Workflow</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_!7Wd0!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcb923404-7188-43db-b56b-c66f4440fb1f_2844x1404.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!7Wd0!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcb923404-7188-43db-b56b-c66f4440fb1f_2844x1404.png 424w, https://substackcdn.com/image/fetch/$s_!7Wd0!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcb923404-7188-43db-b56b-c66f4440fb1f_2844x1404.png 848w, https://substackcdn.com/image/fetch/$s_!7Wd0!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcb923404-7188-43db-b56b-c66f4440fb1f_2844x1404.png 1272w, https://substackcdn.com/image/fetch/$s_!7Wd0!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcb923404-7188-43db-b56b-c66f4440fb1f_2844x1404.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!7Wd0!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcb923404-7188-43db-b56b-c66f4440fb1f_2844x1404.png" width="1456" height="719" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/cb923404-7188-43db-b56b-c66f4440fb1f_2844x1404.png&quot;,&quot;srcNoWatermark&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/8219d83a-a96f-4fa1-a122-5a6b961ea9af_2844x1404.png&quot;,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:719,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:5017333,&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://compute.anshaj.dev/i/181021868?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8219d83a-a96f-4fa1-a122-5a6b961ea9af_2844x1404.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_!7Wd0!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcb923404-7188-43db-b56b-c66f4440fb1f_2844x1404.png 424w, https://substackcdn.com/image/fetch/$s_!7Wd0!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcb923404-7188-43db-b56b-c66f4440fb1f_2844x1404.png 848w, https://substackcdn.com/image/fetch/$s_!7Wd0!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcb923404-7188-43db-b56b-c66f4440fb1f_2844x1404.png 1272w, https://substackcdn.com/image/fetch/$s_!7Wd0!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcb923404-7188-43db-b56b-c66f4440fb1f_2844x1404.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">Reranking using cross-encoder</figcaption></figure></div><ol><li><p><strong>Retrieve Wide</strong>: Instead of getting top-5 documents, get top-50 from the vector DB.</p></li><li><p><strong>Rerank</strong>: Pass all 50 pairs (Query + fetched documents) through the Cross-Encoder.</p></li><li><p><strong>Sort and Slice</strong>: Sort by the new score and take the top-5.</p></li></ol><p>Cross-Encoders are much more accurate than vector similarity because they can &#8220;pay attention&#8221; to the interaction between specific words in the query and the document. The trade-off is latency - running a Cross-Encoder on 50 documents takes significantly longer than a vector lookup. But for precision-critical apps (like legal search), it is non-negotiable.</p><h3>Context Compression and Selection</h3><p>Feeding 10,000 tokens of context to the LLMs is expensive and slow. <strong>Context Compression</strong> helps to reduce this load without losing information.</p><p>Couple of techniques that help us do this are:</p><ul><li><p><strong>LLMChainExtractor</strong>: Using a smaller LLM to read the retrieved document and extract <em>only</em> the sentences relevant to the query, discarding the rest.</p></li><li><p><strong>Embeddings-based Filtering</strong>: Removing documents that are below a certain similarity threshold (e.g., discarding anything with a cosine similarity &lt; 0.7).</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_!NzzR!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9b4c8e1d-1678-4e84-8b0d-44219618ad7d_1988x786.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!NzzR!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9b4c8e1d-1678-4e84-8b0d-44219618ad7d_1988x786.png 424w, https://substackcdn.com/image/fetch/$s_!NzzR!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9b4c8e1d-1678-4e84-8b0d-44219618ad7d_1988x786.png 848w, https://substackcdn.com/image/fetch/$s_!NzzR!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9b4c8e1d-1678-4e84-8b0d-44219618ad7d_1988x786.png 1272w, https://substackcdn.com/image/fetch/$s_!NzzR!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9b4c8e1d-1678-4e84-8b0d-44219618ad7d_1988x786.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!NzzR!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9b4c8e1d-1678-4e84-8b0d-44219618ad7d_1988x786.png" width="1456" height="576" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/9b4c8e1d-1678-4e84-8b0d-44219618ad7d_1988x786.png&quot;,&quot;srcNoWatermark&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/1a015b36-573b-4d72-acbc-b0c53c3b7614_1988x786.png&quot;,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:576,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:1220262,&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://compute.anshaj.dev/i/181021868?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1a015b36-573b-4d72-acbc-b0c53c3b7614_1988x786.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_!NzzR!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9b4c8e1d-1678-4e84-8b0d-44219618ad7d_1988x786.png 424w, https://substackcdn.com/image/fetch/$s_!NzzR!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9b4c8e1d-1678-4e84-8b0d-44219618ad7d_1988x786.png 848w, https://substackcdn.com/image/fetch/$s_!NzzR!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9b4c8e1d-1678-4e84-8b0d-44219618ad7d_1988x786.png 1272w, https://substackcdn.com/image/fetch/$s_!NzzR!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9b4c8e1d-1678-4e84-8b0d-44219618ad7d_1988x786.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">Context compression techniques</figcaption></figure></div><p>This ensures that the final prompt sent to the generator is dense with signal and low on noise, which reduces hallucination risks.</p><h2>GraphRAG</h2><p><strong>GraphRAG</strong> fundamentally changes how we index data. It moves away from flat lists of text chunks and towards structured relationships.</p><p>Vector RAG is great for &#8220;Needle in a Haystack&#8221; queries. It is terrible for <em>Global Understanding</em> queries. If you ask, &#8220;How do the relationships between the factions in this story evolve?&#8221; a vector search will find you snippets where factions are mentioned. It won&#8217;t find you the evolution or the structure of the conflict.</p><h3>Building the Graph</h3><p>GraphRAG, specifically the approach championed by <a href="https://www.microsoft.com/en-us/research/project/graphrag/">Microsoft Research</a>, uses an LLM to build a Knowledge Graph (KG) during the indexing phase.</p><p><strong>The Pipeline</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_!AS-v!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F56d9c406-d0cc-4294-bbe4-039a9964f654_1376x662.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!AS-v!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F56d9c406-d0cc-4294-bbe4-039a9964f654_1376x662.png 424w, https://substackcdn.com/image/fetch/$s_!AS-v!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F56d9c406-d0cc-4294-bbe4-039a9964f654_1376x662.png 848w, https://substackcdn.com/image/fetch/$s_!AS-v!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F56d9c406-d0cc-4294-bbe4-039a9964f654_1376x662.png 1272w, https://substackcdn.com/image/fetch/$s_!AS-v!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F56d9c406-d0cc-4294-bbe4-039a9964f654_1376x662.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!AS-v!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F56d9c406-d0cc-4294-bbe4-039a9964f654_1376x662.png" width="1376" height="662" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/56d9c406-d0cc-4294-bbe4-039a9964f654_1376x662.png&quot;,&quot;srcNoWatermark&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/794e7e7b-4f43-4990-85f4-b1ead088f62c_1376x768.jpeg&quot;,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:662,&quot;width&quot;:1376,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:1353791,&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://compute.anshaj.dev/i/181021868?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F794e7e7b-4f43-4990-85f4-b1ead088f62c_1376x768.jpeg&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!AS-v!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F56d9c406-d0cc-4294-bbe4-039a9964f654_1376x662.png 424w, https://substackcdn.com/image/fetch/$s_!AS-v!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F56d9c406-d0cc-4294-bbe4-039a9964f654_1376x662.png 848w, https://substackcdn.com/image/fetch/$s_!AS-v!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F56d9c406-d0cc-4294-bbe4-039a9964f654_1376x662.png 1272w, https://substackcdn.com/image/fetch/$s_!AS-v!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F56d9c406-d0cc-4294-bbe4-039a9964f654_1376x662.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">Architecture of a Graph RAG Pipeline</figcaption></figure></div><ol><li><p><strong>Source Parsing</strong>: Documents are split into chunks.</p></li><li><p><strong>Extraction</strong>: An LLM processes each chunk to extract Entities (People, Places, Organizations) and Relationships(e.g., &#8220;Person A <em>works for</em> Organization B&#8221;).</p></li><li><p><strong>Graph Construction</strong>: These form a graph structure (Nodes and Edges) stored in a graph database like Neo4j.</p></li><li><p><strong>Community Detection</strong>: This is the sauce. The system uses algorithms like <strong><a href="https://en.wikipedia.org/wiki/Leiden_algorithm">Leiden</a></strong> (a hierarchical clustering algorithm) to group nodes into <em>communities</em>.</p><ul><li><p><em>Level 0</em>: All nodes.</p></li><li><p><em>Level 1</em>: Broad clusters (e.g., &#8220;Tech Companies,&#8221; &#8220;Regulatory Bodies&#8221;).</p></li><li><p><em>Level 2</em>: Tighter clusters (e.g., &#8220;AI Startups in SF&#8221;).</p></li></ul></li><li><p><strong>Community Summarization</strong>: The LLM generates a summary for <em>each community</em>.</p></li></ol><h3>Global Search Mechanism</h3><p>When a user asks a high-level question (&#8221;What are the major market trends in this dataset?&#8221;):</p><ol><li><p>The system does <em>not</em> search the raw text chunks.</p></li><li><p>It searches the <strong>Community Summaries</strong>.</p></li><li><p>Because these summaries are hierarchical, the system can answer at the appropriate level of abstraction.</p></li><li><p>It synthesizes these summaries into a global answer.</p></li></ol><div class="pullquote"><p>&#10024; <strong>Implementation Note</strong> &#10024;</p><p>The Pros of a Graph RAG include unmatched ability to answer thematic, multi-hop, and global questions. It structures unstructured data.</p><p>While the cons revolve around Cost and Complexity. Building the graph is expensive (lots of LLM calls). Maintaining it when new documents are added is non-trivial. It adds a heavy preprocessing step before the first query can even be answered.</p></div><h2>Speculative RAG: Need for Speed</h2><p>In production, latency is a killer. Users may dislike waiting 5 seconds for an answer. <strong><a href="https://arxiv.org/pdf/2407.08223">Speculative RAG</a></strong> is an architectural pattern designed to break the linear dependency of standard RAG to speed things up. It borrows the idea of &#8220;Speculative Decoding&#8221; from model optimization. The core idea is to separate the <em>drafting</em> of an answer from the <em>verification</em> of it.</p><p><strong>The Roles</strong></p><ol><li><p><strong>The Drafter (Specialist)</strong>: A smaller, faster, perhaps fine-tuned model (e.g., Llama-3-8B).</p></li><li><p><strong>The Verifier (Generalist)</strong>: A larger, smarter model (e.g., GPT-5).</p></li></ol><p><strong>The Workflow</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_!YYTk!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F53cb74eb-6e21-4599-9887-8910cf4641b2_1376x681.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!YYTk!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F53cb74eb-6e21-4599-9887-8910cf4641b2_1376x681.png 424w, https://substackcdn.com/image/fetch/$s_!YYTk!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F53cb74eb-6e21-4599-9887-8910cf4641b2_1376x681.png 848w, https://substackcdn.com/image/fetch/$s_!YYTk!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F53cb74eb-6e21-4599-9887-8910cf4641b2_1376x681.png 1272w, https://substackcdn.com/image/fetch/$s_!YYTk!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F53cb74eb-6e21-4599-9887-8910cf4641b2_1376x681.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!YYTk!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F53cb74eb-6e21-4599-9887-8910cf4641b2_1376x681.png" width="1376" height="681" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/53cb74eb-6e21-4599-9887-8910cf4641b2_1376x681.png&quot;,&quot;srcNoWatermark&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/d56b5708-52ac-4140-bd8c-82a6e3314d45_1376x768.jpeg&quot;,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:681,&quot;width&quot;:1376,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:1597479,&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://compute.anshaj.dev/i/181021868?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd56b5708-52ac-4140-bd8c-82a6e3314d45_1376x768.jpeg&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!YYTk!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F53cb74eb-6e21-4599-9887-8910cf4641b2_1376x681.png 424w, https://substackcdn.com/image/fetch/$s_!YYTk!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F53cb74eb-6e21-4599-9887-8910cf4641b2_1376x681.png 848w, https://substackcdn.com/image/fetch/$s_!YYTk!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F53cb74eb-6e21-4599-9887-8910cf4641b2_1376x681.png 1272w, https://substackcdn.com/image/fetch/$s_!YYTk!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F53cb74eb-6e21-4599-9887-8910cf4641b2_1376x681.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">Speculative RAG</figcaption></figure></div><ol><li><p><strong>Parallel Drafting</strong>: Instead of one large prompt, we split our retrieved documents into subsets (e.g., 4 subsets of 2 docs each). We spawn 4 instances of the <strong>Drafter</strong> model in parallel. Each Drafter reads its small subset and generates a <em>draft answer</em>.</p></li><li><p><strong>Verification</strong>: The Verifier looks at the question and the 4 draft answers. It doesn&#8217;t necessarily need to read all the original documents (saving tokens). It evaluates the drafts for consistency and rationale.</p></li><li><p><strong>Selection</strong>: The Verifier picks the best draft or synthesizes them into a final answer.</p></li></ol><p>You might think running 4 models is slower than 1. But because the Drafters run in parallel and use smaller context windows (fewer tokens), the <em>Time to First Token</em> and overall generation time can be significantly lower.</p><p>Research benchmarks on datasets like PubHealth show <a href="https://research.google/blog/speculative-rag-enhancing-retrieval-augmented-generation-through-drafting/">Speculative RAG can reduce latency by over 50%</a> while actually increasing accuracy (by ~13%). The accuracy gain comes from the <em>ensemble effect </em>(remember Random Forests?) - multiple drafters looking at data from different angles reduce the chance of the model fixating on a single wrong detail.</p><h2>The Critic: Self-Correcting Architectures</h2><p>One of the biggest fears in RAG deployment is of Silent Failure. The system retrieves garbage, the LLM hallucinates an answer based on that garbage, and the user believes it. <strong>Self-Correcting RAG</strong> adds a feedback loop to catch these errors.</p><h3>Corrective RAG (CRAG)</h3><p>CRAG adds a lightweight <strong>Retrieval Evaluator (</strong>Relevance Checker<strong>)</strong> into the pipeline.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!_JZh!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9dabf8a2-4141-4134-aedd-91c3bdf07935_2752x1536.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!_JZh!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9dabf8a2-4141-4134-aedd-91c3bdf07935_2752x1536.png 424w, https://substackcdn.com/image/fetch/$s_!_JZh!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9dabf8a2-4141-4134-aedd-91c3bdf07935_2752x1536.png 848w, https://substackcdn.com/image/fetch/$s_!_JZh!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9dabf8a2-4141-4134-aedd-91c3bdf07935_2752x1536.png 1272w, https://substackcdn.com/image/fetch/$s_!_JZh!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9dabf8a2-4141-4134-aedd-91c3bdf07935_2752x1536.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!_JZh!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9dabf8a2-4141-4134-aedd-91c3bdf07935_2752x1536.png" width="2752" height="1536" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/9dabf8a2-4141-4134-aedd-91c3bdf07935_2752x1536.png&quot;,&quot;srcNoWatermark&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/42e3ef08-a938-4a4f-a339-8527d88c8a1f_2752x1536.png&quot;,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1536,&quot;width&quot;:2752,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:5285798,&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://compute.anshaj.dev/i/181021868?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F42e3ef08-a938-4a4f-a339-8527d88c8a1f_2752x1536.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_!_JZh!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9dabf8a2-4141-4134-aedd-91c3bdf07935_2752x1536.png 424w, https://substackcdn.com/image/fetch/$s_!_JZh!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9dabf8a2-4141-4134-aedd-91c3bdf07935_2752x1536.png 848w, https://substackcdn.com/image/fetch/$s_!_JZh!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9dabf8a2-4141-4134-aedd-91c3bdf07935_2752x1536.png 1272w, https://substackcdn.com/image/fetch/$s_!_JZh!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9dabf8a2-4141-4134-aedd-91c3bdf07935_2752x1536.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">Corrective RAG information flow</figcaption></figure></div><p><strong>The Logic</strong></p><ol><li><p><strong>Retrieve</strong>: Get documents.</p></li><li><p><strong>Evaluate</strong>: A specialized model (often a T5 or small BERT-sized model) scores the relevance of the documents to the query.</p></li><li><p><strong>Branching Decision</strong>:</p><ul><li><p><strong>Correct (High Confidence)</strong>: Proceed to generation. Strip out irrelevant snippets.</p></li><li><p><strong>Incorrect (Low Confidence)</strong>: The retrieved docs are trash. <strong>Fallback</strong>: Trigger a web search or check a backup knowledge base. Do not use the bad docs.</p></li><li><p><strong>Ambiguous</strong>: Combine the retrieved docs with a web search to fill in the gaps.</p></li></ul></li></ol><p>This simple <em>Traffic Light - like</em> system prevents the generator from ever seeing purely irrelevant context, which is the primary cause of hallucinations.</p><h3>Self-RAG: Reflection Tokens</h3><p><strong>Self-RAG</strong> takes a different approach. Instead of an external evaluator, it trains the Generator LLM to critique <em>itself</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_!-Hiq!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F171ec951-2941-483c-83b9-1ed896a982d5_2752x1305.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!-Hiq!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F171ec951-2941-483c-83b9-1ed896a982d5_2752x1305.png 424w, https://substackcdn.com/image/fetch/$s_!-Hiq!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F171ec951-2941-483c-83b9-1ed896a982d5_2752x1305.png 848w, https://substackcdn.com/image/fetch/$s_!-Hiq!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F171ec951-2941-483c-83b9-1ed896a982d5_2752x1305.png 1272w, https://substackcdn.com/image/fetch/$s_!-Hiq!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F171ec951-2941-483c-83b9-1ed896a982d5_2752x1305.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!-Hiq!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F171ec951-2941-483c-83b9-1ed896a982d5_2752x1305.png" width="728" height="345.21802325581393" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/171ec951-2941-483c-83b9-1ed896a982d5_2752x1305.png&quot;,&quot;srcNoWatermark&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/ae9a1cd5-a748-43ed-86bf-73cab470afa6_2752x1536.jpeg&quot;,&quot;fullscreen&quot;:false,&quot;imageSize&quot;:&quot;normal&quot;,&quot;height&quot;:1305,&quot;width&quot;:2752,&quot;resizeWidth&quot;:728,&quot;bytes&quot;:3913001,&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;:&quot;center&quot;,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!-Hiq!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F171ec951-2941-483c-83b9-1ed896a982d5_2752x1305.png 424w, https://substackcdn.com/image/fetch/$s_!-Hiq!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F171ec951-2941-483c-83b9-1ed896a982d5_2752x1305.png 848w, https://substackcdn.com/image/fetch/$s_!-Hiq!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F171ec951-2941-483c-83b9-1ed896a982d5_2752x1305.png 1272w, https://substackcdn.com/image/fetch/$s_!-Hiq!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F171ec951-2941-483c-83b9-1ed896a982d5_2752x1305.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">Self-RAG </figcaption></figure></div><p>Reflection Tokens: The model is fine-tuned to emit special tokens inside its generation stream:</p><ul><li><p> &#8220;I need more data for this next sentence.&#8221;</p></li><li><p>&#8220;The document I just read is irrelevant.&#8221;</p></li><li><p>&#8220;The sentence I just wrote is not supported by the evidence.&#8221;</p></li><li><p>&#8220;This answer is useful for the user.&#8221;.</p></li></ul><p>During inference, the model generates a thought, critiques it with a token, and if the token is negative (e.g., = False), it backtracks and regenerates. This happens at the token/sentence level, offering much finer-grained control than CRAG&#8217;s document-level filtering.</p><p>However, implementation is harder: you typically need to fine-tune your own model or use a specifically trained Self-RAG checkpoint </p><h2>Adaptive RAG: The Manager</h2><p>Adaptive RAG is about efficiency. Not every query needs a $0.05 web search and a complex graph traversal. Some queries just need a quick lookup. Adaptive RAG uses a <strong>Classifier</strong> to route queries to the cheapest effective pipeline.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!SO4H!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff9409f99-80e4-4303-b668-57203f6f628c_2752x1277.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!SO4H!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff9409f99-80e4-4303-b668-57203f6f628c_2752x1277.png 424w, https://substackcdn.com/image/fetch/$s_!SO4H!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff9409f99-80e4-4303-b668-57203f6f628c_2752x1277.png 848w, https://substackcdn.com/image/fetch/$s_!SO4H!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff9409f99-80e4-4303-b668-57203f6f628c_2752x1277.png 1272w, https://substackcdn.com/image/fetch/$s_!SO4H!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff9409f99-80e4-4303-b668-57203f6f628c_2752x1277.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!SO4H!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff9409f99-80e4-4303-b668-57203f6f628c_2752x1277.png" width="2752" height="1277" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/f9409f99-80e4-4303-b668-57203f6f628c_2752x1277.png&quot;,&quot;srcNoWatermark&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/9920e27e-cfe4-400d-b66d-854a228c291f_2752x1536.jpeg&quot;,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1277,&quot;width&quot;:2752,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:4187684,&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_!SO4H!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff9409f99-80e4-4303-b668-57203f6f628c_2752x1277.png 424w, https://substackcdn.com/image/fetch/$s_!SO4H!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff9409f99-80e4-4303-b668-57203f6f628c_2752x1277.png 848w, https://substackcdn.com/image/fetch/$s_!SO4H!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff9409f99-80e4-4303-b668-57203f6f628c_2752x1277.png 1272w, https://substackcdn.com/image/fetch/$s_!SO4H!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff9409f99-80e4-4303-b668-57203f6f628c_2752x1277.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">Adaptive RAG Workflow</figcaption></figure></div><h3>Complexity Classification</h3><p>The router analyzes the query and assigns a complexity level:</p><ol><li><p><strong>Simple (No Retrieval)</strong>: &#8220;What is the capital of France?&#8221; -&gt; Let the LLM answer from memory. Fast, free.</p></li><li><p><strong>Moderate (Single-Step)</strong>: &#8220;Who is the CEO of LangChain?&#8221; -&gt; Vector Search -&gt; Generate.</p></li><li><p><strong>Complex (Multi-Step)</strong>: &#8220;Compare the battery life of the iPhone 17 vs. Pixel 10 based on recent reviews.&#8221; -&gt; This requires retrieving reviews for both, normalizing the data, and synthesizing.</p></li></ol><h3>Dynamic Routing Logic</h3><p>In a framework like <strong>LangChain</strong> or <strong>LangGraph</strong>, you implement this as a conditional chain.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!mp-u!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd2f9d20a-4fe9-42ff-bba2-1c815d4497df_2752x1332.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!mp-u!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd2f9d20a-4fe9-42ff-bba2-1c815d4497df_2752x1332.png 424w, https://substackcdn.com/image/fetch/$s_!mp-u!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd2f9d20a-4fe9-42ff-bba2-1c815d4497df_2752x1332.png 848w, https://substackcdn.com/image/fetch/$s_!mp-u!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd2f9d20a-4fe9-42ff-bba2-1c815d4497df_2752x1332.png 1272w, https://substackcdn.com/image/fetch/$s_!mp-u!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd2f9d20a-4fe9-42ff-bba2-1c815d4497df_2752x1332.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!mp-u!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd2f9d20a-4fe9-42ff-bba2-1c815d4497df_2752x1332.png" width="1456" height="705" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/d2f9d20a-4fe9-42ff-bba2-1c815d4497df_2752x1332.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:705,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:276699,&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://compute.anshaj.dev/i/181021868?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd2f9d20a-4fe9-42ff-bba2-1c815d4497df_2752x1332.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_!mp-u!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd2f9d20a-4fe9-42ff-bba2-1c815d4497df_2752x1332.png 424w, https://substackcdn.com/image/fetch/$s_!mp-u!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd2f9d20a-4fe9-42ff-bba2-1c815d4497df_2752x1332.png 848w, https://substackcdn.com/image/fetch/$s_!mp-u!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd2f9d20a-4fe9-42ff-bba2-1c815d4497df_2752x1332.png 1272w, https://substackcdn.com/image/fetch/$s_!mp-u!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd2f9d20a-4fe9-42ff-bba2-1c815d4497df_2752x1332.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 architecture is critical for scaling. It optimizes your &#8220;Token Budget.&#8221; You spend your expensive compute only on the hard problems.</p><h3>Tree of Clarifications </h3><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!SL2K!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fae542822-adf6-449f-b409-13a6d346d1cd_2752x1308.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!SL2K!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fae542822-adf6-449f-b409-13a6d346d1cd_2752x1308.png 424w, https://substackcdn.com/image/fetch/$s_!SL2K!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fae542822-adf6-449f-b409-13a6d346d1cd_2752x1308.png 848w, https://substackcdn.com/image/fetch/$s_!SL2K!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fae542822-adf6-449f-b409-13a6d346d1cd_2752x1308.png 1272w, https://substackcdn.com/image/fetch/$s_!SL2K!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fae542822-adf6-449f-b409-13a6d346d1cd_2752x1308.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!SL2K!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fae542822-adf6-449f-b409-13a6d346d1cd_2752x1308.png" width="2752" height="1308" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/ae542822-adf6-449f-b409-13a6d346d1cd_2752x1308.png&quot;,&quot;srcNoWatermark&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/14be90a7-bab8-4d8b-be49-5a7d381f38d9_2752x1536.jpeg&quot;,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1308,&quot;width&quot;:2752,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:4262209,&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_!SL2K!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fae542822-adf6-449f-b409-13a6d346d1cd_2752x1308.png 424w, https://substackcdn.com/image/fetch/$s_!SL2K!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fae542822-adf6-449f-b409-13a6d346d1cd_2752x1308.png 848w, https://substackcdn.com/image/fetch/$s_!SL2K!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fae542822-adf6-449f-b409-13a6d346d1cd_2752x1308.png 1272w, https://substackcdn.com/image/fetch/$s_!SL2K!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fae542822-adf6-449f-b409-13a6d346d1cd_2752x1308.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">Adaptive RAG with Tree of Clarifications</figcaption></figure></div><p>A sub-pattern of adaptive RAG handles <strong>Ambiguity</strong>. If a user asks &#8220;Who won the game?&#8221;, Adaptive RAG shouldn&#8217;t guess. The Tree of Clarifications architecture generates disambiguating questions (&#8221;Did you mean the NBA game last night or the World Cup final?&#8221;), constructs a tree of possible paths, retrieves info for each, and prunes the dead ends.</p><h2>The Autonomous: Agentic RAG</h2><p>If Adaptive RAG is a manager, <strong>Agentic RAG</strong> is an autonomous worker. It moves beyond pipelines (DAGs) to loops (Cyclic Graphs). This is the current frontier of RAG development.</p><h3>The ReAct Loop</h3><p>The core of Agentic RAG is the ReAct (Reason + Act) pattern.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!6KAo!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc088be29-28fd-4d6c-a749-1e99fddf1a34_2752x1536.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!6KAo!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc088be29-28fd-4d6c-a749-1e99fddf1a34_2752x1536.png 424w, https://substackcdn.com/image/fetch/$s_!6KAo!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc088be29-28fd-4d6c-a749-1e99fddf1a34_2752x1536.png 848w, https://substackcdn.com/image/fetch/$s_!6KAo!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc088be29-28fd-4d6c-a749-1e99fddf1a34_2752x1536.png 1272w, https://substackcdn.com/image/fetch/$s_!6KAo!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc088be29-28fd-4d6c-a749-1e99fddf1a34_2752x1536.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!6KAo!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc088be29-28fd-4d6c-a749-1e99fddf1a34_2752x1536.png" width="1456" height="813" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/c088be29-28fd-4d6c-a749-1e99fddf1a34_2752x1536.png&quot;,&quot;srcNoWatermark&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/862acd25-d11f-44cc-9175-abdbf2f518da_2752x1536.jpeg&quot;,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:813,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!6KAo!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc088be29-28fd-4d6c-a749-1e99fddf1a34_2752x1536.png 424w, https://substackcdn.com/image/fetch/$s_!6KAo!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc088be29-28fd-4d6c-a749-1e99fddf1a34_2752x1536.png 848w, https://substackcdn.com/image/fetch/$s_!6KAo!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc088be29-28fd-4d6c-a749-1e99fddf1a34_2752x1536.png 1272w, https://substackcdn.com/image/fetch/$s_!6KAo!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc088be29-28fd-4d6c-a749-1e99fddf1a34_2752x1536.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">ReAct Loop</figcaption></figure></div><p>The agent doesn&#8217;t just retrieve; it thinks.</p><ol><li><p><strong>Thought</strong>: The user wants to compare two stocks. I need the price of AAPL first.</p><p><strong>Action</strong>: Call Tool get_stock_price(&#8221;AAPL&#8221;).</p><p><strong>Observation</strong>: AAPL is $150.</p></li><li><p><strong>Thought</strong>: Now I need the price of MSFT.</p><p><strong>Action</strong>: Call Tool get_stock_price(&#8221;MSFT&#8221;).</p><p><strong>Observation</strong>: MSFT is $300.</p></li><li><p><strong>Thought</strong>: I have both. Now I will compare.</p></li><li><p><strong>Final Answer</strong>: MSFT is double the price of AAPL.</p></li></ol><h3>Tool Use and Autonomy</h3><p>In Agentic RAG, the &#8220;Retriever&#8221; is just one tool in a toolkit that might also include:</p><ul><li><p>Web Search (for real-time data).</p></li><li><p>Calculator (for math, where LLMs fail).</p></li><li><p>SQL Connector (for structured DBs).</p></li></ul><p>The agent decides <em>when</em> to use the retriever. If the first retrieval is bad, the agent can observe that (&#8221;I didn&#8217;t find the answer&#8221;) and decide to rewrite the query and try again. This <strong>Retry Loop</strong> is what makes Agentic RAG so powerful&#8212;and so dangerous (infinite loops are possible!). For more on this, you can read my article below on AI agent tooling.</p><div class="digest-post-embed" data-attrs="{&quot;nodeId&quot;:&quot;e9e26e2b-5d1c-41c2-ad1d-09ca4c4eb354&quot;,&quot;caption&quot;:&quot;With the recent launch of GPT-5, a few weeks ago, we&#8217;ve started to see a decline in the expansion of capabilities of Large Language Models. While the benchmarks associated with GPT-5 look promising, some industry experts think that the actual implementation seems a bit more focused on cutting down costs and increasing opt&#8230;&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;AI Agent tools&quot;,&quot;publishedBylines&quot;:[{&quot;id&quot;:15656283,&quot;name&quot;:&quot;Anshaj&quot;,&quot;bio&quot;:&quot;A thinker, writer &amp; photographer &quot;,&quot;photo_url&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/5dae1222-5d91-4f7f-90bc-214a57d09a32_1178x1177.jpeg&quot;,&quot;is_guest&quot;:false,&quot;bestseller_tier&quot;:null}],&quot;post_date&quot;:&quot;2025-08-28T12:31:48.323Z&quot;,&quot;cover_image&quot;:&quot;https://images.unsplash.com/photo-1426927308491-6380b6a9936f?crop=entropy&amp;cs=tinysrgb&amp;fit=max&amp;fm=jpg&amp;ixid=M3wzMDAzMzh8MHwxfHNlYXJjaHwzfHx0b29sfGVufDB8fHx8MTc1NjI5NTExNnww&amp;ixlib=rb-4.1.0&amp;q=80&amp;w=1080&quot;,&quot;cover_image_alt&quot;:null,&quot;canonical_url&quot;:&quot;https://compute.anshaj.dev/p/ai-agent-tools&quot;,&quot;section_name&quot;:null,&quot;video_upload_id&quot;:null,&quot;id&quot;:172161012,&quot;type&quot;:&quot;newsletter&quot;,&quot;reaction_count&quot;:1,&quot;comment_count&quot;:0,&quot;publication_id&quot;:1864668,&quot;publication_name&quot;:&quot;Compute - A Blog on Computation&quot;,&quot;publication_logo_url&quot;:&quot;https://substackcdn.com/image/fetch/$s_!ShJo!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F05083da4-de89-4989-8e93-c51efdadef86_750x750.png&quot;,&quot;belowTheFold&quot;:true,&quot;youtube_url&quot;:null,&quot;show_links&quot;:null,&quot;feed_url&quot;:null}"></div><h2>Chain-of-Note: Noise control</h2><p>We talked about noise earlier, but <strong>Chain-of-Note (CoN)</strong> deserves its own section as a specific architectural remedy for the &#8220;Unknown&#8221; problem.</p><p>The Problem: Standard RAG is terrified of saying &#8220;I don&#8217;t know.&#8221; If you ask &#8220;Who is the King of Mars?&#8221; and the retriever brings back a document about the &#8220;King of Burgers,&#8221; a standard RAG model might hallucinate &#8220;The King of Mars is the King of Burgers.&#8221;</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!U0-U!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fec0d43d2-28a6-4fc8-8628-f49c1657bf72_2752x1294.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!U0-U!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fec0d43d2-28a6-4fc8-8628-f49c1657bf72_2752x1294.png 424w, https://substackcdn.com/image/fetch/$s_!U0-U!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fec0d43d2-28a6-4fc8-8628-f49c1657bf72_2752x1294.png 848w, https://substackcdn.com/image/fetch/$s_!U0-U!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fec0d43d2-28a6-4fc8-8628-f49c1657bf72_2752x1294.png 1272w, https://substackcdn.com/image/fetch/$s_!U0-U!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fec0d43d2-28a6-4fc8-8628-f49c1657bf72_2752x1294.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!U0-U!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fec0d43d2-28a6-4fc8-8628-f49c1657bf72_2752x1294.png" width="2752" height="1294" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/ec0d43d2-28a6-4fc8-8628-f49c1657bf72_2752x1294.png&quot;,&quot;srcNoWatermark&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/14d9d822-843c-4a8d-9964-8e9008bd5716_2752x1536.jpeg&quot;,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1294,&quot;width&quot;:2752,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:4328922,&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_!U0-U!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fec0d43d2-28a6-4fc8-8628-f49c1657bf72_2752x1294.png 424w, https://substackcdn.com/image/fetch/$s_!U0-U!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fec0d43d2-28a6-4fc8-8628-f49c1657bf72_2752x1294.png 848w, https://substackcdn.com/image/fetch/$s_!U0-U!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fec0d43d2-28a6-4fc8-8628-f49c1657bf72_2752x1294.png 1272w, https://substackcdn.com/image/fetch/$s_!U0-U!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fec0d43d2-28a6-4fc8-8628-f49c1657bf72_2752x1294.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">Chain of Note RAG Workflow</figcaption></figure></div><p>The CoN Solution: CoN forces the model to take notes before answering.</p><ol><li><p>Read Doc 1: &#8220;This document talks about burgers. It is irrelevant to Mars.&#8221;</p></li><li><p>Read Doc 2: &#8220;This document discusses Mars geology. It mentions no monarchy.&#8221;</p></li><li><p><strong>Synthesize</strong>: &#8220;Based on the notes, there is no information about a King of Mars. The retrieval results were irrelevant.&#8221;</p></li></ol><p>This architecture drastically improves Robustness. It creates a &#8220;Null&#8221; state. It turns the model from a Sycohphant (always trying to please) into a Critic (assessing the validity of its own inputs).</p><h2>Choosing Your Stack</h2><p>With so many architectures, how do you choose? Here is a comparison guide that can help.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!_r7I!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F480c5514-dc30-4e54-ab5a-418219f84f93_1860x768.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!_r7I!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F480c5514-dc30-4e54-ab5a-418219f84f93_1860x768.png 424w, https://substackcdn.com/image/fetch/$s_!_r7I!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F480c5514-dc30-4e54-ab5a-418219f84f93_1860x768.png 848w, https://substackcdn.com/image/fetch/$s_!_r7I!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F480c5514-dc30-4e54-ab5a-418219f84f93_1860x768.png 1272w, https://substackcdn.com/image/fetch/$s_!_r7I!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F480c5514-dc30-4e54-ab5a-418219f84f93_1860x768.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!_r7I!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F480c5514-dc30-4e54-ab5a-418219f84f93_1860x768.png" width="1456" height="601" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/480c5514-dc30-4e54-ab5a-418219f84f93_1860x768.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:601,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:231540,&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://compute.anshaj.dev/i/181021868?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F480c5514-dc30-4e54-ab5a-418219f84f93_1860x768.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_!_r7I!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F480c5514-dc30-4e54-ab5a-418219f84f93_1860x768.png 424w, https://substackcdn.com/image/fetch/$s_!_r7I!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F480c5514-dc30-4e54-ab5a-418219f84f93_1860x768.png 848w, https://substackcdn.com/image/fetch/$s_!_r7I!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F480c5514-dc30-4e54-ab5a-418219f84f93_1860x768.png 1272w, https://substackcdn.com/image/fetch/$s_!_r7I!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F480c5514-dc30-4e54-ab5a-418219f84f93_1860x768.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><h3>The Gold Standard Stack </h3><p>If you are building an enterprise RAG system today, a robust starting point is often a hybrid</p><ol><li><p><strong>Routing</strong>: Adaptive front-end (don&#8217;t RAG everything).</p></li><li><p><strong>Retrieval</strong>: Hybrid Search (Vector + Keyword) with Reranking </p></li><li><p><strong>Architecture</strong>: <strong>Modular</strong>. Start with a linear pipeline. Upgrade to Agentic only for specific complex query types (using the Router).</p></li><li><p><strong>Database</strong>: A store that supports both Vector and Metadata filtering (e.g., Pinecone, Weaviate, or pgvector).</p></li></ol><h2>The Road Ahead</h2><p>The days of  pip install langchain; qa_chain.run() are over. RAG has matured into a serious systems engineering discipline.</p><p>We are moving towards Cognitive RAG: systems that model the user&#8217;s intent, structure the knowledge globally (Graphs), and reason iteratively (Agents). The trade-offs are no longer just about accuracy; they are about </p><div class="pullquote"><p><strong>Autonomy vs. Control </strong> </p><p><strong>Latency vs. Depth</strong>.</p></div><p>As a developer, your job is no longer just to connect the LLM to the DB. It is to architect the <em>flow of thought</em>. Whether you choose the structural rigor of GraphRAG or the dynamic flexibility of Agentic RAG, the goal remains the same: building systems that don&#8217;t just retrieve data, but actually <em>understand</em> it.</p><p>Welcome to the next generation of Intelligent Information Retrieval. Thank you so much for reading this super-long post, and I hope you have a wonderful day.</p><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://compute.anshaj.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">Compute - A Blog on Computation is a reader-supported publication. To receive new posts and support my work, consider becoming a free or paid subscriber.</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[Google Agent Development Kit]]></title><description><![CDATA[Your guide to building agents with Google Agent Development Kit (ADK)]]></description><link>https://compute.anshaj.dev/p/google-agent-development-kit</link><guid isPermaLink="false">https://compute.anshaj.dev/p/google-agent-development-kit</guid><dc:creator><![CDATA[Anshaj]]></dc:creator><pubDate>Tue, 09 Dec 2025 19:43:07 GMT</pubDate><enclosure url="https://images.unsplash.com/photo-1604083678432-3ac6f425272e?crop=entropy&amp;cs=tinysrgb&amp;fit=max&amp;fm=jpg&amp;ixid=M3wzMDAzMzh8MHwxfHNlYXJjaHwxMXx8YWRrfGVufDB8fHx8MTc2NDc2MjQxOHww&amp;ixlib=rb-4.1.0&amp;q=80&amp;w=1080" length="0" type="image/jpeg"/><content:encoded><![CDATA[<div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://images.unsplash.com/photo-1604083678432-3ac6f425272e?crop=entropy&amp;cs=tinysrgb&amp;fit=max&amp;fm=jpg&amp;ixid=M3wzMDAzMzh8MHwxfHNlYXJjaHwxMXx8YWRrfGVufDB8fHx8MTc2NDc2MjQxOHww&amp;ixlib=rb-4.1.0&amp;q=80&amp;w=1080" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://images.unsplash.com/photo-1604083678432-3ac6f425272e?crop=entropy&amp;cs=tinysrgb&amp;fit=max&amp;fm=jpg&amp;ixid=M3wzMDAzMzh8MHwxfHNlYXJjaHwxMXx8YWRrfGVufDB8fHx8MTc2NDc2MjQxOHww&amp;ixlib=rb-4.1.0&amp;q=80&amp;w=1080 424w, https://images.unsplash.com/photo-1604083678432-3ac6f425272e?crop=entropy&amp;cs=tinysrgb&amp;fit=max&amp;fm=jpg&amp;ixid=M3wzMDAzMzh8MHwxfHNlYXJjaHwxMXx8YWRrfGVufDB8fHx8MTc2NDc2MjQxOHww&amp;ixlib=rb-4.1.0&amp;q=80&amp;w=1080 848w, https://images.unsplash.com/photo-1604083678432-3ac6f425272e?crop=entropy&amp;cs=tinysrgb&amp;fit=max&amp;fm=jpg&amp;ixid=M3wzMDAzMzh8MHwxfHNlYXJjaHwxMXx8YWRrfGVufDB8fHx8MTc2NDc2MjQxOHww&amp;ixlib=rb-4.1.0&amp;q=80&amp;w=1080 1272w, https://images.unsplash.com/photo-1604083678432-3ac6f425272e?crop=entropy&amp;cs=tinysrgb&amp;fit=max&amp;fm=jpg&amp;ixid=M3wzMDAzMzh8MHwxfHNlYXJjaHwxMXx8YWRrfGVufDB8fHx8MTc2NDc2MjQxOHww&amp;ixlib=rb-4.1.0&amp;q=80&amp;w=1080 1456w" sizes="100vw"><img src="https://images.unsplash.com/photo-1604083678432-3ac6f425272e?crop=entropy&amp;cs=tinysrgb&amp;fit=max&amp;fm=jpg&amp;ixid=M3wzMDAzMzh8MHwxfHNlYXJjaHwxMXx8YWRrfGVufDB8fHx8MTc2NDc2MjQxOHww&amp;ixlib=rb-4.1.0&amp;q=80&amp;w=1080" width="4032" height="2268" data-attrs="{&quot;src&quot;:&quot;https://images.unsplash.com/photo-1604083678432-3ac6f425272e?crop=entropy&amp;cs=tinysrgb&amp;fit=max&amp;fm=jpg&amp;ixid=M3wzMDAzMzh8MHwxfHNlYXJjaHwxMXx8YWRrfGVufDB8fHx8MTc2NDc2MjQxOHww&amp;ixlib=rb-4.1.0&amp;q=80&amp;w=1080&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:2268,&quot;width&quot;:4032,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;brown and gray stones on water&quot;,&quot;title&quot;:null,&quot;type&quot;:&quot;image/jpg&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="brown and gray stones on water" title="brown and gray stones on water" srcset="https://images.unsplash.com/photo-1604083678432-3ac6f425272e?crop=entropy&amp;cs=tinysrgb&amp;fit=max&amp;fm=jpg&amp;ixid=M3wzMDAzMzh8MHwxfHNlYXJjaHwxMXx8YWRrfGVufDB8fHx8MTc2NDc2MjQxOHww&amp;ixlib=rb-4.1.0&amp;q=80&amp;w=1080 424w, https://images.unsplash.com/photo-1604083678432-3ac6f425272e?crop=entropy&amp;cs=tinysrgb&amp;fit=max&amp;fm=jpg&amp;ixid=M3wzMDAzMzh8MHwxfHNlYXJjaHwxMXx8YWRrfGVufDB8fHx8MTc2NDc2MjQxOHww&amp;ixlib=rb-4.1.0&amp;q=80&amp;w=1080 848w, https://images.unsplash.com/photo-1604083678432-3ac6f425272e?crop=entropy&amp;cs=tinysrgb&amp;fit=max&amp;fm=jpg&amp;ixid=M3wzMDAzMzh8MHwxfHNlYXJjaHwxMXx8YWRrfGVufDB8fHx8MTc2NDc2MjQxOHww&amp;ixlib=rb-4.1.0&amp;q=80&amp;w=1080 1272w, https://images.unsplash.com/photo-1604083678432-3ac6f425272e?crop=entropy&amp;cs=tinysrgb&amp;fit=max&amp;fm=jpg&amp;ixid=M3wzMDAzMzh8MHwxfHNlYXJjaHwxMXx8YWRrfGVufDB8fHx8MTc2NDc2MjQxOHww&amp;ixlib=rb-4.1.0&amp;q=80&amp;w=1080 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><figcaption class="image-caption">Photo by <a href="https://unsplash.com/@lizbaylee">Liz Bailey</a> on <a href="https://unsplash.com">Unsplash</a></figcaption></figure></div><h2>Welcome to the Agentic Era</h2><p>Hello, and welcome to the deep end of the AI pool. If you are reading this, you are likely a software engineer who has moved past the &#8220;honeymoon phase&#8221; of Generative AI. You have played with chat prompts, maybe built a simple RAG (Retrieval-Augmented Generation) application using a few API calls, and now you are hitting a wall. The wall is <strong>determinism</strong>. You need your application to do more than just <em>talk</em>; you need it to <em>act</em>, <em>adhere to business logic</em>, and <em>scale</em> without hallucinating its way into a production incident.</p><div class="pullquote"><p>Welcome to <strong>Agent Engineering</strong>.</p></div><p>This post is designed as a comprehensive, developer-to-developer tutorial on Google&#8217;s Agent Development Kit (ADK). We are going to move beyond simple scripts and build robust, production-ready multi-agent systems. The ADK is not just another wrapper around an LLM API; it is an opinionated framework designed to bring software engineering discipline&#8212;modularity, type safety, observability&#8212;to the probabilistic world of AI. This post has code that I&#8217;ve implemented on Github for you to run at your end.</p><h3>Why ADK? The Code-First Philosophy</h3><p>In the current landscape, you have options. You could use LangChain, which is fantastic for its breadth of integrations but can become &#8220;glue code hell&#8221; in production. You could use Firebase Genkit, which is excellent for adding AI features to full-stack apps but is less specialized for complex, autonomous agent hierarchies.</p><p>The ADK is different. It is built for <strong>complex multi-agent orchestration</strong>. It treats agents not just as prompts, but as software components with defined inputs, outputs, and state lifecycles. It allows you to define &#8220;How does this agent think?&#8221; separately from &#8220;What tools can this agent use?&#8221; and &#8220;Who does this agent talk to?&#8221;.</p><div class="captioned-image-container"><figure><a class="image-link image2" target="_blank" href="https://substackcdn.com/image/fetch/$s_!HRZV!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffc77db0f-8143-41f8-942d-5ca4976fe744_2616x524.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!HRZV!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffc77db0f-8143-41f8-942d-5ca4976fe744_2616x524.png 424w, https://substackcdn.com/image/fetch/$s_!HRZV!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffc77db0f-8143-41f8-942d-5ca4976fe744_2616x524.png 848w, https://substackcdn.com/image/fetch/$s_!HRZV!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffc77db0f-8143-41f8-942d-5ca4976fe744_2616x524.png 1272w, https://substackcdn.com/image/fetch/$s_!HRZV!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffc77db0f-8143-41f8-942d-5ca4976fe744_2616x524.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!HRZV!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffc77db0f-8143-41f8-942d-5ca4976fe744_2616x524.png" width="1456" height="292" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/fc77db0f-8143-41f8-942d-5ca4976fe744_2616x524.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:292,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:211117,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://compute.anshaj.dev/i/180593582?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffc77db0f-8143-41f8-942d-5ca4976fe744_2616x524.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_!HRZV!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffc77db0f-8143-41f8-942d-5ca4976fe744_2616x524.png 424w, https://substackcdn.com/image/fetch/$s_!HRZV!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffc77db0f-8143-41f8-942d-5ca4976fe744_2616x524.png 848w, https://substackcdn.com/image/fetch/$s_!HRZV!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffc77db0f-8143-41f8-942d-5ca4976fe744_2616x524.png 1272w, https://substackcdn.com/image/fetch/$s_!HRZV!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffc77db0f-8143-41f8-942d-5ca4976fe744_2616x524.png 1456w" sizes="100vw"></picture><div></div></div></a></figure></div><p>The ADK shines when you need <strong>predictability</strong>. By using primitives like <em>SequentialAgent</em>, <em>ParallelAgent</em>, and strict <em>FunctionTool</em> definitions, you constrain the LLM&#8217;s vast creative potential into a useful, reliable laser beam of utility.</p><h3>Key capabilities </h3><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!-OOz!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F593952ee-1a39-45cb-880f-cee7d16cf0d9_1376x768.heic" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!-OOz!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F593952ee-1a39-45cb-880f-cee7d16cf0d9_1376x768.heic 424w, https://substackcdn.com/image/fetch/$s_!-OOz!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F593952ee-1a39-45cb-880f-cee7d16cf0d9_1376x768.heic 848w, https://substackcdn.com/image/fetch/$s_!-OOz!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F593952ee-1a39-45cb-880f-cee7d16cf0d9_1376x768.heic 1272w, https://substackcdn.com/image/fetch/$s_!-OOz!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F593952ee-1a39-45cb-880f-cee7d16cf0d9_1376x768.heic 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!-OOz!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F593952ee-1a39-45cb-880f-cee7d16cf0d9_1376x768.heic" width="1376" height="768" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/593952ee-1a39-45cb-880f-cee7d16cf0d9_1376x768.heic&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:768,&quot;width&quot;:1376,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:138459,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/heic&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://compute.anshaj.dev/i/180593582?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F593952ee-1a39-45cb-880f-cee7d16cf0d9_1376x768.heic&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!-OOz!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F593952ee-1a39-45cb-880f-cee7d16cf0d9_1376x768.heic 424w, https://substackcdn.com/image/fetch/$s_!-OOz!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F593952ee-1a39-45cb-880f-cee7d16cf0d9_1376x768.heic 848w, https://substackcdn.com/image/fetch/$s_!-OOz!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F593952ee-1a39-45cb-880f-cee7d16cf0d9_1376x768.heic 1272w, https://substackcdn.com/image/fetch/$s_!-OOz!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F593952ee-1a39-45cb-880f-cee7d16cf0d9_1376x768.heic 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><h4>Agent Orchestration</h4><p>You can structure complex agent behaviors using explicit controls like sequential, parallel, or looping workflows rather than relying solely on prompts. It enables hierarchical delegation, where a <em>Manager</em> agent can route specific sub-tasks to specialized <em>Worker</em> agents and synthesize their outputs. This combination of deterministic code structures and probabilistic LLM routing creates stable, multi-agent systems.</p><h4>Web UI</h4><p>The kit includes a local developer dashboard, often called <strong>ADK Web</strong>, which lets you chat with your agent and visually inspect its reasoning process in real-time. It provides a graphical trace of every step&#8212;from user input to specific tool calls&#8212;making it significantly easier to debug logic errors than reading raw logs. Newer features also support visual, drag-and-drop construction of agent workflows to speed up prototyping.</p><h4>Tools &amp; Capabilities</h4><p>ADK supports the <a href="https://compute.anshaj.dev/p/what-is-mcp">Model Context Protocol (MCP)</a>, enabling plug-and-play connections to external data sources like SQL databases or Slack without writing custom glue code. It also implements the <a href="https://compute.anshaj.dev/p/agent-to-agent-protocol">Agent-to-Agent (A2A)</a> protocol, allowing your ADK agents to communicate and negotiate tasks with agents built on completely different frameworks. Out of the box, it includes essential tools for grounded Google Search and sandboxed code execution.</p><h4>API Server &amp; Runtime</h4><p>ADK allows you to deploy agents directly into the Vertex AI Agent Engine<strong> </strong>or as a standalone service, automatically exposing them as scalable, production-grade API endpoints. It supports standard frameworks like FastAPI for custom implementations while managing the complex, asynchronous request/response lifecycle. This setup handles long-running agent reasoning seamlessly without timing out connections or blocking the main thread.</p><h4>Sessions &amp; Memory</h4><p>ADK treats memory as infrastructure, distinctly separating temporary conversation context from persistent user state and preferences. It integrates with Vector DBs to create a <em>Memory Bank</em>, allowing agents to programmatically save and semantically retrieve information across different sessions. This enables true long-term recall, allowing the agent to &#8220;remember&#8221; details from weeks ago rather than just the current chat window.</p><h4>Ease of Deployment</h4><p>ADK follows a &#8220;Code Local, Deploy Global&#8221; philosophy, ensuring that agents are container-ready and can be deployed to Vertex AI or Cloud Run with a single CLI command. You can also deploy an ADK server on any other cloud provider or on-prem depending on your needs.</p><h3>Prerequisites and Setup</h3><p>Before we write a single line of code, let&#8217;s get our environment ready. The ADK is a modern Python framework, and it demands modern tooling.</p><p><strong>Hard Requirement:</strong> You must use <strong>Python 3.10 or higher</strong>. The ADK leverages advanced typing features available in newer Python versions, and trying to run this on Python 3.9 will result in immediate breaking errors.</p><p>I recommend using <code>uv</code> (a fast Python package manager) or standard <code>venv</code>.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!G77J!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd07226c6-47a8-48c7-8f15-293b08f0748d_2940x1848.heic" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!G77J!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd07226c6-47a8-48c7-8f15-293b08f0748d_2940x1848.heic 424w, https://substackcdn.com/image/fetch/$s_!G77J!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd07226c6-47a8-48c7-8f15-293b08f0748d_2940x1848.heic 848w, https://substackcdn.com/image/fetch/$s_!G77J!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd07226c6-47a8-48c7-8f15-293b08f0748d_2940x1848.heic 1272w, https://substackcdn.com/image/fetch/$s_!G77J!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd07226c6-47a8-48c7-8f15-293b08f0748d_2940x1848.heic 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!G77J!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd07226c6-47a8-48c7-8f15-293b08f0748d_2940x1848.heic" width="1456" height="915" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/d07226c6-47a8-48c7-8f15-293b08f0748d_2940x1848.heic&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;:124125,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/heic&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://compute.anshaj.dev/i/180593582?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd07226c6-47a8-48c7-8f15-293b08f0748d_2940x1848.heic&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!G77J!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd07226c6-47a8-48c7-8f15-293b08f0748d_2940x1848.heic 424w, https://substackcdn.com/image/fetch/$s_!G77J!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd07226c6-47a8-48c7-8f15-293b08f0748d_2940x1848.heic 848w, https://substackcdn.com/image/fetch/$s_!G77J!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd07226c6-47a8-48c7-8f15-293b08f0748d_2940x1848.heic 1272w, https://substackcdn.com/image/fetch/$s_!G77J!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd07226c6-47a8-48c7-8f15-293b08f0748d_2940x1848.heic 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>Once installed, the ADK gives you a CLI tool (<code>adk</code>) that we will use later for deployment and local testing. But first, let&#8217;s understand the atoms that make up the universe.</p><h2>The Atom of Intelligence: The Agent Class</h2><p>In the ADK, an <code>Agent</code> is the fundamental unit of execution. It is not just a prompt; it is a container that holds:</p><ol><li><p><strong>Model Configuration:</strong> Which brain are we using? (e.g., Gemini 2.5 Flash).</p></li><li><p><strong>Instruction (System Prompt):</strong> The personality and constraints.</p></li><li><p><strong>Tools:</strong> The capabilities (functions, APIs).</p></li><li><p><strong>Internal State:</strong> Context management.</p></li></ol><p>Let&#8217;s build a &#8220;Hello World&#8221; agent, but let&#8217;s make it robust. We will use the <code>Agent</code> class to create a helpful coding assistant.</p><h3>Your First Agent</h3><p>Create a file named <code>agent.py</code>. This is the convention ADK expects for deployment later. Create this file</p><pre><code>parent_folder/
    first_agent/
        __init__.py
        agent.py
        .env</code></pre><p>Now write the following code in agent.py. You can find the code implementation in a Github Codespace here for easier access and experimentation at your end.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!Jb6h!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9428a742-ed73-47fd-b581-96d832ce981e_2976x2904.heic" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!Jb6h!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9428a742-ed73-47fd-b581-96d832ce981e_2976x2904.heic 424w, https://substackcdn.com/image/fetch/$s_!Jb6h!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9428a742-ed73-47fd-b581-96d832ce981e_2976x2904.heic 848w, https://substackcdn.com/image/fetch/$s_!Jb6h!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9428a742-ed73-47fd-b581-96d832ce981e_2976x2904.heic 1272w, https://substackcdn.com/image/fetch/$s_!Jb6h!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9428a742-ed73-47fd-b581-96d832ce981e_2976x2904.heic 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!Jb6h!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9428a742-ed73-47fd-b581-96d832ce981e_2976x2904.heic" width="1456" height="1421" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/9428a742-ed73-47fd-b581-96d832ce981e_2976x2904.heic&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1421,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:264899,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/heic&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://compute.anshaj.dev/i/180593582?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9428a742-ed73-47fd-b581-96d832ce981e_2976x2904.heic&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!Jb6h!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9428a742-ed73-47fd-b581-96d832ce981e_2976x2904.heic 424w, https://substackcdn.com/image/fetch/$s_!Jb6h!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9428a742-ed73-47fd-b581-96d832ce981e_2976x2904.heic 848w, https://substackcdn.com/image/fetch/$s_!Jb6h!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9428a742-ed73-47fd-b581-96d832ce981e_2976x2904.heic 1272w, https://substackcdn.com/image/fetch/$s_!Jb6h!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9428a742-ed73-47fd-b581-96d832ce981e_2976x2904.heic 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>Deconstructing the Code:</strong></p><ul><li><p>model: We specify the model ID string. ADK abstracts the API calls to Vertex AI or Google AI Studio.</p></li><li><p>name: This isn&#8217;t just a label. In a multi-agent system, if a <em>Manager</em> agent wants to ask the <em>Coding Buddy</em> for help, it uses this name to route the request.</p></li><li><p>instruction: This is your System Prompt. Notice the specific guidelines. In Agent Engineering, being prescriptive here is better than hoping the model figures it out.</p></li></ul><p>We&#8217;ll need 2 more files apart from this </p><ul><li><p><em>__init__.py </em>is an empty file that the ADK requires</p></li><li><p><em>.env </em>file is used to store your Gemini API Key, which can be created <a href="https://aistudio.google.com/api-keys">google AI studio</a>. You can use a free Gemini API key for this example. </p></li></ul><p>Ensure that your .env file contains the newly created Gemini API Key </p><pre><code><code>echo &#8216;GOOGLE_API_KEY=&#8221;YOUR_API_KEY&#8221;&#8217; &gt; .env</code></code></pre><p>If you&#8217;re getting an error stating that you&#8217;ve reached the end of free quota, it&#8217;s likely that your key isn&#8217;t getting picked up automatically and you should export the key to your shell with </p><pre><code>export <code>GOOGLE_API_KEY=&#8221;YOUR_API_KEY&#8221;</code></code></pre><p>Once you&#8217;re ready, navigate to your parent folder and run the following command on your terminal.</p><pre><code>adk web</code></pre><p>And you&#8217;ll get the following screen. You can find the code shown in this example in <a href="https://github.com/anshajk/python-frameworks/tree/main/ai/adk/adk-masterclass/first_agent">my Github repository here</a> and if you&#8217;d like you can even use Github Codespaces to spin it up without having to set up anything on your own computer. </p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!INbi!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0d9ece1f-449b-46f5-b90c-c22a40e50723_2938x1674.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!INbi!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0d9ece1f-449b-46f5-b90c-c22a40e50723_2938x1674.png 424w, https://substackcdn.com/image/fetch/$s_!INbi!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0d9ece1f-449b-46f5-b90c-c22a40e50723_2938x1674.png 848w, https://substackcdn.com/image/fetch/$s_!INbi!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0d9ece1f-449b-46f5-b90c-c22a40e50723_2938x1674.png 1272w, https://substackcdn.com/image/fetch/$s_!INbi!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0d9ece1f-449b-46f5-b90c-c22a40e50723_2938x1674.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!INbi!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0d9ece1f-449b-46f5-b90c-c22a40e50723_2938x1674.png" width="1456" height="830" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/0d9ece1f-449b-46f5-b90c-c22a40e50723_2938x1674.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:830,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:475538,&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://compute.anshaj.dev/i/180593582?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0d9ece1f-449b-46f5-b90c-c22a40e50723_2938x1674.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_!INbi!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0d9ece1f-449b-46f5-b90c-c22a40e50723_2938x1674.png 424w, https://substackcdn.com/image/fetch/$s_!INbi!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0d9ece1f-449b-46f5-b90c-c22a40e50723_2938x1674.png 848w, https://substackcdn.com/image/fetch/$s_!INbi!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0d9ece1f-449b-46f5-b90c-c22a40e50723_2938x1674.png 1272w, https://substackcdn.com/image/fetch/$s_!INbi!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0d9ece1f-449b-46f5-b90c-c22a40e50723_2938x1674.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>Let&#8217;s dive deeper and build more complex use-cases.</p>
      <p>
          <a href="https://compute.anshaj.dev/p/google-agent-development-kit">
              Read more
          </a>
      </p>
   ]]></content:encoded></item><item><title><![CDATA[Agent to Agent Protocol]]></title><description><![CDATA[When AI Agents Finally Start Talking to Each Other]]></description><link>https://compute.anshaj.dev/p/agent-to-agent-protocol</link><guid isPermaLink="false">https://compute.anshaj.dev/p/agent-to-agent-protocol</guid><dc:creator><![CDATA[Anshaj]]></dc:creator><pubDate>Wed, 03 Dec 2025 11:11:41 GMT</pubDate><enclosure url="https://images.unsplash.com/photo-1465447142348-e9952c393450?crop=entropy&amp;cs=tinysrgb&amp;fit=max&amp;fm=jpg&amp;ixid=M3wzMDAzMzh8MHwxfHNlYXJjaHwyM3x8Y29ubmVjdGVkfGVufDB8fHx8MTc2NDc1OTk5MXww&amp;ixlib=rb-4.1.0&amp;q=80&amp;w=1080" length="0" type="image/jpeg"/><content:encoded><![CDATA[<div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://images.unsplash.com/photo-1465447142348-e9952c393450?crop=entropy&amp;cs=tinysrgb&amp;fit=max&amp;fm=jpg&amp;ixid=M3wzMDAzMzh8MHwxfHNlYXJjaHwyM3x8Y29ubmVjdGVkfGVufDB8fHx8MTc2NDc1OTk5MXww&amp;ixlib=rb-4.1.0&amp;q=80&amp;w=1080" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://images.unsplash.com/photo-1465447142348-e9952c393450?crop=entropy&amp;cs=tinysrgb&amp;fit=max&amp;fm=jpg&amp;ixid=M3wzMDAzMzh8MHwxfHNlYXJjaHwyM3x8Y29ubmVjdGVkfGVufDB8fHx8MTc2NDc1OTk5MXww&amp;ixlib=rb-4.1.0&amp;q=80&amp;w=1080 424w, https://images.unsplash.com/photo-1465447142348-e9952c393450?crop=entropy&amp;cs=tinysrgb&amp;fit=max&amp;fm=jpg&amp;ixid=M3wzMDAzMzh8MHwxfHNlYXJjaHwyM3x8Y29ubmVjdGVkfGVufDB8fHx8MTc2NDc1OTk5MXww&amp;ixlib=rb-4.1.0&amp;q=80&amp;w=1080 848w, https://images.unsplash.com/photo-1465447142348-e9952c393450?crop=entropy&amp;cs=tinysrgb&amp;fit=max&amp;fm=jpg&amp;ixid=M3wzMDAzMzh8MHwxfHNlYXJjaHwyM3x8Y29ubmVjdGVkfGVufDB8fHx8MTc2NDc1OTk5MXww&amp;ixlib=rb-4.1.0&amp;q=80&amp;w=1080 1272w, https://images.unsplash.com/photo-1465447142348-e9952c393450?crop=entropy&amp;cs=tinysrgb&amp;fit=max&amp;fm=jpg&amp;ixid=M3wzMDAzMzh8MHwxfHNlYXJjaHwyM3x8Y29ubmVjdGVkfGVufDB8fHx8MTc2NDc1OTk5MXww&amp;ixlib=rb-4.1.0&amp;q=80&amp;w=1080 1456w" sizes="100vw"><img src="https://images.unsplash.com/photo-1465447142348-e9952c393450?crop=entropy&amp;cs=tinysrgb&amp;fit=max&amp;fm=jpg&amp;ixid=M3wzMDAzMzh8MHwxfHNlYXJjaHwyM3x8Y29ubmVjdGVkfGVufDB8fHx8MTc2NDc1OTk5MXww&amp;ixlib=rb-4.1.0&amp;q=80&amp;w=1080" width="3992" height="2992" data-attrs="{&quot;src&quot;:&quot;https://images.unsplash.com/photo-1465447142348-e9952c393450?crop=entropy&amp;cs=tinysrgb&amp;fit=max&amp;fm=jpg&amp;ixid=M3wzMDAzMzh8MHwxfHNlYXJjaHwyM3x8Y29ubmVjdGVkfGVufDB8fHx8MTc2NDc1OTk5MXww&amp;ixlib=rb-4.1.0&amp;q=80&amp;w=1080&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:2992,&quot;width&quot;:3992,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;aerial photography of concrete roads&quot;,&quot;title&quot;:null,&quot;type&quot;:&quot;image/jpg&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="aerial photography of concrete roads" title="aerial photography of concrete roads" srcset="https://images.unsplash.com/photo-1465447142348-e9952c393450?crop=entropy&amp;cs=tinysrgb&amp;fit=max&amp;fm=jpg&amp;ixid=M3wzMDAzMzh8MHwxfHNlYXJjaHwyM3x8Y29ubmVjdGVkfGVufDB8fHx8MTc2NDc1OTk5MXww&amp;ixlib=rb-4.1.0&amp;q=80&amp;w=1080 424w, https://images.unsplash.com/photo-1465447142348-e9952c393450?crop=entropy&amp;cs=tinysrgb&amp;fit=max&amp;fm=jpg&amp;ixid=M3wzMDAzMzh8MHwxfHNlYXJjaHwyM3x8Y29ubmVjdGVkfGVufDB8fHx8MTc2NDc1OTk5MXww&amp;ixlib=rb-4.1.0&amp;q=80&amp;w=1080 848w, https://images.unsplash.com/photo-1465447142348-e9952c393450?crop=entropy&amp;cs=tinysrgb&amp;fit=max&amp;fm=jpg&amp;ixid=M3wzMDAzMzh8MHwxfHNlYXJjaHwyM3x8Y29ubmVjdGVkfGVufDB8fHx8MTc2NDc1OTk5MXww&amp;ixlib=rb-4.1.0&amp;q=80&amp;w=1080 1272w, https://images.unsplash.com/photo-1465447142348-e9952c393450?crop=entropy&amp;cs=tinysrgb&amp;fit=max&amp;fm=jpg&amp;ixid=M3wzMDAzMzh8MHwxfHNlYXJjaHwyM3x8Y29ubmVjdGVkfGVufDB8fHx8MTc2NDc1OTk5MXww&amp;ixlib=rb-4.1.0&amp;q=80&amp;w=1080 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><figcaption class="image-caption">Photo by <a href="https://unsplash.com/@dnevozhai">Denys Nevozhai</a> on <a href="https://unsplash.com">Unsplash</a></figcaption></figure></div><p>If you&#8217;ve been building AI agents recently, you&#8217;ve probably hit the &#8220;lonely island&#8221; problem. You build a fantastic agent in CrewAI, your friend builds one in LangGraph, and I build one using Google&#8217;s Agent Development Kit (ADK). They are all brilliant, but they can&#8217;t talk to each other. They are siloed intelligent systems.</p><p>Google recently released the <strong>Agent to Agent (A2A) Protocol</strong>, and it might just be the &#8220;TCP/IP moment&#8221; for Agentic AI. Let&#8217;s dive into what this protocol is, how it works, and why it&#8217;s different from things like MCP.</p><h2>What is the Agent to Agent (A2A) Protocol?</h2><p>In simple terms, A2A is a standard that allows AI agents to communicate, collaborate, and exchange information regardless of how they were built or where they are running.</p><p>Think of it as <strong>HTTP for AI Agents</strong>. Before HTTP, computers had a hard time talking to different networks. A2A wants to do the same for agents. It doesn&#8217;t matter if your agent is a &#8220;customer support&#8221; bot written in Python or a &#8220;inventory manager&#8221; written in Java; if they speak A2A, they can work together.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!YvIh!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe04dee5d-f84c-48d0-b135-c8505bd2c939_1376x768.heic" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!YvIh!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe04dee5d-f84c-48d0-b135-c8505bd2c939_1376x768.heic 424w, https://substackcdn.com/image/fetch/$s_!YvIh!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe04dee5d-f84c-48d0-b135-c8505bd2c939_1376x768.heic 848w, https://substackcdn.com/image/fetch/$s_!YvIh!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe04dee5d-f84c-48d0-b135-c8505bd2c939_1376x768.heic 1272w, https://substackcdn.com/image/fetch/$s_!YvIh!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe04dee5d-f84c-48d0-b135-c8505bd2c939_1376x768.heic 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!YvIh!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe04dee5d-f84c-48d0-b135-c8505bd2c939_1376x768.heic" width="1376" height="768" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/e04dee5d-f84c-48d0-b135-c8505bd2c939_1376x768.heic&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:768,&quot;width&quot;:1376,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:137118,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/heic&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://compute.anshaj.dev/i/173185666?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe04dee5d-f84c-48d0-b135-c8505bd2c939_1376x768.heic&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!YvIh!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe04dee5d-f84c-48d0-b135-c8505bd2c939_1376x768.heic 424w, https://substackcdn.com/image/fetch/$s_!YvIh!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe04dee5d-f84c-48d0-b135-c8505bd2c939_1376x768.heic 848w, https://substackcdn.com/image/fetch/$s_!YvIh!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe04dee5d-f84c-48d0-b135-c8505bd2c939_1376x768.heic 1272w, https://substackcdn.com/image/fetch/$s_!YvIh!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe04dee5d-f84c-48d0-b135-c8505bd2c939_1376x768.heic 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><h3>The Core Problem It Solves</h3><p>Right now, if I want my &#8220;Travel Planner Agent&#8221; to book a flight using your &#8220;Airline Booking Agent,&#8221; I usually have to write custom integration code. I need to know your API schema, your auth headers, and your specific quirks.</p><p>With A2A, my agent can just &#8220;discover&#8221; your agent, read its <strong>Agent Card</strong> (more on this later), and start a structured conversation to get the job done.</p><h2>How Does It Actually Work?</h2><p>The protocol is built on web standards we already know and love: <strong>HTTP, JSON-RPC, and SSE (Server-Sent Events)</strong>. It&#8217;s not some obscure binary format; it&#8217;s just web requests.</p><p>Here is the high-level flow:</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!gCAe!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8ddee8cc-27fb-469f-b63d-72147e7a2b07_1376x768.heic" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!gCAe!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8ddee8cc-27fb-469f-b63d-72147e7a2b07_1376x768.heic 424w, https://substackcdn.com/image/fetch/$s_!gCAe!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8ddee8cc-27fb-469f-b63d-72147e7a2b07_1376x768.heic 848w, https://substackcdn.com/image/fetch/$s_!gCAe!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8ddee8cc-27fb-469f-b63d-72147e7a2b07_1376x768.heic 1272w, https://substackcdn.com/image/fetch/$s_!gCAe!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8ddee8cc-27fb-469f-b63d-72147e7a2b07_1376x768.heic 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!gCAe!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8ddee8cc-27fb-469f-b63d-72147e7a2b07_1376x768.heic" width="1376" height="768" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/8ddee8cc-27fb-469f-b63d-72147e7a2b07_1376x768.heic&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:768,&quot;width&quot;:1376,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:144851,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/heic&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://compute.anshaj.dev/i/173185666?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8ddee8cc-27fb-469f-b63d-72147e7a2b07_1376x768.heic&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!gCAe!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8ddee8cc-27fb-469f-b63d-72147e7a2b07_1376x768.heic 424w, https://substackcdn.com/image/fetch/$s_!gCAe!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8ddee8cc-27fb-469f-b63d-72147e7a2b07_1376x768.heic 848w, https://substackcdn.com/image/fetch/$s_!gCAe!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8ddee8cc-27fb-469f-b63d-72147e7a2b07_1376x768.heic 1272w, https://substackcdn.com/image/fetch/$s_!gCAe!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8ddee8cc-27fb-469f-b63d-72147e7a2b07_1376x768.heic 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><ol><li><p><strong>Discovery (The Agent Card):</strong> Every A2A-compliant agent hosts an <code>agent.json</code> file (the Agent Card) at a well-known URL. This is like a business card. It tells other agents:</p><ul><li><p>&#8220;Hi, I&#8217;m the Weather Agent.&#8221;</p></li><li><p>&#8220;I can give you forecasts and historical data.&#8221;</p></li><li><p>&#8220;Here is how you authenticate with me.&#8221;</p></li></ul></li><li><p><strong>Handshake:</strong> My agent reads your card and understands your capabilities.</p></li><li><p><strong>Task Execution:</strong> My agent sends a <strong>Task</strong> to your agent. This isn&#8217;t just a single prompt; it can be a long-running job.</p></li><li><p><strong>Asynchronous Communication:</strong> Your agent might need to ask clarifying questions (&#8221;Which city?&#8221;). A2A handles this back-and-forth negotiation, including waiting for human input if needed.</p></li></ol><h2>A2A vs. MCP: What&#8217;s the Difference?</h2><p>This is the most common question I see. &#8220;We already have Anthropic&#8217;s Model Context Protocol (MCP), why do we need this?&#8221;</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!9AwG!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F25c59502-c0d8-4197-94c3-7cbcef6d53e9_1524x864.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!9AwG!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F25c59502-c0d8-4197-94c3-7cbcef6d53e9_1524x864.png 424w, https://substackcdn.com/image/fetch/$s_!9AwG!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F25c59502-c0d8-4197-94c3-7cbcef6d53e9_1524x864.png 848w, https://substackcdn.com/image/fetch/$s_!9AwG!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F25c59502-c0d8-4197-94c3-7cbcef6d53e9_1524x864.png 1272w, https://substackcdn.com/image/fetch/$s_!9AwG!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F25c59502-c0d8-4197-94c3-7cbcef6d53e9_1524x864.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!9AwG!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F25c59502-c0d8-4197-94c3-7cbcef6d53e9_1524x864.png" width="1456" height="825" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/25c59502-c0d8-4197-94c3-7cbcef6d53e9_1524x864.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:825,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;Diagram showing A2A and MCP working together. A User interacts with Agent A using A2A. Agent A interacts with Agent B using A2A. Agent B uses MCP to interact with Tool 1 and Tool 2.&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="Diagram showing A2A and MCP working together. A User interacts with Agent A using A2A. Agent A interacts with Agent B using A2A. Agent B uses MCP to interact with Tool 1 and Tool 2." title="Diagram showing A2A and MCP working together. A User interacts with Agent A using A2A. Agent A interacts with Agent B using A2A. Agent B uses MCP to interact with Tool 1 and Tool 2." srcset="https://substackcdn.com/image/fetch/$s_!9AwG!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F25c59502-c0d8-4197-94c3-7cbcef6d53e9_1524x864.png 424w, https://substackcdn.com/image/fetch/$s_!9AwG!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F25c59502-c0d8-4197-94c3-7cbcef6d53e9_1524x864.png 848w, https://substackcdn.com/image/fetch/$s_!9AwG!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F25c59502-c0d8-4197-94c3-7cbcef6d53e9_1524x864.png 1272w, https://substackcdn.com/image/fetch/$s_!9AwG!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F25c59502-c0d8-4197-94c3-7cbcef6d53e9_1524x864.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">Source https://a2a-protocol.org/latest/topics/a2a-and-mcp/#why-different-protocols</figcaption></figure></div><p>It helps to visualize them as <strong>Vertical vs. Horizontal</strong>:</p><ul><li><p><strong>MCP is Vertical (Agent &#8596; Tool):</strong> MCP connects an agent to a database, a file system, or a GitHub repository. It gives the agent &#8220;hands&#8221; to do things.</p></li><li><p><strong>A2A is Horizontal (Agent &#8596; Agent):</strong> A2A connects an agent to <em>another agent</em>. It allows for delegation and teamwork.</p></li></ul><p>In a real-world scenario, you would use both. Your &#8220;Project Manager Agent&#8221; uses <strong>A2A</strong> to talk to a &#8220;Coder Agent.&#8221; That Coder Agent then uses <strong>MCP</strong> to access the GitHub API and write code.</p><h2>Why You Should Care</h2><ol><li><p><strong>No Vendor Lock-in:</strong> You aren&#8217;t stuck in the LangChain or Google ecosystem. You can mix and match.</p></li><li><p><strong>Opaque Collaboration:</strong> You can use an external agent (like a payment processor agent) without needing to know its internal prompt engineering or logic. You just care about the result.</p></li><li><p><strong>Standardization:</strong> We stop rewriting the same &#8220;how do I send a message&#8221; logic for every new agent framework.</p></li></ol><h2>Final Thoughts</h2><p>We are moving away from single, god-mode agents toward <strong>multi-agent systems</strong> (MAS). The A2A protocol is a massive step toward making that ecosystem interoperable. It&#8217;s open-source (now with the Linux Foundation), which gives me hope that it will become a genuine standard rather than just a &#8220;Google thing.&#8221;</p><p>If you are building agents today, it is definitely worth looking into making them A2A compliant. It might just be the difference between building a tool and building a teammate. I&#8217;ve created a <a href="https://github.com/anshajk/a2a_boilerplate">Github repository</a> where I&#8217;ve been experimenting with the A2A protocol. Feel free to check it out if you like.</p><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://compute.anshaj.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 Compute - A Blog on Computation! December is a learning month and if you like my work, 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[OpenAI Agent Builder]]></title><description><![CDATA[My experience developing Agentic workflows with the latest low/no code Agentic tool from OpenAI]]></description><link>https://compute.anshaj.dev/p/openai-agent-builder</link><guid isPermaLink="false">https://compute.anshaj.dev/p/openai-agent-builder</guid><dc:creator><![CDATA[Anshaj]]></dc:creator><pubDate>Fri, 10 Oct 2025 07:19:00 GMT</pubDate><enclosure url="https://images.unsplash.com/photo-1675198857086-e5a930f36495?crop=entropy&amp;cs=tinysrgb&amp;fit=max&amp;fm=jpg&amp;ixid=M3wzMDAzMzh8MHwxfHNlYXJjaHw0N3x8YWl8ZW58MHx8fHwxNzU5NzMyOTY0fDA&amp;ixlib=rb-4.1.0&amp;q=80&amp;w=1080" length="0" type="image/jpeg"/><content:encoded><![CDATA[<div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://images.unsplash.com/photo-1675198857086-e5a930f36495?crop=entropy&amp;cs=tinysrgb&amp;fit=max&amp;fm=jpg&amp;ixid=M3wzMDAzMzh8MHwxfHNlYXJjaHw0N3x8YWl8ZW58MHx8fHwxNzU5NzMyOTY0fDA&amp;ixlib=rb-4.1.0&amp;q=80&amp;w=1080" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://images.unsplash.com/photo-1675198857086-e5a930f36495?crop=entropy&amp;cs=tinysrgb&amp;fit=max&amp;fm=jpg&amp;ixid=M3wzMDAzMzh8MHwxfHNlYXJjaHw0N3x8YWl8ZW58MHx8fHwxNzU5NzMyOTY0fDA&amp;ixlib=rb-4.1.0&amp;q=80&amp;w=1080 424w, https://images.unsplash.com/photo-1675198857086-e5a930f36495?crop=entropy&amp;cs=tinysrgb&amp;fit=max&amp;fm=jpg&amp;ixid=M3wzMDAzMzh8MHwxfHNlYXJjaHw0N3x8YWl8ZW58MHx8fHwxNzU5NzMyOTY0fDA&amp;ixlib=rb-4.1.0&amp;q=80&amp;w=1080 848w, https://images.unsplash.com/photo-1675198857086-e5a930f36495?crop=entropy&amp;cs=tinysrgb&amp;fit=max&amp;fm=jpg&amp;ixid=M3wzMDAzMzh8MHwxfHNlYXJjaHw0N3x8YWl8ZW58MHx8fHwxNzU5NzMyOTY0fDA&amp;ixlib=rb-4.1.0&amp;q=80&amp;w=1080 1272w, https://images.unsplash.com/photo-1675198857086-e5a930f36495?crop=entropy&amp;cs=tinysrgb&amp;fit=max&amp;fm=jpg&amp;ixid=M3wzMDAzMzh8MHwxfHNlYXJjaHw0N3x8YWl8ZW58MHx8fHwxNzU5NzMyOTY0fDA&amp;ixlib=rb-4.1.0&amp;q=80&amp;w=1080 1456w" sizes="100vw"><img src="https://images.unsplash.com/photo-1675198857086-e5a930f36495?crop=entropy&amp;cs=tinysrgb&amp;fit=max&amp;fm=jpg&amp;ixid=M3wzMDAzMzh8MHwxfHNlYXJjaHw0N3x8YWl8ZW58MHx8fHwxNzU5NzMyOTY0fDA&amp;ixlib=rb-4.1.0&amp;q=80&amp;w=1080" width="9579" height="5388" data-attrs="{&quot;src&quot;:&quot;https://images.unsplash.com/photo-1675198857086-e5a930f36495?crop=entropy&amp;cs=tinysrgb&amp;fit=max&amp;fm=jpg&amp;ixid=M3wzMDAzMzh8MHwxfHNlYXJjaHw0N3x8YWl8ZW58MHx8fHwxNzU5NzMyOTY0fDA&amp;ixlib=rb-4.1.0&amp;q=80&amp;w=1080&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:5388,&quot;width&quot;:9579,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;a black and white photo of a heart&quot;,&quot;title&quot;:null,&quot;type&quot;:&quot;image/jpg&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="a black and white photo of a heart" title="a black and white photo of a heart" srcset="https://images.unsplash.com/photo-1675198857086-e5a930f36495?crop=entropy&amp;cs=tinysrgb&amp;fit=max&amp;fm=jpg&amp;ixid=M3wzMDAzMzh8MHwxfHNlYXJjaHw0N3x8YWl8ZW58MHx8fHwxNzU5NzMyOTY0fDA&amp;ixlib=rb-4.1.0&amp;q=80&amp;w=1080 424w, https://images.unsplash.com/photo-1675198857086-e5a930f36495?crop=entropy&amp;cs=tinysrgb&amp;fit=max&amp;fm=jpg&amp;ixid=M3wzMDAzMzh8MHwxfHNlYXJjaHw0N3x8YWl8ZW58MHx8fHwxNzU5NzMyOTY0fDA&amp;ixlib=rb-4.1.0&amp;q=80&amp;w=1080 848w, https://images.unsplash.com/photo-1675198857086-e5a930f36495?crop=entropy&amp;cs=tinysrgb&amp;fit=max&amp;fm=jpg&amp;ixid=M3wzMDAzMzh8MHwxfHNlYXJjaHw0N3x8YWl8ZW58MHx8fHwxNzU5NzMyOTY0fDA&amp;ixlib=rb-4.1.0&amp;q=80&amp;w=1080 1272w, https://images.unsplash.com/photo-1675198857086-e5a930f36495?crop=entropy&amp;cs=tinysrgb&amp;fit=max&amp;fm=jpg&amp;ixid=M3wzMDAzMzh8MHwxfHNlYXJjaHw0N3x8YWl8ZW58MHx8fHwxNzU5NzMyOTY0fDA&amp;ixlib=rb-4.1.0&amp;q=80&amp;w=1080 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><figcaption class="image-caption">Photo by <a href="https://unsplash.com/@iseeworld">Matt Wang</a> on <a href="https://unsplash.com">Unsplash</a></figcaption></figure></div><p>This week, on the 6th of October 25, OpenAI released AgentKit, a collection of tooling designed to make it easy to build and work with Agentic systems. There are 3 main components within this AgentKit ecosystem </p><ol><li><p>Agent Builder</p></li><li><p>Connector Registry</p></li><li><p>ChatKit</p></li></ol><p>This article focuses on the first part of the AgentKit ecosystem, which is the agent builder.</p><p><a href="https://platform.openai.com/docs/guides/agents/agent-builder">Agent Builder&#8288;</a> is a no/low code tool that provides a visual canvas for composing logic with drag-and-drop nodes, connecting tools, and configuring custom guardrails. It supports preview runs, inline eval configuration, and full versioning&#8212;ideal for fast iteration. </p><p>In a market that has increasingly seen the likes of <a href="https://www.langflow.org">Langflow</a>, <a href="https://n8n.io">n8n</a>, <a href="https://www.crewai.com">crewAI</a> and other low/no code tools, agent builder is OpenAI&#8217;s version of this low/no code agent building SaaS. I spent some time digging into this platform and built a couple of agents with increasing levels of complexity. </p><h2>Agent 1 - A simple web search agent </h2><p>I built the first agent by connecting the start node, the agent node and the end node. The agent instructions were simple - use the necessary tools and craft a response. The tool that I added was OpenAI&#8217;s web search tool and the model that I used was GPT-5. You can see in the screenshots below how the setup looks like. This took me under 5 minutes, and the agent did a good job of answering the question on the weather in New York. Nice!</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!2g-t!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fda511504-4f7f-45d5-b444-6151b4cae6bc_2886x1722.heic" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!2g-t!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fda511504-4f7f-45d5-b444-6151b4cae6bc_2886x1722.heic 424w, https://substackcdn.com/image/fetch/$s_!2g-t!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fda511504-4f7f-45d5-b444-6151b4cae6bc_2886x1722.heic 848w, https://substackcdn.com/image/fetch/$s_!2g-t!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fda511504-4f7f-45d5-b444-6151b4cae6bc_2886x1722.heic 1272w, https://substackcdn.com/image/fetch/$s_!2g-t!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fda511504-4f7f-45d5-b444-6151b4cae6bc_2886x1722.heic 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!2g-t!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fda511504-4f7f-45d5-b444-6151b4cae6bc_2886x1722.heic" width="618" height="368.8475274725275" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/da511504-4f7f-45d5-b444-6151b4cae6bc_2886x1722.heic&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:false,&quot;imageSize&quot;:&quot;normal&quot;,&quot;height&quot;:869,&quot;width&quot;:1456,&quot;resizeWidth&quot;:618,&quot;bytes&quot;:104001,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/heic&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://compute.anshaj.dev/i/175510179?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fda511504-4f7f-45d5-b444-6151b4cae6bc_2886x1722.heic&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:&quot;center&quot;,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!2g-t!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fda511504-4f7f-45d5-b444-6151b4cae6bc_2886x1722.heic 424w, https://substackcdn.com/image/fetch/$s_!2g-t!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fda511504-4f7f-45d5-b444-6151b4cae6bc_2886x1722.heic 848w, https://substackcdn.com/image/fetch/$s_!2g-t!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fda511504-4f7f-45d5-b444-6151b4cae6bc_2886x1722.heic 1272w, https://substackcdn.com/image/fetch/$s_!2g-t!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fda511504-4f7f-45d5-b444-6151b4cae6bc_2886x1722.heic 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><figcaption class="image-caption">A simple agent structure that uses the web search tool</figcaption></figure></div><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!Ubse!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Faa018e7d-f77c-472e-af59-86422d742e3e_704x1036.heic" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!Ubse!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Faa018e7d-f77c-472e-af59-86422d742e3e_704x1036.heic 424w, https://substackcdn.com/image/fetch/$s_!Ubse!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Faa018e7d-f77c-472e-af59-86422d742e3e_704x1036.heic 848w, https://substackcdn.com/image/fetch/$s_!Ubse!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Faa018e7d-f77c-472e-af59-86422d742e3e_704x1036.heic 1272w, https://substackcdn.com/image/fetch/$s_!Ubse!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Faa018e7d-f77c-472e-af59-86422d742e3e_704x1036.heic 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!Ubse!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Faa018e7d-f77c-472e-af59-86422d742e3e_704x1036.heic" width="330" height="485.625" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/aa018e7d-f77c-472e-af59-86422d742e3e_704x1036.heic&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1036,&quot;width&quot;:704,&quot;resizeWidth&quot;:330,&quot;bytes&quot;:36359,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/heic&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://compute.anshaj.dev/i/175510179?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Faa018e7d-f77c-472e-af59-86422d742e3e_704x1036.heic&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!Ubse!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Faa018e7d-f77c-472e-af59-86422d742e3e_704x1036.heic 424w, https://substackcdn.com/image/fetch/$s_!Ubse!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Faa018e7d-f77c-472e-af59-86422d742e3e_704x1036.heic 848w, https://substackcdn.com/image/fetch/$s_!Ubse!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Faa018e7d-f77c-472e-af59-86422d742e3e_704x1036.heic 1272w, https://substackcdn.com/image/fetch/$s_!Ubse!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Faa018e7d-f77c-472e-af59-86422d742e3e_704x1036.heic 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">Agent configuration for the simple agent</figcaption></figure></div><h2>Agent 2 - Stock Market Analysis and Plotting</h2><p>The second agent I built with the agent builder was to build a flow in which one agent would help me at doing market research about various company stocks. And the other agent would excel at generating plots. The overall high level design of nodes looks like the screenshot below</p><div class="captioned-image-container"><figure><a class="image-link image2" target="_blank" href="https://substackcdn.com/image/fetch/$s_!jrvo!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8306ec67-ab01-41d6-8115-aa37a3e1b893_2214x790.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!jrvo!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8306ec67-ab01-41d6-8115-aa37a3e1b893_2214x790.png 424w, https://substackcdn.com/image/fetch/$s_!jrvo!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8306ec67-ab01-41d6-8115-aa37a3e1b893_2214x790.png 848w, https://substackcdn.com/image/fetch/$s_!jrvo!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8306ec67-ab01-41d6-8115-aa37a3e1b893_2214x790.png 1272w, https://substackcdn.com/image/fetch/$s_!jrvo!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8306ec67-ab01-41d6-8115-aa37a3e1b893_2214x790.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!jrvo!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8306ec67-ab01-41d6-8115-aa37a3e1b893_2214x790.png" width="530" height="189.28571428571428" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/8306ec67-ab01-41d6-8115-aa37a3e1b893_2214x790.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:520,&quot;width&quot;:1456,&quot;resizeWidth&quot;:530,&quot;bytes&quot;:110866,&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://compute.anshaj.dev/i/175510179?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8306ec67-ab01-41d6-8115-aa37a3e1b893_2214x790.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_!jrvo!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8306ec67-ab01-41d6-8115-aa37a3e1b893_2214x790.png 424w, https://substackcdn.com/image/fetch/$s_!jrvo!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8306ec67-ab01-41d6-8115-aa37a3e1b893_2214x790.png 848w, https://substackcdn.com/image/fetch/$s_!jrvo!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8306ec67-ab01-41d6-8115-aa37a3e1b893_2214x790.png 1272w, https://substackcdn.com/image/fetch/$s_!jrvo!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8306ec67-ab01-41d6-8115-aa37a3e1b893_2214x790.png 1456w" sizes="100vw" loading="lazy"></picture><div></div></div></a><figcaption class="image-caption">Agent 2 - Flow Diagram</figcaption></figure></div><p>In the stock finder agent, I added the web search tool so that the agent could look up stock information from the internet. I added a structured response from my first agent in the following way. This is so that the later steps can reference these json fields and make deterministic decisions. (Not everything in an Agentic system needs to be non-deterministic.) The If/Else node will be utilizing this structured response to route the flow of execution further.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!FxPN!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F48d0250c-abb2-49e4-b997-a0f04b87d7b5_1480x1004.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!FxPN!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F48d0250c-abb2-49e4-b997-a0f04b87d7b5_1480x1004.png 424w, https://substackcdn.com/image/fetch/$s_!FxPN!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F48d0250c-abb2-49e4-b997-a0f04b87d7b5_1480x1004.png 848w, https://substackcdn.com/image/fetch/$s_!FxPN!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F48d0250c-abb2-49e4-b997-a0f04b87d7b5_1480x1004.png 1272w, https://substackcdn.com/image/fetch/$s_!FxPN!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F48d0250c-abb2-49e4-b997-a0f04b87d7b5_1480x1004.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!FxPN!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F48d0250c-abb2-49e4-b997-a0f04b87d7b5_1480x1004.png" width="549" height="372.5357142857143" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/48d0250c-abb2-49e4-b997-a0f04b87d7b5_1480x1004.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:988,&quot;width&quot;:1456,&quot;resizeWidth&quot;:549,&quot;bytes&quot;:143171,&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://compute.anshaj.dev/i/175510179?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F48d0250c-abb2-49e4-b997-a0f04b87d7b5_1480x1004.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_!FxPN!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F48d0250c-abb2-49e4-b997-a0f04b87d7b5_1480x1004.png 424w, https://substackcdn.com/image/fetch/$s_!FxPN!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F48d0250c-abb2-49e4-b997-a0f04b87d7b5_1480x1004.png 848w, https://substackcdn.com/image/fetch/$s_!FxPN!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F48d0250c-abb2-49e4-b997-a0f04b87d7b5_1480x1004.png 1272w, https://substackcdn.com/image/fetch/$s_!FxPN!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F48d0250c-abb2-49e4-b997-a0f04b87d7b5_1480x1004.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">Structured output of the first agent</figcaption></figure></div><p>I then used the set state node to set a new variable named stocks_str to this structured output. You&#8217;ll see why this was a key step a bit later. I then added the If/Else node to check if the stock_name as a field was found in the output of the first agent. This would ensure that the plotting agent wouldn&#8217;t be triggered unless the stock data was found and was available for us to use. </p><div class="captioned-image-container"><figure><a class="image-link image2" target="_blank" href="https://substackcdn.com/image/fetch/$s_!p-2E!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbc5ae4de-620a-42ac-88be-dc0b1784d14f_698x412.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!p-2E!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbc5ae4de-620a-42ac-88be-dc0b1784d14f_698x412.png 424w, https://substackcdn.com/image/fetch/$s_!p-2E!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbc5ae4de-620a-42ac-88be-dc0b1784d14f_698x412.png 848w, https://substackcdn.com/image/fetch/$s_!p-2E!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbc5ae4de-620a-42ac-88be-dc0b1784d14f_698x412.png 1272w, https://substackcdn.com/image/fetch/$s_!p-2E!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbc5ae4de-620a-42ac-88be-dc0b1784d14f_698x412.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!p-2E!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbc5ae4de-620a-42ac-88be-dc0b1784d14f_698x412.png" width="328" height="193.60458452722062" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/bc5ae4de-620a-42ac-88be-dc0b1784d14f_698x412.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:412,&quot;width&quot;:698,&quot;resizeWidth&quot;:328,&quot;bytes&quot;:42798,&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://compute.anshaj.dev/i/175510179?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbc5ae4de-620a-42ac-88be-dc0b1784d14f_698x412.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_!p-2E!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbc5ae4de-620a-42ac-88be-dc0b1784d14f_698x412.png 424w, https://substackcdn.com/image/fetch/$s_!p-2E!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbc5ae4de-620a-42ac-88be-dc0b1784d14f_698x412.png 848w, https://substackcdn.com/image/fetch/$s_!p-2E!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbc5ae4de-620a-42ac-88be-dc0b1784d14f_698x412.png 1272w, https://substackcdn.com/image/fetch/$s_!p-2E!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbc5ae4de-620a-42ac-88be-dc0b1784d14f_698x412.png 1456w" sizes="100vw" loading="lazy"></picture><div></div></div></a><figcaption class="image-caption">If/Else Node Configuration</figcaption></figure></div><p>Further, I added the second agent which is our plotting agent, and gave it access to Code Interpreter tool (which allows an agent to write it&#8217;s own python code, <a href="http://compute.anshaj.dev/p/ai-agent-tools">more here</a>). To give it the context of the structured json, I added the following prompt which also contains the <code>state.stocks_str</code> that we had defined earlier. The passed context must be a string and hence the implementation.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!Q-nZ!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F302b6ea3-f318-44ce-8b01-544d0cc87b1a_702x980.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!Q-nZ!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F302b6ea3-f318-44ce-8b01-544d0cc87b1a_702x980.png 424w, https://substackcdn.com/image/fetch/$s_!Q-nZ!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F302b6ea3-f318-44ce-8b01-544d0cc87b1a_702x980.png 848w, https://substackcdn.com/image/fetch/$s_!Q-nZ!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F302b6ea3-f318-44ce-8b01-544d0cc87b1a_702x980.png 1272w, https://substackcdn.com/image/fetch/$s_!Q-nZ!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F302b6ea3-f318-44ce-8b01-544d0cc87b1a_702x980.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!Q-nZ!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F302b6ea3-f318-44ce-8b01-544d0cc87b1a_702x980.png" width="314" height="438.34757834757835" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/302b6ea3-f318-44ce-8b01-544d0cc87b1a_702x980.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:980,&quot;width&quot;:702,&quot;resizeWidth&quot;:314,&quot;bytes&quot;:97784,&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://compute.anshaj.dev/i/175510179?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F302b6ea3-f318-44ce-8b01-544d0cc87b1a_702x980.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_!Q-nZ!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F302b6ea3-f318-44ce-8b01-544d0cc87b1a_702x980.png 424w, https://substackcdn.com/image/fetch/$s_!Q-nZ!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F302b6ea3-f318-44ce-8b01-544d0cc87b1a_702x980.png 848w, https://substackcdn.com/image/fetch/$s_!Q-nZ!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F302b6ea3-f318-44ce-8b01-544d0cc87b1a_702x980.png 1272w, https://substackcdn.com/image/fetch/$s_!Q-nZ!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F302b6ea3-f318-44ce-8b01-544d0cc87b1a_702x980.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">Plotting agent configuration with context</figcaption></figure></div><p>You can see the final output in a 3 minute video below. The agentic workflow successfully found the stock price of Amazon for the last 6 months, and gave me the code to plot it using python. I wish it&#8217;d have rendered the code directly in-line but in my testing, I couldn&#8217;t get the plot to render on my screen. The widget output format didn&#8217;t work for me, even after I added a custom widget with graphs. I did however copy-paste the code in google colab and got a nice plot as you can see below.</p><div class="native-video-embed" data-component-name="VideoPlaceholder" data-attrs="{&quot;mediaUploadId&quot;:&quot;ccd69e8d-54ab-425e-9226-158804626192&quot;,&quot;duration&quot;:null}"></div><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!SLPb!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F69818cd6-bc38-4a78-b8cb-7f5aee1526cd_1200x675.heic" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!SLPb!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F69818cd6-bc38-4a78-b8cb-7f5aee1526cd_1200x675.heic 424w, https://substackcdn.com/image/fetch/$s_!SLPb!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F69818cd6-bc38-4a78-b8cb-7f5aee1526cd_1200x675.heic 848w, https://substackcdn.com/image/fetch/$s_!SLPb!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F69818cd6-bc38-4a78-b8cb-7f5aee1526cd_1200x675.heic 1272w, https://substackcdn.com/image/fetch/$s_!SLPb!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F69818cd6-bc38-4a78-b8cb-7f5aee1526cd_1200x675.heic 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!SLPb!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F69818cd6-bc38-4a78-b8cb-7f5aee1526cd_1200x675.heic" width="509" height="286.3125" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/69818cd6-bc38-4a78-b8cb-7f5aee1526cd_1200x675.heic&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:675,&quot;width&quot;:1200,&quot;resizeWidth&quot;:509,&quot;bytes&quot;:40614,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/heic&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://compute.anshaj.dev/i/175510179?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F69818cd6-bc38-4a78-b8cb-7f5aee1526cd_1200x675.heic&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!SLPb!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F69818cd6-bc38-4a78-b8cb-7f5aee1526cd_1200x675.heic 424w, https://substackcdn.com/image/fetch/$s_!SLPb!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F69818cd6-bc38-4a78-b8cb-7f5aee1526cd_1200x675.heic 848w, https://substackcdn.com/image/fetch/$s_!SLPb!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F69818cd6-bc38-4a78-b8cb-7f5aee1526cd_1200x675.heic 1272w, https://substackcdn.com/image/fetch/$s_!SLPb!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F69818cd6-bc38-4a78-b8cb-7f5aee1526cd_1200x675.heic 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">Amazon stock chart generated using the code provided by the agent</figcaption></figure></div><h1>My observations</h1><ol><li><p>The handling of conversion history is seamless. The agent remembers what the user chatted about and follow-up questions are answered without any development effort from the user.</p></li><li><p>MCP support is okay. The connectors from OpenAI at launch are very few and there&#8217;s a lot of work required to get them set up properly. MCP at launch does not support OAuth and the multiple users have reported <a href="https://community.openai.com/t/issue-when-try-to-use-any-of-mcp-servers-or-connectors-in-agent-builder/1361356">connectors generally not working</a>, which is something I assume will eventually be fixed in the future. However, this definitely does limit the kind of projects that I can build at launch. I was planning on building a 3rd more complex agent, but the general errors in the platform made it impossible to do so</p></li><li><p>Tools like these are more common than ever, and I&#8217;d argue that if your current workflow is living happily in n8n or similar, I see no reason to switch at the moment. The idea behind this one again is just OpenAI entering the game of low/no code agent builder SaaS. At this time, this platform does not have any strategic advantage except the name of OpenAI to back it up. </p></li></ol><p>It&#8217;d be interesting to see how this integrates with chatkit and connector registry. I&#8217;ll be exploring that next and see what I can build with this. In the meantime, thank you so much for reading and I hope you have a wonderful day!</p><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://compute.anshaj.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 Compute - A Blog on Computation! If you&#8217;re interested in articles on computation, 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[AI Agent tools]]></title><description><![CDATA[The tools that you should know about, while developing AI agents]]></description><link>https://compute.anshaj.dev/p/ai-agent-tools</link><guid isPermaLink="false">https://compute.anshaj.dev/p/ai-agent-tools</guid><dc:creator><![CDATA[Anshaj]]></dc:creator><pubDate>Thu, 28 Aug 2025 12:31:48 GMT</pubDate><enclosure url="https://images.unsplash.com/photo-1426927308491-6380b6a9936f?crop=entropy&amp;cs=tinysrgb&amp;fit=max&amp;fm=jpg&amp;ixid=M3wzMDAzMzh8MHwxfHNlYXJjaHwzfHx0b29sfGVufDB8fHx8MTc1NjI5NTExNnww&amp;ixlib=rb-4.1.0&amp;q=80&amp;w=1080" length="0" type="image/jpeg"/><content:encoded><![CDATA[<div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://images.unsplash.com/photo-1426927308491-6380b6a9936f?crop=entropy&amp;cs=tinysrgb&amp;fit=max&amp;fm=jpg&amp;ixid=M3wzMDAzMzh8MHwxfHNlYXJjaHwzfHx0b29sfGVufDB8fHx8MTc1NjI5NTExNnww&amp;ixlib=rb-4.1.0&amp;q=80&amp;w=1080" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://images.unsplash.com/photo-1426927308491-6380b6a9936f?crop=entropy&amp;cs=tinysrgb&amp;fit=max&amp;fm=jpg&amp;ixid=M3wzMDAzMzh8MHwxfHNlYXJjaHwzfHx0b29sfGVufDB8fHx8MTc1NjI5NTExNnww&amp;ixlib=rb-4.1.0&amp;q=80&amp;w=1080 424w, https://images.unsplash.com/photo-1426927308491-6380b6a9936f?crop=entropy&amp;cs=tinysrgb&amp;fit=max&amp;fm=jpg&amp;ixid=M3wzMDAzMzh8MHwxfHNlYXJjaHwzfHx0b29sfGVufDB8fHx8MTc1NjI5NTExNnww&amp;ixlib=rb-4.1.0&amp;q=80&amp;w=1080 848w, https://images.unsplash.com/photo-1426927308491-6380b6a9936f?crop=entropy&amp;cs=tinysrgb&amp;fit=max&amp;fm=jpg&amp;ixid=M3wzMDAzMzh8MHwxfHNlYXJjaHwzfHx0b29sfGVufDB8fHx8MTc1NjI5NTExNnww&amp;ixlib=rb-4.1.0&amp;q=80&amp;w=1080 1272w, https://images.unsplash.com/photo-1426927308491-6380b6a9936f?crop=entropy&amp;cs=tinysrgb&amp;fit=max&amp;fm=jpg&amp;ixid=M3wzMDAzMzh8MHwxfHNlYXJjaHwzfHx0b29sfGVufDB8fHx8MTc1NjI5NTExNnww&amp;ixlib=rb-4.1.0&amp;q=80&amp;w=1080 1456w" sizes="100vw"><img src="https://images.unsplash.com/photo-1426927308491-6380b6a9936f?crop=entropy&amp;cs=tinysrgb&amp;fit=max&amp;fm=jpg&amp;ixid=M3wzMDAzMzh8MHwxfHNlYXJjaHwzfHx0b29sfGVufDB8fHx8MTc1NjI5NTExNnww&amp;ixlib=rb-4.1.0&amp;q=80&amp;w=1080" width="5000" height="3333" data-attrs="{&quot;src&quot;:&quot;https://images.unsplash.com/photo-1426927308491-6380b6a9936f?crop=entropy&amp;cs=tinysrgb&amp;fit=max&amp;fm=jpg&amp;ixid=M3wzMDAzMzh8MHwxfHNlYXJjaHwzfHx0b29sfGVufDB8fHx8MTc1NjI5NTExNnww&amp;ixlib=rb-4.1.0&amp;q=80&amp;w=1080&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:3333,&quot;width&quot;:5000,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;assorted handheld tools in tool rack&quot;,&quot;title&quot;:null,&quot;type&quot;:&quot;image/jpg&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="assorted handheld tools in tool rack" title="assorted handheld tools in tool rack" srcset="https://images.unsplash.com/photo-1426927308491-6380b6a9936f?crop=entropy&amp;cs=tinysrgb&amp;fit=max&amp;fm=jpg&amp;ixid=M3wzMDAzMzh8MHwxfHNlYXJjaHwzfHx0b29sfGVufDB8fHx8MTc1NjI5NTExNnww&amp;ixlib=rb-4.1.0&amp;q=80&amp;w=1080 424w, https://images.unsplash.com/photo-1426927308491-6380b6a9936f?crop=entropy&amp;cs=tinysrgb&amp;fit=max&amp;fm=jpg&amp;ixid=M3wzMDAzMzh8MHwxfHNlYXJjaHwzfHx0b29sfGVufDB8fHx8MTc1NjI5NTExNnww&amp;ixlib=rb-4.1.0&amp;q=80&amp;w=1080 848w, https://images.unsplash.com/photo-1426927308491-6380b6a9936f?crop=entropy&amp;cs=tinysrgb&amp;fit=max&amp;fm=jpg&amp;ixid=M3wzMDAzMzh8MHwxfHNlYXJjaHwzfHx0b29sfGVufDB8fHx8MTc1NjI5NTExNnww&amp;ixlib=rb-4.1.0&amp;q=80&amp;w=1080 1272w, https://images.unsplash.com/photo-1426927308491-6380b6a9936f?crop=entropy&amp;cs=tinysrgb&amp;fit=max&amp;fm=jpg&amp;ixid=M3wzMDAzMzh8MHwxfHNlYXJjaHwzfHx0b29sfGVufDB8fHx8MTc1NjI5NTExNnww&amp;ixlib=rb-4.1.0&amp;q=80&amp;w=1080 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><figcaption class="image-caption">Photo by <a href="https://unsplash.com/@barnimages">Barn Images</a> on <a href="https://unsplash.com">Unsplash</a></figcaption></figure></div><p>With the recent launch of GPT-5, a few weeks ago, we&#8217;ve started to see a decline in the expansion of capabilities of Large Language Models. While the benchmarks associated with GPT-5 look promising, some industry experts think that the actual implementation seems a bit more focused on cutting down costs and increasing optimizations for running at scale, at OpenAI. The question at this stage in AI research is how much more capable, are LLMs going to get, and with the recent research by <a href="https://ml-site.cdn-apple.com/papers/the-illusion-of-thinking.pdf">Apple on the illusion of thinking</a>, and the more recent <a href="https://mlq.ai/media/quarterly_decks/v0.1_State_of_AI_in_Business_2025_Report.pdf">MIT study highlighting the zero return obtained by 95% of organizations</a> using AI, the question around the ROI of AI agents is ever-more relevant. How can we derive the value with these LLMs that we&#8217;ve built, and assuming that the pace of gains in LLM capabilities is going to slow down, how can we build AI solutions that deliver impact early and using the existing capabilities of LLMs, instead of their future promise.</p><p>The way I like to think of AI agents is to think of the large language model as the brain, and the tools as it&#8217;s arms and legs. You can have a great brain, but if you store that brain in a jar, there&#8217;s not much that the brain will be able to do. In the AI industry, people understood this problem fairly early, and we now have a plethora of tools and techniques to give our AI brains, capabilities for them to make a difference. But as I interact with people about their understanding of Agents, I find that not many people are really aware of the scope of tools that are available for these LLM brains to utilize. And your AI agent&#8217;s chance of delivering impact and value, highly depends upon your ability to provide it with the right tooling. This is what we&#8217;ll focus on in this article. </p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!w2U-!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F48bc3ff8-c2e0-411f-ad90-048801237eeb_883x1253.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!w2U-!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F48bc3ff8-c2e0-411f-ad90-048801237eeb_883x1253.png 424w, https://substackcdn.com/image/fetch/$s_!w2U-!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F48bc3ff8-c2e0-411f-ad90-048801237eeb_883x1253.png 848w, https://substackcdn.com/image/fetch/$s_!w2U-!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F48bc3ff8-c2e0-411f-ad90-048801237eeb_883x1253.png 1272w, https://substackcdn.com/image/fetch/$s_!w2U-!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F48bc3ff8-c2e0-411f-ad90-048801237eeb_883x1253.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!w2U-!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F48bc3ff8-c2e0-411f-ad90-048801237eeb_883x1253.png" width="357" height="506.59229898074744" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/48bc3ff8-c2e0-411f-ad90-048801237eeb_883x1253.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1253,&quot;width&quot;:883,&quot;resizeWidth&quot;:357,&quot;bytes&quot;:2801572,&quot;alt&quot;:&quot;Generated image&quot;,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="Generated image" title="Generated image" srcset="https://substackcdn.com/image/fetch/$s_!w2U-!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F48bc3ff8-c2e0-411f-ad90-048801237eeb_883x1253.png 424w, https://substackcdn.com/image/fetch/$s_!w2U-!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F48bc3ff8-c2e0-411f-ad90-048801237eeb_883x1253.png 848w, https://substackcdn.com/image/fetch/$s_!w2U-!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F48bc3ff8-c2e0-411f-ad90-048801237eeb_883x1253.png 1272w, https://substackcdn.com/image/fetch/$s_!w2U-!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F48bc3ff8-c2e0-411f-ad90-048801237eeb_883x1253.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><figcaption class="image-caption">An LLM by itself is like a brain in a Jar</figcaption></figure></div><p>There are 5 types of tools that we&#8217;ll talk about in this article</p><ol><li><p>Code Interpreter</p></li><li><p>Function calling</p></li><li><p>File Search</p></li><li><p>Web Search</p></li><li><p>MCP Servers</p></li></ol><h3>Code Interpreter </h3><p>This tool can write it&#8217;s own code to solve specific problems. This is a very powerful capability as the LLM is provided a sandbox environment where it can run its code and do things that LLMs are bad at - like arithmetic problems. Suppose you want a large language model to compute compound interest for you. The large language model by itself does not have a good capability to do this for you, because it&#8217;s a language model. It can attempt to do this using some prompting technique like chain-of-thought etc, but generally, LLMs struggle a lot with arithmetic computations. </p><p>However, if the LLM can write it&#8217;s own code and run it in its own sandboxed runtime, it can potentially find the answer to most arithmetic problems extremely easily. With libraries like numpy and pandas available in python, data analysis is generally just a couple of lines of code, which the LLM can write and with this tool, run. The LLM can also generate plots and images for you, essentially acting as a super efficient data analyst, and with this, covers its limitation of not being natively good at arithmetic.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!mYOy!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd2b77a99-c8e7-4f83-99c3-6672a31018df_1376x542.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!mYOy!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd2b77a99-c8e7-4f83-99c3-6672a31018df_1376x542.png 424w, https://substackcdn.com/image/fetch/$s_!mYOy!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd2b77a99-c8e7-4f83-99c3-6672a31018df_1376x542.png 848w, https://substackcdn.com/image/fetch/$s_!mYOy!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd2b77a99-c8e7-4f83-99c3-6672a31018df_1376x542.png 1272w, https://substackcdn.com/image/fetch/$s_!mYOy!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd2b77a99-c8e7-4f83-99c3-6672a31018df_1376x542.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!mYOy!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd2b77a99-c8e7-4f83-99c3-6672a31018df_1376x542.png" width="1376" height="542" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/d2b77a99-c8e7-4f83-99c3-6672a31018df_1376x542.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:542,&quot;width&quot;:1376,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:382669,&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://compute.anshaj.dev/i/172161012?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd2b77a99-c8e7-4f83-99c3-6672a31018df_1376x542.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_!mYOy!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd2b77a99-c8e7-4f83-99c3-6672a31018df_1376x542.png 424w, https://substackcdn.com/image/fetch/$s_!mYOy!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd2b77a99-c8e7-4f83-99c3-6672a31018df_1376x542.png 848w, https://substackcdn.com/image/fetch/$s_!mYOy!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd2b77a99-c8e7-4f83-99c3-6672a31018df_1376x542.png 1272w, https://substackcdn.com/image/fetch/$s_!mYOy!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd2b77a99-c8e7-4f83-99c3-6672a31018df_1376x542.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">Enabling code interpreter tool to help us solve mathematical problems</figcaption></figure></div><h3>Function calling</h3><p>This tool can choose which function in your codebase to call, and provide you with the right arguments to be passed to that function. The large language models acts as the decision making authority, choosing for you, which function in your codebase to call, depending upon the context. This is extremely powerful as well. Your functions written in C#, Java, or any programming language for that matter, can be utilized this way, and that is the point. </p><p>Traditional programming tells us what to do based on conditional statements like if-else statements. Machine learning solves specific problems after some kind of training - supervised or unsupervised. This is different as the LLMs come ready, out of the box with this functionality, and you don&#8217;t really need to change your programming stack to enable these capabilities. This is why, function calling has such a high potential of delivering value and remains one of the most impressive tools for modern agent development.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!pflP!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbf6d2fa6-7a13-4352-9705-06a8f1cb7566_1364x992.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!pflP!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbf6d2fa6-7a13-4352-9705-06a8f1cb7566_1364x992.png 424w, https://substackcdn.com/image/fetch/$s_!pflP!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbf6d2fa6-7a13-4352-9705-06a8f1cb7566_1364x992.png 848w, https://substackcdn.com/image/fetch/$s_!pflP!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbf6d2fa6-7a13-4352-9705-06a8f1cb7566_1364x992.png 1272w, https://substackcdn.com/image/fetch/$s_!pflP!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbf6d2fa6-7a13-4352-9705-06a8f1cb7566_1364x992.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!pflP!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbf6d2fa6-7a13-4352-9705-06a8f1cb7566_1364x992.png" width="1364" height="992" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/bf6d2fa6-7a13-4352-9705-06a8f1cb7566_1364x992.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:992,&quot;width&quot;:1364,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:128911,&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://compute.anshaj.dev/i/172161012?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbf6d2fa6-7a13-4352-9705-06a8f1cb7566_1364x992.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_!pflP!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbf6d2fa6-7a13-4352-9705-06a8f1cb7566_1364x992.png 424w, https://substackcdn.com/image/fetch/$s_!pflP!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbf6d2fa6-7a13-4352-9705-06a8f1cb7566_1364x992.png 848w, https://substackcdn.com/image/fetch/$s_!pflP!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbf6d2fa6-7a13-4352-9705-06a8f1cb7566_1364x992.png 1272w, https://substackcdn.com/image/fetch/$s_!pflP!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbf6d2fa6-7a13-4352-9705-06a8f1cb7566_1364x992.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">Function calling in OpenAI models</figcaption></figure></div><h3>File Search</h3><p>File search tool basically acts like a RAG - Retrieval Augmented Generation system. One of the most popular uses of LLMs is in RAG systems. And building these RAGs have never been simpler as they now essentially come as just another tool for LLMs to use, known as the file search tool. You can upload your own data in vector databases by uploading your own files like PDFs, word documents etc. This information is then stored in a vector database, fetched back by the retriever and curated by the LLM. RAGs used to be messy to build at one point of time, but the modern AI development landscape has made building RAG as simple as adding the file search tool to your LLM capabilities. </p><p>You can read more about RAGs over here at <a href="https://compute.anshaj.dev/p/retrieval-augmented-generation">my article on RAG</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_!hfzW!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F41cdc822-e4a2-48be-b190-705495e746ef_1170x600.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!hfzW!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F41cdc822-e4a2-48be-b190-705495e746ef_1170x600.png 424w, https://substackcdn.com/image/fetch/$s_!hfzW!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F41cdc822-e4a2-48be-b190-705495e746ef_1170x600.png 848w, https://substackcdn.com/image/fetch/$s_!hfzW!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F41cdc822-e4a2-48be-b190-705495e746ef_1170x600.png 1272w, https://substackcdn.com/image/fetch/$s_!hfzW!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F41cdc822-e4a2-48be-b190-705495e746ef_1170x600.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!hfzW!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F41cdc822-e4a2-48be-b190-705495e746ef_1170x600.png" width="1170" height="600" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/41cdc822-e4a2-48be-b190-705495e746ef_1170x600.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:600,&quot;width&quot;:1170,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:416435,&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://compute.anshaj.dev/i/172161012?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F41cdc822-e4a2-48be-b190-705495e746ef_1170x600.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_!hfzW!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F41cdc822-e4a2-48be-b190-705495e746ef_1170x600.png 424w, https://substackcdn.com/image/fetch/$s_!hfzW!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F41cdc822-e4a2-48be-b190-705495e746ef_1170x600.png 848w, https://substackcdn.com/image/fetch/$s_!hfzW!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F41cdc822-e4a2-48be-b190-705495e746ef_1170x600.png 1272w, https://substackcdn.com/image/fetch/$s_!hfzW!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F41cdc822-e4a2-48be-b190-705495e746ef_1170x600.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">File search tool enabling the creation of a RAG system</figcaption></figure></div><h3>Web Search</h3><p>All large language models today, have a cutoff date, on which their training dataset was cut-off. We solve the problem of giving the right context to an LLM through file search tool or an RAG, but what if we need something even more recent than what our RAG can offer. Also if we do not have information in our vector database, the LLM can use the web search functionality to figure out the right information it needs to make a decision and act on it. Web search allows a LLM to have access to a search engine the same way you and I run web searches. This addresses the cutoff date problem for LLMs, and makes them capable of knowing what is happening today, right now through search capabilities.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!NNS5!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F108f9d1c-cf64-4933-b18f-025ba0f9ef6b_1026x1074.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!NNS5!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F108f9d1c-cf64-4933-b18f-025ba0f9ef6b_1026x1074.png 424w, https://substackcdn.com/image/fetch/$s_!NNS5!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F108f9d1c-cf64-4933-b18f-025ba0f9ef6b_1026x1074.png 848w, https://substackcdn.com/image/fetch/$s_!NNS5!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F108f9d1c-cf64-4933-b18f-025ba0f9ef6b_1026x1074.png 1272w, https://substackcdn.com/image/fetch/$s_!NNS5!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F108f9d1c-cf64-4933-b18f-025ba0f9ef6b_1026x1074.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!NNS5!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F108f9d1c-cf64-4933-b18f-025ba0f9ef6b_1026x1074.png" width="530" height="554.7953216374269" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/108f9d1c-cf64-4933-b18f-025ba0f9ef6b_1026x1074.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1074,&quot;width&quot;:1026,&quot;resizeWidth&quot;:530,&quot;bytes&quot;:111839,&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://compute.anshaj.dev/i/172161012?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F108f9d1c-cf64-4933-b18f-025ba0f9ef6b_1026x1074.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_!NNS5!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F108f9d1c-cf64-4933-b18f-025ba0f9ef6b_1026x1074.png 424w, https://substackcdn.com/image/fetch/$s_!NNS5!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F108f9d1c-cf64-4933-b18f-025ba0f9ef6b_1026x1074.png 848w, https://substackcdn.com/image/fetch/$s_!NNS5!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F108f9d1c-cf64-4933-b18f-025ba0f9ef6b_1026x1074.png 1272w, https://substackcdn.com/image/fetch/$s_!NNS5!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F108f9d1c-cf64-4933-b18f-025ba0f9ef6b_1026x1074.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">Web search tool options in OpenAI models</figcaption></figure></div><h3>MCP Servers</h3><p>The most recent, standard and industry accepted way of sharing information and context with LLMs is Model Context Protocol - MCP. It came out as a result of solving the frustrations seen at Anthropic (the company behind Claude LLM), while integrating LLMs with various other programs. It&#8217;s going to be a year since the inception of MCP and its safe to say that there&#8217;s very wide adoption of MCP across the industry. And for good reason, MCP solves the burning question - How to design AI systems such that they&#8217;re extensible, maintaining and discoverable. This means that sharing information from APIs, static files, blob storages, non-relational databases etc can be done in a standard way. MCP also defines server primitives that all servers can follow so that the users (MCP clients) can discover capabilities smartly.  To learn about MCP more you can read my article on <a href="https://compute.anshaj.dev/p/what-is-mcp">MCP in detail here. </a></p><div><hr></div><p>When you put this together, you get something that looks like this diagram that I put together, below</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!v2V2!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe1ed2c18-c297-4e51-a51f-c9279265d8c8_1873x1432.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!v2V2!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe1ed2c18-c297-4e51-a51f-c9279265d8c8_1873x1432.png 424w, https://substackcdn.com/image/fetch/$s_!v2V2!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe1ed2c18-c297-4e51-a51f-c9279265d8c8_1873x1432.png 848w, https://substackcdn.com/image/fetch/$s_!v2V2!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe1ed2c18-c297-4e51-a51f-c9279265d8c8_1873x1432.png 1272w, https://substackcdn.com/image/fetch/$s_!v2V2!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe1ed2c18-c297-4e51-a51f-c9279265d8c8_1873x1432.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!v2V2!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe1ed2c18-c297-4e51-a51f-c9279265d8c8_1873x1432.png" width="1456" height="1113" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/e1ed2c18-c297-4e51-a51f-c9279265d8c8_1873x1432.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1113,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:265349,&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://compute.anshaj.dev/i/172161012?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe1ed2c18-c297-4e51-a51f-c9279265d8c8_1873x1432.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_!v2V2!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe1ed2c18-c297-4e51-a51f-c9279265d8c8_1873x1432.png 424w, https://substackcdn.com/image/fetch/$s_!v2V2!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe1ed2c18-c297-4e51-a51f-c9279265d8c8_1873x1432.png 848w, https://substackcdn.com/image/fetch/$s_!v2V2!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe1ed2c18-c297-4e51-a51f-c9279265d8c8_1873x1432.png 1272w, https://substackcdn.com/image/fetch/$s_!v2V2!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe1ed2c18-c297-4e51-a51f-c9279265d8c8_1873x1432.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">An easy way to visualize different agent tool capabilities </figcaption></figure></div><p>This sums up the important pieces of tooling that enables AI agents to unlock capabilities never seen before in software engineering. These tools are the main reasons behind the automation capabilities of LLMs. Modern Agentic development hence, isn&#8217;t limited by the progress that we&#8217;re making on LLMs. We&#8217;re also making significant progress in tooling and as we make it easier and easier for these AI brains to use various types of tools, we should start seeing automation capabilities never seen before.</p><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://compute.anshaj.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">I hope you enjoyed reading this article. If my writing interests you, feel free to subscribe for free to receive new posts and support my work. For now, thank you so much for reading and I hope you have a wonderful day!</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[What is MCP]]></title><description><![CDATA[I promise it's not as complicated as you might think]]></description><link>https://compute.anshaj.dev/p/what-is-mcp</link><guid isPermaLink="false">https://compute.anshaj.dev/p/what-is-mcp</guid><dc:creator><![CDATA[Anshaj]]></dc:creator><pubDate>Tue, 22 Jul 2025 11:34:12 GMT</pubDate><enclosure url="https://images.unsplash.com/photo-1589652717521-10c0d092dea9?crop=entropy&amp;cs=tinysrgb&amp;fit=max&amp;fm=jpg&amp;ixid=M3wzMDAzMzh8MHwxfHNlYXJjaHwyNnx8Y29tcHV0ZXJ8ZW58MHx8fHwxNzUzMTc4ODc2fDA&amp;ixlib=rb-4.1.0&amp;q=80&amp;w=1080" length="0" type="image/jpeg"/><content:encoded><![CDATA[<div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://images.unsplash.com/photo-1589652717521-10c0d092dea9?crop=entropy&amp;cs=tinysrgb&amp;fit=max&amp;fm=jpg&amp;ixid=M3wzMDAzMzh8MHwxfHNlYXJjaHwyNnx8Y29tcHV0ZXJ8ZW58MHx8fHwxNzUzMTc4ODc2fDA&amp;ixlib=rb-4.1.0&amp;q=80&amp;w=1080" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://images.unsplash.com/photo-1589652717521-10c0d092dea9?crop=entropy&amp;cs=tinysrgb&amp;fit=max&amp;fm=jpg&amp;ixid=M3wzMDAzMzh8MHwxfHNlYXJjaHwyNnx8Y29tcHV0ZXJ8ZW58MHx8fHwxNzUzMTc4ODc2fDA&amp;ixlib=rb-4.1.0&amp;q=80&amp;w=1080 424w, https://images.unsplash.com/photo-1589652717521-10c0d092dea9?crop=entropy&amp;cs=tinysrgb&amp;fit=max&amp;fm=jpg&amp;ixid=M3wzMDAzMzh8MHwxfHNlYXJjaHwyNnx8Y29tcHV0ZXJ8ZW58MHx8fHwxNzUzMTc4ODc2fDA&amp;ixlib=rb-4.1.0&amp;q=80&amp;w=1080 848w, https://images.unsplash.com/photo-1589652717521-10c0d092dea9?crop=entropy&amp;cs=tinysrgb&amp;fit=max&amp;fm=jpg&amp;ixid=M3wzMDAzMzh8MHwxfHNlYXJjaHwyNnx8Y29tcHV0ZXJ8ZW58MHx8fHwxNzUzMTc4ODc2fDA&amp;ixlib=rb-4.1.0&amp;q=80&amp;w=1080 1272w, https://images.unsplash.com/photo-1589652717521-10c0d092dea9?crop=entropy&amp;cs=tinysrgb&amp;fit=max&amp;fm=jpg&amp;ixid=M3wzMDAzMzh8MHwxfHNlYXJjaHwyNnx8Y29tcHV0ZXJ8ZW58MHx8fHwxNzUzMTc4ODc2fDA&amp;ixlib=rb-4.1.0&amp;q=80&amp;w=1080 1456w" sizes="100vw"><img src="https://images.unsplash.com/photo-1589652717521-10c0d092dea9?crop=entropy&amp;cs=tinysrgb&amp;fit=max&amp;fm=jpg&amp;ixid=M3wzMDAzMzh8MHwxfHNlYXJjaHwyNnx8Y29tcHV0ZXJ8ZW58MHx8fHwxNzUzMTc4ODc2fDA&amp;ixlib=rb-4.1.0&amp;q=80&amp;w=1080" width="4752" height="3168" data-attrs="{&quot;src&quot;:&quot;https://images.unsplash.com/photo-1589652717521-10c0d092dea9?crop=entropy&amp;cs=tinysrgb&amp;fit=max&amp;fm=jpg&amp;ixid=M3wzMDAzMzh8MHwxfHNlYXJjaHwyNnx8Y29tcHV0ZXJ8ZW58MHx8fHwxNzUzMTc4ODc2fDA&amp;ixlib=rb-4.1.0&amp;q=80&amp;w=1080&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:3168,&quot;width&quot;:4752,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;brown and white long coated small dog wearing eyeglasses on black laptop computer&quot;,&quot;title&quot;:null,&quot;type&quot;:&quot;image/jpg&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="brown and white long coated small dog wearing eyeglasses on black laptop computer" title="brown and white long coated small dog wearing eyeglasses on black laptop computer" srcset="https://images.unsplash.com/photo-1589652717521-10c0d092dea9?crop=entropy&amp;cs=tinysrgb&amp;fit=max&amp;fm=jpg&amp;ixid=M3wzMDAzMzh8MHwxfHNlYXJjaHwyNnx8Y29tcHV0ZXJ8ZW58MHx8fHwxNzUzMTc4ODc2fDA&amp;ixlib=rb-4.1.0&amp;q=80&amp;w=1080 424w, https://images.unsplash.com/photo-1589652717521-10c0d092dea9?crop=entropy&amp;cs=tinysrgb&amp;fit=max&amp;fm=jpg&amp;ixid=M3wzMDAzMzh8MHwxfHNlYXJjaHwyNnx8Y29tcHV0ZXJ8ZW58MHx8fHwxNzUzMTc4ODc2fDA&amp;ixlib=rb-4.1.0&amp;q=80&amp;w=1080 848w, https://images.unsplash.com/photo-1589652717521-10c0d092dea9?crop=entropy&amp;cs=tinysrgb&amp;fit=max&amp;fm=jpg&amp;ixid=M3wzMDAzMzh8MHwxfHNlYXJjaHwyNnx8Y29tcHV0ZXJ8ZW58MHx8fHwxNzUzMTc4ODc2fDA&amp;ixlib=rb-4.1.0&amp;q=80&amp;w=1080 1272w, https://images.unsplash.com/photo-1589652717521-10c0d092dea9?crop=entropy&amp;cs=tinysrgb&amp;fit=max&amp;fm=jpg&amp;ixid=M3wzMDAzMzh8MHwxfHNlYXJjaHwyNnx8Y29tcHV0ZXJ8ZW58MHx8fHwxNzUzMTc4ODc2fDA&amp;ixlib=rb-4.1.0&amp;q=80&amp;w=1080 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><figcaption class="image-caption">Photo by <a href="true">Cookie the Pom</a> on <a href="https://unsplash.com">Unsplash</a></figcaption></figure></div><p>Everyone is talking about MCP. And until about two months ago, I didn&#8217;t understand it very well. With a ton of information coming from various sources, about how MCP is a &#8220;game-changer&#8221; and how it will revolutionize everything, I personally found it very hard to find content that helped me understand what MCP is. And I think we&#8217;re in such dearth of good quality sources of information these days, places that don&#8217;t &#8220;sell&#8221; an idea and instead help us understand the idea so that we ourselves can determine its worth. But that is a rant for some other day. </p><p>I went the rabbit hole of going through the documentation, discussions from industry experts and basically every good source that I could get my hands on, and well, understood MCP for what it is. And then I went ahead and started implementing my own MCP components and performed a bunch of interesting experiments with it. So if you find this topic interesting, let me tell you what I learnt and I&#8217;ll let you decide how impactful this is really going to be.</p><h2>What is MCP?</h2><p>MCP stands for <strong>Model Context Protocol</strong>. The term says it all. It&#8217;s a protocol. It&#8217;s a spec that was created by Anthropic, to standardize the way Large Language Models can get access to information and tools. Tooling is a big component of what truly makes these LLMs, behave like agents. If you&#8217;re new to AI agents, I&#8217;d recommend reading this article that I wrote earlier about what AI agents really are. </p><div class="embedded-post-wrap" data-attrs="{&quot;id&quot;:161463106,&quot;url&quot;:&quot;https://compute.anshaj.dev/p/what-are-ai-agents-really&quot;,&quot;publication_id&quot;:1864668,&quot;publication_name&quot;:&quot;Compute - A programming blog&quot;,&quot;publication_logo_url&quot;:&quot;https://substackcdn.com/image/fetch/$s_!ShJo!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F05083da4-de89-4989-8e93-c51efdadef86_750x750.png&quot;,&quot;title&quot;:&quot;What are AI agents really?&quot;,&quot;truncated_body_text&quot;:&quot;We as humans have always been trying to make our computers do more and more things. In the last 40 years alone as a species, we&#8217;ve gone orders of magnitudes further in field of computing than we have in our entire 10,000+ year old history. We have developed cheap storage, better and faster compute every year. We optim&#8230;&quot;,&quot;date&quot;:&quot;2025-04-16T17:38:08.683Z&quot;,&quot;like_count&quot;:0,&quot;comment_count&quot;:0,&quot;bylines&quot;:[{&quot;id&quot;:15656283,&quot;name&quot;:&quot;Anshaj&quot;,&quot;handle&quot;:&quot;anshaj&quot;,&quot;previous_name&quot;:null,&quot;photo_url&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/5dae1222-5d91-4f7f-90bc-214a57d09a32_1178x1177.jpeg&quot;,&quot;bio&quot;:&quot;A thinker, writer &amp; photographer &quot;,&quot;profile_set_up_at&quot;:&quot;2023-08-09T08:45:53.982Z&quot;,&quot;reader_installed_at&quot;:&quot;2024-05-05T21:22:26.032Z&quot;,&quot;publicationUsers&quot;:[{&quot;id&quot;:1851748,&quot;user_id&quot;:15656283,&quot;publication_id&quot;:1864668,&quot;role&quot;:&quot;admin&quot;,&quot;public&quot;:true,&quot;is_primary&quot;:true,&quot;publication&quot;:{&quot;id&quot;:1864668,&quot;name&quot;:&quot;Compute - A programming blog&quot;,&quot;subdomain&quot;:&quot;thecomputeblog&quot;,&quot;custom_domain&quot;:&quot;compute.anshaj.dev&quot;,&quot;custom_domain_optional&quot;:false,&quot;hero_text&quot;:&quot;A blog for Programming &amp; Computation&quot;,&quot;logo_url&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/05083da4-de89-4989-8e93-c51efdadef86_750x750.png&quot;,&quot;author_id&quot;:15656283,&quot;primary_user_id&quot;:15656283,&quot;theme_var_background_pop&quot;:&quot;#67BDFC&quot;,&quot;created_at&quot;:&quot;2023-08-09T08:45:58.110Z&quot;,&quot;email_from_name&quot;:null,&quot;copyright&quot;:&quot;Anshaj&quot;,&quot;founding_plan_name&quot;:null,&quot;community_enabled&quot;:true,&quot;invite_only&quot;:false,&quot;payments_state&quot;:&quot;disabled&quot;,&quot;language&quot;:null,&quot;explicit&quot;:false,&quot;homepage_type&quot;:&quot;newspaper&quot;,&quot;is_personal_mode&quot;:false}}],&quot;is_guest&quot;:false,&quot;bestseller_tier&quot;:null}],&quot;utm_campaign&quot;:null,&quot;belowTheFold&quot;:false,&quot;type&quot;:&quot;newsletter&quot;,&quot;language&quot;:&quot;en&quot;}" data-component-name="EmbeddedPostToDOM"><a class="embedded-post" native="true" href="https://compute.anshaj.dev/p/what-are-ai-agents-really?utm_source=substack&amp;utm_campaign=post_embed&amp;utm_medium=web"><div class="embedded-post-header"><img class="embedded-post-publication-logo" src="https://substackcdn.com/image/fetch/$s_!ShJo!,w_56,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F05083da4-de89-4989-8e93-c51efdadef86_750x750.png"><span class="embedded-post-publication-name">Compute - A programming blog</span></div><div class="embedded-post-title-wrapper"><div class="embedded-post-title">What are AI agents really?</div></div><div class="embedded-post-body">We as humans have always been trying to make our computers do more and more things. In the last 40 years alone as a species, we&#8217;ve gone orders of magnitudes further in field of computing than we have in our entire 10,000+ year old history. We have developed cheap storage, better and faster compute every year. We optim&#8230;</div><div class="embedded-post-cta-wrapper"><span class="embedded-post-cta">Read more</span></div><div class="embedded-post-meta">a year ago &#183; Anshaj</div></a></div><p>If you&#8217;re already comfortable with the idea that an AI agent is essentially a LLM with capabilities to interact with its environment (tools etc), this is where MCP really comes in. </p><p>MCP is an attempt to standardize the way LLMs can call these tools, access data etc. As a developer, for every single integration, you don&#8217;t need to reinvent the wheel about &#8220;how&#8221; to integrate your API, data source etc with a LLM to make it an agent. MCP is a &#8220;good&#8221; or a standard way to integrate your tooling with LLMs that the entire industry focused on AI can follow and make it easier for all of us to use each other&#8217;s tooling. Suppose you develop a new capability to have a relational database (SQL Server etc) connect with a LLM so that the LLM can query your database for information, if you expose this implementation as an MCP component (we&#8217;ll talk about this next), it can give other people &amp; other agents access to your implementation easily, without really having to write custom code to integrate with your solution. And that is the entire point!</p><h2>Architecture of MCP system</h2><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!mMH5!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4b1869fa-7cec-4095-9da4-8a6b0f27d306_1436x1024.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!mMH5!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4b1869fa-7cec-4095-9da4-8a6b0f27d306_1436x1024.png 424w, https://substackcdn.com/image/fetch/$s_!mMH5!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4b1869fa-7cec-4095-9da4-8a6b0f27d306_1436x1024.png 848w, https://substackcdn.com/image/fetch/$s_!mMH5!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4b1869fa-7cec-4095-9da4-8a6b0f27d306_1436x1024.png 1272w, https://substackcdn.com/image/fetch/$s_!mMH5!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4b1869fa-7cec-4095-9da4-8a6b0f27d306_1436x1024.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!mMH5!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4b1869fa-7cec-4095-9da4-8a6b0f27d306_1436x1024.png" width="1436" height="1024" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/4b1869fa-7cec-4095-9da4-8a6b0f27d306_1436x1024.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1024,&quot;width&quot;:1436,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:142602,&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://compute.anshaj.dev/i/168937084?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4b1869fa-7cec-4095-9da4-8a6b0f27d306_1436x1024.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_!mMH5!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4b1869fa-7cec-4095-9da4-8a6b0f27d306_1436x1024.png 424w, https://substackcdn.com/image/fetch/$s_!mMH5!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4b1869fa-7cec-4095-9da4-8a6b0f27d306_1436x1024.png 848w, https://substackcdn.com/image/fetch/$s_!mMH5!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4b1869fa-7cec-4095-9da4-8a6b0f27d306_1436x1024.png 1272w, https://substackcdn.com/image/fetch/$s_!mMH5!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4b1869fa-7cec-4095-9da4-8a6b0f27d306_1436x1024.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">Source: https://modelcontextprotocol.io/specification/2025-06-18/architecture</figcaption></figure></div><p>There are 3 main components in a MCP system</p><ol><li><p>Host</p></li><li><p>Client </p></li><li><p>Server</p></li></ol><p>Each of these 3 have their dedicated roles, and are arranged such that the system that MCP envisions, is secure, scalable, and actually makes it easy to build agentic systems faster.</p><h3>MCP Host</h3><p>The MCP host is the LLM application (e.g., Claude Desktop, VS Code) that acts as the container and coordinator. The host creates and manages multiple client instances, controls their connection permissions and lifecycles, enforces security policies, handles user authorisation, coordinates LLM integration and sampling, and manages context aggregation across clients. Think of this as the orchestrator of the entire MCP workflow.</p><h3>MCP Client</h3><p>Each MCP client is created by the host and maintains an isolated, stateful JSON RPC session with a specific server. Clients handle protocol negotiation, capability exchange, bidirectional message routing, subscriptions, and notifications, while maintaining security boundaries between servers. There is a 1:1 relationship between a client and a server. One host can spin up multiple MCP clients to interact with multiple MCP servers. </p><h3>MCP Server</h3><p>MCP Servers are independent processes that provide context and capabilities to the LLM. Servers expose resources, tools, and prompt templates via MCP primitives (we&#8217;ll discuss them in detail). Servers can be local processes (running on the same machine as the host) or remote services (hosted in the cloud). </p><p>Some of the design principles should be noted while building MCP servers</p><ol><li><p>Servers should be extremely easy to build</p></li><li><p>Servers should be highly composable meaning that each server provides focused functionality in isolation thus allowing multiple servers to be combined seamlessly</p></li><li><p>Servers should not be able to read the whole conversation, nor &#8220;see into&#8221; other servers</p></li><li><p>Features can be added to servers and clients progressively</p></li></ol><h4>Server primitives</h4><p>While we talk about an MCP server, its important to understand the server primitives that the MCP protocol expects. There are 3 main server primitives</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!CGV5!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F27c57894-d36e-4d31-9166-47e3ad9b6a31_1266x684.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!CGV5!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F27c57894-d36e-4d31-9166-47e3ad9b6a31_1266x684.png 424w, https://substackcdn.com/image/fetch/$s_!CGV5!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F27c57894-d36e-4d31-9166-47e3ad9b6a31_1266x684.png 848w, https://substackcdn.com/image/fetch/$s_!CGV5!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F27c57894-d36e-4d31-9166-47e3ad9b6a31_1266x684.png 1272w, https://substackcdn.com/image/fetch/$s_!CGV5!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F27c57894-d36e-4d31-9166-47e3ad9b6a31_1266x684.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!CGV5!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F27c57894-d36e-4d31-9166-47e3ad9b6a31_1266x684.png" width="1266" height="684" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/27c57894-d36e-4d31-9166-47e3ad9b6a31_1266x684.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:684,&quot;width&quot;:1266,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:89721,&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://compute.anshaj.dev/i/168937084?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F27c57894-d36e-4d31-9166-47e3ad9b6a31_1266x684.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_!CGV5!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F27c57894-d36e-4d31-9166-47e3ad9b6a31_1266x684.png 424w, https://substackcdn.com/image/fetch/$s_!CGV5!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F27c57894-d36e-4d31-9166-47e3ad9b6a31_1266x684.png 848w, https://substackcdn.com/image/fetch/$s_!CGV5!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F27c57894-d36e-4d31-9166-47e3ad9b6a31_1266x684.png 1272w, https://substackcdn.com/image/fetch/$s_!CGV5!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F27c57894-d36e-4d31-9166-47e3ad9b6a31_1266x684.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>Tools:</strong> These are discrete actions or functions that an AI agent can call. An example includes a get weather tool from a weather service, a create event tool from a calendar service, or a create postgres database tool from a database provider. Servers advertise the name, description, and input/output schema of each tool in their capabilities listing. When an LLM invokes a tool via a client, the MCP server executes the underlying function. </p><p><strong>Resources:</strong> These are read-only data items or documents that the server can provide, and the client can retrieve on demand. Examples include text files, database schemas, file contents, or entries from a knowledge base. They allow the LLM to access and incorporate external information into its context.</p><p><strong>Prompt Templates:</strong> These are predefined templates providing suggested prompts that can be injected into the LLM's context window. They can guide the model's approach to certain tasks or data and often appear as slash commands in AI applications, saving users time.</p><p>An easy reference to the information above can be found in the table below, </p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!z0ao!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F450051f3-69e4-458b-a118-41087c1e2dec_1426x390.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!z0ao!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F450051f3-69e4-458b-a118-41087c1e2dec_1426x390.png 424w, https://substackcdn.com/image/fetch/$s_!z0ao!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F450051f3-69e4-458b-a118-41087c1e2dec_1426x390.png 848w, https://substackcdn.com/image/fetch/$s_!z0ao!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F450051f3-69e4-458b-a118-41087c1e2dec_1426x390.png 1272w, https://substackcdn.com/image/fetch/$s_!z0ao!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F450051f3-69e4-458b-a118-41087c1e2dec_1426x390.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!z0ao!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F450051f3-69e4-458b-a118-41087c1e2dec_1426x390.png" width="1426" height="390" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/450051f3-69e4-458b-a118-41087c1e2dec_1426x390.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:390,&quot;width&quot;:1426,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:95533,&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://compute.anshaj.dev/i/168937084?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F450051f3-69e4-458b-a118-41087c1e2dec_1426x390.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_!z0ao!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F450051f3-69e4-458b-a118-41087c1e2dec_1426x390.png 424w, https://substackcdn.com/image/fetch/$s_!z0ao!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F450051f3-69e4-458b-a118-41087c1e2dec_1426x390.png 848w, https://substackcdn.com/image/fetch/$s_!z0ao!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F450051f3-69e4-458b-a118-41087c1e2dec_1426x390.png 1272w, https://substackcdn.com/image/fetch/$s_!z0ao!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F450051f3-69e4-458b-a118-41087c1e2dec_1426x390.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><h2><strong>Capability Negotiation</strong></h2><p>Capability negotiation in the MCP allows different AI components to understand and interact with each other effectively. It is a system where both MCP clients and servers explicitly declare the features and functionalities they support during the initialization of a session</p><ul><li><p>The primary goal is to ensure that both the client and the server have a clear understanding of which protocol features and primitives are available for use throughout their interaction</p></li><li><p>This negotiation is crucial for AI agents to successfully integrate with external data sources and tools, such as databases or APIs.</p></li><li><p>It enables dynamic discovery, allowing an AI agent to query an MCP server at runtime to determine its available functionalities and then invoke those capabilities in a standardized way</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_!miJj!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9d4adecf-9cf2-4483-a96f-6d450a03cc70_1170x1530.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!miJj!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9d4adecf-9cf2-4483-a96f-6d450a03cc70_1170x1530.png 424w, https://substackcdn.com/image/fetch/$s_!miJj!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9d4adecf-9cf2-4483-a96f-6d450a03cc70_1170x1530.png 848w, https://substackcdn.com/image/fetch/$s_!miJj!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9d4adecf-9cf2-4483-a96f-6d450a03cc70_1170x1530.png 1272w, https://substackcdn.com/image/fetch/$s_!miJj!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9d4adecf-9cf2-4483-a96f-6d450a03cc70_1170x1530.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!miJj!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9d4adecf-9cf2-4483-a96f-6d450a03cc70_1170x1530.png" width="1170" height="1530" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/9d4adecf-9cf2-4483-a96f-6d450a03cc70_1170x1530.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1530,&quot;width&quot;:1170,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:195090,&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://compute.anshaj.dev/i/168937084?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9d4adecf-9cf2-4483-a96f-6d450a03cc70_1170x1530.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_!miJj!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9d4adecf-9cf2-4483-a96f-6d450a03cc70_1170x1530.png 424w, https://substackcdn.com/image/fetch/$s_!miJj!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9d4adecf-9cf2-4483-a96f-6d450a03cc70_1170x1530.png 848w, https://substackcdn.com/image/fetch/$s_!miJj!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9d4adecf-9cf2-4483-a96f-6d450a03cc70_1170x1530.png 1272w, https://substackcdn.com/image/fetch/$s_!miJj!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9d4adecf-9cf2-4483-a96f-6d450a03cc70_1170x1530.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">Source: https://modelcontextprotocol.io/specification/2025-06-18/architecture</figcaption></figure></div><p>The dedicated roles of MCP Host, Client and Server, combined with capability negotiation etc, creates a standard way for building agentic applications. This also paves way for developers to build on top of each other&#8217;s work and can significantly increase the pace at which agentic applications are developed. That is the promise of MCP.</p><p>I&#8217;ve complied a bunch of useful links in the section below in case you&#8217;re interested </p><div><hr></div><ul><li><p><a href="https://modelcontextprotocol.io/specification/2025-06-18/changelog">How to stay updated with the updates on the MCP protocol</a></p></li><li><p><a href="https://modelcontextprotocol.io/docs/concepts/architecture#best-practices">Best practices</a></p></li><li><p><a href="https://modelcontextprotocol.io/specification/2025-06-18/basic/security_best_practices">Security best practices</a></p></li></ul><div><hr></div><p>Well, now you know how the key specifications behind the MCP protocol. In an upcoming article, I&#8217;ll demonstrate how to use <a href="https://gofastmcp.com/getting-started/welcome">fastmcp</a> to build your own MCP server easily. If that is something that interests you, feel free to subscribe to the compute blog using the button below. With this, thank you so much for reading and I hope you have a wonderful day!</p><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://compute.anshaj.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 Compute - A programming blog! 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[Retrieval Augmented Generation ]]></title><description><![CDATA[One of the most cost-effective, easy to implement, and lowest-risk path to higher performance for GenAI applications]]></description><link>https://compute.anshaj.dev/p/retrieval-augmented-generation</link><guid isPermaLink="false">https://compute.anshaj.dev/p/retrieval-augmented-generation</guid><dc:creator><![CDATA[Anshaj]]></dc:creator><pubDate>Tue, 27 May 2025 14:07:33 GMT</pubDate><enclosure url="https://images.unsplash.com/photo-1542176107-f50284e217c5?crop=entropy&amp;cs=tinysrgb&amp;fit=max&amp;fm=jpg&amp;ixid=M3wzMDAzMzh8MHwxfHNlYXJjaHwxfHwzNjV8ZW58MHx8fHwxNzQ4MzU0NTg0fDA&amp;ixlib=rb-4.1.0&amp;q=80&amp;w=1080" length="0" type="image/jpeg"/><content:encoded><![CDATA[<div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://images.unsplash.com/photo-1542176107-f50284e217c5?crop=entropy&amp;cs=tinysrgb&amp;fit=max&amp;fm=jpg&amp;ixid=M3wzMDAzMzh8MHwxfHNlYXJjaHwxfHwzNjV8ZW58MHx8fHwxNzQ4MzU0NTg0fDA&amp;ixlib=rb-4.1.0&amp;q=80&amp;w=1080" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://images.unsplash.com/photo-1542176107-f50284e217c5?crop=entropy&amp;cs=tinysrgb&amp;fit=max&amp;fm=jpg&amp;ixid=M3wzMDAzMzh8MHwxfHNlYXJjaHwxfHwzNjV8ZW58MHx8fHwxNzQ4MzU0NTg0fDA&amp;ixlib=rb-4.1.0&amp;q=80&amp;w=1080 424w, https://images.unsplash.com/photo-1542176107-f50284e217c5?crop=entropy&amp;cs=tinysrgb&amp;fit=max&amp;fm=jpg&amp;ixid=M3wzMDAzMzh8MHwxfHNlYXJjaHwxfHwzNjV8ZW58MHx8fHwxNzQ4MzU0NTg0fDA&amp;ixlib=rb-4.1.0&amp;q=80&amp;w=1080 848w, https://images.unsplash.com/photo-1542176107-f50284e217c5?crop=entropy&amp;cs=tinysrgb&amp;fit=max&amp;fm=jpg&amp;ixid=M3wzMDAzMzh8MHwxfHNlYXJjaHwxfHwzNjV8ZW58MHx8fHwxNzQ4MzU0NTg0fDA&amp;ixlib=rb-4.1.0&amp;q=80&amp;w=1080 1272w, https://images.unsplash.com/photo-1542176107-f50284e217c5?crop=entropy&amp;cs=tinysrgb&amp;fit=max&amp;fm=jpg&amp;ixid=M3wzMDAzMzh8MHwxfHNlYXJjaHwxfHwzNjV8ZW58MHx8fHwxNzQ4MzU0NTg0fDA&amp;ixlib=rb-4.1.0&amp;q=80&amp;w=1080 1456w" sizes="100vw"><img src="https://images.unsplash.com/photo-1542176107-f50284e217c5?crop=entropy&amp;cs=tinysrgb&amp;fit=max&amp;fm=jpg&amp;ixid=M3wzMDAzMzh8MHwxfHNlYXJjaHwxfHwzNjV8ZW58MHx8fHwxNzQ4MzU0NTg0fDA&amp;ixlib=rb-4.1.0&amp;q=80&amp;w=1080" width="728" height="485.3333333333333" data-attrs="{&quot;src&quot;:&quot;https://images.unsplash.com/photo-1542176107-f50284e217c5?crop=entropy&amp;cs=tinysrgb&amp;fit=max&amp;fm=jpg&amp;ixid=M3wzMDAzMzh8MHwxfHNlYXJjaHwxfHwzNjV8ZW58MHx8fHwxNzQ4MzU0NTg0fDA&amp;ixlib=rb-4.1.0&amp;q=80&amp;w=1080&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:false,&quot;imageSize&quot;:&quot;normal&quot;,&quot;height&quot;:4000,&quot;width&quot;:6000,&quot;resizeWidth&quot;:728,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;365 book beside clear glass mug&quot;,&quot;title&quot;:null,&quot;type&quot;:&quot;image/jpg&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:&quot;center&quot;,&quot;offset&quot;:false}" class="sizing-normal" alt="365 book beside clear glass mug" title="365 book beside clear glass mug" srcset="https://images.unsplash.com/photo-1542176107-f50284e217c5?crop=entropy&amp;cs=tinysrgb&amp;fit=max&amp;fm=jpg&amp;ixid=M3wzMDAzMzh8MHwxfHNlYXJjaHwxfHwzNjV8ZW58MHx8fHwxNzQ4MzU0NTg0fDA&amp;ixlib=rb-4.1.0&amp;q=80&amp;w=1080 424w, https://images.unsplash.com/photo-1542176107-f50284e217c5?crop=entropy&amp;cs=tinysrgb&amp;fit=max&amp;fm=jpg&amp;ixid=M3wzMDAzMzh8MHwxfHNlYXJjaHwxfHwzNjV8ZW58MHx8fHwxNzQ4MzU0NTg0fDA&amp;ixlib=rb-4.1.0&amp;q=80&amp;w=1080 848w, https://images.unsplash.com/photo-1542176107-f50284e217c5?crop=entropy&amp;cs=tinysrgb&amp;fit=max&amp;fm=jpg&amp;ixid=M3wzMDAzMzh8MHwxfHNlYXJjaHwxfHwzNjV8ZW58MHx8fHwxNzQ4MzU0NTg0fDA&amp;ixlib=rb-4.1.0&amp;q=80&amp;w=1080 1272w, https://images.unsplash.com/photo-1542176107-f50284e217c5?crop=entropy&amp;cs=tinysrgb&amp;fit=max&amp;fm=jpg&amp;ixid=M3wzMDAzMzh8MHwxfHNlYXJjaHwxfHwzNjV8ZW58MHx8fHwxNzQ4MzU0NTg0fDA&amp;ixlib=rb-4.1.0&amp;q=80&amp;w=1080 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><figcaption class="image-caption">Photo by <a href="true">Fauzan Ardhi</a> on <a href="https://unsplash.com">Unsplash</a></figcaption></figure></div><p>Retrieval Augmented Generation (RAG) is an AI technique that enhances the quality of Large Language Model (LLM) responses by grounding them in external, verifiable knowledge sources. It combines the generative power of LLMs with the precision of information retrieval, leading to more accurate, up-to-date, and contextually relevant outputs. </p><h3>Bridging the knowledge gap of LLMs</h3><p>LLMs are trained on vast but static datasets, meaning their knowledge is frozen at the point of their last training. This can lead to outdated information, a lack of domain-specific knowledge, and a tendency to "hallucinate" or generate plausible but incorrect information. <strong>Retrieval Augmented Generation (RAG)</strong> has emerged as a powerful solution to address these challenges, significantly enhancing the reliability and accuracy of LLM-generated content. Since the information is grounded based on an existing knowledge source, this makes it very unlikely for an LLM to cook up some random information against a search query.</p><h2>Core Idea</h2><p>At its core, <strong>RAG is an architectural approach </strong>that combines the generative capabilities of LLMs with an external knowledge retrieval system<strong>.</strong> Instead of relying solely on the information embedded in its training data, a RAG system first fetches relevant information from a specified knowledge base (e.g., a collection of documents, a database, or an API) based on the user's query. This retrieved information is then provided as context to the LLM, which uses it to generate a more informed and accurate response.</p><p>Think of it like an open-book exam for an LLM. Rather than trying to recall information from memory (its training data), the LLM gets to consult relevant notes (the retrieved documents) before answering the question. This process grounds the LLM's response in factual, up-to-date, or domain-specific information.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!TeY9!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcf1b4be1-bed0-4fe4-bb52-df6192848b38_898x532.jpeg" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!TeY9!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcf1b4be1-bed0-4fe4-bb52-df6192848b38_898x532.jpeg 424w, https://substackcdn.com/image/fetch/$s_!TeY9!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcf1b4be1-bed0-4fe4-bb52-df6192848b38_898x532.jpeg 848w, https://substackcdn.com/image/fetch/$s_!TeY9!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcf1b4be1-bed0-4fe4-bb52-df6192848b38_898x532.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!TeY9!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcf1b4be1-bed0-4fe4-bb52-df6192848b38_898x532.jpeg 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!TeY9!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcf1b4be1-bed0-4fe4-bb52-df6192848b38_898x532.jpeg" width="898" height="532" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/cf1b4be1-bed0-4fe4-bb52-df6192848b38_898x532.jpeg&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:532,&quot;width&quot;:898,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;&quot;,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" title="" srcset="https://substackcdn.com/image/fetch/$s_!TeY9!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcf1b4be1-bed0-4fe4-bb52-df6192848b38_898x532.jpeg 424w, https://substackcdn.com/image/fetch/$s_!TeY9!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcf1b4be1-bed0-4fe4-bb52-df6192848b38_898x532.jpeg 848w, https://substackcdn.com/image/fetch/$s_!TeY9!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcf1b4be1-bed0-4fe4-bb52-df6192848b38_898x532.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!TeY9!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcf1b4be1-bed0-4fe4-bb52-df6192848b38_898x532.jpeg 1456w" sizes="100vw"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg 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">Source: https://aws.amazon.com/what-is/retrieval-augmented-generation/</figcaption></figure></div><h2>The key benefits of RAG</h2><ol><li><p><strong>Improved Accuracy and Reduced Hallucinations:</strong> By providing relevant, factual context, RAG significantly reduces the likelihood of LLMs generating incorrect or nonsensical information (hallucinations). The responses are grounded in the retrieved data.</p></li><li><p><strong>Provide LLM, Access to Up-to-Date Information:</strong> LLMs inherently possess static knowledge. RAG allows them to access and utilize the latest information from external sources without needing to be retrained, which is a costly and time-consuming process.</p></li><li><p><strong>Enhanced Domain-Specific Knowledge:</strong> RAG enables LLMs to provide expert-level responses in specific domains (e.g., medical, legal, finance) by connecting them to curated, domain-specific knowledge bases. This allows for tailored and accurate information delivery.</p></li><li><p><strong>Increased Transparency and Trust:</strong> Because RAG systems retrieve information from specific sources, they can often cite these sources in their responses. This allows users to verify the information and builds trust in the system's outputs.</p></li><li><p><strong>Cost-Effectiveness:</strong> Compared to fine-tuning an LLM with new data for every specific task or knowledge update, RAG is generally more cost-effective. Updating the external knowledge base is typically simpler and cheaper than retraining a massive language model.</p></li><li><p><strong>Personalization:</strong> RAG can be used to personalize responses by retrieving information relevant to a specific user's context, history, or preferences.</p></li></ol><h2>Key Components </h2><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!LlMG!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2f12b525-7cdc-4e5f-a71c-78983c68e018_1999x1374.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!LlMG!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2f12b525-7cdc-4e5f-a71c-78983c68e018_1999x1374.png 424w, https://substackcdn.com/image/fetch/$s_!LlMG!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2f12b525-7cdc-4e5f-a71c-78983c68e018_1999x1374.png 848w, https://substackcdn.com/image/fetch/$s_!LlMG!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2f12b525-7cdc-4e5f-a71c-78983c68e018_1999x1374.png 1272w, https://substackcdn.com/image/fetch/$s_!LlMG!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2f12b525-7cdc-4e5f-a71c-78983c68e018_1999x1374.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!LlMG!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2f12b525-7cdc-4e5f-a71c-78983c68e018_1999x1374.png" width="1456" height="1001" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/2f12b525-7cdc-4e5f-a71c-78983c68e018_1999x1374.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1001,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;Retrieval Augmented Generation reduces the likelihood of hallucinations by providing domain-specific information through an LLM's context window.&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="Retrieval Augmented Generation reduces the likelihood of hallucinations by providing domain-specific information through an LLM's context window." title="Retrieval Augmented Generation reduces the likelihood of hallucinations by providing domain-specific information through an LLM's context window." srcset="https://substackcdn.com/image/fetch/$s_!LlMG!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2f12b525-7cdc-4e5f-a71c-78983c68e018_1999x1374.png 424w, https://substackcdn.com/image/fetch/$s_!LlMG!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2f12b525-7cdc-4e5f-a71c-78983c68e018_1999x1374.png 848w, https://substackcdn.com/image/fetch/$s_!LlMG!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2f12b525-7cdc-4e5f-a71c-78983c68e018_1999x1374.png 1272w, https://substackcdn.com/image/fetch/$s_!LlMG!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2f12b525-7cdc-4e5f-a71c-78983c68e018_1999x1374.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">Source: https://www.pinecone.io/learn/retrieval-augmented-generation/</figcaption></figure></div><h3>Knowledge base</h3><p>This is the foundation of the "retrieval" aspect. It's the external corpus of information that the RAG system will draw upon to inform its responses. It can consist of a wide variety of data, including unstructured data like PDFs, Word docs, TXT files, articles, web pages, FAQs, internal wikis, semi structured like JSON files, CSV files with textual content etc.</p><p>The quality, relevance, and comprehensiveness of the knowledge base directly impact the accuracy and usefulness of the RAG system's outputs. If the information isn't in the knowledge base, the RAG system can't retrieve it.</p><h3>The Data Preprocessing and Indexing Pipeline</h3><p>This offline process prepares the knowledge base for efficient and effective retrieval. The key steps in this are</p><ul><li><p><strong>Data Loading:</strong> Ingesting the raw data from the specified sources.</p></li><li><p><strong>Chunking:</strong> Breaking down large documents into smaller, semantically meaningful segments or "chunks." This is crucial because the LLMs have limited context window sizes and smaller chunks allow for more precise retrieval of relevant information. It&#8217;s important to note that chunking strategies can significantly impact retrieval performance.</p></li><li><p><strong>Metadata Extraction:</strong> Optionally, extracting and associating metadata with each chunk (e.g., source document, creation date, author, keywords). This can be used for filtering or providing context during retrieval.</p></li></ul><h3><strong>The Embedding Model</strong></h3><p>The embedding model is responsible for transforming text (both the document chunks from the knowledge base and the user's query) into numerical representations called vector embeddings. Typically, these are sophisticated neural network models, often based on Transformer architectures (e.g., BERT, Sentence-BERT, Ada from OpenAI, or open-source alternatives like those from Hugging Face).</p><p>An embedding model captures the semantic meaning of the text. Text segments with similar meanings will have vector embeddings that are close to each other in the high-dimensional vector space, while dissimilar texts will be further apart.</p><p>The quality of the embedding model is paramount. A good model will:</p><ul><li><p>Accurately represent the semantics of the text.</p></li><li><p>Distinguish subtle differences in meaning.</p></li><li><p>Align well with the types of queries and documents the RAG system will handle.</p></li></ul><blockquote><p><strong>Note: </strong>The <em>same</em> embedding model must be used<strong> </strong>for embedding the knowledge base documents and for embedding the user queries at runtime to ensure that the similarity comparisons are meaningful.</p></blockquote><h3><strong>The Vector Database</strong></h3><p>Vector database is a specialized database designed to store, manage, and efficiently search through large quantities of vector embeddings. It has the following main functions</p><ul><li><p><strong>Storage:</strong> It stores the vector embeddings generated from the document chunks, often alongside the original text chunks themselves or a reference to them, and any associated metadata.</p></li><li><p><strong>Indexing:</strong> It creates an index of these vectors to enable fast similarity searches. Common indexing techniques include Approximate Nearest Neighbor algorithms which trade off a small amount of accuracy for significant speed gains, especially with large datasets.</p></li><li><p><strong>Similarity Search:</strong> When a user query (also converted to a vector embedding) is received, the vector database compares this query vector to the vectors in its index and retrieves the 'k' most similar vectors (and their corresponding text chunks). The similarity is typically measured using metrics like cosine similarity or Euclidean distance.</p></li></ul><p>Some examples of popular vector databases are Pinecone, Weaviate, Milvus, Chroma, FAISS etc.</p><h3><strong>The Retriever Component</strong></h3><p>Retriever orchestrates the process of fetching relevant information from the vector database based on the user's query. The retriever performs the following steps</p><ul><li><p>Takes the user's query.</p></li><li><p>Uses the embedding model to convert the query into a vector embedding.</p></li><li><p>Sends this query embedding to the vector database.</p></li><li><p>Receives the top-k most relevant document chunks (the "context") from the vector database.</p></li><li><p>May include logic for filtering results based on metadata, re-ranking retrieved chunks, or combining results from multiple retrieval strategies.</p></li></ul><p>The retriever is the bridge between the user's need for information and the stored knowledge. Its efficiency and accuracy in finding the <em>right</em> context are critical.</p><h3><strong>The Large Language Model (LLM):</strong></h3><p>A LLM like GPT, Gemini etc serve as the generative engine of the RAG system. It takes the user's original query and the retrieved context and synthesizes them to produce a coherent, human-like answer. The LLM layer is responsible for </p><ul><li><p><strong>Prompt Augmentation:</strong> The original user query is combined with the retrieved context. This is often done by formatting a new, augmented prompt that instructs the LLM to use the provided context to answer the query. For example: </p><pre><code>"Context: [retrieved document chunk 1] [retrieved document chunk 2] ... 
Question: [original user query] 

Answer based on the provided context:"</code></pre></li><li><p><strong>Information Synthesis:</strong> The LLM processes this augmented prompt. Its pre-trained ability to understand language, reason, and generate text allows it to:</p><ul><li><p>Understand the query in light of the new information.</p></li><li><p>Extract relevant facts from the context.</p></li><li><p>Synthesize these facts into a fluent and relevant answer.</p></li><li><p>Avoid relying solely on its internal, potentially outdated or generic knowledge.</p></li></ul></li><li><p><strong>Response Generation:</strong> Produces the final textual response for the user.</p></li></ul><p>The LLM's capabilities in comprehension, reasoning, and generation determine the quality, naturalness, and usefulness of the final output. Its ability to perform "in-context learning" using the provided context effectively is key to RAG's success.</p><div><hr></div><p>In summary, a RAG system is a multi-stage process where data is first processed and stored in a searchable vector format. Then, at query time, relevant information is retrieved, and finally, this retrieved information is used by an LLM to generate an informed and contextually grounded response (LLM + Orchestrator).</p><p>I&#8217;ve been building RAGs using various LLMs and frameworks, and you&#8217;d be surprised at how easy it is to build one. If you&#8217;d like to read more about Agentic AI and other aspects of modern computation, feel free to subscribe to the compute blog for free. With that, thank you so much for reading and I hope you have a wonderful day!</p><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://compute.anshaj.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 Compute - A programming blog! 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[Langflow]]></title><description><![CDATA[Make your AI agent using a no/low code approach & easily build powerful AI agents]]></description><link>https://compute.anshaj.dev/p/langflow</link><guid isPermaLink="false">https://compute.anshaj.dev/p/langflow</guid><dc:creator><![CDATA[Anshaj]]></dc:creator><pubDate>Wed, 23 Apr 2025 05:42:46 GMT</pubDate><enclosure url="https://images.unsplash.com/photo-1674027444485-cec3da58eef4?crop=entropy&amp;cs=tinysrgb&amp;fit=max&amp;fm=jpg&amp;ixid=M3wzMDAzMzh8MHwxfHNlYXJjaHwzOHx8YWl8ZW58MHx8fHwxNzQ0ODk1NjI0fDA&amp;ixlib=rb-4.0.3&amp;q=80&amp;w=1080" length="0" type="image/jpeg"/><content:encoded><![CDATA[<div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://images.unsplash.com/photo-1674027444485-cec3da58eef4?crop=entropy&amp;cs=tinysrgb&amp;fit=max&amp;fm=jpg&amp;ixid=M3wzMDAzMzh8MHwxfHNlYXJjaHwzOHx8YWl8ZW58MHx8fHwxNzQ0ODk1NjI0fDA&amp;ixlib=rb-4.0.3&amp;q=80&amp;w=1080" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://images.unsplash.com/photo-1674027444485-cec3da58eef4?crop=entropy&amp;cs=tinysrgb&amp;fit=max&amp;fm=jpg&amp;ixid=M3wzMDAzMzh8MHwxfHNlYXJjaHwzOHx8YWl8ZW58MHx8fHwxNzQ0ODk1NjI0fDA&amp;ixlib=rb-4.0.3&amp;q=80&amp;w=1080 424w, https://images.unsplash.com/photo-1674027444485-cec3da58eef4?crop=entropy&amp;cs=tinysrgb&amp;fit=max&amp;fm=jpg&amp;ixid=M3wzMDAzMzh8MHwxfHNlYXJjaHwzOHx8YWl8ZW58MHx8fHwxNzQ0ODk1NjI0fDA&amp;ixlib=rb-4.0.3&amp;q=80&amp;w=1080 848w, https://images.unsplash.com/photo-1674027444485-cec3da58eef4?crop=entropy&amp;cs=tinysrgb&amp;fit=max&amp;fm=jpg&amp;ixid=M3wzMDAzMzh8MHwxfHNlYXJjaHwzOHx8YWl8ZW58MHx8fHwxNzQ0ODk1NjI0fDA&amp;ixlib=rb-4.0.3&amp;q=80&amp;w=1080 1272w, https://images.unsplash.com/photo-1674027444485-cec3da58eef4?crop=entropy&amp;cs=tinysrgb&amp;fit=max&amp;fm=jpg&amp;ixid=M3wzMDAzMzh8MHwxfHNlYXJjaHwzOHx8YWl8ZW58MHx8fHwxNzQ0ODk1NjI0fDA&amp;ixlib=rb-4.0.3&amp;q=80&amp;w=1080 1456w" sizes="100vw"><img src="https://images.unsplash.com/photo-1674027444485-cec3da58eef4?crop=entropy&amp;cs=tinysrgb&amp;fit=max&amp;fm=jpg&amp;ixid=M3wzMDAzMzh8MHwxfHNlYXJjaHwzOHx8YWl8ZW58MHx8fHwxNzQ0ODk1NjI0fDA&amp;ixlib=rb-4.0.3&amp;q=80&amp;w=1080" width="3840" height="2160" data-attrs="{&quot;src&quot;:&quot;https://images.unsplash.com/photo-1674027444485-cec3da58eef4?crop=entropy&amp;cs=tinysrgb&amp;fit=max&amp;fm=jpg&amp;ixid=M3wzMDAzMzh8MHwxfHNlYXJjaHwzOHx8YWl8ZW58MHx8fHwxNzQ0ODk1NjI0fDA&amp;ixlib=rb-4.0.3&amp;q=80&amp;w=1080&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:2160,&quot;width&quot;:3840,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;an abstract image of a sphere with dots and lines&quot;,&quot;title&quot;:null,&quot;type&quot;:&quot;image/jpg&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="an abstract image of a sphere with dots and lines" title="an abstract image of a sphere with dots and lines" srcset="https://images.unsplash.com/photo-1674027444485-cec3da58eef4?crop=entropy&amp;cs=tinysrgb&amp;fit=max&amp;fm=jpg&amp;ixid=M3wzMDAzMzh8MHwxfHNlYXJjaHwzOHx8YWl8ZW58MHx8fHwxNzQ0ODk1NjI0fDA&amp;ixlib=rb-4.0.3&amp;q=80&amp;w=1080 424w, https://images.unsplash.com/photo-1674027444485-cec3da58eef4?crop=entropy&amp;cs=tinysrgb&amp;fit=max&amp;fm=jpg&amp;ixid=M3wzMDAzMzh8MHwxfHNlYXJjaHwzOHx8YWl8ZW58MHx8fHwxNzQ0ODk1NjI0fDA&amp;ixlib=rb-4.0.3&amp;q=80&amp;w=1080 848w, https://images.unsplash.com/photo-1674027444485-cec3da58eef4?crop=entropy&amp;cs=tinysrgb&amp;fit=max&amp;fm=jpg&amp;ixid=M3wzMDAzMzh8MHwxfHNlYXJjaHwzOHx8YWl8ZW58MHx8fHwxNzQ0ODk1NjI0fDA&amp;ixlib=rb-4.0.3&amp;q=80&amp;w=1080 1272w, https://images.unsplash.com/photo-1674027444485-cec3da58eef4?crop=entropy&amp;cs=tinysrgb&amp;fit=max&amp;fm=jpg&amp;ixid=M3wzMDAzMzh8MHwxfHNlYXJjaHwzOHx8YWl8ZW58MHx8fHwxNzQ0ODk1NjI0fDA&amp;ixlib=rb-4.0.3&amp;q=80&amp;w=1080 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><figcaption class="image-caption">Photo by <a href="true">Growtika</a> on <a href="https://unsplash.com">Unsplash</a></figcaption></figure></div><p>One of the best ways to learn about AI agents is to build them. And this does not have to be hard and you don&#8217;t even need to be a developer to do this. Armed with the basics of AI, which I&#8217;ve covered for you in the article below, you can start building AI agents with very minimal setup and coding experience required at your end. This is because we now have frameworks that have drag and drop based interfaces to create agents intuitively. One of the best open frameworks doing this today is <a href="https://www.langflow.org">Langflow.</a></p><div><hr></div><div class="digest-post-embed" data-attrs="{&quot;nodeId&quot;:&quot;befbf8b2-96e2-4ddc-baec-47503f8dd083&quot;,&quot;caption&quot;:&quot;We as humans have always been trying to make our computers do more and more things. In the last 40 years alone as a species, we&#8217;ve gone orders of magnitudes further in field of computing than we have in our entire 10,000+ year old history. We have developed cheap storage, better and faster compute every year. We optim&#8230;&quot;,&quot;cta&quot;:null,&quot;showBylines&quot;:true,&quot;size&quot;:&quot;md&quot;,&quot;isEditorNode&quot;:true,&quot;title&quot;:&quot;What are AI agents really?&quot;,&quot;publishedBylines&quot;:[{&quot;id&quot;:15656283,&quot;name&quot;:&quot;Anshaj&quot;,&quot;bio&quot;:&quot;Just a wandering soul, encouraging others to live their best lives. I write two blogs - Compute for everything related to computation and Threads for my thoughts on life.&quot;,&quot;photo_url&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/eed29d07-2090-4eff-bc45-4a2605b96dab_1024x1024.jpeg&quot;,&quot;is_guest&quot;:false,&quot;bestseller_tier&quot;:null}],&quot;post_date&quot;:&quot;2025-04-16T17:38:08.683Z&quot;,&quot;cover_image&quot;:&quot;https://images.unsplash.com/photo-1677756119517-756a188d2d94?crop=entropy&amp;cs=tinysrgb&amp;fit=max&amp;fm=jpg&amp;ixid=M3wzMDAzMzh8MHwxfHNlYXJjaHw2fHxhaXxlbnwwfHx8fDE3NDQ3NTMzNTN8MA&amp;ixlib=rb-4.0.3&amp;q=80&amp;w=1080&quot;,&quot;cover_image_alt&quot;:null,&quot;canonical_url&quot;:&quot;https://thecomputeblog.substack.com/p/what-are-ai-agents-really&quot;,&quot;section_name&quot;:null,&quot;video_upload_id&quot;:null,&quot;id&quot;:161463106,&quot;type&quot;:&quot;newsletter&quot;,&quot;reaction_count&quot;:0,&quot;comment_count&quot;:0,&quot;publication_id&quot;:null,&quot;publication_name&quot;:&quot;Compute - A programming blog&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%2F05083da4-de89-4989-8e93-c51efdadef86_750x750.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>If you&#8217;ve read the article above, you know that there are only a couple of important things required to build your own AI agent. Luckily, langflow abstracts most of the implementation behind a friendly user interface for you to focus on how you want your agent to work, instead of spending a lot of time writing code. And if you want to write code and make your own customizations, there&#8217;s support for that as well. How nice!</p><h2>The target demographic for langflow</h2><p>Langflow reminds me of <a href="https://figma.com">Figma</a>, which has become synonymous with UI/UX workflows. Designing and prototyping frontend applications, became super easy due to Figma and most of the companies working on products started relying on it to work on their UI/UX flows. Langflow is like figma for AI agents. You can design an agent with a drag-drop interface and develop smart agents without really having to write any code. </p><p>At the same time, if you are comfortable writing your programs, you can implement your own tooling which langflow can then utilize making it a powerful tool even for experienced software engineers. </p><h2>How is it different from others agentic AI tools?</h2><p>Here&#8217;s a small table comparing the different popular agentic AI frameworks in the market right now in case you&#8217;d like to take a quick look.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!yXDe!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F019fe565-d7ad-4a18-96cf-f47008f8b36f_1440x546.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!yXDe!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F019fe565-d7ad-4a18-96cf-f47008f8b36f_1440x546.png 424w, https://substackcdn.com/image/fetch/$s_!yXDe!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F019fe565-d7ad-4a18-96cf-f47008f8b36f_1440x546.png 848w, https://substackcdn.com/image/fetch/$s_!yXDe!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F019fe565-d7ad-4a18-96cf-f47008f8b36f_1440x546.png 1272w, https://substackcdn.com/image/fetch/$s_!yXDe!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F019fe565-d7ad-4a18-96cf-f47008f8b36f_1440x546.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!yXDe!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F019fe565-d7ad-4a18-96cf-f47008f8b36f_1440x546.png" width="1440" height="546" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/019fe565-d7ad-4a18-96cf-f47008f8b36f_1440x546.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:546,&quot;width&quot;:1440,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:193606,&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://thecomputeblog.substack.com/i/161535826?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F019fe565-d7ad-4a18-96cf-f47008f8b36f_1440x546.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_!yXDe!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F019fe565-d7ad-4a18-96cf-f47008f8b36f_1440x546.png 424w, https://substackcdn.com/image/fetch/$s_!yXDe!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F019fe565-d7ad-4a18-96cf-f47008f8b36f_1440x546.png 848w, https://substackcdn.com/image/fetch/$s_!yXDe!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F019fe565-d7ad-4a18-96cf-f47008f8b36f_1440x546.png 1272w, https://substackcdn.com/image/fetch/$s_!yXDe!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F019fe565-d7ad-4a18-96cf-f47008f8b36f_1440x546.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><h2>Setting up langflow on your computer </h2><p>The steps for this are fairly straightforward, if you&#8217;d like to set it up on your computer for playing around with langflow</p><ol><li><p>Have python version &gt;= 3.10, installed in your machine</p></li><li><p>Create a virtual environment with <code>python3 -m venv .venv</code></p></li><li><p>Load the virtual environment with <code>source .venv/bin/activate</code></p></li><li><p>Langflow is best installed using <a href="https://github.com/astral-sh/uv) (a fast python package manager written in rust">uv</a></p></li><li><p>To install langflow run the following <code>uv pip install langflow</code></p></li><li><p>You run langflow with <code>uv run langflow run</code></p></li></ol><p>When the command finishes execution, this is what you'd be able to see on your terminal.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!-F6T!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe9113c45-1884-4760-a405-1139860f4c2c_1078x444.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!-F6T!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe9113c45-1884-4760-a405-1139860f4c2c_1078x444.png 424w, https://substackcdn.com/image/fetch/$s_!-F6T!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe9113c45-1884-4760-a405-1139860f4c2c_1078x444.png 848w, https://substackcdn.com/image/fetch/$s_!-F6T!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe9113c45-1884-4760-a405-1139860f4c2c_1078x444.png 1272w, https://substackcdn.com/image/fetch/$s_!-F6T!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe9113c45-1884-4760-a405-1139860f4c2c_1078x444.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!-F6T!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe9113c45-1884-4760-a405-1139860f4c2c_1078x444.png" width="1078" height="444" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/e9113c45-1884-4760-a405-1139860f4c2c_1078x444.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:444,&quot;width&quot;:1078,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:98995,&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://thecomputeblog.substack.com/i/161535826?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe9113c45-1884-4760-a405-1139860f4c2c_1078x444.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_!-F6T!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe9113c45-1884-4760-a405-1139860f4c2c_1078x444.png 424w, https://substackcdn.com/image/fetch/$s_!-F6T!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe9113c45-1884-4760-a405-1139860f4c2c_1078x444.png 848w, https://substackcdn.com/image/fetch/$s_!-F6T!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe9113c45-1884-4760-a405-1139860f4c2c_1078x444.png 1272w, https://substackcdn.com/image/fetch/$s_!-F6T!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe9113c45-1884-4760-a405-1139860f4c2c_1078x444.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><h2>Visual agent builder</h2><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!Vkgg!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc3ef93b9-fa8d-4a8d-b40d-11aa830cb429_2940x1678.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!Vkgg!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc3ef93b9-fa8d-4a8d-b40d-11aa830cb429_2940x1678.png 424w, https://substackcdn.com/image/fetch/$s_!Vkgg!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc3ef93b9-fa8d-4a8d-b40d-11aa830cb429_2940x1678.png 848w, https://substackcdn.com/image/fetch/$s_!Vkgg!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc3ef93b9-fa8d-4a8d-b40d-11aa830cb429_2940x1678.png 1272w, https://substackcdn.com/image/fetch/$s_!Vkgg!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc3ef93b9-fa8d-4a8d-b40d-11aa830cb429_2940x1678.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!Vkgg!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc3ef93b9-fa8d-4a8d-b40d-11aa830cb429_2940x1678.png" width="1456" height="831" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/c3ef93b9-fa8d-4a8d-b40d-11aa830cb429_2940x1678.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:831,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:468083,&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://thecomputeblog.substack.com/i/161535826?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc3ef93b9-fa8d-4a8d-b40d-11aa830cb429_2940x1678.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_!Vkgg!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc3ef93b9-fa8d-4a8d-b40d-11aa830cb429_2940x1678.png 424w, https://substackcdn.com/image/fetch/$s_!Vkgg!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc3ef93b9-fa8d-4a8d-b40d-11aa830cb429_2940x1678.png 848w, https://substackcdn.com/image/fetch/$s_!Vkgg!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc3ef93b9-fa8d-4a8d-b40d-11aa830cb429_2940x1678.png 1272w, https://substackcdn.com/image/fetch/$s_!Vkgg!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc3ef93b9-fa8d-4a8d-b40d-11aa830cb429_2940x1678.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>Langflow is an intuitive visual flow builder. This drag-and-drop interface allows people to create complex AI workflows without writing extensive code. You can easily connect different components, such as prompts, language models, and data sources, to build sophisticated AI applications.</p><h3>What is a flow?</h3><p>A <strong>flow</strong> is an application. It receives input, processes it, and produces output. Flows are created in the <strong>workspace</strong> with components dragged from the components sidebar.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!Ryq5!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F094e71b9-9931-4744-97cd-c3c5485c52e8_3438x1764.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!Ryq5!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F094e71b9-9931-4744-97cd-c3c5485c52e8_3438x1764.png 424w, https://substackcdn.com/image/fetch/$s_!Ryq5!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F094e71b9-9931-4744-97cd-c3c5485c52e8_3438x1764.png 848w, https://substackcdn.com/image/fetch/$s_!Ryq5!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F094e71b9-9931-4744-97cd-c3c5485c52e8_3438x1764.png 1272w, https://substackcdn.com/image/fetch/$s_!Ryq5!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F094e71b9-9931-4744-97cd-c3c5485c52e8_3438x1764.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!Ryq5!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F094e71b9-9931-4744-97cd-c3c5485c52e8_3438x1764.png" width="1456" height="747" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/094e71b9-9931-4744-97cd-c3c5485c52e8_3438x1764.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:747,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;Basic prompting flow within in the workspace&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="Basic prompting flow within in the workspace" title="Basic prompting flow within in the workspace" srcset="https://substackcdn.com/image/fetch/$s_!Ryq5!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F094e71b9-9931-4744-97cd-c3c5485c52e8_3438x1764.png 424w, https://substackcdn.com/image/fetch/$s_!Ryq5!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F094e71b9-9931-4744-97cd-c3c5485c52e8_3438x1764.png 848w, https://substackcdn.com/image/fetch/$s_!Ryq5!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F094e71b9-9931-4744-97cd-c3c5485c52e8_3438x1764.png 1272w, https://substackcdn.com/image/fetch/$s_!Ryq5!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F094e71b9-9931-4744-97cd-c3c5485c52e8_3438x1764.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>A flow can be as simple as the <a href="https://docs.langflow.org/get-started-quickstart">basic prompting flow</a>, which creates an OpenAI chatbot with four components.</p><ul><li><p>Each component in a flow is a <strong>node</strong> that performs a specific task, like an AI model or a data source.</p></li><li><p>Each component has a <strong>Configuration</strong> menu. Click the <strong>Code</strong> pane to see a component's underlying Python code.</p></li><li><p>Components are connected with <strong>edges</strong> to form flows.</p></li></ul><p>When a flow is run, Langflow builds a <a href="https://en.wikipedia.org/wiki/Directed_acyclic_graph">Directed Acyclic Graph</a> (DAG) graph object from the nodes (components) and edges (connections between components), with the nodes sorted to determine the order of execution. The graph build calls the individual components' build functions to validate and prepare the nodes. This graph is then processed in dependency order. Each node is built and executed sequentially, with results from each built node being passed to nodes that are dependent on the previous node's results.</p><h3>Components</h3><p>A <strong>component</strong> is a single building block within a flow and consists of inputs, outputs, and parameters that define its functionality. To add a component to your flow, drag it from the sidebar onto the workspace. To connect components, drag a line from the output handle (&#9898;) of one component to the input handle of another</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!HsoG!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdd11c79a-39cc-45d6-aa33-e27d93197728_1162x1532.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!HsoG!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdd11c79a-39cc-45d6-aa33-e27d93197728_1162x1532.png 424w, https://substackcdn.com/image/fetch/$s_!HsoG!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdd11c79a-39cc-45d6-aa33-e27d93197728_1162x1532.png 848w, https://substackcdn.com/image/fetch/$s_!HsoG!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdd11c79a-39cc-45d6-aa33-e27d93197728_1162x1532.png 1272w, https://substackcdn.com/image/fetch/$s_!HsoG!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdd11c79a-39cc-45d6-aa33-e27d93197728_1162x1532.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!HsoG!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdd11c79a-39cc-45d6-aa33-e27d93197728_1162x1532.png" width="358" height="471.9931153184165" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/dd11c79a-39cc-45d6-aa33-e27d93197728_1162x1532.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:false,&quot;imageSize&quot;:&quot;normal&quot;,&quot;height&quot;:1532,&quot;width&quot;:1162,&quot;resizeWidth&quot;:358,&quot;bytes&quot;:145640,&quot;alt&quot;:&quot;Prompt component&quot;,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:&quot;center&quot;,&quot;offset&quot;:false}" class="sizing-normal" alt="Prompt component" title="Prompt component" srcset="https://substackcdn.com/image/fetch/$s_!HsoG!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdd11c79a-39cc-45d6-aa33-e27d93197728_1162x1532.png 424w, https://substackcdn.com/image/fetch/$s_!HsoG!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdd11c79a-39cc-45d6-aa33-e27d93197728_1162x1532.png 848w, https://substackcdn.com/image/fetch/$s_!HsoG!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdd11c79a-39cc-45d6-aa33-e27d93197728_1162x1532.png 1272w, https://substackcdn.com/image/fetch/$s_!HsoG!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdd11c79a-39cc-45d6-aa33-e27d93197728_1162x1532.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><h1>Project - Youtube video summary agent</h1><p>One of the fun ideas I had while experimenting with langflow, was to build an agent that would summarize the youtube videos, and DM it to me for safekeeping. As someone who doesn&#8217;t want to spend a lot of time watching youtube, this would&#8217;ve been a good solution to save time and check whether a video is even worth watching.</p><p>I used youtube transcripts tool, to get the transcripts for any youtube video, attached the chat input and output to the agent, used gemini 2.0 flash for the LLM layer and the overall flow was surprisingly simple. You can see the entire flow in the picture below.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!ZqC7!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F096e82fb-c7b2-4a28-802b-3c0bbe2204cd_1974x1482.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!ZqC7!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F096e82fb-c7b2-4a28-802b-3c0bbe2204cd_1974x1482.png 424w, https://substackcdn.com/image/fetch/$s_!ZqC7!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F096e82fb-c7b2-4a28-802b-3c0bbe2204cd_1974x1482.png 848w, https://substackcdn.com/image/fetch/$s_!ZqC7!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F096e82fb-c7b2-4a28-802b-3c0bbe2204cd_1974x1482.png 1272w, https://substackcdn.com/image/fetch/$s_!ZqC7!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F096e82fb-c7b2-4a28-802b-3c0bbe2204cd_1974x1482.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!ZqC7!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F096e82fb-c7b2-4a28-802b-3c0bbe2204cd_1974x1482.png" width="1456" height="1093" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/096e82fb-c7b2-4a28-802b-3c0bbe2204cd_1974x1482.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1093,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:273291,&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://thecomputeblog.substack.com/i/161535826?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F096e82fb-c7b2-4a28-802b-3c0bbe2204cd_1974x1482.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_!ZqC7!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F096e82fb-c7b2-4a28-802b-3c0bbe2204cd_1974x1482.png 424w, https://substackcdn.com/image/fetch/$s_!ZqC7!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F096e82fb-c7b2-4a28-802b-3c0bbe2204cd_1974x1482.png 848w, https://substackcdn.com/image/fetch/$s_!ZqC7!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F096e82fb-c7b2-4a28-802b-3c0bbe2204cd_1974x1482.png 1272w, https://substackcdn.com/image/fetch/$s_!ZqC7!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F096e82fb-c7b2-4a28-802b-3c0bbe2204cd_1974x1482.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 also gave my agent very clear instructions on what it needs to do. I instructed it to summarize the video in not more than 3 main points. At the same time, I wanted the agent to provide me a a list of all the important points that were discussed in the video. The idea was to distill information as much as possible, while retaining the important information that I can reference later, if required. The instructions to my agent were as below.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!kLqt!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fee56e735-81fa-4931-86b5-a51f5f55ab83_2782x1580.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!kLqt!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fee56e735-81fa-4931-86b5-a51f5f55ab83_2782x1580.png 424w, https://substackcdn.com/image/fetch/$s_!kLqt!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fee56e735-81fa-4931-86b5-a51f5f55ab83_2782x1580.png 848w, https://substackcdn.com/image/fetch/$s_!kLqt!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fee56e735-81fa-4931-86b5-a51f5f55ab83_2782x1580.png 1272w, https://substackcdn.com/image/fetch/$s_!kLqt!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fee56e735-81fa-4931-86b5-a51f5f55ab83_2782x1580.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!kLqt!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fee56e735-81fa-4931-86b5-a51f5f55ab83_2782x1580.png" width="1456" height="827" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/ee56e735-81fa-4931-86b5-a51f5f55ab83_2782x1580.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:827,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:227662,&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://thecomputeblog.substack.com/i/161535826?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fee56e735-81fa-4931-86b5-a51f5f55ab83_2782x1580.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_!kLqt!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fee56e735-81fa-4931-86b5-a51f5f55ab83_2782x1580.png 424w, https://substackcdn.com/image/fetch/$s_!kLqt!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fee56e735-81fa-4931-86b5-a51f5f55ab83_2782x1580.png 848w, https://substackcdn.com/image/fetch/$s_!kLqt!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fee56e735-81fa-4931-86b5-a51f5f55ab83_2782x1580.png 1272w, https://substackcdn.com/image/fetch/$s_!kLqt!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fee56e735-81fa-4931-86b5-a51f5f55ab83_2782x1580.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 all came together. Here, in a video of less than 1 minutes, I&#8217;ll show you how the end to end implementation of this looks like, including receiving my agent sending a message to me, on Discord (an IM platform) </p><div class="native-video-embed" data-component-name="VideoPlaceholder" data-attrs="{&quot;mediaUploadId&quot;:&quot;0b77404a-177c-450d-b529-4f6999d15d1c&quot;,&quot;duration&quot;:null}"></div><div><hr></div><p>Langflow is a surprisingly good open-source framework that makes it super easy &amp; fun to build AI agents, but it&#8217;s far from the only one. If you&#8217;d like to read about other agentic AI frameworks and other modern computation practices &amp; solutions, feel free to subscribe to my blog - compute for free. With that, thank you so much for reading and I hope you have a wonderful day!</p><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://compute.anshaj.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 Compute - A programming blog! 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[What are AI agents really?]]></title><description><![CDATA[Let's do a deep dive into what AI agents are, and their building blocks]]></description><link>https://compute.anshaj.dev/p/what-are-ai-agents-really</link><guid isPermaLink="false">https://compute.anshaj.dev/p/what-are-ai-agents-really</guid><dc:creator><![CDATA[Anshaj]]></dc:creator><pubDate>Wed, 16 Apr 2025 17:38:08 GMT</pubDate><enclosure url="https://images.unsplash.com/photo-1677756119517-756a188d2d94?crop=entropy&amp;cs=tinysrgb&amp;fit=max&amp;fm=jpg&amp;ixid=M3wzMDAzMzh8MHwxfHNlYXJjaHw2fHxhaXxlbnwwfHx8fDE3NDQ3NTMzNTN8MA&amp;ixlib=rb-4.0.3&amp;q=80&amp;w=1080" length="0" type="image/jpeg"/><content:encoded><![CDATA[<div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://images.unsplash.com/photo-1677756119517-756a188d2d94?crop=entropy&amp;cs=tinysrgb&amp;fit=max&amp;fm=jpg&amp;ixid=M3wzMDAzMzh8MHwxfHNlYXJjaHw2fHxhaXxlbnwwfHx8fDE3NDQ3NTMzNTN8MA&amp;ixlib=rb-4.0.3&amp;q=80&amp;w=1080" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://images.unsplash.com/photo-1677756119517-756a188d2d94?crop=entropy&amp;cs=tinysrgb&amp;fit=max&amp;fm=jpg&amp;ixid=M3wzMDAzMzh8MHwxfHNlYXJjaHw2fHxhaXxlbnwwfHx8fDE3NDQ3NTMzNTN8MA&amp;ixlib=rb-4.0.3&amp;q=80&amp;w=1080 424w, https://images.unsplash.com/photo-1677756119517-756a188d2d94?crop=entropy&amp;cs=tinysrgb&amp;fit=max&amp;fm=jpg&amp;ixid=M3wzMDAzMzh8MHwxfHNlYXJjaHw2fHxhaXxlbnwwfHx8fDE3NDQ3NTMzNTN8MA&amp;ixlib=rb-4.0.3&amp;q=80&amp;w=1080 848w, https://images.unsplash.com/photo-1677756119517-756a188d2d94?crop=entropy&amp;cs=tinysrgb&amp;fit=max&amp;fm=jpg&amp;ixid=M3wzMDAzMzh8MHwxfHNlYXJjaHw2fHxhaXxlbnwwfHx8fDE3NDQ3NTMzNTN8MA&amp;ixlib=rb-4.0.3&amp;q=80&amp;w=1080 1272w, https://images.unsplash.com/photo-1677756119517-756a188d2d94?crop=entropy&amp;cs=tinysrgb&amp;fit=max&amp;fm=jpg&amp;ixid=M3wzMDAzMzh8MHwxfHNlYXJjaHw2fHxhaXxlbnwwfHx8fDE3NDQ3NTMzNTN8MA&amp;ixlib=rb-4.0.3&amp;q=80&amp;w=1080 1456w" sizes="100vw"><img src="https://images.unsplash.com/photo-1677756119517-756a188d2d94?crop=entropy&amp;cs=tinysrgb&amp;fit=max&amp;fm=jpg&amp;ixid=M3wzMDAzMzh8MHwxfHNlYXJjaHw2fHxhaXxlbnwwfHx8fDE3NDQ3NTMzNTN8MA&amp;ixlib=rb-4.0.3&amp;q=80&amp;w=1080" width="5996" height="4096" data-attrs="{&quot;src&quot;:&quot;https://images.unsplash.com/photo-1677756119517-756a188d2d94?crop=entropy&amp;cs=tinysrgb&amp;fit=max&amp;fm=jpg&amp;ixid=M3wzMDAzMzh8MHwxfHNlYXJjaHw2fHxhaXxlbnwwfHx8fDE3NDQ3NTMzNTN8MA&amp;ixlib=rb-4.0.3&amp;q=80&amp;w=1080&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:4096,&quot;width&quot;:5996,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;a robot holding a gun next to a pile of rolls of toilet paper&quot;,&quot;title&quot;:null,&quot;type&quot;:&quot;image/jpg&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="a robot holding a gun next to a pile of rolls of toilet paper" title="a robot holding a gun next to a pile of rolls of toilet paper" srcset="https://images.unsplash.com/photo-1677756119517-756a188d2d94?crop=entropy&amp;cs=tinysrgb&amp;fit=max&amp;fm=jpg&amp;ixid=M3wzMDAzMzh8MHwxfHNlYXJjaHw2fHxhaXxlbnwwfHx8fDE3NDQ3NTMzNTN8MA&amp;ixlib=rb-4.0.3&amp;q=80&amp;w=1080 424w, https://images.unsplash.com/photo-1677756119517-756a188d2d94?crop=entropy&amp;cs=tinysrgb&amp;fit=max&amp;fm=jpg&amp;ixid=M3wzMDAzMzh8MHwxfHNlYXJjaHw2fHxhaXxlbnwwfHx8fDE3NDQ3NTMzNTN8MA&amp;ixlib=rb-4.0.3&amp;q=80&amp;w=1080 848w, https://images.unsplash.com/photo-1677756119517-756a188d2d94?crop=entropy&amp;cs=tinysrgb&amp;fit=max&amp;fm=jpg&amp;ixid=M3wzMDAzMzh8MHwxfHNlYXJjaHw2fHxhaXxlbnwwfHx8fDE3NDQ3NTMzNTN8MA&amp;ixlib=rb-4.0.3&amp;q=80&amp;w=1080 1272w, https://images.unsplash.com/photo-1677756119517-756a188d2d94?crop=entropy&amp;cs=tinysrgb&amp;fit=max&amp;fm=jpg&amp;ixid=M3wzMDAzMzh8MHwxfHNlYXJjaHw2fHxhaXxlbnwwfHx8fDE3NDQ3NTMzNTN8MA&amp;ixlib=rb-4.0.3&amp;q=80&amp;w=1080 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><figcaption class="image-caption">Photo by <a href="true">Gerard Siderius</a> on <a href="https://unsplash.com">Unsplash</a></figcaption></figure></div><p>We as humans have always been trying to make our computers do more and more things. In the last 40 years alone as a species, we&#8217;ve gone orders of magnitudes further in field of computing than we have in our entire 10,000+ year old history. We have developed cheap storage, better and faster compute every year. We optimized our supply chains to get hardware around the globe faster. We developed cloud and made it super convenient for people to build applications and software. We developed GPUs and figured out ways to use them to perform computations orders of magnitude faster. </p><p>All of this came together to realize the dream that computer scientists have long wanted to realize ever since the conception of computers. What if computers could learn behavior without explicit programming. You know - instead of do this when x happens, what if the machine learns on its own to decide what should be done. What if it could mimic how the human brain works? That would be wonderful wouldn&#8217;t it? </p><p>We developed Machine learning algorithms and the idea of an artificial neural network before 2000s but we did not have the computation, storage and a global infrastructure to make this economically viable. Until we did.  </p><p>Agents, are what we&#8217;ve always wanted our computers to be. Computers &#8220;thinking&#8221; on their own and also being autonomous, which implies that they will act on their own. The &#8220;<strong>act on their own</strong>&#8221; part is what really differentiates an agent from what we&#8217;ve been doing with AI so far. This is the main bit. An agent <strong>can act</strong> based on various inputs that it takes from its environment. It can utilize a series of tools to do complex tasks. </p><p>Let me show you some examples. </p><h2>Firebase studio</h2><div class="native-video-embed" data-component-name="VideoPlaceholder" data-attrs="{&quot;mediaUploadId&quot;:&quot;1361ee10-8764-461b-abab-e58d033fc193&quot;,&quot;duration&quot;:null}"></div><p>This right here is <a href="https://firebase.studio">Firebase studio</a>, an excellent implementation of agentic AI. You tell the agent the kind of application you want to build, and the features that you need. The agent that goes ahead and figures out the frontend, the backend and the various building blocks required to build your application. It then starts to put together code using Large Language Models (like GPT and Gemini) and <strong>checks whether the code actually works</strong>. If the code works, it knows that the job is done and waits for you to give it more instructions. </p><p><a href="https://www.figma.com">Figma</a>, a UI/UX prototyping tool came a couple of years ago and made it very simple to see how an application would look and feel before the development even begins. It significantly changed the industry over the years. Now, Imagine being able to prototype an entire application, in minutes, and not just its mockup. Getting from ideas to products is going to be so much faster with tools like this in the market. And this is far from being the only tool that&#8217;s changing the way, we&#8217;ve through about software development. </p><h2>VS Code Agent </h2><div class="native-video-embed" data-component-name="VideoPlaceholder" data-attrs="{&quot;mediaUploadId&quot;:&quot;2b5c039a-373c-49dc-80bb-d1adfe320f33&quot;,&quot;duration&quot;:null}"></div><p><a href="https://code.visualstudio.com">VS Code</a> is one of the best and most popular free coding editors available for software engineers today. It integrates super well with another tool called Github copilot to give you a fantastic &#8220;agent mode&#8221; experience. Let&#8217;s say you want to build an application in typescript but do not know the nuances of it. Maybe you know a bit of typescript but there&#8217;s a lot of work that is usually required to set up your project and even getting the basics to work on your machine. There might be software dependencies, and other things that are required before you can see a UI render for your application. </p><p>Similar to firebase studio, VS Code agent mode will figure out the commands for you, and run those commands for you. It will observe the output of the execution of those commands and gradually make its way towards giving you a fully functional project. That is great news for developers and PMs who want to prototype things but do not possess deep expertise in the hundreds of frameworks that are often required in making an application. And even for a seasoned developer, the productivity gains are immense. Being able to prototype ideas quickly, without having to spend a ton of time purely typing does increase the speed of writing code significantly.</p><h2>What can agents do?</h2><p>Here are some examples that I&#8217;ve seen agents being able to do, with the right integrations </p><ol><li><p>Search the internet </p></li><li><p>Send emails </p></li><li><p>Crawl &amp; scrape the internet for information</p></li><li><p>Send messages</p></li><li><p><strong>Write custom code to do solve basically problems of any nature</strong></p></li><li><p><strong>Talk to other agents</strong> </p></li></ol><p>If you provide an agent with the right set of tools, it&#8217;ll be able to accomplish many things that were considered impossible a couple of years ago. For example, here&#8217;s an implementation by <a href="https://manus.im">Manus AI</a> (a state of the art Agentic AI solution) to understand <a href="https://manus.im/share/VUKK5neqmYOKsJ0J7gF6N8?replay=1">public sentiment related to a topic</a> by going through conversation happening on twitter, youtube and other social media platforms. </p><h2>What is needed to build agents?</h2><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!EzB4!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9f77516e-a5cb-4662-bd68-d583a5bb9688_1552x1128.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!EzB4!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9f77516e-a5cb-4662-bd68-d583a5bb9688_1552x1128.png 424w, https://substackcdn.com/image/fetch/$s_!EzB4!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9f77516e-a5cb-4662-bd68-d583a5bb9688_1552x1128.png 848w, https://substackcdn.com/image/fetch/$s_!EzB4!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9f77516e-a5cb-4662-bd68-d583a5bb9688_1552x1128.png 1272w, https://substackcdn.com/image/fetch/$s_!EzB4!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9f77516e-a5cb-4662-bd68-d583a5bb9688_1552x1128.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!EzB4!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9f77516e-a5cb-4662-bd68-d583a5bb9688_1552x1128.png" width="1456" height="1058" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/9f77516e-a5cb-4662-bd68-d583a5bb9688_1552x1128.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1058,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:&quot;key building block headings for building AI agents_ - visual selection.png&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="" title="key building block headings for building AI agents_ - visual selection.png" srcset="https://substackcdn.com/image/fetch/$s_!EzB4!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9f77516e-a5cb-4662-bd68-d583a5bb9688_1552x1128.png 424w, https://substackcdn.com/image/fetch/$s_!EzB4!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9f77516e-a5cb-4662-bd68-d583a5bb9688_1552x1128.png 848w, https://substackcdn.com/image/fetch/$s_!EzB4!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9f77516e-a5cb-4662-bd68-d583a5bb9688_1552x1128.png 1272w, https://substackcdn.com/image/fetch/$s_!EzB4!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9f77516e-a5cb-4662-bd68-d583a5bb9688_1552x1128.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>AI agents are systems designed to <strong>perceive their environment</strong>, <strong>make decisions</strong>, and <strong>take actions</strong> to achieve specific goals, autonomously. Some of the main building blocks of AI agents are</p><h3><strong>Perception </strong></h3><p>AI agents gather information from the environment through, Sensors in physical robots (e.g., cameras, LIDAR) or APIs or data streams in software agents (e.g., websites, databases, user interactions)</p><p>For example:</p><ul><li><p>A chatbot sees user text as input.</p></li><li><p>A trading bot reads real-time market data.</p></li><li><p>A social sentiment analysis agent goes through crawls and scrapes websites </p></li></ul><h3><strong>Reasoning and Decision Making</strong></h3><p>Once data is received, agents, analyze the input, maintain a state or memory of previous interactions and use rules, models, or AI techniques to decide <strong>what to do next </strong>Some of these techniques can be Rule-based logic, Machine learning models (e.g., classification, reinforcement learning), Planning algorithms (e.g., A* search, Monte Carlo Tree Search) or Large Language Models for high-level reasoning and planning. Due to the recent rapid advances in LLMs, and LLMs becoming increasingly cheaper and bigger (more context tokens), agents have been becoming better at solving complex problems. </p><h3><strong>Action</strong></h3><p>After deciding what to do, agents can perform an action via actuators (robots) or function calls (software). These actions affect the environment, completing the perception-action loop</p><p>Some examples are:</p><ul><li><p>An AI assistant books a meeting, based on everyone&#8217;s availability and sends out a pre-read for the meeting&#8217;s topic </p></li><li><p>An LLM-based agent queries a database based on a user&#8217;s question and formats a report</p></li></ul><h3><strong>Environment</strong></h3><p>The world the agent interacts with can be:</p><ul><li><p><strong>Physical</strong> like real-world robotics and IoT devices</p></li><li><p><strong>Digital</strong> like web browsers, APIs, games and simulations</p></li><li><p><strong>Abstract</strong> like mathematical problems and data science tasks</p></li></ul><p>An environment allows an agent to interact and learn. It acts as a source for feedback that agent can use to experiment iteratively. It allows agents to learn from both successful and failed experiments much like a baby learns from interacting with his/her environment while growing up.</p><h3><strong>Memory (State) Management</strong></h3><p>Memory management within agents allows the agent to keep track of past interactions. This is why you&#8217;re able to have a natural conversation with the chatGPT these days. If your first question is like, &#8220;What are the available macbooks in the market&#8221;, followed up by &#8220;What is the price of the latest one?&#8221;, you know that the the agent is going to find the price for the latest macbook.  Memory also allows the agent to make intermediary decisions that might be important to solve your problem better. This is very similar to how we sometimes make a to-do list before solving a complicated multi-step problem. </p><h3><strong>Frameworks &amp; Tools</strong></h3><p>For building advanced agents, there are multiple frameworks out there already. Some of these frameworks help you build LLM agents, some are components within agents to let you perform tasks easily. Here are some of the them</p><ul><li><p>LangChain / LlamaIndex </p></li><li><p>Autogen / BabyAGI </p></li><li><p>Haystack, CrewAI, MetaGPT </p></li><li><p>Langflow</p></li><li><p>LLMs/APIs (OpenAI, Claude, Mistral, local models)</p></li></ul><p>I&#8217;m planning to cover these frameworks in my blog, soon. If you&#8217;re interested in free weekly articles on the latest agentic AI frameworks, tutorials and engineering trends, feel free to subscribe to compute for free by clicking the button below. With that, thank you so much for reading and I hope you have a wonderful day!</p><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://compute.anshaj.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 Compute - A programming blog! 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><p></p><p></p><p></p><p></p><p></p>]]></content:encoded></item><item><title><![CDATA[FastAPI in python]]></title><description><![CDATA[Explore FastAPI&#8217;s powerful features, including async support, automatic validation, and built-in documentation, making it the go-to framework for modern Python APIs.]]></description><link>https://compute.anshaj.dev/p/fastapi-in-python</link><guid isPermaLink="false">https://compute.anshaj.dev/p/fastapi-in-python</guid><dc:creator><![CDATA[Anshaj]]></dc:creator><pubDate>Fri, 28 Feb 2025 09:15:44 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!c_ky!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb5f1d358-4a23-4203-bd37-87d9aa07183d_1080x635.jpeg" length="0" type="image/jpeg"/><content:encoded><![CDATA[<div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!c_ky!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb5f1d358-4a23-4203-bd37-87d9aa07183d_1080x635.jpeg" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!c_ky!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb5f1d358-4a23-4203-bd37-87d9aa07183d_1080x635.jpeg 424w, https://substackcdn.com/image/fetch/$s_!c_ky!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb5f1d358-4a23-4203-bd37-87d9aa07183d_1080x635.jpeg 848w, https://substackcdn.com/image/fetch/$s_!c_ky!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb5f1d358-4a23-4203-bd37-87d9aa07183d_1080x635.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!c_ky!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb5f1d358-4a23-4203-bd37-87d9aa07183d_1080x635.jpeg 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!c_ky!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb5f1d358-4a23-4203-bd37-87d9aa07183d_1080x635.jpeg" width="1080" height="635" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/b5f1d358-4a23-4203-bd37-87d9aa07183d_1080x635.jpeg&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:635,&quot;width&quot;:1080,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:59462,&quot;alt&quot;:&quot;four fighting planes&quot;,&quot;title&quot;:null,&quot;type&quot;:&quot;image/jpeg&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="four fighting planes" title="four fighting planes" srcset="https://substackcdn.com/image/fetch/$s_!c_ky!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb5f1d358-4a23-4203-bd37-87d9aa07183d_1080x635.jpeg 424w, https://substackcdn.com/image/fetch/$s_!c_ky!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb5f1d358-4a23-4203-bd37-87d9aa07183d_1080x635.jpeg 848w, https://substackcdn.com/image/fetch/$s_!c_ky!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb5f1d358-4a23-4203-bd37-87d9aa07183d_1080x635.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!c_ky!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb5f1d358-4a23-4203-bd37-87d9aa07183d_1080x635.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><figcaption class="image-caption">Photo by <a href="true">Nathan Jackson</a> on <a href="https://unsplash.com">Unsplash</a></figcaption></figure></div><h1>Overview</h1><p><a href="https://fastapi.tiangolo.com">FastAPI</a> is a modern, fast (<strong>high-performance</strong>), web framework for building APIs with Python based on standard Python type hints.</p><p>The key features are:</p><ul><li><p><strong>Fast</strong>: Very high performance, on par with <strong><a href="https://nodejs.org/en">NodeJS</a></strong> and <strong><a href="https://go.dev">Go</a></strong>. <a href="https://fastapi.tiangolo.com/#performance">One of the fastest Python frameworks available</a>.</p></li><li><p><strong>Fast to code</strong>: Increase the speed to develop features by about <strong>200% to 300%</strong>.</p></li><li><p><strong>Fewer bugs</strong>: Reduce about 40% of human (developer) induced errors. </p></li><li><p><strong>Intuitive</strong>: Great editor support. Completion everywhere. Less time debugging.</p></li><li><p><strong>Easy</strong>: Designed to be easy to use and learn. Less time reading docs.</p></li><li><p><strong>Short</strong>: Minimize code duplication. Multiple features from each parameter declaration. Fewer bugs.</p></li><li><p><strong>Robust</strong>: Get production-ready code. With automatic interactive documentation.</p></li><li><p><strong>Standards-based</strong>: Based on (and fully compatible with) the open standards for APIs: <a href="https://github.com/OAI/OpenAPI-Specification">OpenAPI</a> (Swagger) and <a href="https://json-schema.org/">JSON Schema</a>.</p></li></ul><h1>Let&#8217;s dive in</h1><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!wecw!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F11fa71de-a6da-44f0-9b41-e47278dfc889_1024x369.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!wecw!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F11fa71de-a6da-44f0-9b41-e47278dfc889_1024x369.png 424w, https://substackcdn.com/image/fetch/$s_!wecw!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F11fa71de-a6da-44f0-9b41-e47278dfc889_1024x369.png 848w, https://substackcdn.com/image/fetch/$s_!wecw!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F11fa71de-a6da-44f0-9b41-e47278dfc889_1024x369.png 1272w, https://substackcdn.com/image/fetch/$s_!wecw!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F11fa71de-a6da-44f0-9b41-e47278dfc889_1024x369.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!wecw!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F11fa71de-a6da-44f0-9b41-e47278dfc889_1024x369.png" width="1024" height="369" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/11fa71de-a6da-44f0-9b41-e47278dfc889_1024x369.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:369,&quot;width&quot;:1024,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;FastAPI&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="FastAPI" title="FastAPI" srcset="https://substackcdn.com/image/fetch/$s_!wecw!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F11fa71de-a6da-44f0-9b41-e47278dfc889_1024x369.png 424w, https://substackcdn.com/image/fetch/$s_!wecw!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F11fa71de-a6da-44f0-9b41-e47278dfc889_1024x369.png 848w, https://substackcdn.com/image/fetch/$s_!wecw!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F11fa71de-a6da-44f0-9b41-e47278dfc889_1024x369.png 1272w, https://substackcdn.com/image/fetch/$s_!wecw!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F11fa71de-a6da-44f0-9b41-e47278dfc889_1024x369.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><h2>Super fast to get started</h2><p>FastAPI allows you to set up a fully functional API with just a few lines of code. For example, this is all you need to create a simple "Hello World" endpoint:</p><pre><code>from fastapi import FastAPI

app = FastAPI()

@app.get("/")
def read_root():
    return {"message": "Hello, World!"}
</code></pre><p>Save it as <em>main.py</em>, run it with <em>uvicorn main:app --reload</em>, and voil&#224;! You have a running API.</p><h2>Built-in Validation </h2><p>FastAPI uses <a href="https://docs.pydantic.dev/latest/">Pydantic</a> (really cool data validation library) to validate your data automatically. Just define your input schema, and it handles the rest. If someone sends invalid data, FastAPI will return a detailed error message explaining what's wrong. This is how easy it is to implement data validation</p><pre><code>from fastapi import FastAPI
from pydantic import BaseModel

app = FastAPI()

class Item(BaseModel):
    name: str
    price: float
    in_stock: bool

@app.post("/items/")
def create_item(item: Item):
    return {"item": item}
</code></pre><h2>Asynchronous by Design</h2><p>FastAPI is built on top of <strong>Starlette</strong>, which means it fully supports asynchronous programming. This is great if your API interacts with databases, external APIs, or other time-consuming operations. This is unlike <a href="https://flask.palletsprojects.com/en/stable/">Flask</a>, which another popular micro-service framework in python.</p><h3>Asynchronous Endpoints</h3><p>FastAPI&#8217;s support for asynchronous programming allows developers to handle multiple requests concurrently, leading to better performance in high-throughput applications. Unlike traditional synchronous frameworks, where each request is processed sequentially, async endpoints enable non-blocking operations using Python&#8217;s <code>async</code> and <code>await</code> keywords.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!O5CM!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8776a65c-f361-44dd-a66a-9f2e94e9a07b_1214x456.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!O5CM!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8776a65c-f361-44dd-a66a-9f2e94e9a07b_1214x456.png 424w, https://substackcdn.com/image/fetch/$s_!O5CM!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8776a65c-f361-44dd-a66a-9f2e94e9a07b_1214x456.png 848w, https://substackcdn.com/image/fetch/$s_!O5CM!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8776a65c-f361-44dd-a66a-9f2e94e9a07b_1214x456.png 1272w, https://substackcdn.com/image/fetch/$s_!O5CM!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8776a65c-f361-44dd-a66a-9f2e94e9a07b_1214x456.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!O5CM!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8776a65c-f361-44dd-a66a-9f2e94e9a07b_1214x456.png" width="1214" height="456" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/8776a65c-f361-44dd-a66a-9f2e94e9a07b_1214x456.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:456,&quot;width&quot;:1214,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:76042,&quot;alt&quot;:&quot;&quot;,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://thecomputeblog.substack.com/i/152451915?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8776a65c-f361-44dd-a66a-9f2e94e9a07b_1214x456.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" title="" srcset="https://substackcdn.com/image/fetch/$s_!O5CM!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8776a65c-f361-44dd-a66a-9f2e94e9a07b_1214x456.png 424w, https://substackcdn.com/image/fetch/$s_!O5CM!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8776a65c-f361-44dd-a66a-9f2e94e9a07b_1214x456.png 848w, https://substackcdn.com/image/fetch/$s_!O5CM!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8776a65c-f361-44dd-a66a-9f2e94e9a07b_1214x456.png 1272w, https://substackcdn.com/image/fetch/$s_!O5CM!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8776a65c-f361-44dd-a66a-9f2e94e9a07b_1214x456.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><h4><strong>When to Use Async Endpoints</strong></h4><ul><li><p>When dealing with I/O-bound operations such as database queries, external API calls, or file processing.</p></li><li><p>When handling a high number of concurrent users efficiently.</p></li><li><p>When integrating with modern async-based libraries like <code>httpx</code> (for HTTP requests) or <code>databases</code> (for async database operations).</p></li></ul><h2>Interactive Documentation</h2><p>One of FastAPI's coolest features is <strong>interactive documentation</strong>. Once your API is up, visit <em>/docs</em> or <em>/redoc</em>, and you'll find auto-generated, interactive docs based on your code. No extra effort needed!</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!bJ-0!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc94c1ccf-ea57-4f9a-99a3-844a847e75c2_960x1080.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!bJ-0!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc94c1ccf-ea57-4f9a-99a3-844a847e75c2_960x1080.png 424w, https://substackcdn.com/image/fetch/$s_!bJ-0!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc94c1ccf-ea57-4f9a-99a3-844a847e75c2_960x1080.png 848w, https://substackcdn.com/image/fetch/$s_!bJ-0!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc94c1ccf-ea57-4f9a-99a3-844a847e75c2_960x1080.png 1272w, https://substackcdn.com/image/fetch/$s_!bJ-0!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc94c1ccf-ea57-4f9a-99a3-844a847e75c2_960x1080.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!bJ-0!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc94c1ccf-ea57-4f9a-99a3-844a847e75c2_960x1080.png" width="960" height="1080" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/c94c1ccf-ea57-4f9a-99a3-844a847e75c2_960x1080.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1080,&quot;width&quot;:960,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;Swagger UI&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="Swagger UI" title="Swagger UI" srcset="https://substackcdn.com/image/fetch/$s_!bJ-0!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc94c1ccf-ea57-4f9a-99a3-844a847e75c2_960x1080.png 424w, https://substackcdn.com/image/fetch/$s_!bJ-0!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc94c1ccf-ea57-4f9a-99a3-844a847e75c2_960x1080.png 848w, https://substackcdn.com/image/fetch/$s_!bJ-0!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc94c1ccf-ea57-4f9a-99a3-844a847e75c2_960x1080.png 1272w, https://substackcdn.com/image/fetch/$s_!bJ-0!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc94c1ccf-ea57-4f9a-99a3-844a847e75c2_960x1080.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><h2>Dependency Injection</h2><p>Dependency Injection (DI) is a software design pattern that promotes modularity, reusability, and testability by allowing dependencies to be injected into functions or classes rather than being hardcoded. FastAPI has built-in support for dependency injection, making it a powerful feature for handling dependencies such as database connections, authentication mechanisms, and business logic.</p><h3><strong>How FastAPI Handles Dependency Injection</strong></h3><p>FastAPI&#8217;s DI system is declarative and built into the framework using Python&#8217;s type hinting. It enables developers to define dependencies separately and inject them into route handlers using <code>Depends</code>. The dependency function is executed before the route function and its return value is passed as an argument.</p><h4>Basic dependency injection</h4><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!Ev35!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F62936db9-72ca-4ab8-bf42-30540cef5c63_1186x552.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!Ev35!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F62936db9-72ca-4ab8-bf42-30540cef5c63_1186x552.png 424w, https://substackcdn.com/image/fetch/$s_!Ev35!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F62936db9-72ca-4ab8-bf42-30540cef5c63_1186x552.png 848w, https://substackcdn.com/image/fetch/$s_!Ev35!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F62936db9-72ca-4ab8-bf42-30540cef5c63_1186x552.png 1272w, https://substackcdn.com/image/fetch/$s_!Ev35!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F62936db9-72ca-4ab8-bf42-30540cef5c63_1186x552.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!Ev35!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F62936db9-72ca-4ab8-bf42-30540cef5c63_1186x552.png" width="1186" height="552" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/62936db9-72ca-4ab8-bf42-30540cef5c63_1186x552.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:552,&quot;width&quot;:1186,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:88942,&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://thecomputeblog.substack.com/i/152451915?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F62936db9-72ca-4ab8-bf42-30540cef5c63_1186x552.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_!Ev35!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F62936db9-72ca-4ab8-bf42-30540cef5c63_1186x552.png 424w, https://substackcdn.com/image/fetch/$s_!Ev35!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F62936db9-72ca-4ab8-bf42-30540cef5c63_1186x552.png 848w, https://substackcdn.com/image/fetch/$s_!Ev35!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F62936db9-72ca-4ab8-bf42-30540cef5c63_1186x552.png 1272w, https://substackcdn.com/image/fetch/$s_!Ev35!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F62936db9-72ca-4ab8-bf42-30540cef5c63_1186x552.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>How it works:</strong></p><ul><li><p><code>common_dependency()</code> is a simple function that returns a string.</p></li><li><p>The <code>Depends</code> function tells FastAPI that this dependency should be executed before handling the request.</p></li><li><p>The result of <code>common_dependency()</code> is injected into the route function as the <code>data</code> parameter.</p></li></ul><h4><strong>Advanced Dependency Injection</strong></h4><p>FastAPI allows injecting more complex dependencies like database sessions, authentication checks, and configuration settings.</p><h4><strong>Example: Database Connection as a Dependency</strong></h4><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!QGqI!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa4d70df2-60d9-4bc8-96c7-871d6769e330_1198x778.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!QGqI!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa4d70df2-60d9-4bc8-96c7-871d6769e330_1198x778.png 424w, https://substackcdn.com/image/fetch/$s_!QGqI!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa4d70df2-60d9-4bc8-96c7-871d6769e330_1198x778.png 848w, https://substackcdn.com/image/fetch/$s_!QGqI!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa4d70df2-60d9-4bc8-96c7-871d6769e330_1198x778.png 1272w, https://substackcdn.com/image/fetch/$s_!QGqI!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa4d70df2-60d9-4bc8-96c7-871d6769e330_1198x778.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!QGqI!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa4d70df2-60d9-4bc8-96c7-871d6769e330_1198x778.png" width="1198" height="778" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/a4d70df2-60d9-4bc8-96c7-871d6769e330_1198x778.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:778,&quot;width&quot;:1198,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:121806,&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://thecomputeblog.substack.com/i/152451915?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa4d70df2-60d9-4bc8-96c7-871d6769e330_1198x778.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_!QGqI!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa4d70df2-60d9-4bc8-96c7-871d6769e330_1198x778.png 424w, https://substackcdn.com/image/fetch/$s_!QGqI!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa4d70df2-60d9-4bc8-96c7-871d6769e330_1198x778.png 848w, https://substackcdn.com/image/fetch/$s_!QGqI!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa4d70df2-60d9-4bc8-96c7-871d6769e330_1198x778.png 1272w, https://substackcdn.com/image/fetch/$s_!QGqI!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa4d70df2-60d9-4bc8-96c7-871d6769e330_1198x778.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>How it works:</strong></p><ul><li><p>The <code>get_db</code> function initializes a database session and ensures it is closed after use.</p></li><li><p><code>yield</code> is used for cleanup after the dependency is executed.</p></li><li><p>The <code>Depends(get_db)</code> injects the database session into the route.</p></li></ul><h2>Key differences with Flask</h2><p><a href="https://flask.palletsprojects.com/en/stable/">Flask</a> and FastAPI are two of the most popular web frameworks in Python, but they have key differences in design philosophy, performance, and features.</p><p>I&#8217;ve summarized the key differences between the frameworks in the table below.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!Xvaa!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F381b5183-4d40-4279-bce7-30ad5755d9b6_2496x1010.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!Xvaa!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F381b5183-4d40-4279-bce7-30ad5755d9b6_2496x1010.png 424w, https://substackcdn.com/image/fetch/$s_!Xvaa!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F381b5183-4d40-4279-bce7-30ad5755d9b6_2496x1010.png 848w, https://substackcdn.com/image/fetch/$s_!Xvaa!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F381b5183-4d40-4279-bce7-30ad5755d9b6_2496x1010.png 1272w, https://substackcdn.com/image/fetch/$s_!Xvaa!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F381b5183-4d40-4279-bce7-30ad5755d9b6_2496x1010.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!Xvaa!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F381b5183-4d40-4279-bce7-30ad5755d9b6_2496x1010.png" width="1456" height="589" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/381b5183-4d40-4279-bce7-30ad5755d9b6_2496x1010.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:589,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:305996,&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://thecomputeblog.substack.com/i/152451915?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F381b5183-4d40-4279-bce7-30ad5755d9b6_2496x1010.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_!Xvaa!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F381b5183-4d40-4279-bce7-30ad5755d9b6_2496x1010.png 424w, https://substackcdn.com/image/fetch/$s_!Xvaa!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F381b5183-4d40-4279-bce7-30ad5755d9b6_2496x1010.png 848w, https://substackcdn.com/image/fetch/$s_!Xvaa!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F381b5183-4d40-4279-bce7-30ad5755d9b6_2496x1010.png 1272w, https://substackcdn.com/image/fetch/$s_!Xvaa!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F381b5183-4d40-4279-bce7-30ad5755d9b6_2496x1010.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><h4>When to use one over the other</h4><p>While both flask and fastapi are great frameworks, there are areas where one shines over the other. The table below summarizes this. </p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!qMaE!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb72762e8-d7eb-49ec-9b24-a4434e2f24f5_2016x708.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!qMaE!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb72762e8-d7eb-49ec-9b24-a4434e2f24f5_2016x708.png 424w, https://substackcdn.com/image/fetch/$s_!qMaE!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb72762e8-d7eb-49ec-9b24-a4434e2f24f5_2016x708.png 848w, https://substackcdn.com/image/fetch/$s_!qMaE!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb72762e8-d7eb-49ec-9b24-a4434e2f24f5_2016x708.png 1272w, https://substackcdn.com/image/fetch/$s_!qMaE!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb72762e8-d7eb-49ec-9b24-a4434e2f24f5_2016x708.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!qMaE!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb72762e8-d7eb-49ec-9b24-a4434e2f24f5_2016x708.png" width="1456" height="511" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/b72762e8-d7eb-49ec-9b24-a4434e2f24f5_2016x708.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:511,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:199385,&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://thecomputeblog.substack.com/i/152451915?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb72762e8-d7eb-49ec-9b24-a4434e2f24f5_2016x708.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_!qMaE!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb72762e8-d7eb-49ec-9b24-a4434e2f24f5_2016x708.png 424w, https://substackcdn.com/image/fetch/$s_!qMaE!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb72762e8-d7eb-49ec-9b24-a4434e2f24f5_2016x708.png 848w, https://substackcdn.com/image/fetch/$s_!qMaE!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb72762e8-d7eb-49ec-9b24-a4434e2f24f5_2016x708.png 1272w, https://substackcdn.com/image/fetch/$s_!qMaE!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb72762e8-d7eb-49ec-9b24-a4434e2f24f5_2016x708.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>Final Verdict</strong></p><ul><li><p><strong>Choose FastAPI</strong> if you need a <strong>high-performance, async-ready API</strong> with built-in documentation and validation.</p></li><li><p><strong>Choose Flask</strong> if you're <strong>building a traditional web application</strong> with <strong>templating</strong> (like Jinja2) or if you prefer a <strong>lightweight</strong> framework with more flexibility.</p><p></p></li></ul><div><hr></div><p>The code for the examples shared for this post are available for free on my Github repository <a href="https://github.com/anshajk/python-frameworks">python-frameworks</a>. </p><div><hr></div><h2>Conclusion</h2><p>FastAPI is a game-changer for modern API development in Python. Its built-in validation, high performance, and async capabilities make it an excellent choice for both small and large-scale projects. If you&#8217;re looking for a framework that makes API development fast and enjoyable, FastAPI is worth exploring!</p><p>Happy coding!</p><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://compute.anshaj.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 Compute - A programming blog! Subscribe for free to receive new posts on programming &amp; computation 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[Containers in software engineering]]></title><description><![CDATA[Learn the basics of docker & kubernetes in under 10 minutes]]></description><link>https://compute.anshaj.dev/p/containers-in-software-engineering</link><guid isPermaLink="false">https://compute.anshaj.dev/p/containers-in-software-engineering</guid><dc:creator><![CDATA[Anshaj]]></dc:creator><pubDate>Sat, 18 Jan 2025 11:52:09 GMT</pubDate><enclosure url="https://images.unsplash.com/photo-1634638022229-5a52221886dc?crop=entropy&amp;cs=tinysrgb&amp;fit=max&amp;fm=jpg&amp;ixid=M3wzMDAzMzh8MHwxfHNlYXJjaHw2fHxjb250YWluZXIlMjBzaGlwfGVufDB8fHx8MTczNzE5NzM1NHww&amp;ixlib=rb-4.0.3&amp;q=80&amp;w=1080" length="0" type="image/jpeg"/><content:encoded><![CDATA[<div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://images.unsplash.com/photo-1634638022229-5a52221886dc?crop=entropy&amp;cs=tinysrgb&amp;fit=max&amp;fm=jpg&amp;ixid=M3wzMDAzMzh8MHwxfHNlYXJjaHw2fHxjb250YWluZXIlMjBzaGlwfGVufDB8fHx8MTczNzE5NzM1NHww&amp;ixlib=rb-4.0.3&amp;q=80&amp;w=1080" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://images.unsplash.com/photo-1634638022229-5a52221886dc?crop=entropy&amp;cs=tinysrgb&amp;fit=max&amp;fm=jpg&amp;ixid=M3wzMDAzMzh8MHwxfHNlYXJjaHw2fHxjb250YWluZXIlMjBzaGlwfGVufDB8fHx8MTczNzE5NzM1NHww&amp;ixlib=rb-4.0.3&amp;q=80&amp;w=1080 424w, https://images.unsplash.com/photo-1634638022229-5a52221886dc?crop=entropy&amp;cs=tinysrgb&amp;fit=max&amp;fm=jpg&amp;ixid=M3wzMDAzMzh8MHwxfHNlYXJjaHw2fHxjb250YWluZXIlMjBzaGlwfGVufDB8fHx8MTczNzE5NzM1NHww&amp;ixlib=rb-4.0.3&amp;q=80&amp;w=1080 848w, https://images.unsplash.com/photo-1634638022229-5a52221886dc?crop=entropy&amp;cs=tinysrgb&amp;fit=max&amp;fm=jpg&amp;ixid=M3wzMDAzMzh8MHwxfHNlYXJjaHw2fHxjb250YWluZXIlMjBzaGlwfGVufDB8fHx8MTczNzE5NzM1NHww&amp;ixlib=rb-4.0.3&amp;q=80&amp;w=1080 1272w, https://images.unsplash.com/photo-1634638022229-5a52221886dc?crop=entropy&amp;cs=tinysrgb&amp;fit=max&amp;fm=jpg&amp;ixid=M3wzMDAzMzh8MHwxfHNlYXJjaHw2fHxjb250YWluZXIlMjBzaGlwfGVufDB8fHx8MTczNzE5NzM1NHww&amp;ixlib=rb-4.0.3&amp;q=80&amp;w=1080 1456w" sizes="100vw"><img src="https://images.unsplash.com/photo-1634638022229-5a52221886dc?crop=entropy&amp;cs=tinysrgb&amp;fit=max&amp;fm=jpg&amp;ixid=M3wzMDAzMzh8MHwxfHNlYXJjaHw2fHxjb250YWluZXIlMjBzaGlwfGVufDB8fHx8MTczNzE5NzM1NHww&amp;ixlib=rb-4.0.3&amp;q=80&amp;w=1080" width="5912" height="3941" data-attrs="{&quot;src&quot;:&quot;https://images.unsplash.com/photo-1634638022229-5a52221886dc?crop=entropy&amp;cs=tinysrgb&amp;fit=max&amp;fm=jpg&amp;ixid=M3wzMDAzMzh8MHwxfHNlYXJjaHw2fHxjb250YWluZXIlMjBzaGlwfGVufDB8fHx8MTczNzE5NzM1NHww&amp;ixlib=rb-4.0.3&amp;q=80&amp;w=1080&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:3941,&quot;width&quot;:5912,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;a large cargo ship in a body of water&quot;,&quot;title&quot;:null,&quot;type&quot;:&quot;image/jpg&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="a large cargo ship in a body of water" title="a large cargo ship in a body of water" srcset="https://images.unsplash.com/photo-1634638022229-5a52221886dc?crop=entropy&amp;cs=tinysrgb&amp;fit=max&amp;fm=jpg&amp;ixid=M3wzMDAzMzh8MHwxfHNlYXJjaHw2fHxjb250YWluZXIlMjBzaGlwfGVufDB8fHx8MTczNzE5NzM1NHww&amp;ixlib=rb-4.0.3&amp;q=80&amp;w=1080 424w, https://images.unsplash.com/photo-1634638022229-5a52221886dc?crop=entropy&amp;cs=tinysrgb&amp;fit=max&amp;fm=jpg&amp;ixid=M3wzMDAzMzh8MHwxfHNlYXJjaHw2fHxjb250YWluZXIlMjBzaGlwfGVufDB8fHx8MTczNzE5NzM1NHww&amp;ixlib=rb-4.0.3&amp;q=80&amp;w=1080 848w, https://images.unsplash.com/photo-1634638022229-5a52221886dc?crop=entropy&amp;cs=tinysrgb&amp;fit=max&amp;fm=jpg&amp;ixid=M3wzMDAzMzh8MHwxfHNlYXJjaHw2fHxjb250YWluZXIlMjBzaGlwfGVufDB8fHx8MTczNzE5NzM1NHww&amp;ixlib=rb-4.0.3&amp;q=80&amp;w=1080 1272w, https://images.unsplash.com/photo-1634638022229-5a52221886dc?crop=entropy&amp;cs=tinysrgb&amp;fit=max&amp;fm=jpg&amp;ixid=M3wzMDAzMzh8MHwxfHNlYXJjaHw2fHxjb250YWluZXIlMjBzaGlwfGVufDB8fHx8MTczNzE5NzM1NHww&amp;ixlib=rb-4.0.3&amp;q=80&amp;w=1080 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><figcaption class="image-caption">Photo by <a href="true">Mika Baumeister</a> on <a href="https://unsplash.com">Unsplash</a></figcaption></figure></div><h2>The why of containers</h2><p>&#8220;It works on my machine, I&#8217;m not sure why it&#8217;s breaking in yours&#8221; is a problem that plagued developers for years. With the rise of agile, and quantifying developer&#8217;s productivity, it also became clear that such problems require solutions. If you cannot be sure that the software that runs on your machine will work on your fellow dev&#8217;s machine, you cannot be sure that it&#8217;ll work on production either. </p><p>This is one of the major problems that containers solved. Let&#8217;s understand this more. The problem of <strong>"it works on my machine"</strong> arises when an application behaves differently in different environments (e.g., development, testing, or production) due to discrepancies in dependencies, configurations, or operating system setups.</p><p>Containers effectively address this issue by providing a consistent and isolated runtime environment by </p><ol><li><p><strong>Encapsulating Dependencies</strong></p><p>Containers package all the dependencies (libraries, frameworks, configuration files, etc.) an application needs to run. This ensures the application behaves the same way regardless of where it's deployed, as the container runs with its bundled dependencies.</p></li><li><p><strong>Portability Across Platforms</strong></p><p>Containers abstract away the underlying infrastructure by providing a consistent runtime. Whether it's running on a developer's laptop, a testing server, or a production environment, the container ensures uniform behavior.</p></li><li><p><strong>Isolation</strong></p><p>Containers run in isolated environments, meaning they are unaffected by the host system's configuration or other applications running on the same host. This eliminates conflicts like mismatched library versions or environmental variables.</p></li><li><p><strong>Reproducibility</strong></p><p>Containers are built using <strong>Dockerfiles</strong> or equivalent configuration files, which describe the environment setup in a version-controlled and reproducible manner. Teams can rebuild containers identically at any time, ensuring consistency across environments.</p></li><li><p><strong>Simplified Onboarding</strong></p><p>New developers or team members don&#8217;t need to replicate complex environment setups. They can simply use the containerized application, ensuring they work with the exact same environment as everyone else.</p></li></ol><h2>What are containers</h2><p><strong>Containers</strong> are lightweight, standalone, and executable packages of software that include everything needed to run an application: the code, runtime, libraries, and system tools. They provide a consistent computing environment, making applications portable across different systems.</p><h3>What Containers do</h3><ol><li><p><strong>Encapsulation</strong>: Bundle applications and their dependencies together.</p></li><li><p><strong>Portability</strong>: Run consistently across various environments (development, testing, and production).</p></li><li><p><strong>Isolation</strong>: Ensure that one container doesn't affect others running on the same host.</p></li><li><p><strong>Efficiency</strong>: Use system resources effectively without the overhead of full virtualization (e.g., virtual machines).</p></li></ol><h3>What is Docker?</h3><div class="captioned-image-container"><figure><a class="image-link image2" target="_blank" href="https://substackcdn.com/image/fetch/$s_!Sfef!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa26ce745-c2be-4040-9b79-42e45138fee6_9726x2213.heic" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!Sfef!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa26ce745-c2be-4040-9b79-42e45138fee6_9726x2213.heic 424w, https://substackcdn.com/image/fetch/$s_!Sfef!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa26ce745-c2be-4040-9b79-42e45138fee6_9726x2213.heic 848w, https://substackcdn.com/image/fetch/$s_!Sfef!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa26ce745-c2be-4040-9b79-42e45138fee6_9726x2213.heic 1272w, https://substackcdn.com/image/fetch/$s_!Sfef!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa26ce745-c2be-4040-9b79-42e45138fee6_9726x2213.heic 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!Sfef!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa26ce745-c2be-4040-9b79-42e45138fee6_9726x2213.heic" width="1456" height="331" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/a26ce745-c2be-4040-9b79-42e45138fee6_9726x2213.heic&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:331,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:261806,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/heic&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_!Sfef!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa26ce745-c2be-4040-9b79-42e45138fee6_9726x2213.heic 424w, https://substackcdn.com/image/fetch/$s_!Sfef!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa26ce745-c2be-4040-9b79-42e45138fee6_9726x2213.heic 848w, https://substackcdn.com/image/fetch/$s_!Sfef!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa26ce745-c2be-4040-9b79-42e45138fee6_9726x2213.heic 1272w, https://substackcdn.com/image/fetch/$s_!Sfef!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa26ce745-c2be-4040-9b79-42e45138fee6_9726x2213.heic 1456w" sizes="100vw" loading="lazy"></picture><div></div></div></a></figure></div><p></p><p>Docker is <strong>one of the many</strong> ways of building and running containers. It is one of the most popular and widely adopted containerization platforms, there are several alternatives that can build, run, and manage containers. Each has its own strengths and use cases. The reason docker is the first thing, people think of when talking about containers is that for a very long time, docker was the most popular choice for working with containers.</p><p>Docker is a great platform and toolset for creating, deploying, and managing containers. It simplifies containerization by providing:</p><ul><li><p>A <strong>Dockerfile</strong> to define the container&#8217;s configuration.</p></li><li><p>A <strong>Docker Engine</strong> to build, run, and manage containers.</p></li><li><p>A <strong>Docker Hub</strong> for sharing and distributing container images.</p></li></ul><p>Let&#8217;s see how a Dockerfile looks like</p><pre><code># Use an official Python runtime as a parent image
FROM python:3.9-slim

# Set the working directory inside the container
WORKDIR /app

# Copy the current directory's contents into the container
COPY . /app

# Install the Python dependencies
RUN pip install --no-cache-dir -r requirements.txt

# Expose port 5000 for the application
EXPOSE 5000

# Command to run the application
CMD ["python", "app.py"]</code></pre><p>Let&#8217;s understand an overview of what this script is doing</p><ol><li><p><code>FROM</code>: Specifies the base image (e.g., <code>python:3.9-slim</code>) that the container will build upon.</p></li><li><p><code>WORKDIR</code>: Sets the working directory inside the container where commands will be executed.</p></li><li><p><code>COPY</code>: Copies files and directories from the host machine to the container.</p></li><li><p><code>RUN</code>: Executes a command during the build process, such as installing dependencies.</p></li><li><p><code>EXPOSE</code>: Declares the port on which the containerized application will listen.</p></li><li><p><code>CMD</code>: Defines the default command to run when the container starts, such as launching the application.</p></li></ol><p>Now that we&#8217;ve seen how a Dockerfile looks like, let&#8217;s see how to build an image and run it</p><h3>Building an image</h3><p><strong>Building a Docker image</strong> is the process of creating a container image by executing the instructions defined in a <code>Dockerfile</code>. The result is a self-contained package that includes the application, its dependencies, and any configurations needed to run it.</p><p>In our Dockerfile example above, the following commands in your shell will build and run the container </p><ol><li><p>Build the container </p><pre><code><code>docker build -t my-python-app .</code></code></pre><ol><li><p><code>-t my-python-app</code>: Tags the image with the name <code>my-python-app</code>.</p></li><li><p><code>.</code> Refers to the directory containing the <code>Dockerfile</code>.</p></li></ol></li><li><p>Run the container </p><pre><code><code>docker run -p 5000:5000 my-python-app</code></code></pre><ol><li><p><code>-p 5000:5000</code>: Maps port <code>5000</code> of the container to port <code>5000</code> on the host.</p></li><li><p><code>my-python-app</code>: The name of the image to run.</p></li></ol></li></ol><h3>Key things to remember</h3><ul><li><p>A Dockerfile is a script with instructions to build a container image.</p></li><li><p>Each instruction creates a new layer in the container, contributing to efficiency (layer caching).</p></li><li><p>It&#8217;s designed to be simple yet powerful, enabling consistent and reproducible environments.</p></li></ul><div><hr></div><h2>Kubernetes - Managing a ton of containers </h2><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!yhOe!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F36d85009-aeb8-4b20-a728-8d1df8476ff2_3600x3493.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!yhOe!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F36d85009-aeb8-4b20-a728-8d1df8476ff2_3600x3493.png 424w, https://substackcdn.com/image/fetch/$s_!yhOe!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F36d85009-aeb8-4b20-a728-8d1df8476ff2_3600x3493.png 848w, https://substackcdn.com/image/fetch/$s_!yhOe!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F36d85009-aeb8-4b20-a728-8d1df8476ff2_3600x3493.png 1272w, https://substackcdn.com/image/fetch/$s_!yhOe!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F36d85009-aeb8-4b20-a728-8d1df8476ff2_3600x3493.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!yhOe!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F36d85009-aeb8-4b20-a728-8d1df8476ff2_3600x3493.png" width="408" height="395.95054945054943" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/36d85009-aeb8-4b20-a728-8d1df8476ff2_3600x3493.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1413,&quot;width&quot;:1456,&quot;resizeWidth&quot;:408,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;logo.png&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="logo.png" title="logo.png" srcset="https://substackcdn.com/image/fetch/$s_!yhOe!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F36d85009-aeb8-4b20-a728-8d1df8476ff2_3600x3493.png 424w, https://substackcdn.com/image/fetch/$s_!yhOe!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F36d85009-aeb8-4b20-a728-8d1df8476ff2_3600x3493.png 848w, https://substackcdn.com/image/fetch/$s_!yhOe!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F36d85009-aeb8-4b20-a728-8d1df8476ff2_3600x3493.png 1272w, https://substackcdn.com/image/fetch/$s_!yhOe!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F36d85009-aeb8-4b20-a728-8d1df8476ff2_3600x3493.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>As systems scale, managing and deploying containers manually becomes challenging. You can have hundreds of containers running on hundreds of servers. There are some challenges that show up on scales like this</p><ol><li><p><strong>Orchestration difficulty</strong>: Applications often consist of multiple services (e.g., frontend, backend, database) running in many containers. Orchestrating these containers manually is cumbersome.</p></li><li><p><strong>Scaling</strong>: Handling variable workloads requires scaling containers up or down dynamically, which is difficult to do without automation.</p></li><li><p><strong>Availability</strong>: Ensuring that applications are always running, even if some containers or nodes fail, requires self-healing capabilities.</p></li><li><p><strong>Load Balancing</strong>: Distributing traffic effectively across multiple instances of a service ensures reliability and efficiency.</p></li><li><p><strong>Deployments</strong>: Rolling updates, canary deployments, and rollbacks are difficult to manage manually.</p></li></ol><p>If <strong>Docker</strong> is the tool used to create and run containers, <strong>Kubernetes</strong> is the system that orchestrates and manages those containers at scale. Here&#8217;s a metaphor and a more technical explanation to clarify their relationship:</p><h4>Containers vs. Kubernetes</h4><ul><li><p><strong>Docker (Containers)</strong>: Imagine containers as individual delivery trucks. Each truck is self-contained, carrying specific goods (an application and its dependencies). Docker is the tool that builds, loads, and drives these trucks.</p></li><li><p><strong>Kubernetes (Orchestrator)</strong>: Now imagine you manage a large logistics company with thousands of delivery trucks. Kubernetes is the system that plans routes, monitors truck conditions, schedules deliveries, ensures trucks aren&#8217;t idle, and reroutes trucks when one breaks down.</p></li></ul><p>While Docker focuses on managing single containers, <strong>Kubernetes coordinates how all containers work together across multiple machines</strong>.</p><p><strong>With Docker alone</strong>:</p><ul><li><p>You manually start containers, stop them, and figure out how to connect them.</p></li><li><p>You&#8217;re responsible for scaling and handling failures.</p></li></ul><p><strong>With Kubernetes</strong>:</p><ul><li><p>You define the system&#8217;s desired state (e.g., "run 5 instances of my app and scale if CPU usage exceeds 70%").</p></li><li><p>Kubernetes handles starting, scaling, load balancing, and restarting containers automatically.</p></li></ul><p>Let&#8217;s get a bit more technical about Kubernetes </p><h3>How Kubernetes Works</h3><p>At its core, Kubernetes uses a <strong>cluster-based architecture</strong>. There is a master node and worker nodes, with their own sets of responsibilities</p><ol><li><p><strong>Master Node (Control Plane)</strong>:</p><ol><li><p>Responsible for managing the cluster, scheduling workloads, and maintaining the desired state.</p></li><li><p>Key components:</p><ul><li><p><strong>API Server</strong>: Central communication point between users and the cluster.</p></li><li><p><strong>Scheduler</strong>: Assigns workloads to worker nodes.</p></li><li><p><strong>Controller Manager</strong>: Ensures the cluster matches the desired state.</p></li><li><p><strong>etcd</strong>: Stores all cluster data persistently.</p></li></ul></li></ol></li><li><p><strong>Worker Nodes</strong>:</p><ol><li><p>Run the actual containerized applications.</p></li><li><p>Key components:</p><ul><li><p><strong>Kubelet</strong>: Ensures containers are running as instructed by the control plane.</p></li><li><p><strong>Kube-proxy</strong>: Manages networking and forwarding of requests to the correct containers.</p></li><li><p><strong>Container Runtime</strong>: Runs containers (e.g., Docker, containerd).</p></li></ul></li></ol></li></ol><h4><strong>Key Kubernetes Abstractions</strong></h4><ol><li><p><strong>Pods</strong>: The smallest deployable unit in Kubernetes, typically running one or more tightly coupled containers.</p></li><li><p><strong>Services</strong>: Abstracts access to a group of pods, providing load balancing and stable networking.</p></li><li><p><strong>Deployments</strong>: Manages the deployment and scaling of pods, ensuring the desired number of replicas are running.</p></li><li><p><strong>Namespaces</strong>: Logical partitions within a cluster to separate resources and workloads.</p></li><li><p><strong>ConfigMaps and Secrets</strong>: Manage application configuration and sensitive data securely.</p></li></ol><h4><strong>Workflow</strong></h4><p><strong>Declarative Configuration</strong>: You define the desired state of your application (e.g., run 3 replicas of a web server) in YAML or JSON.</p><ul><li><p><strong>Control Plane Actions</strong>:</p><ol><li><p>The API server processes the configuration and stores it in <code>etcd</code>.</p></li><li><p>The scheduler assigns pods to suitable worker nodes.</p></li><li><p>The kubelet on each worker node ensures containers are running.</p></li></ol></li><li><p><strong>Dynamic Adjustments</strong>:</p><ul><li><p>Kubernetes monitors the system and adjusts the cluster automatically, such as scaling pods up or down based on CPU usage.</p></li></ul></li></ul><p>Here&#8217;s a diagram to understand this process easily</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!mGm6!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1f9263e0-60c3-4279-9882-0cb03bd02e39_3504x3840.heic" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!mGm6!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1f9263e0-60c3-4279-9882-0cb03bd02e39_3504x3840.heic 424w, https://substackcdn.com/image/fetch/$s_!mGm6!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1f9263e0-60c3-4279-9882-0cb03bd02e39_3504x3840.heic 848w, https://substackcdn.com/image/fetch/$s_!mGm6!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1f9263e0-60c3-4279-9882-0cb03bd02e39_3504x3840.heic 1272w, https://substackcdn.com/image/fetch/$s_!mGm6!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1f9263e0-60c3-4279-9882-0cb03bd02e39_3504x3840.heic 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!mGm6!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1f9263e0-60c3-4279-9882-0cb03bd02e39_3504x3840.heic" width="1456" height="1596" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/1f9263e0-60c3-4279-9882-0cb03bd02e39_3504x3840.heic&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1596,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:176209,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/heic&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_!mGm6!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1f9263e0-60c3-4279-9882-0cb03bd02e39_3504x3840.heic 424w, https://substackcdn.com/image/fetch/$s_!mGm6!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1f9263e0-60c3-4279-9882-0cb03bd02e39_3504x3840.heic 848w, https://substackcdn.com/image/fetch/$s_!mGm6!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1f9263e0-60c3-4279-9882-0cb03bd02e39_3504x3840.heic 1272w, https://substackcdn.com/image/fetch/$s_!mGm6!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1f9263e0-60c3-4279-9882-0cb03bd02e39_3504x3840.heic 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><h2>Managed Kubernetes</h2><p>Managed Kubernetes services provided by major cloud providers, such as Managed Kubernetes services provided by major cloud providers, such as <strong>Azure</strong>, <strong>AWS</strong>, and <strong>Google Cloud</strong>, offer fully managed, scalable, and secure Kubernetes clusters to simplify container orchestration.</p><ul><li><p><strong>Azure Kubernetes Service (<a href="https://azure.microsoft.com/en-us/products/kubernetes-service">AKS</a>)</strong>: Azure's managed Kubernetes service provides a simple, fast, and secure way to deploy and manage Kubernetes clusters. It handles tasks such as automated patching, scaling, and high availability, while allowing users to focus on application deployment and management. AKS integrates seamlessly with other Azure services, offering built-in monitoring, logging, and identity management through Azure Active Directory.</p></li><li><p><strong>Amazon Elastic Kubernetes Service (<a href="https://aws.amazon.com/eks/">EKS</a>)</strong>: AWS&#8217;s EKS is a highly available and scalable service that takes care of cluster management, including provisioning, patching, and scaling. EKS supports a wide range of integrations with AWS services such as IAM, CloudWatch, and Route 53, offering enhanced security and observability. It also ensures the control plane is automatically managed and fully resilient.</p></li><li><p><strong>Google Kubernetes Engine (<a href="https://cloud.google.com/kubernetes-engine?hl=en">GKE</a>)</strong>: GKE is known for its seamless integration with Google Cloud services and its native support for Google&#8217;s deep Kubernetes expertise. GKE automates key aspects such as updates, scaling, and monitoring. It also integrates with Google&#8217;s advanced AI/ML tools, making it a strong choice for developers building modern, cloud-native applications.</p></li></ul><p>All these services reduce the operational overhead of Kubernetes management, allowing developers to focus more on application development rather than cluster administration. They provide features like automatic scaling, high availability, and integration with the cloud provider's ecosystem, helping businesses achieve faster deployment and improved efficiency.</p><p>Now you know quite a bit about containers and their orchestration. In an upcoming article, I&#8217;ll be sharing a playground for you to experiment with these and gain a hands on experience without setting anything up on your computer. Till then, I hope you enjoyed reading this one. Have a wonderful day!</p><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://compute.anshaj.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 Compute - A programming blog! Subscribe for free to receive new posts and learn something new in computation.</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[Github Actions - a great introduction into CI/CD]]></title><description><![CDATA[Learn about one of the most important parts of DevOps in under 10 minutes]]></description><link>https://compute.anshaj.dev/p/learn-cicd-with-github-actions</link><guid isPermaLink="false">https://compute.anshaj.dev/p/learn-cicd-with-github-actions</guid><dc:creator><![CDATA[Anshaj]]></dc:creator><pubDate>Sun, 17 Nov 2024 14:55:17 GMT</pubDate><enclosure url="https://images.unsplash.com/photo-1414912925664-0c502cc25dde?crop=entropy&amp;cs=tinysrgb&amp;fit=max&amp;fm=jpg&amp;ixid=M3wzMDAzMzh8MHwxfHNlYXJjaHw4fHxob3Jpem9ufGVufDB8fHx8MTczMTA3MTU1Nnww&amp;ixlib=rb-4.0.3&amp;q=80&amp;w=1080" length="0" type="image/jpeg"/><content:encoded><![CDATA[<div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://images.unsplash.com/photo-1414912925664-0c502cc25dde?crop=entropy&amp;cs=tinysrgb&amp;fit=max&amp;fm=jpg&amp;ixid=M3wzMDAzMzh8MHwxfHNlYXJjaHw4fHxob3Jpem9ufGVufDB8fHx8MTczMTA3MTU1Nnww&amp;ixlib=rb-4.0.3&amp;q=80&amp;w=1080" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://images.unsplash.com/photo-1414912925664-0c502cc25dde?crop=entropy&amp;cs=tinysrgb&amp;fit=max&amp;fm=jpg&amp;ixid=M3wzMDAzMzh8MHwxfHNlYXJjaHw4fHxob3Jpem9ufGVufDB8fHx8MTczMTA3MTU1Nnww&amp;ixlib=rb-4.0.3&amp;q=80&amp;w=1080 424w, https://images.unsplash.com/photo-1414912925664-0c502cc25dde?crop=entropy&amp;cs=tinysrgb&amp;fit=max&amp;fm=jpg&amp;ixid=M3wzMDAzMzh8MHwxfHNlYXJjaHw4fHxob3Jpem9ufGVufDB8fHx8MTczMTA3MTU1Nnww&amp;ixlib=rb-4.0.3&amp;q=80&amp;w=1080 848w, https://images.unsplash.com/photo-1414912925664-0c502cc25dde?crop=entropy&amp;cs=tinysrgb&amp;fit=max&amp;fm=jpg&amp;ixid=M3wzMDAzMzh8MHwxfHNlYXJjaHw4fHxob3Jpem9ufGVufDB8fHx8MTczMTA3MTU1Nnww&amp;ixlib=rb-4.0.3&amp;q=80&amp;w=1080 1272w, https://images.unsplash.com/photo-1414912925664-0c502cc25dde?crop=entropy&amp;cs=tinysrgb&amp;fit=max&amp;fm=jpg&amp;ixid=M3wzMDAzMzh8MHwxfHNlYXJjaHw4fHxob3Jpem9ufGVufDB8fHx8MTczMTA3MTU1Nnww&amp;ixlib=rb-4.0.3&amp;q=80&amp;w=1080 1456w" sizes="100vw"><img src="https://images.unsplash.com/photo-1414912925664-0c502cc25dde?crop=entropy&amp;cs=tinysrgb&amp;fit=max&amp;fm=jpg&amp;ixid=M3wzMDAzMzh8MHwxfHNlYXJjaHw4fHxob3Jpem9ufGVufDB8fHx8MTczMTA3MTU1Nnww&amp;ixlib=rb-4.0.3&amp;q=80&amp;w=1080" width="7200" height="4800" data-attrs="{&quot;src&quot;:&quot;https://images.unsplash.com/photo-1414912925664-0c502cc25dde?crop=entropy&amp;cs=tinysrgb&amp;fit=max&amp;fm=jpg&amp;ixid=M3wzMDAzMzh8MHwxfHNlYXJjaHw4fHxob3Jpem9ufGVufDB8fHx8MTczMTA3MTU1Nnww&amp;ixlib=rb-4.0.3&amp;q=80&amp;w=1080&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:4800,&quot;width&quot;:7200,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;silhouette of bird flying during sunset&quot;,&quot;title&quot;:null,&quot;type&quot;:&quot;image/jpg&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="silhouette of bird flying during sunset" title="silhouette of bird flying during sunset" srcset="https://images.unsplash.com/photo-1414912925664-0c502cc25dde?crop=entropy&amp;cs=tinysrgb&amp;fit=max&amp;fm=jpg&amp;ixid=M3wzMDAzMzh8MHwxfHNlYXJjaHw4fHxob3Jpem9ufGVufDB8fHx8MTczMTA3MTU1Nnww&amp;ixlib=rb-4.0.3&amp;q=80&amp;w=1080 424w, https://images.unsplash.com/photo-1414912925664-0c502cc25dde?crop=entropy&amp;cs=tinysrgb&amp;fit=max&amp;fm=jpg&amp;ixid=M3wzMDAzMzh8MHwxfHNlYXJjaHw4fHxob3Jpem9ufGVufDB8fHx8MTczMTA3MTU1Nnww&amp;ixlib=rb-4.0.3&amp;q=80&amp;w=1080 848w, https://images.unsplash.com/photo-1414912925664-0c502cc25dde?crop=entropy&amp;cs=tinysrgb&amp;fit=max&amp;fm=jpg&amp;ixid=M3wzMDAzMzh8MHwxfHNlYXJjaHw4fHxob3Jpem9ufGVufDB8fHx8MTczMTA3MTU1Nnww&amp;ixlib=rb-4.0.3&amp;q=80&amp;w=1080 1272w, https://images.unsplash.com/photo-1414912925664-0c502cc25dde?crop=entropy&amp;cs=tinysrgb&amp;fit=max&amp;fm=jpg&amp;ixid=M3wzMDAzMzh8MHwxfHNlYXJjaHw4fHxob3Jpem9ufGVufDB8fHx8MTczMTA3MTU1Nnww&amp;ixlib=rb-4.0.3&amp;q=80&amp;w=1080 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><figcaption class="image-caption">Photo by <a href="true">Tim Mossholder</a> on <a href="https://unsplash.com">Unsplash</a></figcaption></figure></div><h2>What is CI/CD?</h2><p>CI (Continuous Integration) and CD (Continuous Delivery/Continuous Deployment) are practices within DevOps aimed at automating and streamlining the software development lifecycle to improve speed, quality, and consistency.</p><h3>Continuous Integration </h3><p>Continuous Integration is a development practice where developers frequently integrate their code changes into a shared repository, often several times a day. Each integration is <strong>automatically tested and validated</strong> through a series of automated tests to detect errors early. This approach allows for quicker detection and resolution of integration issues, which helps maintain code quality.</p><h3>Continuous Delivery</h3><p>Continuous Delivery is the practice of automatically <strong>preparing code changes for release</strong> to production. With CD, the codebase is always in a deployable state, allowing teams to release updates reliably and more frequently.</p><h3>Continuous Deployment </h3><p>Continuous Deployment is the next step after Continuous Delivery. Here, every code change that passes automated testing is <strong>automatically deployed to production</strong> without human intervention. Continuous Deployment allows for faster feedback and iterative improvement but requires very high test coverage and automation.</p><p>The classic cycle of pushing code looks like </p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!Rhe1!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F92740aec-c13d-4a6e-9f43-98e498badafb_1171x1953.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!Rhe1!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F92740aec-c13d-4a6e-9f43-98e498badafb_1171x1953.png 424w, https://substackcdn.com/image/fetch/$s_!Rhe1!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F92740aec-c13d-4a6e-9f43-98e498badafb_1171x1953.png 848w, https://substackcdn.com/image/fetch/$s_!Rhe1!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F92740aec-c13d-4a6e-9f43-98e498badafb_1171x1953.png 1272w, https://substackcdn.com/image/fetch/$s_!Rhe1!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F92740aec-c13d-4a6e-9f43-98e498badafb_1171x1953.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!Rhe1!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F92740aec-c13d-4a6e-9f43-98e498badafb_1171x1953.png" width="1171" height="1953" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/92740aec-c13d-4a6e-9f43-98e498badafb_1171x1953.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1953,&quot;width&quot;:1171,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:292975,&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_!Rhe1!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F92740aec-c13d-4a6e-9f43-98e498badafb_1171x1953.png 424w, https://substackcdn.com/image/fetch/$s_!Rhe1!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F92740aec-c13d-4a6e-9f43-98e498badafb_1171x1953.png 848w, https://substackcdn.com/image/fetch/$s_!Rhe1!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F92740aec-c13d-4a6e-9f43-98e498badafb_1171x1953.png 1272w, https://substackcdn.com/image/fetch/$s_!Rhe1!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F92740aec-c13d-4a6e-9f43-98e498badafb_1171x1953.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><h1>Github Actions</h1><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!uYw4!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F27cad3bf-5745-4a1b-8237-987fbbbb7242_2496x1322.bin" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!uYw4!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F27cad3bf-5745-4a1b-8237-987fbbbb7242_2496x1322.bin 424w, https://substackcdn.com/image/fetch/$s_!uYw4!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F27cad3bf-5745-4a1b-8237-987fbbbb7242_2496x1322.bin 848w, https://substackcdn.com/image/fetch/$s_!uYw4!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F27cad3bf-5745-4a1b-8237-987fbbbb7242_2496x1322.bin 1272w, https://substackcdn.com/image/fetch/$s_!uYw4!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F27cad3bf-5745-4a1b-8237-987fbbbb7242_2496x1322.bin 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!uYw4!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F27cad3bf-5745-4a1b-8237-987fbbbb7242_2496x1322.bin" width="1456" height="771" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/27cad3bf-5745-4a1b-8237-987fbbbb7242_2496x1322.bin&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:771,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;Screenshot of a GitHub Actions workflow titled 'matrix-build-deploy.yml' displaying a pipeline with three stages: Build, Test, and Publish. The Build stage has completed successfully in 1 minute and 42 seconds. The Test stage includes builds for Linux, macOS, and Windows, all of which have also completed successfully with their respective durations. The final stage, Publish, shows that the publishing steps for Linux, macOS, and Windows are pending and waiting for approval. The background features a gradient transitioning from green to blue.&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="Screenshot of a GitHub Actions workflow titled 'matrix-build-deploy.yml' displaying a pipeline with three stages: Build, Test, and Publish. The Build stage has completed successfully in 1 minute and 42 seconds. The Test stage includes builds for Linux, macOS, and Windows, all of which have also completed successfully with their respective durations. The final stage, Publish, shows that the publishing steps for Linux, macOS, and Windows are pending and waiting for approval. The background features a gradient transitioning from green to blue." title="Screenshot of a GitHub Actions workflow titled 'matrix-build-deploy.yml' displaying a pipeline with three stages: Build, Test, and Publish. The Build stage has completed successfully in 1 minute and 42 seconds. The Test stage includes builds for Linux, macOS, and Windows, all of which have also completed successfully with their respective durations. The final stage, Publish, shows that the publishing steps for Linux, macOS, and Windows are pending and waiting for approval. The background features a gradient transitioning from green to blue." srcset="https://substackcdn.com/image/fetch/$s_!uYw4!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F27cad3bf-5745-4a1b-8237-987fbbbb7242_2496x1322.bin 424w, https://substackcdn.com/image/fetch/$s_!uYw4!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F27cad3bf-5745-4a1b-8237-987fbbbb7242_2496x1322.bin 848w, https://substackcdn.com/image/fetch/$s_!uYw4!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F27cad3bf-5745-4a1b-8237-987fbbbb7242_2496x1322.bin 1272w, https://substackcdn.com/image/fetch/$s_!uYw4!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F27cad3bf-5745-4a1b-8237-987fbbbb7242_2496x1322.bin 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">Demonstration image for Github Actions</figcaption></figure></div><p>GitHub Actions is a powerful tool for automating tasks and workflows directly within GitHub. It's integrated into the GitHub platform and is primarily used for Continuous Integration (CI) and Continuous Deployment (CD), though its capabilities go far beyond that.</p><h2>Key features of Github Actions</h2><ol><li><p><strong>Automate your workflows</strong>: Automate software development workflows like testing, building, and deploying code.</p></li><li><p><strong>Event driven workflows</strong>: Trigger workflows based on GitHub events, such as pushes, pull requests, releases, or even at scheduled times.</p></li><li><p><strong>Customize to your liking</strong>: Define workflows using YAML files in a <code>.github/workflows</code> directory within a repository.</p></li><li><p><strong>Reuse and save time</strong>: Create or use existing actions shared by the community to simplify workflow design.</p></li><li><p><strong>Matrix Builds</strong>: Run jobs in parallel for multiple combinations of environments, dependencies, or configurations.</p></li><li><p><strong>Manage secrets safely</strong>: Securely store and use sensitive information like API keys and credentials.</p></li><li><p><strong>Built-in Logs</strong>: Access detailed logs for debugging and performance analysis.</p></li></ol><div class="pullquote"><p>Github Actions is a great solution to make things happen on a specific schedule or when changes are made to your code. This can involve sending messages, enforcing rules on the pull requests, performing tests, building and releasing code just to name a few.</p></div><h2>Structure of Github actions workflow</h2><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!25ed!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F30a270ed-dd84-4158-bd78-77686534c3e7_3840x1778.heic" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!25ed!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F30a270ed-dd84-4158-bd78-77686534c3e7_3840x1778.heic 424w, https://substackcdn.com/image/fetch/$s_!25ed!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F30a270ed-dd84-4158-bd78-77686534c3e7_3840x1778.heic 848w, https://substackcdn.com/image/fetch/$s_!25ed!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F30a270ed-dd84-4158-bd78-77686534c3e7_3840x1778.heic 1272w, https://substackcdn.com/image/fetch/$s_!25ed!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F30a270ed-dd84-4158-bd78-77686534c3e7_3840x1778.heic 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!25ed!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F30a270ed-dd84-4158-bd78-77686534c3e7_3840x1778.heic" width="728" height="337" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/30a270ed-dd84-4158-bd78-77686534c3e7_3840x1778.heic&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:false,&quot;imageSize&quot;:&quot;normal&quot;,&quot;height&quot;:674,&quot;width&quot;:1456,&quot;resizeWidth&quot;:728,&quot;bytes&quot;:86676,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/heic&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_!25ed!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F30a270ed-dd84-4158-bd78-77686534c3e7_3840x1778.heic 424w, https://substackcdn.com/image/fetch/$s_!25ed!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F30a270ed-dd84-4158-bd78-77686534c3e7_3840x1778.heic 848w, https://substackcdn.com/image/fetch/$s_!25ed!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F30a270ed-dd84-4158-bd78-77686534c3e7_3840x1778.heic 1272w, https://substackcdn.com/image/fetch/$s_!25ed!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F30a270ed-dd84-4158-bd78-77686534c3e7_3840x1778.heic 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">Components of a Github action workflow</figcaption></figure></div><p>A workflow is defined in a <strong><a href="https://en.wikipedia.org/wiki/YAML">YAML</a></strong> file and consists of the following parts:</p><ul><li><p><strong>Name</strong>: Optional, used for identifying the workflow.</p></li><li><p><strong>Trigger</strong>: Defines when the workflow should run (e.g., <code>push</code>, <code>pull_request</code>, or <code>schedule</code>).</p></li><li><p><strong>Jobs</strong>: Workflows consist of one or more jobs that run in parallel or sequentially.</p></li><li><p><strong>Steps</strong>: Each job has multiple steps, which include actions or shell commands.</p></li></ul><p>Here&#8217;s an example of a very basic Github Action workflow </p><pre><code># .github/workflows/basic-workflow.yml
name: Basic Workflow

on:
  push:
    branches:
      - main

jobs:
  build:
    runs-on: ubuntu-latest

    steps:
      - name: Checkout Code
        uses: actions/checkout@v3

      - name: Print Hello World
        run: echo "Hello, World!"</code></pre><h2>Let&#8217;s play with Github Actions</h2><p>I&#8217;ve created a template repository to make it easy for you to play and experiment with Github actions. Just navigate to <a href="https://github.com/anshajk/learn-github-actions">this template repository on Github</a> and select the button on the top right that says, &#8220;Use this template&#8221; and then select &#8220;Create a new repository&#8221;</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!AnOq!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4e2eeea1-3200-420e-8690-090c91d4b311_2754x1482.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!AnOq!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4e2eeea1-3200-420e-8690-090c91d4b311_2754x1482.png 424w, https://substackcdn.com/image/fetch/$s_!AnOq!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4e2eeea1-3200-420e-8690-090c91d4b311_2754x1482.png 848w, https://substackcdn.com/image/fetch/$s_!AnOq!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4e2eeea1-3200-420e-8690-090c91d4b311_2754x1482.png 1272w, https://substackcdn.com/image/fetch/$s_!AnOq!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4e2eeea1-3200-420e-8690-090c91d4b311_2754x1482.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!AnOq!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4e2eeea1-3200-420e-8690-090c91d4b311_2754x1482.png" width="1456" height="784" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/4e2eeea1-3200-420e-8690-090c91d4b311_2754x1482.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:784,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:447544,&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_!AnOq!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4e2eeea1-3200-420e-8690-090c91d4b311_2754x1482.png 424w, https://substackcdn.com/image/fetch/$s_!AnOq!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4e2eeea1-3200-420e-8690-090c91d4b311_2754x1482.png 848w, https://substackcdn.com/image/fetch/$s_!AnOq!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4e2eeea1-3200-420e-8690-090c91d4b311_2754x1482.png 1272w, https://substackcdn.com/image/fetch/$s_!AnOq!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4e2eeea1-3200-420e-8690-090c91d4b311_2754x1482.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>Provide a name for your repository like how I do it in the screenshot below and then create your repository.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!Uz6k!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7f6d97c2-8303-4f0b-8927-c1f846380c6d_1886x1372.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!Uz6k!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7f6d97c2-8303-4f0b-8927-c1f846380c6d_1886x1372.png 424w, https://substackcdn.com/image/fetch/$s_!Uz6k!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7f6d97c2-8303-4f0b-8927-c1f846380c6d_1886x1372.png 848w, https://substackcdn.com/image/fetch/$s_!Uz6k!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7f6d97c2-8303-4f0b-8927-c1f846380c6d_1886x1372.png 1272w, https://substackcdn.com/image/fetch/$s_!Uz6k!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7f6d97c2-8303-4f0b-8927-c1f846380c6d_1886x1372.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!Uz6k!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7f6d97c2-8303-4f0b-8927-c1f846380c6d_1886x1372.png" width="1456" height="1059" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/7f6d97c2-8303-4f0b-8927-c1f846380c6d_1886x1372.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1059,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:275876,&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_!Uz6k!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7f6d97c2-8303-4f0b-8927-c1f846380c6d_1886x1372.png 424w, https://substackcdn.com/image/fetch/$s_!Uz6k!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7f6d97c2-8303-4f0b-8927-c1f846380c6d_1886x1372.png 848w, https://substackcdn.com/image/fetch/$s_!Uz6k!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7f6d97c2-8303-4f0b-8927-c1f846380c6d_1886x1372.png 1272w, https://substackcdn.com/image/fetch/$s_!Uz6k!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7f6d97c2-8303-4f0b-8927-c1f846380c6d_1886x1372.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>A few seconds after creating your repository, refresh your browser and you should see a green tick, denoting the first run of your Github action</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!dLen!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2907fa54-5869-4460-9b81-85030a8b72ab_2642x1296.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!dLen!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2907fa54-5869-4460-9b81-85030a8b72ab_2642x1296.png 424w, https://substackcdn.com/image/fetch/$s_!dLen!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2907fa54-5869-4460-9b81-85030a8b72ab_2642x1296.png 848w, https://substackcdn.com/image/fetch/$s_!dLen!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2907fa54-5869-4460-9b81-85030a8b72ab_2642x1296.png 1272w, https://substackcdn.com/image/fetch/$s_!dLen!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2907fa54-5869-4460-9b81-85030a8b72ab_2642x1296.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!dLen!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2907fa54-5869-4460-9b81-85030a8b72ab_2642x1296.png" width="1456" height="714" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/2907fa54-5869-4460-9b81-85030a8b72ab_2642x1296.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:714,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:327306,&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_!dLen!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2907fa54-5869-4460-9b81-85030a8b72ab_2642x1296.png 424w, https://substackcdn.com/image/fetch/$s_!dLen!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2907fa54-5869-4460-9b81-85030a8b72ab_2642x1296.png 848w, https://substackcdn.com/image/fetch/$s_!dLen!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2907fa54-5869-4460-9b81-85030a8b72ab_2642x1296.png 1272w, https://substackcdn.com/image/fetch/$s_!dLen!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2907fa54-5869-4460-9b81-85030a8b72ab_2642x1296.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>Navigate to the actions tab in your newly created repository and you&#8217;ll see the full details of the run of your workflow. </p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!amCp!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F57c88a96-17f9-472e-9f0c-f3e9fb88e5c4_2846x918.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!amCp!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F57c88a96-17f9-472e-9f0c-f3e9fb88e5c4_2846x918.png 424w, https://substackcdn.com/image/fetch/$s_!amCp!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F57c88a96-17f9-472e-9f0c-f3e9fb88e5c4_2846x918.png 848w, https://substackcdn.com/image/fetch/$s_!amCp!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F57c88a96-17f9-472e-9f0c-f3e9fb88e5c4_2846x918.png 1272w, https://substackcdn.com/image/fetch/$s_!amCp!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F57c88a96-17f9-472e-9f0c-f3e9fb88e5c4_2846x918.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!amCp!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F57c88a96-17f9-472e-9f0c-f3e9fb88e5c4_2846x918.png" width="1456" height="470" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/57c88a96-17f9-472e-9f0c-f3e9fb88e5c4_2846x918.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:470,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:213536,&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_!amCp!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F57c88a96-17f9-472e-9f0c-f3e9fb88e5c4_2846x918.png 424w, https://substackcdn.com/image/fetch/$s_!amCp!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F57c88a96-17f9-472e-9f0c-f3e9fb88e5c4_2846x918.png 848w, https://substackcdn.com/image/fetch/$s_!amCp!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F57c88a96-17f9-472e-9f0c-f3e9fb88e5c4_2846x918.png 1272w, https://substackcdn.com/image/fetch/$s_!amCp!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F57c88a96-17f9-472e-9f0c-f3e9fb88e5c4_2846x918.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>Once you navigate into the details of your workflow run, you&#8217;ll find that some basic echo commands were called from your runtime, like in the screenshot below. This is because the repository that I&#8217;ve provided to you as a template, contains a basic workflow, the purpose of which is to print &#8220;Hello world&#8221; and run a multi-line script.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!ntjc!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F483f72c8-7d62-4564-a3e4-1f9e6460fe92_2840x1280.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!ntjc!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F483f72c8-7d62-4564-a3e4-1f9e6460fe92_2840x1280.png 424w, https://substackcdn.com/image/fetch/$s_!ntjc!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F483f72c8-7d62-4564-a3e4-1f9e6460fe92_2840x1280.png 848w, https://substackcdn.com/image/fetch/$s_!ntjc!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F483f72c8-7d62-4564-a3e4-1f9e6460fe92_2840x1280.png 1272w, https://substackcdn.com/image/fetch/$s_!ntjc!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F483f72c8-7d62-4564-a3e4-1f9e6460fe92_2840x1280.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!ntjc!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F483f72c8-7d62-4564-a3e4-1f9e6460fe92_2840x1280.png" width="1456" height="656" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/483f72c8-7d62-4564-a3e4-1f9e6460fe92_2840x1280.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:656,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:229261,&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_!ntjc!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F483f72c8-7d62-4564-a3e4-1f9e6460fe92_2840x1280.png 424w, https://substackcdn.com/image/fetch/$s_!ntjc!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F483f72c8-7d62-4564-a3e4-1f9e6460fe92_2840x1280.png 848w, https://substackcdn.com/image/fetch/$s_!ntjc!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F483f72c8-7d62-4564-a3e4-1f9e6460fe92_2840x1280.png 1272w, https://substackcdn.com/image/fetch/$s_!ntjc!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F483f72c8-7d62-4564-a3e4-1f9e6460fe92_2840x1280.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>If you&#8217;d like to change and experiment with this workflow, just edit the workflow file for the Github actions and experiment away</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!tWXG!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F941821ac-c7f4-4812-97d6-84c7fda7a42a_2864x1586.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!tWXG!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F941821ac-c7f4-4812-97d6-84c7fda7a42a_2864x1586.png 424w, https://substackcdn.com/image/fetch/$s_!tWXG!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F941821ac-c7f4-4812-97d6-84c7fda7a42a_2864x1586.png 848w, https://substackcdn.com/image/fetch/$s_!tWXG!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F941821ac-c7f4-4812-97d6-84c7fda7a42a_2864x1586.png 1272w, https://substackcdn.com/image/fetch/$s_!tWXG!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F941821ac-c7f4-4812-97d6-84c7fda7a42a_2864x1586.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!tWXG!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F941821ac-c7f4-4812-97d6-84c7fda7a42a_2864x1586.png" width="1456" height="806" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/941821ac-c7f4-4812-97d6-84c7fda7a42a_2864x1586.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:806,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:379788,&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_!tWXG!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F941821ac-c7f4-4812-97d6-84c7fda7a42a_2864x1586.png 424w, https://substackcdn.com/image/fetch/$s_!tWXG!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F941821ac-c7f4-4812-97d6-84c7fda7a42a_2864x1586.png 848w, https://substackcdn.com/image/fetch/$s_!tWXG!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F941821ac-c7f4-4812-97d6-84c7fda7a42a_2864x1586.png 1272w, https://substackcdn.com/image/fetch/$s_!tWXG!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F941821ac-c7f4-4812-97d6-84c7fda7a42a_2864x1586.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>Now that you have access to a runtime, setting up builds and releases is simply a matter of adding the right jobs and the right dependencies. Feel free to modify this script to your liking and try building some source code in the language of your choice in your newly created repository. Good luck!</p><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://compute.anshaj.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 Compute - A programming blog! Subscribe for free to receive new posts and learn more about modern computation.</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[Hasura - Effortless unified API on all your data]]></title><description><![CDATA[How to ship a rock-solid API on your data &#8211; in minutes]]></description><link>https://compute.anshaj.dev/p/hasura-effortless-unified-api-on</link><guid isPermaLink="false">https://compute.anshaj.dev/p/hasura-effortless-unified-api-on</guid><dc:creator><![CDATA[Anshaj]]></dc:creator><pubDate>Fri, 08 Nov 2024 18:59:10 GMT</pubDate><enclosure url="https://images.unsplash.com/photo-1542640244-7e672d6cef4e?crop=entropy&amp;cs=tinysrgb&amp;fit=max&amp;fm=jpg&amp;ixid=M3wzMDAzMzh8MHwxfHNlYXJjaHwyNXx8amFwYW58ZW58MHx8fHwxNzMwNTMxNjI4fDA&amp;ixlib=rb-4.0.3&amp;q=80&amp;w=1080" length="0" type="image/jpeg"/><content:encoded><![CDATA[<div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://images.unsplash.com/photo-1542640244-7e672d6cef4e?crop=entropy&amp;cs=tinysrgb&amp;fit=max&amp;fm=jpg&amp;ixid=M3wzMDAzMzh8MHwxfHNlYXJjaHwyNXx8amFwYW58ZW58MHx8fHwxNzMwNTMxNjI4fDA&amp;ixlib=rb-4.0.3&amp;q=80&amp;w=1080" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://images.unsplash.com/photo-1542640244-7e672d6cef4e?crop=entropy&amp;cs=tinysrgb&amp;fit=max&amp;fm=jpg&amp;ixid=M3wzMDAzMzh8MHwxfHNlYXJjaHwyNXx8amFwYW58ZW58MHx8fHwxNzMwNTMxNjI4fDA&amp;ixlib=rb-4.0.3&amp;q=80&amp;w=1080 424w, https://images.unsplash.com/photo-1542640244-7e672d6cef4e?crop=entropy&amp;cs=tinysrgb&amp;fit=max&amp;fm=jpg&amp;ixid=M3wzMDAzMzh8MHwxfHNlYXJjaHwyNXx8amFwYW58ZW58MHx8fHwxNzMwNTMxNjI4fDA&amp;ixlib=rb-4.0.3&amp;q=80&amp;w=1080 848w, https://images.unsplash.com/photo-1542640244-7e672d6cef4e?crop=entropy&amp;cs=tinysrgb&amp;fit=max&amp;fm=jpg&amp;ixid=M3wzMDAzMzh8MHwxfHNlYXJjaHwyNXx8amFwYW58ZW58MHx8fHwxNzMwNTMxNjI4fDA&amp;ixlib=rb-4.0.3&amp;q=80&amp;w=1080 1272w, https://images.unsplash.com/photo-1542640244-7e672d6cef4e?crop=entropy&amp;cs=tinysrgb&amp;fit=max&amp;fm=jpg&amp;ixid=M3wzMDAzMzh8MHwxfHNlYXJjaHwyNXx8amFwYW58ZW58MHx8fHwxNzMwNTMxNjI4fDA&amp;ixlib=rb-4.0.3&amp;q=80&amp;w=1080 1456w" sizes="100vw"><img src="https://images.unsplash.com/photo-1542640244-7e672d6cef4e?crop=entropy&amp;cs=tinysrgb&amp;fit=max&amp;fm=jpg&amp;ixid=M3wzMDAzMzh8MHwxfHNlYXJjaHwyNXx8amFwYW58ZW58MHx8fHwxNzMwNTMxNjI4fDA&amp;ixlib=rb-4.0.3&amp;q=80&amp;w=1080" width="7952" height="5304" data-attrs="{&quot;src&quot;:&quot;https://images.unsplash.com/photo-1542640244-7e672d6cef4e?crop=entropy&amp;cs=tinysrgb&amp;fit=max&amp;fm=jpg&amp;ixid=M3wzMDAzMzh8MHwxfHNlYXJjaHwyNXx8amFwYW58ZW58MHx8fHwxNzMwNTMxNjI4fDA&amp;ixlib=rb-4.0.3&amp;q=80&amp;w=1080&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:5304,&quot;width&quot;:7952,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;pagoda temple surrounded by trees&quot;,&quot;title&quot;:null,&quot;type&quot;:&quot;image/jpg&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="pagoda temple surrounded by trees" title="pagoda temple surrounded by trees" srcset="https://images.unsplash.com/photo-1542640244-7e672d6cef4e?crop=entropy&amp;cs=tinysrgb&amp;fit=max&amp;fm=jpg&amp;ixid=M3wzMDAzMzh8MHwxfHNlYXJjaHwyNXx8amFwYW58ZW58MHx8fHwxNzMwNTMxNjI4fDA&amp;ixlib=rb-4.0.3&amp;q=80&amp;w=1080 424w, https://images.unsplash.com/photo-1542640244-7e672d6cef4e?crop=entropy&amp;cs=tinysrgb&amp;fit=max&amp;fm=jpg&amp;ixid=M3wzMDAzMzh8MHwxfHNlYXJjaHwyNXx8amFwYW58ZW58MHx8fHwxNzMwNTMxNjI4fDA&amp;ixlib=rb-4.0.3&amp;q=80&amp;w=1080 848w, https://images.unsplash.com/photo-1542640244-7e672d6cef4e?crop=entropy&amp;cs=tinysrgb&amp;fit=max&amp;fm=jpg&amp;ixid=M3wzMDAzMzh8MHwxfHNlYXJjaHwyNXx8amFwYW58ZW58MHx8fHwxNzMwNTMxNjI4fDA&amp;ixlib=rb-4.0.3&amp;q=80&amp;w=1080 1272w, https://images.unsplash.com/photo-1542640244-7e672d6cef4e?crop=entropy&amp;cs=tinysrgb&amp;fit=max&amp;fm=jpg&amp;ixid=M3wzMDAzMzh8MHwxfHNlYXJjaHwyNXx8amFwYW58ZW58MHx8fHwxNzMwNTMxNjI4fDA&amp;ixlib=rb-4.0.3&amp;q=80&amp;w=1080 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><figcaption class="image-caption">Photo by <a href="true">Tianshu Liu</a> on <a href="https://unsplash.com">Unsplash</a></figcaption></figure></div><h2>Overview</h2><p>I want to show you something incredible. In this post, I&#8217;ll talk about <a href="https://hasura.io">Hasura</a> - an open-source engine that provides instant, real-time GraphQL and REST APIs for your databases and applications. It acts as a data access layer, simplifying the process of building and managing APIs by automating the generation of GraphQL or REST endpoints based on your existing database structure. The Hasura engine is an open source project which <strong>supercharges</strong> the building of modern applications by providing access to data via a single, composable, secure API endpoint.</p><h3>But first &#8230; a quick refresher on GraphQL</h3><p><a href="https://graphql.org">GraphQL</a> is a query language for APIs and a runtime for executing those queries by using a type system that you define for your data. It was developed by <a href="https://www.meta.com">Facebook</a> and released as an open-source project in 2015. Unlike traditional REST APIs, where each endpoint returns a fixed structure of data, GraphQL allows clients to request exactly the data they need, making data retrieval more efficient and flexible. </p><p>Below is an example of a Graphql API call</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!wwcV!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9fa8cc0d-893f-4a6b-8e8b-5a74d862f55f_2520x1306.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!wwcV!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9fa8cc0d-893f-4a6b-8e8b-5a74d862f55f_2520x1306.png 424w, https://substackcdn.com/image/fetch/$s_!wwcV!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9fa8cc0d-893f-4a6b-8e8b-5a74d862f55f_2520x1306.png 848w, https://substackcdn.com/image/fetch/$s_!wwcV!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9fa8cc0d-893f-4a6b-8e8b-5a74d862f55f_2520x1306.png 1272w, https://substackcdn.com/image/fetch/$s_!wwcV!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9fa8cc0d-893f-4a6b-8e8b-5a74d862f55f_2520x1306.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!wwcV!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9fa8cc0d-893f-4a6b-8e8b-5a74d862f55f_2520x1306.png" width="728" height="377.5" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/9fa8cc0d-893f-4a6b-8e8b-5a74d862f55f_2520x1306.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:false,&quot;imageSize&quot;:&quot;normal&quot;,&quot;height&quot;:755,&quot;width&quot;:1456,&quot;resizeWidth&quot;:728,&quot;bytes&quot;:233229,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!wwcV!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9fa8cc0d-893f-4a6b-8e8b-5a74d862f55f_2520x1306.png 424w, https://substackcdn.com/image/fetch/$s_!wwcV!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9fa8cc0d-893f-4a6b-8e8b-5a74d862f55f_2520x1306.png 848w, https://substackcdn.com/image/fetch/$s_!wwcV!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9fa8cc0d-893f-4a6b-8e8b-5a74d862f55f_2520x1306.png 1272w, https://substackcdn.com/image/fetch/$s_!wwcV!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9fa8cc0d-893f-4a6b-8e8b-5a74d862f55f_2520x1306.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>I&#8217;ve added a link at the end of the article, in case you&#8217;d like to experiment with GraphQL queries yourself.</p><h2>So how does Hasura help?</h2><p>Hasura lets you provision instant, real-time GraphQL and REST APIs for your data, making it very easy to build</p><ol><li><p><strong>Data-Driven Applications</strong>: It is ideal for quickly building applications where real-time data interaction is important, such as dashboards, collaborative tools, or social feeds.</p></li><li><p><strong>Backend for Mobile Apps</strong>: Hasura can serve as the backend to mobile applications needing consistent and efficient data querying and updates.</p></li><li><p><strong>Microservices Integration</strong>: It can be used to unify different data sources, making it easier to expose a unified API across a microservices architecture.</p></li></ol><div class="pullquote"><p>Basically, as long as you have a database, Hasura makes it super easy to <strong>build an API</strong> on top of your existing data.</p></div><h2>Key Features of Hasura</h2><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!-77r!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa87e61bb-beb4-487d-a223-ce7f33bf8d44_2259x862.heic" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!-77r!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa87e61bb-beb4-487d-a223-ce7f33bf8d44_2259x862.heic 424w, https://substackcdn.com/image/fetch/$s_!-77r!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa87e61bb-beb4-487d-a223-ce7f33bf8d44_2259x862.heic 848w, https://substackcdn.com/image/fetch/$s_!-77r!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa87e61bb-beb4-487d-a223-ce7f33bf8d44_2259x862.heic 1272w, https://substackcdn.com/image/fetch/$s_!-77r!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa87e61bb-beb4-487d-a223-ce7f33bf8d44_2259x862.heic 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!-77r!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa87e61bb-beb4-487d-a223-ce7f33bf8d44_2259x862.heic" width="1456" height="556" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/a87e61bb-beb4-487d-a223-ce7f33bf8d44_2259x862.heic&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:556,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:82471,&quot;alt&quot;:&quot;&quot;,&quot;title&quot;:null,&quot;type&quot;:&quot;image/heic&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" title="" srcset="https://substackcdn.com/image/fetch/$s_!-77r!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa87e61bb-beb4-487d-a223-ce7f33bf8d44_2259x862.heic 424w, https://substackcdn.com/image/fetch/$s_!-77r!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa87e61bb-beb4-487d-a223-ce7f33bf8d44_2259x862.heic 848w, https://substackcdn.com/image/fetch/$s_!-77r!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa87e61bb-beb4-487d-a223-ce7f33bf8d44_2259x862.heic 1272w, https://substackcdn.com/image/fetch/$s_!-77r!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa87e61bb-beb4-487d-a223-ce7f33bf8d44_2259x862.heic 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>Instant GraphQL API </strong>Hasura automatically generates <a href="https://github.com/hasura/graphql-engine">a fully functional GraphQL API</a> based on your database schema, allowing for flexible and efficient data querying.</p></li></ul><ul><li><p><strong>Real-Time Capabilities</strong>: It supports real-time data updates with <a href="https://www.apollographql.com/docs/react/data/subscriptions">GraphQL subscriptions</a>, enabling applications to receive live updates as data changes.</p></li><li><p><strong>REST Endpoints</strong>: While primarily a GraphQL engine, Hasura also allows users to create REST endpoints from the same data source.</p></li><li><p><strong>Authorization and Security</strong>: Built-in role-based access control (RBAC) and security policies let you define granular access permissions for different users.</p></li><li><p><strong>Supports Multiple Databases</strong>: Hasura supports various databases, with strong initial support for PostgreSQL and extending to others like MySQL and SQL Server.</p></li><li><p><strong>Remote Schemas and Integrations</strong>: It allows the integration of other GraphQL services as remote schemas, combining various APIs into a single endpoint.</p></li><li><p><strong>Custom Business Logic</strong>: Users can add custom business logic through serverless functions or REST APIs that Hasura can integrate with.</p></li></ul><h2>Let&#8217;s play around with Hasura</h2><p>I created an account on <a href="https://hasura.io">Hasura.io</a> and chose the free-tier for my experimentation. This <strong>did not require a credit card</strong>, which was very welcome. I chose AWS as my cloud provider for this demo and I was surprised to see this setup becoming available to me in under 30 seconds. Here&#8217;s how my account looked like, after creation.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!FNMA!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdb69a7bf-8828-40b7-8959-8b1ba49bd204_2770x1542.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!FNMA!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdb69a7bf-8828-40b7-8959-8b1ba49bd204_2770x1542.png 424w, https://substackcdn.com/image/fetch/$s_!FNMA!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdb69a7bf-8828-40b7-8959-8b1ba49bd204_2770x1542.png 848w, https://substackcdn.com/image/fetch/$s_!FNMA!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdb69a7bf-8828-40b7-8959-8b1ba49bd204_2770x1542.png 1272w, https://substackcdn.com/image/fetch/$s_!FNMA!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdb69a7bf-8828-40b7-8959-8b1ba49bd204_2770x1542.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!FNMA!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdb69a7bf-8828-40b7-8959-8b1ba49bd204_2770x1542.png" width="1456" height="811" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/db69a7bf-8828-40b7-8959-8b1ba49bd204_2770x1542.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:811,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:317829,&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_!FNMA!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdb69a7bf-8828-40b7-8959-8b1ba49bd204_2770x1542.png 424w, https://substackcdn.com/image/fetch/$s_!FNMA!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdb69a7bf-8828-40b7-8959-8b1ba49bd204_2770x1542.png 848w, https://substackcdn.com/image/fetch/$s_!FNMA!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdb69a7bf-8828-40b7-8959-8b1ba49bd204_2770x1542.png 1272w, https://substackcdn.com/image/fetch/$s_!FNMA!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdb69a7bf-8828-40b7-8959-8b1ba49bd204_2770x1542.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>Now let us see what all we can do with Hasura</p><h3>It&#8217;s really simple to connect your data</h3><p>I did not have a database lying around, so I provisioned a free Postgres instance using <a href="https://neon.tech">Neon</a>. This was pretty good but I needed data to start playing around with the same. I wrote a simple ChatGPT prompt to create some mock data and populate my database with the same. </p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!cnpm!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff2598ad8-ba92-4e26-9274-a3ccce5f1dff_2880x1250.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!cnpm!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff2598ad8-ba92-4e26-9274-a3ccce5f1dff_2880x1250.png 424w, https://substackcdn.com/image/fetch/$s_!cnpm!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff2598ad8-ba92-4e26-9274-a3ccce5f1dff_2880x1250.png 848w, https://substackcdn.com/image/fetch/$s_!cnpm!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff2598ad8-ba92-4e26-9274-a3ccce5f1dff_2880x1250.png 1272w, https://substackcdn.com/image/fetch/$s_!cnpm!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff2598ad8-ba92-4e26-9274-a3ccce5f1dff_2880x1250.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!cnpm!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff2598ad8-ba92-4e26-9274-a3ccce5f1dff_2880x1250.png" width="1456" height="632" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/f2598ad8-ba92-4e26-9274-a3ccce5f1dff_2880x1250.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:632,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:268867,&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_!cnpm!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff2598ad8-ba92-4e26-9274-a3ccce5f1dff_2880x1250.png 424w, https://substackcdn.com/image/fetch/$s_!cnpm!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff2598ad8-ba92-4e26-9274-a3ccce5f1dff_2880x1250.png 848w, https://substackcdn.com/image/fetch/$s_!cnpm!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff2598ad8-ba92-4e26-9274-a3ccce5f1dff_2880x1250.png 1272w, https://substackcdn.com/image/fetch/$s_!cnpm!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff2598ad8-ba92-4e26-9274-a3ccce5f1dff_2880x1250.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>Now that my table was created and the data became available, it was time to start exploring the graphql API. And voila! This happened instantly. The moment my database connection became available, the API was ready to go. <strong>This is</strong> <strong>absolutely amazing </strong>because I can start using this API in a web application right away. </p><div class="pullquote"><p>I&#8217;ve never seen a way to create an API this fast, ever in my entire career. </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_!q1Ht!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1f313e23-34c9-457c-b542-0f97f6facc9a_2880x1520.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!q1Ht!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1f313e23-34c9-457c-b542-0f97f6facc9a_2880x1520.png 424w, https://substackcdn.com/image/fetch/$s_!q1Ht!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1f313e23-34c9-457c-b542-0f97f6facc9a_2880x1520.png 848w, https://substackcdn.com/image/fetch/$s_!q1Ht!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1f313e23-34c9-457c-b542-0f97f6facc9a_2880x1520.png 1272w, https://substackcdn.com/image/fetch/$s_!q1Ht!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1f313e23-34c9-457c-b542-0f97f6facc9a_2880x1520.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!q1Ht!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1f313e23-34c9-457c-b542-0f97f6facc9a_2880x1520.png" width="1456" height="768" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/1f313e23-34c9-457c-b542-0f97f6facc9a_2880x1520.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:768,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:407519,&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_!q1Ht!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1f313e23-34c9-457c-b542-0f97f6facc9a_2880x1520.png 424w, https://substackcdn.com/image/fetch/$s_!q1Ht!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1f313e23-34c9-457c-b542-0f97f6facc9a_2880x1520.png 848w, https://substackcdn.com/image/fetch/$s_!q1Ht!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1f313e23-34c9-457c-b542-0f97f6facc9a_2880x1520.png 1272w, https://substackcdn.com/image/fetch/$s_!q1Ht!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1f313e23-34c9-457c-b542-0f97f6facc9a_2880x1520.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><h3>What about security?</h3><p>This is also where I was very pleasantly surprised to find very intuitive controls available in the UI. I was able to enable </p><ul><li><p>Rate-limits</p></li><li><p>Node limits</p></li><li><p>Depth limits</p></li><li><p>Timeout  and</p></li><li><p>Batch-request limits </p></li></ul><p>for a global user as well as a user that I created for testing. This is very useful as implementing this was actually quite a messy affair, when I did this on my own, using a flask-backend in python a few years ago. </p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!vAnL!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Feb99ce13-7388-401a-88b8-540463f4e6b7_2868x1296.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!vAnL!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Feb99ce13-7388-401a-88b8-540463f4e6b7_2868x1296.png 424w, https://substackcdn.com/image/fetch/$s_!vAnL!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Feb99ce13-7388-401a-88b8-540463f4e6b7_2868x1296.png 848w, https://substackcdn.com/image/fetch/$s_!vAnL!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Feb99ce13-7388-401a-88b8-540463f4e6b7_2868x1296.png 1272w, https://substackcdn.com/image/fetch/$s_!vAnL!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Feb99ce13-7388-401a-88b8-540463f4e6b7_2868x1296.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!vAnL!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Feb99ce13-7388-401a-88b8-540463f4e6b7_2868x1296.png" width="1456" height="658" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/eb99ce13-7388-401a-88b8-540463f4e6b7_2868x1296.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:658,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:276212,&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_!vAnL!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Feb99ce13-7388-401a-88b8-540463f4e6b7_2868x1296.png 424w, https://substackcdn.com/image/fetch/$s_!vAnL!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Feb99ce13-7388-401a-88b8-540463f4e6b7_2868x1296.png 848w, https://substackcdn.com/image/fetch/$s_!vAnL!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Feb99ce13-7388-401a-88b8-540463f4e6b7_2868x1296.png 1272w, https://substackcdn.com/image/fetch/$s_!vAnL!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Feb99ce13-7388-401a-88b8-540463f4e6b7_2868x1296.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>Schema-introspection can also be limited to roles and that is a very welcome feature that is available right in the UI.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!p9PW!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fda9bec17-f51a-4419-8608-36601262d3cb_2330x802.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!p9PW!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fda9bec17-f51a-4419-8608-36601262d3cb_2330x802.png 424w, https://substackcdn.com/image/fetch/$s_!p9PW!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fda9bec17-f51a-4419-8608-36601262d3cb_2330x802.png 848w, https://substackcdn.com/image/fetch/$s_!p9PW!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fda9bec17-f51a-4419-8608-36601262d3cb_2330x802.png 1272w, https://substackcdn.com/image/fetch/$s_!p9PW!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fda9bec17-f51a-4419-8608-36601262d3cb_2330x802.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!p9PW!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fda9bec17-f51a-4419-8608-36601262d3cb_2330x802.png" width="1456" height="501" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/da9bec17-f51a-4419-8608-36601262d3cb_2330x802.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:501,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:89353,&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_!p9PW!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fda9bec17-f51a-4419-8608-36601262d3cb_2330x802.png 424w, https://substackcdn.com/image/fetch/$s_!p9PW!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fda9bec17-f51a-4419-8608-36601262d3cb_2330x802.png 848w, https://substackcdn.com/image/fetch/$s_!p9PW!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fda9bec17-f51a-4419-8608-36601262d3cb_2330x802.png 1272w, https://substackcdn.com/image/fetch/$s_!p9PW!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fda9bec17-f51a-4419-8608-36601262d3cb_2330x802.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><h3>Making a REST endpoint</h3><p>It was comically easy to make a REST endpoint on top of my data. All of the methods of GET, POST, PUT, PATCH and DELETE are available to the user while creating the endpoint. This is a great feature for systems that want to leverage everything that Hasura offers, without having to switch to a GraphQL API.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!A7Ut!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F08a97fee-bf25-429e-a03c-4e04dec1a0ee_2874x1530.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!A7Ut!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F08a97fee-bf25-429e-a03c-4e04dec1a0ee_2874x1530.png 424w, https://substackcdn.com/image/fetch/$s_!A7Ut!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F08a97fee-bf25-429e-a03c-4e04dec1a0ee_2874x1530.png 848w, https://substackcdn.com/image/fetch/$s_!A7Ut!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F08a97fee-bf25-429e-a03c-4e04dec1a0ee_2874x1530.png 1272w, https://substackcdn.com/image/fetch/$s_!A7Ut!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F08a97fee-bf25-429e-a03c-4e04dec1a0ee_2874x1530.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!A7Ut!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F08a97fee-bf25-429e-a03c-4e04dec1a0ee_2874x1530.png" width="1456" height="775" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/08a97fee-bf25-429e-a03c-4e04dec1a0ee_2874x1530.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:775,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:265094,&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_!A7Ut!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F08a97fee-bf25-429e-a03c-4e04dec1a0ee_2874x1530.png 424w, https://substackcdn.com/image/fetch/$s_!A7Ut!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F08a97fee-bf25-429e-a03c-4e04dec1a0ee_2874x1530.png 848w, https://substackcdn.com/image/fetch/$s_!A7Ut!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F08a97fee-bf25-429e-a03c-4e04dec1a0ee_2874x1530.png 1272w, https://substackcdn.com/image/fetch/$s_!A7Ut!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F08a97fee-bf25-429e-a03c-4e04dec1a0ee_2874x1530.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><h3>Actions</h3><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!ZNK_!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1475b027-bd26-45d5-b664-b083a18209b7_701x414.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!ZNK_!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1475b027-bd26-45d5-b664-b083a18209b7_701x414.png 424w, https://substackcdn.com/image/fetch/$s_!ZNK_!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1475b027-bd26-45d5-b664-b083a18209b7_701x414.png 848w, https://substackcdn.com/image/fetch/$s_!ZNK_!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1475b027-bd26-45d5-b664-b083a18209b7_701x414.png 1272w, https://substackcdn.com/image/fetch/$s_!ZNK_!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1475b027-bd26-45d5-b664-b083a18209b7_701x414.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!ZNK_!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1475b027-bd26-45d5-b664-b083a18209b7_701x414.png" width="701" height="414" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/1475b027-bd26-45d5-b664-b083a18209b7_701x414.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:414,&quot;width&quot;:701,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;Actions&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="Actions" title="Actions" srcset="https://substackcdn.com/image/fetch/$s_!ZNK_!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1475b027-bd26-45d5-b664-b083a18209b7_701x414.png 424w, https://substackcdn.com/image/fetch/$s_!ZNK_!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1475b027-bd26-45d5-b664-b083a18209b7_701x414.png 848w, https://substackcdn.com/image/fetch/$s_!ZNK_!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1475b027-bd26-45d5-b664-b083a18209b7_701x414.png 1272w, https://substackcdn.com/image/fetch/$s_!ZNK_!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1475b027-bd26-45d5-b664-b083a18209b7_701x414.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>Actions in Hasura are custom queries or mutations that are resolved via HTTP handlers. Actions can be used to carry out complex data validations, data enrichment from external sources or execute just about any custom business logic.</p><p>An action would end up executing custom logic that you can call via a webhook or a REST endpoint and basically work with any external system. Creation of an action is also very straightforward. You define your configuration and select how you want to handle the same. The execution allows for both synchronous and asynchronous calls which is excellent and ends up allowing for all sorts of custom implementations.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!5C24!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6f400cfe-4d47-4432-8f98-91c92bfb02cc_2750x1502.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!5C24!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6f400cfe-4d47-4432-8f98-91c92bfb02cc_2750x1502.png 424w, https://substackcdn.com/image/fetch/$s_!5C24!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6f400cfe-4d47-4432-8f98-91c92bfb02cc_2750x1502.png 848w, https://substackcdn.com/image/fetch/$s_!5C24!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6f400cfe-4d47-4432-8f98-91c92bfb02cc_2750x1502.png 1272w, https://substackcdn.com/image/fetch/$s_!5C24!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6f400cfe-4d47-4432-8f98-91c92bfb02cc_2750x1502.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!5C24!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6f400cfe-4d47-4432-8f98-91c92bfb02cc_2750x1502.png" width="1456" height="795" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/6f400cfe-4d47-4432-8f98-91c92bfb02cc_2750x1502.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:795,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:342303,&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_!5C24!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6f400cfe-4d47-4432-8f98-91c92bfb02cc_2750x1502.png 424w, https://substackcdn.com/image/fetch/$s_!5C24!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6f400cfe-4d47-4432-8f98-91c92bfb02cc_2750x1502.png 848w, https://substackcdn.com/image/fetch/$s_!5C24!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6f400cfe-4d47-4432-8f98-91c92bfb02cc_2750x1502.png 1272w, https://substackcdn.com/image/fetch/$s_!5C24!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6f400cfe-4d47-4432-8f98-91c92bfb02cc_2750x1502.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><h3>Remote Schemas</h3><div class="captioned-image-container"><figure><a class="image-link image2" target="_blank" href="https://substackcdn.com/image/fetch/$s_!xoeM!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F38358595-1fe5-412c-91e8-3ec21534e380_1574x320.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!xoeM!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F38358595-1fe5-412c-91e8-3ec21534e380_1574x320.png 424w, https://substackcdn.com/image/fetch/$s_!xoeM!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F38358595-1fe5-412c-91e8-3ec21534e380_1574x320.png 848w, https://substackcdn.com/image/fetch/$s_!xoeM!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F38358595-1fe5-412c-91e8-3ec21534e380_1574x320.png 1272w, https://substackcdn.com/image/fetch/$s_!xoeM!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F38358595-1fe5-412c-91e8-3ec21534e380_1574x320.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!xoeM!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F38358595-1fe5-412c-91e8-3ec21534e380_1574x320.png" width="1456" height="296" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/38358595-1fe5-412c-91e8-3ec21534e380_1574x320.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:296,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;Remote Schema&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="Remote Schema" title="Remote Schema" srcset="https://substackcdn.com/image/fetch/$s_!xoeM!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F38358595-1fe5-412c-91e8-3ec21534e380_1574x320.png 424w, https://substackcdn.com/image/fetch/$s_!xoeM!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F38358595-1fe5-412c-91e8-3ec21534e380_1574x320.png 848w, https://substackcdn.com/image/fetch/$s_!xoeM!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F38358595-1fe5-412c-91e8-3ec21534e380_1574x320.png 1272w, https://substackcdn.com/image/fetch/$s_!xoeM!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F38358595-1fe5-412c-91e8-3ec21534e380_1574x320.png 1456w" sizes="100vw" loading="lazy"></picture><div></div></div></a></figure></div><p>Remote schemas in Hasura are external GraphQL services which can be merged with Hasura to provide a unified GraphQL API. Think of it like automated schema stitching. All you need to do is build a GraphQL service and then provide its HTTP endpoint to Hasura. Your GraphQL service can be written in any language or framework.</p><h3>Event triggers</h3><div class="captioned-image-container"><figure><a class="image-link image2" target="_blank" href="https://substackcdn.com/image/fetch/$s_!zPM2!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fadaac05e-16e0-44aa-9aca-d19510ad9154_1516x368.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!zPM2!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fadaac05e-16e0-44aa-9aca-d19510ad9154_1516x368.png 424w, https://substackcdn.com/image/fetch/$s_!zPM2!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fadaac05e-16e0-44aa-9aca-d19510ad9154_1516x368.png 848w, https://substackcdn.com/image/fetch/$s_!zPM2!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fadaac05e-16e0-44aa-9aca-d19510ad9154_1516x368.png 1272w, https://substackcdn.com/image/fetch/$s_!zPM2!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fadaac05e-16e0-44aa-9aca-d19510ad9154_1516x368.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!zPM2!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fadaac05e-16e0-44aa-9aca-d19510ad9154_1516x368.png" width="1456" height="353" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/adaac05e-16e0-44aa-9aca-d19510ad9154_1516x368.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:353,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;Event Triggers&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="Event Triggers" title="Event Triggers" srcset="https://substackcdn.com/image/fetch/$s_!zPM2!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fadaac05e-16e0-44aa-9aca-d19510ad9154_1516x368.png 424w, https://substackcdn.com/image/fetch/$s_!zPM2!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fadaac05e-16e0-44aa-9aca-d19510ad9154_1516x368.png 848w, https://substackcdn.com/image/fetch/$s_!zPM2!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fadaac05e-16e0-44aa-9aca-d19510ad9154_1516x368.png 1272w, https://substackcdn.com/image/fetch/$s_!zPM2!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fadaac05e-16e0-44aa-9aca-d19510ad9154_1516x368.png 1456w" sizes="100vw" loading="lazy"></picture><div></div></div></a></figure></div><p>An Event Trigger atomically captures events (insert, update, delete) on a specified table and then reliably calls a HTTP webhook to run some custom business logic.</p><h3>Monitoring</h3><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!LVia!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa6c4fc97-875d-4948-8649-a4d2d5778a74_2840x1558.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!LVia!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa6c4fc97-875d-4948-8649-a4d2d5778a74_2840x1558.png 424w, https://substackcdn.com/image/fetch/$s_!LVia!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa6c4fc97-875d-4948-8649-a4d2d5778a74_2840x1558.png 848w, https://substackcdn.com/image/fetch/$s_!LVia!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa6c4fc97-875d-4948-8649-a4d2d5778a74_2840x1558.png 1272w, https://substackcdn.com/image/fetch/$s_!LVia!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa6c4fc97-875d-4948-8649-a4d2d5778a74_2840x1558.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!LVia!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa6c4fc97-875d-4948-8649-a4d2d5778a74_2840x1558.png" width="1456" height="799" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/a6c4fc97-875d-4948-8649-a4d2d5778a74_2840x1558.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:799,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:395850,&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_!LVia!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa6c4fc97-875d-4948-8649-a4d2d5778a74_2840x1558.png 424w, https://substackcdn.com/image/fetch/$s_!LVia!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa6c4fc97-875d-4948-8649-a4d2d5778a74_2840x1558.png 848w, https://substackcdn.com/image/fetch/$s_!LVia!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa6c4fc97-875d-4948-8649-a4d2d5778a74_2840x1558.png 1272w, https://substackcdn.com/image/fetch/$s_!LVia!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa6c4fc97-875d-4948-8649-a4d2d5778a74_2840x1558.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>Hasura's GraphQL Engine includes several built-in monitoring features and integrates with external monitoring tools to help users track, optimize, and troubleshoot their API performance. Here are the main monitoring features available in Hasura:</p><ul><li><p><strong>Health Check Endpoint</strong>: Hasura provides a <code>/healthz</code> endpoint to check the status of the Hasura server, which is useful for setting up basic health monitoring.</p></li><li><p><strong>Readiness Endpoint</strong>: The <code>/readiness</code> endpoint can be used to check if Hasura is ready to accept traffic, helpful for auto-scaling and load balancing setups.</p></li><li><p><strong>GraphQL Engine Logs</strong>: Hasura generates logs for requests, response times, and errors. These logs can be configured for various verbosity levels and can be directed to log aggregation tools for better insights.</p></li><li><p><strong>Request/Response Metrics</strong>: Hasura provides metrics for query and mutation execution time, including metadata about each query, mutation, and subscription.</p></li><li><p><strong>Real-time Analytics for Active Subscriptions</strong>: Hasura&#8217;s console allows you to monitor active subscriptions in real-time, showing which users are subscribed to which queries and for how long.</p></li></ul><ul><li><p>Hasura integrates with <strong>OpenTelemetry</strong> and <strong>Jaeger</strong> for distributed tracing, allowing users to monitor each stage of query execution. You can trace requests from the frontend through Hasura to the underlying database and identify slow-performing queries.</p></li></ul><ul><li><p>Hasura provides a native integration with <strong>Prometheus</strong> to export monitoring metrics, such as request latency, response status codes, and other performance indicators.</p></li></ul><ul><li><p>Hasura can also work with third-party observability tools such as Datadog, New Relic, and others by exporting logs and metrics. This flexibility enables more advanced monitoring setups for larger applications or specific enterprise needs.</p></li></ul><div><hr></div><h2>Conclusion</h2><p>All in all, Hasura is an excellent project and I can&#8217;t wait to implement my upcoming projects with it. With a generous-free tier on Hasura cloud, I want to start hosting some of my APIs and start implementing some web dev projects using the same. Also, I am going to going to self-host Hasura engine and see how I can leverage it with an existing infrastructure on my personal cloud subscription. </p><blockquote><p>If you&#8217;re interested in reading about my implementations or similar topics in the engineering space, feel free to subscribe to my blog for <strong>free</strong> using the button below.</p></blockquote><p>This was a long post and if you&#8217;ve stuck around, I&#8217;d like to thank you for reading. And I hope you have a wonderful day!</p><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://compute.anshaj.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 Compute - A programming blog! 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><h2>Resources</h2><p>Want to experiment with how GraphQL API works? <a href="https://studio.apollographql.com/public/rick-and-morty-a3b90u/variant/current/explorer">Here&#8217;s a handy link</a> for you to experiment with queries in GraphQL.</p>]]></content:encoded></item><item><title><![CDATA[What are orchestrators in data systems?]]></title><description><![CDATA[Everything you need to know about modern data pipeline orchestration]]></description><link>https://compute.anshaj.dev/p/what-are-orchestrators-in-data-systems</link><guid isPermaLink="false">https://compute.anshaj.dev/p/what-are-orchestrators-in-data-systems</guid><dc:creator><![CDATA[Anshaj]]></dc:creator><pubDate>Wed, 30 Oct 2024 18:27:16 GMT</pubDate><enclosure url="https://images.unsplash.com/photo-1730098482564-259a89064e47?crop=entropy&amp;cs=tinysrgb&amp;fit=max&amp;fm=jpg&amp;ixid=M3wzMDAzMzh8MHwxfHNlYXJjaHw5fHxvcmNoZXN0cmF8ZW58MHx8fHwxNzMwMzEwMjY5fDA&amp;ixlib=rb-4.0.3&amp;q=80&amp;w=1080" length="0" type="image/jpeg"/><content:encoded><![CDATA[<div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://images.unsplash.com/photo-1730098482564-259a89064e47?crop=entropy&amp;cs=tinysrgb&amp;fit=max&amp;fm=jpg&amp;ixid=M3wzMDAzMzh8MHwxfHNlYXJjaHw5fHxvcmNoZXN0cmF8ZW58MHx8fHwxNzMwMzEwMjY5fDA&amp;ixlib=rb-4.0.3&amp;q=80&amp;w=1080" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://images.unsplash.com/photo-1730098482564-259a89064e47?crop=entropy&amp;cs=tinysrgb&amp;fit=max&amp;fm=jpg&amp;ixid=M3wzMDAzMzh8MHwxfHNlYXJjaHw5fHxvcmNoZXN0cmF8ZW58MHx8fHwxNzMwMzEwMjY5fDA&amp;ixlib=rb-4.0.3&amp;q=80&amp;w=1080 424w, https://images.unsplash.com/photo-1730098482564-259a89064e47?crop=entropy&amp;cs=tinysrgb&amp;fit=max&amp;fm=jpg&amp;ixid=M3wzMDAzMzh8MHwxfHNlYXJjaHw5fHxvcmNoZXN0cmF8ZW58MHx8fHwxNzMwMzEwMjY5fDA&amp;ixlib=rb-4.0.3&amp;q=80&amp;w=1080 848w, https://images.unsplash.com/photo-1730098482564-259a89064e47?crop=entropy&amp;cs=tinysrgb&amp;fit=max&amp;fm=jpg&amp;ixid=M3wzMDAzMzh8MHwxfHNlYXJjaHw5fHxvcmNoZXN0cmF8ZW58MHx8fHwxNzMwMzEwMjY5fDA&amp;ixlib=rb-4.0.3&amp;q=80&amp;w=1080 1272w, https://images.unsplash.com/photo-1730098482564-259a89064e47?crop=entropy&amp;cs=tinysrgb&amp;fit=max&amp;fm=jpg&amp;ixid=M3wzMDAzMzh8MHwxfHNlYXJjaHw5fHxvcmNoZXN0cmF8ZW58MHx8fHwxNzMwMzEwMjY5fDA&amp;ixlib=rb-4.0.3&amp;q=80&amp;w=1080 1456w" sizes="100vw"><img src="https://images.unsplash.com/photo-1730098482564-259a89064e47?crop=entropy&amp;cs=tinysrgb&amp;fit=max&amp;fm=jpg&amp;ixid=M3wzMDAzMzh8MHwxfHNlYXJjaHw5fHxvcmNoZXN0cmF8ZW58MHx8fHwxNzMwMzEwMjY5fDA&amp;ixlib=rb-4.0.3&amp;q=80&amp;w=1080" width="3851" height="5184" data-attrs="{&quot;src&quot;:&quot;https://images.unsplash.com/photo-1730098482564-259a89064e47?crop=entropy&amp;cs=tinysrgb&amp;fit=max&amp;fm=jpg&amp;ixid=M3wzMDAzMzh8MHwxfHNlYXJjaHw5fHxvcmNoZXN0cmF8ZW58MHx8fHwxNzMwMzEwMjY5fDA&amp;ixlib=rb-4.0.3&amp;q=80&amp;w=1080&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:5184,&quot;width&quot;:3851,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;A conductor and orchestra performing in a concert&quot;,&quot;title&quot;:null,&quot;type&quot;:&quot;image/jpg&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="A conductor and orchestra performing in a concert" title="A conductor and orchestra performing in a concert" srcset="https://images.unsplash.com/photo-1730098482564-259a89064e47?crop=entropy&amp;cs=tinysrgb&amp;fit=max&amp;fm=jpg&amp;ixid=M3wzMDAzMzh8MHwxfHNlYXJjaHw5fHxvcmNoZXN0cmF8ZW58MHx8fHwxNzMwMzEwMjY5fDA&amp;ixlib=rb-4.0.3&amp;q=80&amp;w=1080 424w, https://images.unsplash.com/photo-1730098482564-259a89064e47?crop=entropy&amp;cs=tinysrgb&amp;fit=max&amp;fm=jpg&amp;ixid=M3wzMDAzMzh8MHwxfHNlYXJjaHw5fHxvcmNoZXN0cmF8ZW58MHx8fHwxNzMwMzEwMjY5fDA&amp;ixlib=rb-4.0.3&amp;q=80&amp;w=1080 848w, https://images.unsplash.com/photo-1730098482564-259a89064e47?crop=entropy&amp;cs=tinysrgb&amp;fit=max&amp;fm=jpg&amp;ixid=M3wzMDAzMzh8MHwxfHNlYXJjaHw5fHxvcmNoZXN0cmF8ZW58MHx8fHwxNzMwMzEwMjY5fDA&amp;ixlib=rb-4.0.3&amp;q=80&amp;w=1080 1272w, https://images.unsplash.com/photo-1730098482564-259a89064e47?crop=entropy&amp;cs=tinysrgb&amp;fit=max&amp;fm=jpg&amp;ixid=M3wzMDAzMzh8MHwxfHNlYXJjaHw5fHxvcmNoZXN0cmF8ZW58MHx8fHwxNzMwMzEwMjY5fDA&amp;ixlib=rb-4.0.3&amp;q=80&amp;w=1080 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><figcaption class="image-caption">Photo by <a href="true">Kazuo ota</a> on <a href="https://unsplash.com">Unsplash</a></figcaption></figure></div><h2>What are orchestrators?</h2><p>Orchestrators are tools designed to <strong>manage</strong>, <strong>schedule</strong>, and <strong>monitor</strong> complex workflows in data pipelines and software systems. They allow developers to automate a sequence of tasks or workflows, define dependencies between tasks, and ensure that each task is executed in the right order, typically handling data processing, ETL (Extract, Transform, Load) operations, and other repetitive tasks.</p><h2>Core Functions</h2><ol><li><p><strong>Workflow Scheduling:</strong> Orchestrators schedule tasks to run at specific times or intervals, allowing for automating workflows. This is essential for pipelines that require regular updates, like daily data ingestion or processing tasks.</p></li><li><p><strong>Dependency Management:</strong> Workflows often involve tasks that depend on the completion of other tasks. Orchestrators allow you to define these dependencies so that tasks are executed in the correct order. </p></li><li><p><strong>Error Handling and Logging:</strong> Orchestrators track the success and failure of each task and offer logs for debugging. If a task fails, they can retry it or notify the appropriate team, ensuring that errors are caught and handled efficiently.</p></li><li><p><strong>Parallelization and Scalability:</strong> Orchestrators can run multiple tasks in parallel if they are independent, which helps reduce the total time required for workflow execution. They also integrate with distributed computing resources, making them scalable as workload demands increase.</p></li><li><p><strong>Monitoring and Alerting:</strong> They provide tools to monitor workflow execution in real time and can send alerts if tasks fail or if there are delays. This helps maintain reliability and uptime, especially for critical pipelines.</p></li></ol><p></p><h2>Benefits of Using Orchestrators in Software Systems:</h2><ul><li><p><strong>Automation:</strong> By automating repetitive workflows, orchestrators save developers time and minimize manual errors.</p></li><li><p><strong>Reliability &amp; Resilience:</strong> The ability to handle dependencies and retry failed tasks ensures that workflows are resilient to interruptions.</p></li><li><p><strong>Scalability:</strong> As workflows grow in complexity, orchestrators can scale to accommodate more tasks, dependencies, and larger volumes of data.</p></li><li><p><strong>Better Collaboration and Visibility:</strong> Teams can easily visualize, monitor, and manage workflows, improving collaboration and transparency.</p></li></ul><h2>Popular orchestrators in the data engineering space</h2><h3><strong>Apache Airflow</strong></h3><p><a href="https://airflow.apache.org/">Apache Airflow</a> allows you to define almost any workflow in Python code, no matter how complex. Because of its versatility, Airflow is used by companies all over the world for a variety of use cases.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!NNpA!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F764f4cf2-be4c-49cc-a074-27fc3e9ab794_2212x1936.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!NNpA!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F764f4cf2-be4c-49cc-a074-27fc3e9ab794_2212x1936.png 424w, https://substackcdn.com/image/fetch/$s_!NNpA!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F764f4cf2-be4c-49cc-a074-27fc3e9ab794_2212x1936.png 848w, https://substackcdn.com/image/fetch/$s_!NNpA!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F764f4cf2-be4c-49cc-a074-27fc3e9ab794_2212x1936.png 1272w, https://substackcdn.com/image/fetch/$s_!NNpA!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F764f4cf2-be4c-49cc-a074-27fc3e9ab794_2212x1936.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!NNpA!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F764f4cf2-be4c-49cc-a074-27fc3e9ab794_2212x1936.png" width="1456" height="1274" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/764f4cf2-be4c-49cc-a074-27fc3e9ab794_2212x1936.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1274,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;_images/graph.png&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="_images/graph.png" title="_images/graph.png" srcset="https://substackcdn.com/image/fetch/$s_!NNpA!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F764f4cf2-be4c-49cc-a074-27fc3e9ab794_2212x1936.png 424w, https://substackcdn.com/image/fetch/$s_!NNpA!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F764f4cf2-be4c-49cc-a074-27fc3e9ab794_2212x1936.png 848w, https://substackcdn.com/image/fetch/$s_!NNpA!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F764f4cf2-be4c-49cc-a074-27fc3e9ab794_2212x1936.png 1272w, https://substackcdn.com/image/fetch/$s_!NNpA!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F764f4cf2-be4c-49cc-a074-27fc3e9ab794_2212x1936.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>Some of the main characteristics of airflow are</p><ul><li><p><strong>Python-Based DAGs</strong>: Workflows are defined as Directed Acyclic Graphs (DAGs) in Python, allowing for great flexibility and customization.</p></li><li><p><strong>Dependency Management</strong>: Supports complex dependency handling to sequence tasks.</p></li><li><p><strong>Extensibility</strong>: Integrates with many tools and services through a vast array of plugins and operators.</p></li><li><p><strong>Strong UI for Monitoring and Control</strong>: Offers a user-friendly web interface for monitoring and managing workflows.</p></li></ul><div class="pullquote"><p>Apache airflow is best for Data engineering and ETL workflows <strong>where customization is critical</strong>.</p></div><h3><strong>Luigi</strong></h3><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!X0Ed!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2597f902-0da9-4854-a8f6-859f5e26da50_893x763.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!X0Ed!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2597f902-0da9-4854-a8f6-859f5e26da50_893x763.png 424w, https://substackcdn.com/image/fetch/$s_!X0Ed!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2597f902-0da9-4854-a8f6-859f5e26da50_893x763.png 848w, https://substackcdn.com/image/fetch/$s_!X0Ed!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2597f902-0da9-4854-a8f6-859f5e26da50_893x763.png 1272w, https://substackcdn.com/image/fetch/$s_!X0Ed!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2597f902-0da9-4854-a8f6-859f5e26da50_893x763.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!X0Ed!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2597f902-0da9-4854-a8f6-859f5e26da50_893x763.png" width="893" height="763" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/2597f902-0da9-4854-a8f6-859f5e26da50_893x763.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:763,&quot;width&quot;:893,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;Dependency graph&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="Dependency graph" title="Dependency graph" srcset="https://substackcdn.com/image/fetch/$s_!X0Ed!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2597f902-0da9-4854-a8f6-859f5e26da50_893x763.png 424w, https://substackcdn.com/image/fetch/$s_!X0Ed!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2597f902-0da9-4854-a8f6-859f5e26da50_893x763.png 848w, https://substackcdn.com/image/fetch/$s_!X0Ed!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2597f902-0da9-4854-a8f6-859f5e26da50_893x763.png 1272w, https://substackcdn.com/image/fetch/$s_!X0Ed!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2597f902-0da9-4854-a8f6-859f5e26da50_893x763.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><a href="https://luigi.readthedocs.io/en/stable/#">Luigi</a> is a Python package that helps you build complex pipelines of batch jobs. It handles dependency resolution, workflow management, visualization, handling failures, command line integration, and much more.</p><p>Some of the main characteristics of Luigi are</p><ul><li><p><strong>Dependency Resolution</strong>: Particularly strong at handling complex dependencies across a wide array of tasks.</p></li><li><p><strong>Pipeline Simplicity</strong>: Ideal for simpler, sequential pipelines with many tasks but relatively straightforward logic.</p></li><li><p><strong>Command-Line Interface</strong>: Workflow management and execution are command-line-driven, which suits developers comfortable in that environment.</p></li></ul><div class="pullquote"><p>Luigi is best for data pipeline automation with <strong>simpler task flows</strong>, typically used for ETL in data science or analytics tasks.</p></div><h3><strong>Prefect</strong></h3><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!GamL!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3c6a5bf2-79fb-457c-b343-2989dc91c751_3840x2509.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!GamL!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3c6a5bf2-79fb-457c-b343-2989dc91c751_3840x2509.png 424w, https://substackcdn.com/image/fetch/$s_!GamL!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3c6a5bf2-79fb-457c-b343-2989dc91c751_3840x2509.png 848w, https://substackcdn.com/image/fetch/$s_!GamL!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3c6a5bf2-79fb-457c-b343-2989dc91c751_3840x2509.png 1272w, https://substackcdn.com/image/fetch/$s_!GamL!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3c6a5bf2-79fb-457c-b343-2989dc91c751_3840x2509.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!GamL!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3c6a5bf2-79fb-457c-b343-2989dc91c751_3840x2509.png" width="1456" height="951" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/3c6a5bf2-79fb-457c-b343-2989dc91c751_3840x2509.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:951,&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_!GamL!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3c6a5bf2-79fb-457c-b343-2989dc91c751_3840x2509.png 424w, https://substackcdn.com/image/fetch/$s_!GamL!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3c6a5bf2-79fb-457c-b343-2989dc91c751_3840x2509.png 848w, https://substackcdn.com/image/fetch/$s_!GamL!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3c6a5bf2-79fb-457c-b343-2989dc91c751_3840x2509.png 1272w, https://substackcdn.com/image/fetch/$s_!GamL!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3c6a5bf2-79fb-457c-b343-2989dc91c751_3840x2509.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><a href="https://www.prefect.io/">Prefect</a> is one of the newer names in the market. It allows you to orchestrate your code with scheduling, automatic retries, and prioritized instant alerting, giving you full observability into your workflows. Of all the orchestrators in the list, Prefect is my favorite as the implementation is simply, really good!</p><p>Some of the main characteristics of prefect are</p><ul><li><p><strong>Pythonic and Flexible</strong>: Also Python-based like Airflow but with a focus on easy-to-use syntax and configuration.</p></li><li><p><strong>Dynamic Task Mapping</strong>: Allows for dynamic task creation at runtime, which is beneficial for variable-length workflows.</p></li><li><p><strong>Fault Tolerance and Resilience</strong>: Provides robust error handling, making it easy to rerun workflows from a failed task.</p></li><li><p><strong>Hybrid Cloud Execution</strong>: Supports both cloud and local execution, allowing users to manage infrastructure more flexibly.</p></li></ul><div class="pullquote"><p>Prefect is best for scalable, resilient workflows where <strong>cloud integration and error handling are a high priority</strong>.</p></div><h3><strong>KubeFlow Pipelines</strong></h3><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!7VfJ!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7cdc5144-073f-4140-9512-7537d53b63a1_2858x1698.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!7VfJ!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7cdc5144-073f-4140-9512-7537d53b63a1_2858x1698.png 424w, https://substackcdn.com/image/fetch/$s_!7VfJ!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7cdc5144-073f-4140-9512-7537d53b63a1_2858x1698.png 848w, https://substackcdn.com/image/fetch/$s_!7VfJ!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7cdc5144-073f-4140-9512-7537d53b63a1_2858x1698.png 1272w, https://substackcdn.com/image/fetch/$s_!7VfJ!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7cdc5144-073f-4140-9512-7537d53b63a1_2858x1698.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!7VfJ!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7cdc5144-073f-4140-9512-7537d53b63a1_2858x1698.png" width="1456" height="865" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/7cdc5144-073f-4140-9512-7537d53b63a1_2858x1698.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:865,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;Pipelines UI&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="Pipelines UI" title="Pipelines UI" srcset="https://substackcdn.com/image/fetch/$s_!7VfJ!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7cdc5144-073f-4140-9512-7537d53b63a1_2858x1698.png 424w, https://substackcdn.com/image/fetch/$s_!7VfJ!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7cdc5144-073f-4140-9512-7537d53b63a1_2858x1698.png 848w, https://substackcdn.com/image/fetch/$s_!7VfJ!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7cdc5144-073f-4140-9512-7537d53b63a1_2858x1698.png 1272w, https://substackcdn.com/image/fetch/$s_!7VfJ!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7cdc5144-073f-4140-9512-7537d53b63a1_2858x1698.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><a href="https://www.kubeflow.org/docs/components/pipelines/">Kubeflow Pipelines (KFP)</a> is a platform for building and deploying portable and scalable machine learning (ML) workflows using Docker containers.</p><p>Some of the main characteristics of kubeflow pipelines are</p><ul><li><p><strong>Kubernetes-Native</strong>: Designed for running on Kubernetes, making it ideal for containerized applications.</p></li><li><p><strong>Machine Learning (ML) Focused</strong>: Specifically built to manage ML workflows, including model training, deployment, and monitoring.</p></li><li><p><strong>Parameterization and Iteration</strong>: Great support for hyperparameter tuning, parameterized runs, and experiment tracking.</p></li><li><p><strong>Integration with ML Tools</strong>: Works well with TensorFlow, PyTorch, and other popular ML frameworks.</p></li></ul><div class="pullquote"><p>Kubeflow pipelines are best for Orchestrating and automating ML workflows in <strong>Kubernetes environments</strong>.</p></div><h3><strong>Dagster</strong></h3><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!piSR!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc0a269d2-c029-4bf4-87ed-2eff3340e3e2_1776x1162.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!piSR!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc0a269d2-c029-4bf4-87ed-2eff3340e3e2_1776x1162.png 424w, https://substackcdn.com/image/fetch/$s_!piSR!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc0a269d2-c029-4bf4-87ed-2eff3340e3e2_1776x1162.png 848w, https://substackcdn.com/image/fetch/$s_!piSR!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc0a269d2-c029-4bf4-87ed-2eff3340e3e2_1776x1162.png 1272w, https://substackcdn.com/image/fetch/$s_!piSR!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc0a269d2-c029-4bf4-87ed-2eff3340e3e2_1776x1162.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!piSR!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc0a269d2-c029-4bf4-87ed-2eff3340e3e2_1776x1162.png" width="1456" height="953" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/c0a269d2-c029-4bf4-87ed-2eff3340e3e2_1776x1162.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:953,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:426181,&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_!piSR!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc0a269d2-c029-4bf4-87ed-2eff3340e3e2_1776x1162.png 424w, https://substackcdn.com/image/fetch/$s_!piSR!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc0a269d2-c029-4bf4-87ed-2eff3340e3e2_1776x1162.png 848w, https://substackcdn.com/image/fetch/$s_!piSR!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc0a269d2-c029-4bf4-87ed-2eff3340e3e2_1776x1162.png 1272w, https://substackcdn.com/image/fetch/$s_!piSR!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc0a269d2-c029-4bf4-87ed-2eff3340e3e2_1776x1162.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><a href="https://dagster.io/">Dagster</a> models pipelines in terms of the data assets they produce and consume, which, by default, brings order and observability to your data platform. Assets in Dagster can model data produced by any system, such as dbt models, Snowflake tables, or even CSV files.</p><p>Main characteristics of Dagster are </p><ul><li><p><strong>Type-Safe and Data-Driven</strong>: Incorporates type-safety and data validation, making it a popular choice for data-centric applications.</p></li><li><p><strong>Modular and Component-Based</strong>: Allows users to manage individual tasks as reusable modules, simplifying complex workflows.</p></li><li><p><strong>Strong Debugging and Testing Support</strong>: Provides tools for developing, testing, and debugging data pipelines.</p></li></ul><div class="pullquote"><p>Dagster is best for data-heavy workflows where <strong>data quality and validation are key</strong> requirements, especially in data engineering and analytics.</p></div><p>In future articles, we&#8217;ll dive deep into each of these and see how we can set these up fast and understand their fundamentals and intermediate concepts. If you&#8217;re interested in reading about them or similar topics, feel free to subscribe to my blog for <strong>free</strong> using the button below. </p><p>Thanks for reading! I hope you have a wonderful day!</p><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://compute.anshaj.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 Compute - A programming blog! 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[5 things that make you a great software engineer]]></title><description><![CDATA[That they don't tell you about]]></description><link>https://compute.anshaj.dev/p/5-things-that-make-you-a-great-software</link><guid isPermaLink="false">https://compute.anshaj.dev/p/5-things-that-make-you-a-great-software</guid><dc:creator><![CDATA[Anshaj]]></dc:creator><pubDate>Thu, 10 Oct 2024 13:33:58 GMT</pubDate><enclosure url="https://images.unsplash.com/photo-1506506200949-df8644f002d1?crop=entropy&amp;cs=tinysrgb&amp;fit=max&amp;fm=jpg&amp;ixid=M3wzMDAzMzh8MHwxfHNlYXJjaHwyNXx8Y29kZXJ8ZW58MHx8fHwxNzI4NTYzOTUwfDA&amp;ixlib=rb-4.0.3&amp;q=80&amp;w=1080" length="0" type="image/jpeg"/><content:encoded><![CDATA[<div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://images.unsplash.com/photo-1506506200949-df8644f002d1?crop=entropy&amp;cs=tinysrgb&amp;fit=max&amp;fm=jpg&amp;ixid=M3wzMDAzMzh8MHwxfHNlYXJjaHwyNXx8Y29kZXJ8ZW58MHx8fHwxNzI4NTYzOTUwfDA&amp;ixlib=rb-4.0.3&amp;q=80&amp;w=1080" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://images.unsplash.com/photo-1506506200949-df8644f002d1?crop=entropy&amp;cs=tinysrgb&amp;fit=max&amp;fm=jpg&amp;ixid=M3wzMDAzMzh8MHwxfHNlYXJjaHwyNXx8Y29kZXJ8ZW58MHx8fHwxNzI4NTYzOTUwfDA&amp;ixlib=rb-4.0.3&amp;q=80&amp;w=1080 424w, https://images.unsplash.com/photo-1506506200949-df8644f002d1?crop=entropy&amp;cs=tinysrgb&amp;fit=max&amp;fm=jpg&amp;ixid=M3wzMDAzMzh8MHwxfHNlYXJjaHwyNXx8Y29kZXJ8ZW58MHx8fHwxNzI4NTYzOTUwfDA&amp;ixlib=rb-4.0.3&amp;q=80&amp;w=1080 848w, https://images.unsplash.com/photo-1506506200949-df8644f002d1?crop=entropy&amp;cs=tinysrgb&amp;fit=max&amp;fm=jpg&amp;ixid=M3wzMDAzMzh8MHwxfHNlYXJjaHwyNXx8Y29kZXJ8ZW58MHx8fHwxNzI4NTYzOTUwfDA&amp;ixlib=rb-4.0.3&amp;q=80&amp;w=1080 1272w, https://images.unsplash.com/photo-1506506200949-df8644f002d1?crop=entropy&amp;cs=tinysrgb&amp;fit=max&amp;fm=jpg&amp;ixid=M3wzMDAzMzh8MHwxfHNlYXJjaHwyNXx8Y29kZXJ8ZW58MHx8fHwxNzI4NTYzOTUwfDA&amp;ixlib=rb-4.0.3&amp;q=80&amp;w=1080 1456w" sizes="100vw"><img src="https://images.unsplash.com/photo-1506506200949-df8644f002d1?crop=entropy&amp;cs=tinysrgb&amp;fit=max&amp;fm=jpg&amp;ixid=M3wzMDAzMzh8MHwxfHNlYXJjaHwyNXx8Y29kZXJ8ZW58MHx8fHwxNzI4NTYzOTUwfDA&amp;ixlib=rb-4.0.3&amp;q=80&amp;w=1080" width="3246" height="4869" data-attrs="{&quot;src&quot;:&quot;https://images.unsplash.com/photo-1506506200949-df8644f002d1?crop=entropy&amp;cs=tinysrgb&amp;fit=max&amp;fm=jpg&amp;ixid=M3wzMDAzMzh8MHwxfHNlYXJjaHwyNXx8Y29kZXJ8ZW58MHx8fHwxNzI4NTYzOTUwfDA&amp;ixlib=rb-4.0.3&amp;q=80&amp;w=1080&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:4869,&quot;width&quot;:3246,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;MacBook Pro on table&quot;,&quot;title&quot;:null,&quot;type&quot;:&quot;image/jpg&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="MacBook Pro on table" title="MacBook Pro on table" srcset="https://images.unsplash.com/photo-1506506200949-df8644f002d1?crop=entropy&amp;cs=tinysrgb&amp;fit=max&amp;fm=jpg&amp;ixid=M3wzMDAzMzh8MHwxfHNlYXJjaHwyNXx8Y29kZXJ8ZW58MHx8fHwxNzI4NTYzOTUwfDA&amp;ixlib=rb-4.0.3&amp;q=80&amp;w=1080 424w, https://images.unsplash.com/photo-1506506200949-df8644f002d1?crop=entropy&amp;cs=tinysrgb&amp;fit=max&amp;fm=jpg&amp;ixid=M3wzMDAzMzh8MHwxfHNlYXJjaHwyNXx8Y29kZXJ8ZW58MHx8fHwxNzI4NTYzOTUwfDA&amp;ixlib=rb-4.0.3&amp;q=80&amp;w=1080 848w, https://images.unsplash.com/photo-1506506200949-df8644f002d1?crop=entropy&amp;cs=tinysrgb&amp;fit=max&amp;fm=jpg&amp;ixid=M3wzMDAzMzh8MHwxfHNlYXJjaHwyNXx8Y29kZXJ8ZW58MHx8fHwxNzI4NTYzOTUwfDA&amp;ixlib=rb-4.0.3&amp;q=80&amp;w=1080 1272w, https://images.unsplash.com/photo-1506506200949-df8644f002d1?crop=entropy&amp;cs=tinysrgb&amp;fit=max&amp;fm=jpg&amp;ixid=M3wzMDAzMzh8MHwxfHNlYXJjaHwyNXx8Y29kZXJ8ZW58MHx8fHwxNzI4NTYzOTUwfDA&amp;ixlib=rb-4.0.3&amp;q=80&amp;w=1080 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><figcaption class="image-caption">Photo by <a href="true">Jay Wennington</a> on <a href="https://unsplash.com">Unsplash</a></figcaption></figure></div><p>It&#8217;s been a few years since I&#8217;ve been working as a software engineer. During this time, I&#8217;ve worked on various domains - backend, data science, data engineering, devops to name a few. I&#8217;ve worked for multiple organizations ranging from the biggest names in tech to small scale startups building products from the ground up. </p><p>Here are 5 things that I&#8217;ve learned in the last 8 years of my software engineering career that no one told me about, when I started. And note that are all of these are skills that you can hone and sharpen over the course of your own journey </p><h2><strong>Growth mindset is your most important asset</strong></h2><p>A growth mindset is the belief that abilities and intelligence can be developed over time through effort, learning, and persistence. This concept was popularized by psychologist Carol Dweck. In contrast to a "fixed mindset"&#8212;the belief that abilities are static and unchangeable&#8212;a growth mindset encourages a person to view challenges as opportunities to grow, embrace failure as a learning experience, and focus on improvement rather than fearing mistakes.</p><p>People with a growth mindset tend to:</p><ul><li><p>Believe that effort leads to improvement.</p></li><li><p>Embrace challenges rather than avoid them.</p></li><li><p>Learn from criticism and feedback.</p></li><li><p>Persist in the face of setbacks.</p></li></ul><p>In your professional setting, you&#8217;re going to receive critical feedback. Whether you&#8217;ve just started or have reached more than 20 years in your discipline, one always makes mistakes and one can always be better. To become better however, you have to learn how to <strong>not take feedback personally </strong>but instead, see the situation objectively. What could you indeed do better? Is there something you missed? Instead of being hard on yourself, that you made a mistake, remember that you&#8217;re human and even if you&#8217;re one of the best in your field, there&#8217;ll always be room for growth. Be kind to yourself and allow yourself to grow, allow yourself to see things that you can do better, and make it a habit. Like a plant by design, always grows towards light, allow yourself to always find your way towards growth.</p><h2>Your only competition is you</h2><p>You&#8217;ve heard this countless times and hence I&#8217;m not gonna bore you with an explanation of this. Compete with your yesterday&#8217;s self and not other engineers, people etc. You may have been conditioned to compare yourself with others, by your family, teachers etc, but it is time that you <strong>unlearn this mindset and grow</strong> a mindset of getting better than what you were yesterday. Focus on consistent growth instead of impulsive growth and you&#8217;ll find yourself finding your direction much more easily than others</p><h2>Stakeholders are not your enemies</h2><p>If you&#8217;re working as an engineer, you&#8217;ve at least once blamed the problem on a stakeholder. It&#8217;s either - &#8220;Requirements change way too often.&#8221; or &#8220;I don&#8217;t understand why they can&#8217;t make up their mind&#8221;. As a software engineer, it&#8217;s easy to fall into the trap of viewing stakeholders&#8212;be they product managers, business leaders, designers, or clients&#8212;as adversaries or obstacles in the development process. This mindset often stems from a perception that stakeholders are out to impose unrealistic demands, disrupt your workflow, or dictate technical decisions without understanding the complexities of software engineering.</p><p>This mindset won&#8217;t help you. And what doesn&#8217;t help can change for good. Stakeholders are your <strong>partners</strong> in creating successful products. They&#8217;re not your enemies&#8212;they&#8217;re the key players who ensure that your work aligns with business goals, user needs, and market realities. In order to become a better engineer, you need to understand your product. And it&#8217;s very likely that you do not understand your product as well as your stakeholders do. Here are some things that you can do to understand your stakeholders better and to co-partner with them in building great products</p><ol><li><p>Understand your customers. One of the primary roles of stakeholders is to advocate for the needs and desires of the customer or end-user. As a software engineer, you may not always have direct access to the people using the product, but stakeholders do. Their job is to gather insights, feedback, and market research, ensuring that what you build solves real problems and provides value.</p></li><li><p>Understand the context for decision making. Stakeholders often hold a broader view of the product's goals, vision, and market positioning. While you may be an expert in <strong>how</strong> things work from a technical perspective, stakeholders understand <strong>why</strong> those things matter in the larger business context. They can provide critical context when making decisions about features, timelines, and trade-offs.</p></li><li><p>Most stakeholders come from non-tech backgrounds. They can give you insights about your work, that may not be apparent to you. There&#8217;s a huge potential for growth by analyzing the perspective of someone who comes from a different background than you, and sees the world differently than you.</p></li></ol><p>In truth, once I learned this myself, I started having a much better time in my stakeholder talks. I became friends with many of them, and I&#8217;ve had great discussions with some of my stakeholders and continue to enjoy spending time with them outside of work as well.</p><h2>Being a problem solver is better than being a language specialist </h2><p>In the world of software engineering, there's often a debate about the best path to success: Should you become an expert in a particular programming language or framework, or should you focus on developing problem-solving skills that are language-agnostic? While mastering a specific technology might give you deep expertise, becoming a versatile problem solver can offer far more long-term career benefits. It&#8217;s important to remember</p><h3><strong>Languages Are Tools, Not the End Goal</strong></h3><p>At its core, software engineering is about solving problems and building solutions. Languages, frameworks, and tools are just the means to that end. Whether you're working with Python, JavaScript, Java, C++, or even newer languages like Rust or Go, the programming language itself is just a tool to implement your ideas. What truly matters is your ability to break down complex problems and devise effective, efficient solutions, regardless of the technology stack you&#8217;re using. </p><h3>It&#8217;s a rapidly Changing Industry</h3><p>The tech industry evolves at a breakneck pace. New programming languages, libraries, and frameworks are being introduced constantly, and tools that were popular a few years ago may become obsolete or less relevant. A language specialist may find themselves tied to a technology that has lost favor in the industry, whereas a problem solver has the flexibility to pick up new tools and technologies as needed.</p><p>Being adaptable makes you more marketable and more likely to succeed over the long term, as you can take on a broader range of projects and adjust to the needs of your organization or the industry.</p><h3>Cross-Disciplinary Expertise</h3><p>In modern software development, projects often require collaboration with professionals from diverse disciplines, including UX/UI designers, product managers, QA testers, data engineers, and even non-technical stakeholders. A problem solver is better equipped to work in these cross-functional teams because they can communicate solutions and trade-offs in terms that everyone can understand&#8212;whether it's a technical team member or a business stakeholder.</p><p>This skill is especially crucial as software engineering has shifted towards full-stack development, where engineers are required to have a broader range of knowledge across both front-end and back-end development, as well as cloud infrastructure, databases, and security.</p><h3>Long-Term Career Flexibility</h3><p>Career longevity in software engineering is largely driven by your ability to adapt and solve problems rather than your deep knowledge of a specific technology. As the industry shifts and new trends emerge (such as the rise of AI, blockchain, and cloud computing), your ability to learn and apply new technologies quickly becomes much more important than your expertise in a particular language.</p><h3><strong>True Value Lies in Delivering Results</strong></h3><p>In the end, software engineering is about delivering results that meet user needs and business goals. While mastering a particular language might make you technically proficient in certain areas, the ability to consistently deliver effective solutions to real-world problems is what will make you stand out as an exceptional engineer.</p><h2>Feynman technique for learning things</h2><p>The <strong>Feynman Technique</strong> is a powerful method for learning and deeply understanding concepts, named after the Nobel-winning physicist <strong>Richard Feynman</strong>, who was known for his ability to explain complex scientific ideas in simple, clear terms. This technique involves four simple steps that help you internalize information and identify gaps in your understanding. Here&#8217;s how it works:</p><h3><strong>Choose a Concept You Want to Learn</strong></h3><p>The first step is to pick the topic or concept you want to understand. This could be anything from a specific software engineering concept like <strong>recursion</strong> or <strong>object-oriented design</strong>, to a broader topic like <strong>machine learning</strong> or <strong>quantum physics</strong>. The idea is to select something that you either don&#8217;t know well yet or want to deepen your understanding of.</p><h3><strong>Teach It to a Child (or Anyone Without Expertise)</strong></h3><p>This is the heart of the Feynman Technique: explain the concept as if you're teaching it to someone with no prior knowledge of the subject. The idea is to simplify the topic to the point where even a young child could understand it.</p><p>In the context of software engineering, this could mean explaining an abstract concept like <strong>polymorphism</strong> to a beginner by using everyday analogies (e.g., "Think of a car. A car can be driven, but depending on the car, the type of fuel it uses or the engine under the hood may differ, just like how polymorphism allows different classes to use the same method but behave differently.").</p><p>This step forces you to get rid of jargon and complex language, and distill the information to its most fundamental, easy-to-understand points. If you struggle to explain something, it&#8217;s a clear sign that your understanding of the concept isn&#8217;t as deep as it needs to be.</p><h3><strong>Identify Gaps in Your Knowledge</strong></h3><p>After attempting to explain the concept simply, you'll likely realize parts of the explanation are unclear or incomplete. This is where you spot gaps in your knowledge. If you can't explain a particular part of the concept easily, or if you&#8217;re unsure about certain details, it indicates that you need to study those parts more deeply.</p><p>At this stage, go back to your source material&#8212;be it textbooks, tutorials, or documentation&#8212;and review the areas that are unclear. This might involve re-reading concepts, seeking alternate explanations, or practicing the material through examples and exercises.</p><h3><strong>Simplify and Refine Your Explanation</strong></h3><p>Once you've identified your knowledge gaps and filled them in, go back and simplify your explanation again. The goal is to make your understanding as clear and concise as possible. This final step often involves refining your ability to explain the concept in an even more accessible way, ensuring that the information is both accurate and easy to understand.</p><h3>Why It Works</h3><p>The Feynman Technique works because it encourages active engagement with the material. Rather than passively reading or listening to explanations, you are forced to process and organize the information in your own words. This makes you internalize it much more deeply.</p><p>Additionally, by teaching the material to someone else (real or imaginary), you simulate a situation where you have to explain things clearly, which makes you more likely to remember and understand the topic thoroughly. The process of identifying gaps in your knowledge also ensures that you're constantly learning and improving.</p><h3>Example: Feynman Technique in Software Engineering</h3><p>Let&#8217;s say you want to learn about <strong>Asynchronous Programming</strong> in JavaScript. Here&#8217;s how you might apply the Feynman Technique:</p><ol><li><p><strong>Choose the Concept</strong>: Asynchronous Programming (Promises, async/await).</p></li><li><p><strong>Teach It to a Child</strong>: Explain it like you're teaching a beginner or a child.</p><ul><li><p>"Imagine you&#8217;re making a sandwich. Instead of waiting for the sandwich to be made before you can eat, you start another task, like making a smoothie. When the sandwich is ready, you come back to it. Asynchronous programming is like that&#8212;you don&#8217;t wait for one thing to finish before starting something else. You can work on multiple tasks at once."</p></li></ul></li><li><p><strong>Identify Gaps</strong>: While trying to explain it, you may realize you aren&#8217;t sure how Promises handle multiple tasks or how error handling works in asynchronous code. You go back and read up on <strong>Promise chaining</strong> or <strong>error handling in async/await</strong>.</p></li><li><p><strong>Refine Your Explanation</strong>: After you&#8217;ve filled in your gaps, you rephrase your explanation:</p><ul><li><p>"Asynchronous programming lets you start one task (like making a smoothie) while waiting for another (like the sandwich) to be completed. When the sandwich is done, you handle it. In programming, a Promise is like a waiter that will give you your sandwich when it&#8217;s ready. If something goes wrong, the waiter can tell you with an error message." </p></li></ul></li></ol><div><hr></div><p>This was a long article. If you&#8217;ve made it so far, congratulations. You&#8217;re one of the rare people who are able to retain attention in a world where people are finding it harder and harder to concentrate. If you liked reading this, consider subscribing to this substack. I&#8217;ve reading and implementing ways to be more productive, and do meaningful work since the last 4 years and I&#8217;d like to share some of those things with the world. You may find some thing of value here afterall&#8230;</p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://compute.anshaj.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://compute.anshaj.dev/subscribe?"><span>Subscribe now</span></a></p><p></p>]]></content:encoded></item><item><title><![CDATA[Boost Your Productivity with the Best VS Code Extensions]]></title><description><![CDATA[How to save time and become more efficient at software engineering using VS Code extensions]]></description><link>https://compute.anshaj.dev/p/boost-productivity-with-vs-code-extensions</link><guid isPermaLink="false">https://compute.anshaj.dev/p/boost-productivity-with-vs-code-extensions</guid><dc:creator><![CDATA[Anshaj]]></dc:creator><pubDate>Mon, 02 Oct 2023 13:17:37 GMT</pubDate><enclosure url="https://images.unsplash.com/photo-1484417894907-623942c8ee29?crop=entropy&amp;cs=tinysrgb&amp;fit=max&amp;fm=jpg&amp;ixid=M3wzMDAzMzh8MHwxfHNlYXJjaHwxM3x8dnMlMjBjb2RlfGVufDB8fHx8MTY5NjI1MDEwMHww&amp;ixlib=rb-4.0.3&amp;q=80&amp;w=1080" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p></p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://images.unsplash.com/photo-1484417894907-623942c8ee29?crop=entropy&amp;cs=tinysrgb&amp;fit=max&amp;fm=jpg&amp;ixid=M3wzMDAzMzh8MHwxfHNlYXJjaHwxM3x8dnMlMjBjb2RlfGVufDB8fHx8MTY5NjI1MDEwMHww&amp;ixlib=rb-4.0.3&amp;q=80&amp;w=1080" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://images.unsplash.com/photo-1484417894907-623942c8ee29?crop=entropy&amp;cs=tinysrgb&amp;fit=max&amp;fm=jpg&amp;ixid=M3wzMDAzMzh8MHwxfHNlYXJjaHwxM3x8dnMlMjBjb2RlfGVufDB8fHx8MTY5NjI1MDEwMHww&amp;ixlib=rb-4.0.3&amp;q=80&amp;w=1080 424w, https://images.unsplash.com/photo-1484417894907-623942c8ee29?crop=entropy&amp;cs=tinysrgb&amp;fit=max&amp;fm=jpg&amp;ixid=M3wzMDAzMzh8MHwxfHNlYXJjaHwxM3x8dnMlMjBjb2RlfGVufDB8fHx8MTY5NjI1MDEwMHww&amp;ixlib=rb-4.0.3&amp;q=80&amp;w=1080 848w, https://images.unsplash.com/photo-1484417894907-623942c8ee29?crop=entropy&amp;cs=tinysrgb&amp;fit=max&amp;fm=jpg&amp;ixid=M3wzMDAzMzh8MHwxfHNlYXJjaHwxM3x8dnMlMjBjb2RlfGVufDB8fHx8MTY5NjI1MDEwMHww&amp;ixlib=rb-4.0.3&amp;q=80&amp;w=1080 1272w, https://images.unsplash.com/photo-1484417894907-623942c8ee29?crop=entropy&amp;cs=tinysrgb&amp;fit=max&amp;fm=jpg&amp;ixid=M3wzMDAzMzh8MHwxfHNlYXJjaHwxM3x8dnMlMjBjb2RlfGVufDB8fHx8MTY5NjI1MDEwMHww&amp;ixlib=rb-4.0.3&amp;q=80&amp;w=1080 1456w" sizes="100vw"><img src="https://images.unsplash.com/photo-1484417894907-623942c8ee29?crop=entropy&amp;cs=tinysrgb&amp;fit=max&amp;fm=jpg&amp;ixid=M3wzMDAzMzh8MHwxfHNlYXJjaHwxM3x8dnMlMjBjb2RlfGVufDB8fHx8MTY5NjI1MDEwMHww&amp;ixlib=rb-4.0.3&amp;q=80&amp;w=1080" width="5507" height="3098" data-attrs="{&quot;src&quot;:&quot;https://images.unsplash.com/photo-1484417894907-623942c8ee29?crop=entropy&amp;cs=tinysrgb&amp;fit=max&amp;fm=jpg&amp;ixid=M3wzMDAzMzh8MHwxfHNlYXJjaHwxM3x8dnMlMjBjb2RlfGVufDB8fHx8MTY5NjI1MDEwMHww&amp;ixlib=rb-4.0.3&amp;q=80&amp;w=1080&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:3098,&quot;width&quot;:5507,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;MacBook Pro showing programming language&quot;,&quot;title&quot;:null,&quot;type&quot;:&quot;image/jpg&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="MacBook Pro showing programming language" title="MacBook Pro showing programming language" srcset="https://images.unsplash.com/photo-1484417894907-623942c8ee29?crop=entropy&amp;cs=tinysrgb&amp;fit=max&amp;fm=jpg&amp;ixid=M3wzMDAzMzh8MHwxfHNlYXJjaHwxM3x8dnMlMjBjb2RlfGVufDB8fHx8MTY5NjI1MDEwMHww&amp;ixlib=rb-4.0.3&amp;q=80&amp;w=1080 424w, https://images.unsplash.com/photo-1484417894907-623942c8ee29?crop=entropy&amp;cs=tinysrgb&amp;fit=max&amp;fm=jpg&amp;ixid=M3wzMDAzMzh8MHwxfHNlYXJjaHwxM3x8dnMlMjBjb2RlfGVufDB8fHx8MTY5NjI1MDEwMHww&amp;ixlib=rb-4.0.3&amp;q=80&amp;w=1080 848w, https://images.unsplash.com/photo-1484417894907-623942c8ee29?crop=entropy&amp;cs=tinysrgb&amp;fit=max&amp;fm=jpg&amp;ixid=M3wzMDAzMzh8MHwxfHNlYXJjaHwxM3x8dnMlMjBjb2RlfGVufDB8fHx8MTY5NjI1MDEwMHww&amp;ixlib=rb-4.0.3&amp;q=80&amp;w=1080 1272w, https://images.unsplash.com/photo-1484417894907-623942c8ee29?crop=entropy&amp;cs=tinysrgb&amp;fit=max&amp;fm=jpg&amp;ixid=M3wzMDAzMzh8MHwxfHNlYXJjaHwxM3x8dnMlMjBjb2RlfGVufDB8fHx8MTY5NjI1MDEwMHww&amp;ixlib=rb-4.0.3&amp;q=80&amp;w=1080 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><figcaption class="image-caption">Photo by <a href="https://unsplash.com/@emilep">Emile Perron</a> on <a href="https://unsplash.com">Unsplash</a></figcaption></figure></div><p>I've been using Visual Studio Code (VS Code) for about five years now, and it has truly transformed the way I code for both personal and professional projects. This lightweight, open-source code editor has a fantastic ecosystem of extensions that enhance its functionality and make it an indispensable tool for developers. In this article, I'll share some of the best extensions that have helped me streamline my coding process and boost my productivity.</p><h3><strong>Visual Studio Live Share</strong></h3><p>VS Code <a href="https://code.visualstudio.com/learn/collaboration/live-share">live share extension</a> is a game-changer for collaborative coding. It allows you to share your workspace in real-time with team members or colleagues, making it easier than ever to pair program, debug, and troubleshoot together. With Live Share, you can edit code simultaneously and even share your debugging session, which is incredibly helpful for remote work or distributed teams.</p><h3><strong>GitLens</strong></h3><p>For version control aficionados, <a href="https://marketplace.visualstudio.com/items?itemName=eamodio.gitlens">GitLens</a> is a must-have extension. It supercharges your Git experience within VS Code, providing an array of features like inline blame annotations, commit history exploration, and code lens for commit references. With GitLens, you'll have a deeper understanding of your code's history and who made what changes.</p><h3><strong>Remote Development Extensions</strong></h3><p>With the rise of remote and distributed work, the Remote Development extension pack is a valuable addition. It includes extensions like Remote - SSH, Remote - Containers, and Remote - WSL, which enable you to develop in remote environments seamlessly. Whether you need to code on a remote server, inside a Docker container, or on Windows Subsystem for Linux (WSL), these extensions have you covered.</p><h3><strong>Bookmarks</strong> </h3><p>The <a href="https://marketplace.visualstudio.com/items?itemName=alefragnani.Bookmarks">Bookmarks extension</a> in VS Code is a lifesaver when it comes to finding code snippets swiftly and programming with greater efficiency. It allows you to mark specific lines of code with bookmarks, which act as handy signposts for later reference. Whether you need to quickly revisit a critical section of code, navigate between different parts of a file, or keep track of important TODOs, bookmarks make it a breeze. With a single keyboard shortcut, you can toggle through your bookmarks, making it easy to jump to precisely where you need to be in your codebase. This feature not only enhances productivity but also reduces the time spent scrolling and searching, helping you code more effectively.</p><h3><strong>Dev Containers</strong></h3><p>The <a href="https://code.visualstudio.com/docs/devcontainers/containers">Dev Containers extension</a> in VS Code revolutionises the way developers set up and maintain local development environments. It ensures consistency and streamlines the process of configuring development environments across a team. With Dev Containers, you can define your development environment as code, specifying all the necessary dependencies, tools, and configurations in a single configuration file. When a team member opens the project, VS Code automatically detects and prompts them to create or reopen the project in the specified development container. This not only saves time but also eliminates the "it works on my machine" problem, as all developers work within the same, standardized environment. Dev Containers truly fosters collaboration and ensures that every team member is on the same page, making development smoother and more efficient</p><h3><strong>Github Copilot</strong></h3><p><a href="https://github.com/features/copilot">GitHub Copilot</a> is like having a coding buddy who's not only super smart but also tons of fun to work with! It's your secret weapon for turbocharging software projects. Copilot helps you write code faster by suggesting what you need as you type, saving you time and effort. Plus, it makes coding feel like a game, thanks to its friendly and helpful suggestions. It's like having your very own co-pilot on the coding adventure, and it turns even complex projects into a breeze. With Copilot, software development becomes a fast, fun, and approachable journey that you'll look forward to every day!</p><h3>Code Spell Checker</h3><p>The <a href="https://marketplace.visualstudio.com/items?itemName=streetsidesoftware.code-spell-checker">Code Spell Checker extension</a> in VS Code is a silent hero for programmers. It effortlessly catches spelling errors in your code and comments, ensuring that your communication is clear and professional. By preventing typos and misspellings from slipping through the cracks, this extension saves you the time and embarrassment of correcting them later. It's a small but incredibly valuable tool that helps you code with confidence, making you not only more efficient but also a more polished programmer.</p><h3>Better Comments</h3><p>The <a href="https://marketplace.visualstudio.com/items?itemName=aaron-bond.better-comments">Better Comments extension</a> in VS Code is very useful when it comes to writing meaningful and useful comments in your code. It adds color coding and custom syntax to your comments, making it easy to categorize and prioritize them. Whether you want to highlight important to-dos, mark code for review, or simply provide clarity within your codebase, this extension ensures that your comments are not just an afterthought but an integral part of your programming process. It encourages better documentation practices, ultimately improving code readability and collaboration within your team. With Better Comments, you'll find that your comments are no longer an obligation but a valuable asset in your programming journey.</p><h2>Conclusion</h2><p>Visual Studio Code's extensibility is one of its most significant strengths, allowing developers to tailor their coding environment to their specific needs. As someone who has relied on VS Code for half a decade, I can attest to the immense value these extensions bring to the table. Whether you're working on personal projects, collaborating with a team, or tackling complex codebases, these extensions will undoubtedly help you code faster, smarter, and with fewer headaches. Give them a try, and you'll wonder how you ever coded without them!</p><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://compute.anshaj.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 Anshaj&#8217;s Substack! Subscribe for free to receive new posts and support my work.</p></div><form class="subscription-widget-subscribe"><input type="email" class="email-input" name="email" placeholder="Type your email&#8230;" tabindex="-1"><input type="submit" class="button primary" value="Subscribe"><div class="fake-input-wrapper"><div class="fake-input"></div><div class="fake-button"></div></div></form></div></div>]]></content:encoded></item><item><title><![CDATA[How to create websites easily with Hugo]]></title><description><![CDATA[And host them for free :)]]></description><link>https://compute.anshaj.dev/p/how-to-create-websites-easily-with</link><guid isPermaLink="false">https://compute.anshaj.dev/p/how-to-create-websites-easily-with</guid><dc:creator><![CDATA[Anshaj]]></dc:creator><pubDate>Fri, 10 Feb 2023 15:28:00 GMT</pubDate><enclosure url="https://images.unsplash.com/photo-1505330622279-bf7d7fc918f4?crop=entropy&amp;cs=tinysrgb&amp;fit=max&amp;fm=jpg&amp;ixid=M3wzMDAzMzh8MHwxfHNlYXJjaHwxfHxibG9nfGVufDB8fHx8MTcyODU3Mzc4N3ww&amp;ixlib=rb-4.0.3&amp;q=80&amp;w=1080" length="0" type="image/jpeg"/><content:encoded><![CDATA[<div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://images.unsplash.com/photo-1505330622279-bf7d7fc918f4?crop=entropy&amp;cs=tinysrgb&amp;fit=max&amp;fm=jpg&amp;ixid=M3wzMDAzMzh8MHwxfHNlYXJjaHwxfHxibG9nfGVufDB8fHx8MTcyODU3Mzc4N3ww&amp;ixlib=rb-4.0.3&amp;q=80&amp;w=1080" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://images.unsplash.com/photo-1505330622279-bf7d7fc918f4?crop=entropy&amp;cs=tinysrgb&amp;fit=max&amp;fm=jpg&amp;ixid=M3wzMDAzMzh8MHwxfHNlYXJjaHwxfHxibG9nfGVufDB8fHx8MTcyODU3Mzc4N3ww&amp;ixlib=rb-4.0.3&amp;q=80&amp;w=1080 424w, https://images.unsplash.com/photo-1505330622279-bf7d7fc918f4?crop=entropy&amp;cs=tinysrgb&amp;fit=max&amp;fm=jpg&amp;ixid=M3wzMDAzMzh8MHwxfHNlYXJjaHwxfHxibG9nfGVufDB8fHx8MTcyODU3Mzc4N3ww&amp;ixlib=rb-4.0.3&amp;q=80&amp;w=1080 848w, https://images.unsplash.com/photo-1505330622279-bf7d7fc918f4?crop=entropy&amp;cs=tinysrgb&amp;fit=max&amp;fm=jpg&amp;ixid=M3wzMDAzMzh8MHwxfHNlYXJjaHwxfHxibG9nfGVufDB8fHx8MTcyODU3Mzc4N3ww&amp;ixlib=rb-4.0.3&amp;q=80&amp;w=1080 1272w, https://images.unsplash.com/photo-1505330622279-bf7d7fc918f4?crop=entropy&amp;cs=tinysrgb&amp;fit=max&amp;fm=jpg&amp;ixid=M3wzMDAzMzh8MHwxfHNlYXJjaHwxfHxibG9nfGVufDB8fHx8MTcyODU3Mzc4N3ww&amp;ixlib=rb-4.0.3&amp;q=80&amp;w=1080 1456w" sizes="100vw"><img src="https://images.unsplash.com/photo-1505330622279-bf7d7fc918f4?crop=entropy&amp;cs=tinysrgb&amp;fit=max&amp;fm=jpg&amp;ixid=M3wzMDAzMzh8MHwxfHNlYXJjaHwxfHxibG9nfGVufDB8fHx8MTcyODU3Mzc4N3ww&amp;ixlib=rb-4.0.3&amp;q=80&amp;w=1080" width="6945" height="4635" data-attrs="{&quot;src&quot;:&quot;https://images.unsplash.com/photo-1505330622279-bf7d7fc918f4?crop=entropy&amp;cs=tinysrgb&amp;fit=max&amp;fm=jpg&amp;ixid=M3wzMDAzMzh8MHwxfHNlYXJjaHwxfHxibG9nfGVufDB8fHx8MTcyODU3Mzc4N3ww&amp;ixlib=rb-4.0.3&amp;q=80&amp;w=1080&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:4635,&quot;width&quot;:6945,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;MacBook Air beside gold-colored study lamp and spiral books&quot;,&quot;title&quot;:null,&quot;type&quot;:&quot;image/jpg&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="MacBook Air beside gold-colored study lamp and spiral books" title="MacBook Air beside gold-colored study lamp and spiral books" srcset="https://images.unsplash.com/photo-1505330622279-bf7d7fc918f4?crop=entropy&amp;cs=tinysrgb&amp;fit=max&amp;fm=jpg&amp;ixid=M3wzMDAzMzh8MHwxfHNlYXJjaHwxfHxibG9nfGVufDB8fHx8MTcyODU3Mzc4N3ww&amp;ixlib=rb-4.0.3&amp;q=80&amp;w=1080 424w, https://images.unsplash.com/photo-1505330622279-bf7d7fc918f4?crop=entropy&amp;cs=tinysrgb&amp;fit=max&amp;fm=jpg&amp;ixid=M3wzMDAzMzh8MHwxfHNlYXJjaHwxfHxibG9nfGVufDB8fHx8MTcyODU3Mzc4N3ww&amp;ixlib=rb-4.0.3&amp;q=80&amp;w=1080 848w, https://images.unsplash.com/photo-1505330622279-bf7d7fc918f4?crop=entropy&amp;cs=tinysrgb&amp;fit=max&amp;fm=jpg&amp;ixid=M3wzMDAzMzh8MHwxfHNlYXJjaHwxfHxibG9nfGVufDB8fHx8MTcyODU3Mzc4N3ww&amp;ixlib=rb-4.0.3&amp;q=80&amp;w=1080 1272w, https://images.unsplash.com/photo-1505330622279-bf7d7fc918f4?crop=entropy&amp;cs=tinysrgb&amp;fit=max&amp;fm=jpg&amp;ixid=M3wzMDAzMzh8MHwxfHNlYXJjaHwxfHxibG9nfGVufDB8fHx8MTcyODU3Mzc4N3ww&amp;ixlib=rb-4.0.3&amp;q=80&amp;w=1080 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><figcaption class="image-caption">Photo by <a href="true">Arnel Hasanovic</a> on <a href="https://unsplash.com">Unsplash</a></figcaption></figure></div><h2>Overview</h2><p>If you're like me and want an easy way to make and publish your website, this article is for you. I'll cover how I made and deployed this current site with minimal effort and zero investment. </p><p><a href="https://github.com/gohugoio/hugo">Hugo</a> is a static HTML and CSS website generator written in&nbsp;[Go](https://golang.org/). It is optimized for speed, ease of use, and configurability. Hugo takes a directory with content and templates and renders them into a full HTML website.</p><p>Some of it's key features are</p><p>1. Relies on Markdown files with front matter for metadata</p><p>2. Renders a typical website of moderate size in a fraction of a second</p><p>3. Is designed to work well for any kind of website including blogs, tumbles, and docs</p><h2>Installation</h2><p>Hugo is very simple to install. There are two things that you require</p><p>1. An installation of <a href="https://go.dev">Golang</a></p><p>2. Installation of Hugo  </p><p>Hugo can be easily installed if you have homebrew with </p><pre><code><code>brew install hugo</code></code></pre><p>If you're not on Mac or you don't have homebrew to install software and dependencies, here's the official installation <a href="https://gohugo.io/getting-started/installing/#quick-install">documentation</a>.</p><h2>Quick start</h2><p>Bootstrapping a website is as simple as running the command below</p><pre><code>hugo new site quickstart</code></pre><p>The theme I'm using for this website is the <a href="https://github.com/theNewDynamic/gohugo-theme-ananke">Anake theme</a>. I'll explain how I set up this theme for this website. The complete list of themes for Hugo can be found at [themes.gohugo.io](https://themes.gohugo.io/)</p><p>Now, that we've picked up a theme, we'll do some quick setup by cloning the theme as a git submodule within our repository</p><pre><code>cd quickstart
git init
git submodule add https://github.com/theNewDynamic/gohugo-theme-ananke.git themes/ananke
echo theme = \"ananke\" &gt;&gt; config.toml</code></pre><p>Let's now add some content to our site with </p><pre><code>hugo new posts/my-first-post.md</code></pre><p>Let's now start the Hugo server with</p><pre><code>hugo server -D</code></pre><p>This is what should be visible when you navigate to localhost:1313</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!ykw7!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F82ee3cf3-e234-4ffd-bcd0-bbb6fd1e2b0b_2880x1478.jpeg" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!ykw7!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F82ee3cf3-e234-4ffd-bcd0-bbb6fd1e2b0b_2880x1478.jpeg 424w, https://substackcdn.com/image/fetch/$s_!ykw7!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F82ee3cf3-e234-4ffd-bcd0-bbb6fd1e2b0b_2880x1478.jpeg 848w, https://substackcdn.com/image/fetch/$s_!ykw7!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F82ee3cf3-e234-4ffd-bcd0-bbb6fd1e2b0b_2880x1478.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!ykw7!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F82ee3cf3-e234-4ffd-bcd0-bbb6fd1e2b0b_2880x1478.jpeg 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!ykw7!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F82ee3cf3-e234-4ffd-bcd0-bbb6fd1e2b0b_2880x1478.jpeg" width="1456" height="747" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/82ee3cf3-e234-4ffd-bcd0-bbb6fd1e2b0b_2880x1478.jpeg&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:747,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;quickstart.jpg&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="quickstart.jpg" title="quickstart.jpg" srcset="https://substackcdn.com/image/fetch/$s_!ykw7!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F82ee3cf3-e234-4ffd-bcd0-bbb6fd1e2b0b_2880x1478.jpeg 424w, https://substackcdn.com/image/fetch/$s_!ykw7!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F82ee3cf3-e234-4ffd-bcd0-bbb6fd1e2b0b_2880x1478.jpeg 848w, https://substackcdn.com/image/fetch/$s_!ykw7!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F82ee3cf3-e234-4ffd-bcd0-bbb6fd1e2b0b_2880x1478.jpeg 1272w, https://substackcdn.com/image/fetch/$s_!ykw7!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F82ee3cf3-e234-4ffd-bcd0-bbb6fd1e2b0b_2880x1478.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 website is now running locally on our machine. </p><h2>Let's deploy</h2><p>Websites can be hosted at a bunch of places easily. One of my favorite solutions to deploy my website for free is [netlify](https://www.netlify.com). You can sign up for a free account and have your website deployed in no time. </p><p>The best part about Netflify is that setting up a continuous deployment pipeline from github is fairly straightforward. Netflify will build your wesbite for you, and deploy it, while providing you a DNS service, if you're planning to use a personal domain. So the only investment I had in hosting is buying my own domain, which I bought separately from <a href="https://domains.google">google domains</a>. I'd highly encourage you to get a domain for yourself, if you don't have one already. </p><p>Here are the steps to deploy your freshly created website on netlify using github.</p><p>Prerequisites </p><p>1. Github account</p><p>2. Netflify account</p><h3>Steps</h3><p>1. Create a new file in your repo with the name <em>netflify.toml</em> and add the following </p><pre><code> [build]

    publish = "public"

    command = "hugo --gc --minify"

    [context.production.environment]

    HUGO_VERSION = "0.101.0"

    HUGO_ENV = "production"

    HUGO_ENABLEGITINFO = "true"

    [context.split1]

    command = "hugo --gc --minify --enableGitInfo"

    [context.split1.environment]

    HUGO_VERSION = "0.101.0"

    HUGO_ENV = "production"

    [context.deploy-preview]

    command = "hugo --gc --minify --buildFuture -b $DEPLOY_PRIME_URL"

    [context.deploy-preview.environment]

    HUGO_VERSION = "0.101.0"

    [context.branch-deploy]

    command = "hugo --gc --minify -b $DEPLOY_PRIME_URL"

    [context.branch-deploy.environment]

    HUGO_VERSION = "0.101.0"

    [context.next.environment]

    HUGO_ENABLEGITINFO = "true"

    [[redirects]]

    from = "/npmjs/*"

    to = "/npmjs/"

    status = 200</code></pre><p>2. Check-in your code on github. Your repo should now look something like this</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!P8XW!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F79658e7b-9bc9-4db4-b1c2-ce1013a23393_1798x716.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!P8XW!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F79658e7b-9bc9-4db4-b1c2-ce1013a23393_1798x716.png 424w, https://substackcdn.com/image/fetch/$s_!P8XW!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F79658e7b-9bc9-4db4-b1c2-ce1013a23393_1798x716.png 848w, https://substackcdn.com/image/fetch/$s_!P8XW!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F79658e7b-9bc9-4db4-b1c2-ce1013a23393_1798x716.png 1272w, https://substackcdn.com/image/fetch/$s_!P8XW!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F79658e7b-9bc9-4db4-b1c2-ce1013a23393_1798x716.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!P8XW!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F79658e7b-9bc9-4db4-b1c2-ce1013a23393_1798x716.png" width="1456" height="580" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/79658e7b-9bc9-4db4-b1c2-ce1013a23393_1798x716.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:580,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;github-push.png&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="github-push.png" title="github-push.png" srcset="https://substackcdn.com/image/fetch/$s_!P8XW!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F79658e7b-9bc9-4db4-b1c2-ce1013a23393_1798x716.png 424w, https://substackcdn.com/image/fetch/$s_!P8XW!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F79658e7b-9bc9-4db4-b1c2-ce1013a23393_1798x716.png 848w, https://substackcdn.com/image/fetch/$s_!P8XW!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F79658e7b-9bc9-4db4-b1c2-ce1013a23393_1798x716.png 1272w, https://substackcdn.com/image/fetch/$s_!P8XW!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F79658e7b-9bc9-4db4-b1c2-ce1013a23393_1798x716.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>3. Open netlify and sign in with your github credentials. Alternatively, we can connect our github account later as well.</p><p>4. Now we need to allow netflify access to our repositories. We can follow the principle of least privilege here and only allow netlify access to the one repository containing our website code</p><p>5. Now, that we have our repo accessible from Netlify, Netlify will be able to see every time we push a new commit on github. This will ensure that our website is built and deployed automatically.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!yl71!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F66b2d605-a5dc-4778-8709-49283ba00767_1416x758.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!yl71!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F66b2d605-a5dc-4778-8709-49283ba00767_1416x758.png 424w, https://substackcdn.com/image/fetch/$s_!yl71!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F66b2d605-a5dc-4778-8709-49283ba00767_1416x758.png 848w, https://substackcdn.com/image/fetch/$s_!yl71!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F66b2d605-a5dc-4778-8709-49283ba00767_1416x758.png 1272w, https://substackcdn.com/image/fetch/$s_!yl71!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F66b2d605-a5dc-4778-8709-49283ba00767_1416x758.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!yl71!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F66b2d605-a5dc-4778-8709-49283ba00767_1416x758.png" width="1416" height="758" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/66b2d605-a5dc-4778-8709-49283ba00767_1416x758.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:758,&quot;width&quot;:1416,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;netlify-1.png&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="netlify-1.png" title="netlify-1.png" srcset="https://substackcdn.com/image/fetch/$s_!yl71!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F66b2d605-a5dc-4778-8709-49283ba00767_1416x758.png 424w, https://substackcdn.com/image/fetch/$s_!yl71!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F66b2d605-a5dc-4778-8709-49283ba00767_1416x758.png 848w, https://substackcdn.com/image/fetch/$s_!yl71!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F66b2d605-a5dc-4778-8709-49283ba00767_1416x758.png 1272w, https://substackcdn.com/image/fetch/$s_!yl71!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F66b2d605-a5dc-4778-8709-49283ba00767_1416x758.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><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!egm2!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F43b50850-ba66-4712-8330-1711078ec5ea_1456x852.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!egm2!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F43b50850-ba66-4712-8330-1711078ec5ea_1456x852.png 424w, https://substackcdn.com/image/fetch/$s_!egm2!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F43b50850-ba66-4712-8330-1711078ec5ea_1456x852.png 848w, https://substackcdn.com/image/fetch/$s_!egm2!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F43b50850-ba66-4712-8330-1711078ec5ea_1456x852.png 1272w, https://substackcdn.com/image/fetch/$s_!egm2!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F43b50850-ba66-4712-8330-1711078ec5ea_1456x852.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!egm2!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F43b50850-ba66-4712-8330-1711078ec5ea_1456x852.png" width="1456" height="852" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/43b50850-ba66-4712-8330-1711078ec5ea_1456x852.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:852,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;netlify-2.png&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="netlify-2.png" title="netlify-2.png" srcset="https://substackcdn.com/image/fetch/$s_!egm2!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F43b50850-ba66-4712-8330-1711078ec5ea_1456x852.png 424w, https://substackcdn.com/image/fetch/$s_!egm2!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F43b50850-ba66-4712-8330-1711078ec5ea_1456x852.png 848w, https://substackcdn.com/image/fetch/$s_!egm2!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F43b50850-ba66-4712-8330-1711078ec5ea_1456x852.png 1272w, https://substackcdn.com/image/fetch/$s_!egm2!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F43b50850-ba66-4712-8330-1711078ec5ea_1456x852.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><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!0k0F!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa4b7f771-92d7-4c03-a9f6-42f74f745a39_1904x1142.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!0k0F!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa4b7f771-92d7-4c03-a9f6-42f74f745a39_1904x1142.png 424w, https://substackcdn.com/image/fetch/$s_!0k0F!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa4b7f771-92d7-4c03-a9f6-42f74f745a39_1904x1142.png 848w, https://substackcdn.com/image/fetch/$s_!0k0F!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa4b7f771-92d7-4c03-a9f6-42f74f745a39_1904x1142.png 1272w, https://substackcdn.com/image/fetch/$s_!0k0F!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa4b7f771-92d7-4c03-a9f6-42f74f745a39_1904x1142.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!0k0F!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa4b7f771-92d7-4c03-a9f6-42f74f745a39_1904x1142.png" width="1456" height="873" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/a4b7f771-92d7-4c03-a9f6-42f74f745a39_1904x1142.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:873,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;netlify-3.png&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="netlify-3.png" title="netlify-3.png" srcset="https://substackcdn.com/image/fetch/$s_!0k0F!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa4b7f771-92d7-4c03-a9f6-42f74f745a39_1904x1142.png 424w, https://substackcdn.com/image/fetch/$s_!0k0F!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa4b7f771-92d7-4c03-a9f6-42f74f745a39_1904x1142.png 848w, https://substackcdn.com/image/fetch/$s_!0k0F!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa4b7f771-92d7-4c03-a9f6-42f74f745a39_1904x1142.png 1272w, https://substackcdn.com/image/fetch/$s_!0k0F!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa4b7f771-92d7-4c03-a9f6-42f74f745a39_1904x1142.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><h2>Our deployed site</h2><p>At the end of the build-deploy stage, our website will get deployed to a unique url generated by netlify. We can always set up our own domain using Netflify DNS, but I won't be covering that in this post. Our newly website should now be running and looking something like this</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!o1Ps!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff0e551a9-e219-46e1-9923-d534b3e46b59_2224x1666.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!o1Ps!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff0e551a9-e219-46e1-9923-d534b3e46b59_2224x1666.png 424w, https://substackcdn.com/image/fetch/$s_!o1Ps!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff0e551a9-e219-46e1-9923-d534b3e46b59_2224x1666.png 848w, https://substackcdn.com/image/fetch/$s_!o1Ps!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff0e551a9-e219-46e1-9923-d534b3e46b59_2224x1666.png 1272w, https://substackcdn.com/image/fetch/$s_!o1Ps!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff0e551a9-e219-46e1-9923-d534b3e46b59_2224x1666.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!o1Ps!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff0e551a9-e219-46e1-9923-d534b3e46b59_2224x1666.png" width="1456" height="1091" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/f0e551a9-e219-46e1-9923-d534b3e46b59_2224x1666.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1091,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;deployed-site.png&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="deployed-site.png" title="deployed-site.png" srcset="https://substackcdn.com/image/fetch/$s_!o1Ps!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff0e551a9-e219-46e1-9923-d534b3e46b59_2224x1666.png 424w, https://substackcdn.com/image/fetch/$s_!o1Ps!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff0e551a9-e219-46e1-9923-d534b3e46b59_2224x1666.png 848w, https://substackcdn.com/image/fetch/$s_!o1Ps!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff0e551a9-e219-46e1-9923-d534b3e46b59_2224x1666.png 1272w, https://substackcdn.com/image/fetch/$s_!o1Ps!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff0e551a9-e219-46e1-9923-d534b3e46b59_2224x1666.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>Hugo provides multiple features for easy creation of new posts, image processing etc. For full documentation, please refer the <a href="https://gohugo.io/documentation/">official hugo docs</a></p><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://compute.anshaj.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 Compute - A programming blog! 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></channel></rss>