<?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:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Awais Qarni on Medium]]></title>
        <description><![CDATA[Stories by Awais Qarni on Medium]]></description>
        <link>https://medium.com/@awais.qarni87?source=rss-6f0ab8b2d83c------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*gzdUsqVTNuN7WurkrVTvNw.jpeg</url>
            <title>Stories by Awais Qarni on Medium</title>
            <link>https://medium.com/@awais.qarni87?source=rss-6f0ab8b2d83c------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Mon, 30 Nov 2026 05:50:51 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@awais.qarni87/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[The Security Layer We Forgot to Build: Agentic AI in Production]]></title>
            <link>https://medium.com/@awais.qarni87/the-security-layer-we-forgot-to-build-agentic-ai-in-production-42b50c3415a9?source=rss-6f0ab8b2d83c------2</link>
            <guid isPermaLink="false">https://medium.com/p/42b50c3415a9</guid>
            <category><![CDATA[agentic-ai]]></category>
            <category><![CDATA[ai-security]]></category>
            <category><![CDATA[product-engineering]]></category>
            <dc:creator><![CDATA[Awais Qarni]]></dc:creator>
            <pubDate>Mon, 08 Jun 2026 16:32:04 GMT</pubDate>
            <atom:updated>2026-06-08T16:32:04.364Z</atom:updated>
            <content:encoded><![CDATA[<p>We’ve spent years hardening web apps, APIs, and databases. But agentic AI systems introduce a new attack surface, and most teams shipping them today have no idea what it looks like.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ZLhZflI28ZU8MQIypALhQw.png" /></figure><p>There’s a moment every engineer recognizes. You’ve shipped something fast, users love it, and then someone asks: “Have you thought about what happens if someone tries to break this?” With traditional software, we have playbooks for that question. With agentic AI, most of us don’t — yet.</p><p>Over the past year, I’ve been building agentic AI systems in a real production environment, not in a sandbox, not as a demo, but in a system that processes customer data, interacts with databases, and takes actions in the world. What I learned about the security implications didn’t come from a course. It came from asking “what could go wrong here?” at every layer.</p><p>This is what I wish someone had written down earlier.</p><h3>Section 01</h3><h4>What makes agentic AI different from regular software</h4><p>A traditional API call is a request-response. It does what you ask, returns a value, and stops. An agentic AI system is different in a fundamental way: it decides what to do next. It reads context, picks tools, calls external services, and generates actions — often in a chain, often without a human in the loop for each step.</p><p>That autonomy is the feature. But it’s also the attack surface.</p><blockquote>When a system can reason about instructions and act on them, the instructions themselves become a vector for attack. That’s new. We’ve never had to defend against software that can be reasoned with.</blockquote><p>In conventional software, you sanitize inputs and validate outputs. In agentic systems, the “input” can be a natural language instruction buried inside a document the agent reads, a tool response from an API it calls, or a prompt injected into a web page it browses. The attack surface isn’t just the front door — it’s everywhere the agent looks.</p><h3>Section 02</h3><h4>The threat landscape: what you’re actually defending against</h4><p>Prompt injection</p><p>Malicious instructions embedded in data the agent reads — documents, web pages, API responses — that hijack the agent’s behavior.</p><p><strong>Tool misuse</strong></p><p>Tricking the agent into calling a tool it shouldn’t — deleting records, sending emails, or escalating its own permissions.</p><p><strong>Chain poisoning</strong></p><p>Compromising one step in a multi-agent chain to corrupt all downstream reasoning and actions.</p><p><strong>Context extraction</strong></p><p>Getting the agent to leak its system prompt, credentials, or other users’ data through carefully crafted follow-up questions.</p><p><strong>Goal hijacking</strong></p><p>Persistent instructions across memory or long context that gradually redirect the agent away from its intended purpose.</p><p><strong>Identity spoofing</strong></p><p>Impersonating a trusted agent or orchestrator to pass unauthorized instructions downstream without triggering safety checks.</p><p>Most of these don’t require hacking skills. They require understanding how the agent reasons, and then writing text that exploits that reasoning. That’s a lower barrier than SQL injection, and the blast radius can be much larger.</p><h3>Section 03</h3><h4>The principle of minimal footprint</h4><p>The single most important concept I’ve internalized while building these systems is this: an agent should request only the permissions it needs, avoid storing sensitive information beyond the immediate task, and prefer reversible actions over irreversible ones.</p><p>This isn’t novel thinking — it’s the principle of least privilege applied to AI. But in practice, agentic systems violate it constantly, not through malice but through convenience. It’s easy to give an agent broad database access because scoping it takes effort. It’s easy to let it retain context across sessions because building proper memory boundaries is hard. Every shortcut here is a security debt.</p><p><strong>Practical rule</strong></p><p>Before giving an agent access to a tool or data source, ask: what is the worst thing it could do with this access? If the answer is catastrophic and the probability of misuse isn’t zero, scope it down or add a human confirmation step.</p><p>In production, I’ve found it helpful to think of agents the way I think of service accounts: they should have just enough access to do their job, nothing more, and their actions should be logged with enough detail to reconstruct exactly what happened and why.</p><h3>Section 04</h3><h4>Where the real risk lives: multi-agent systems</h4><p>Single-agent systems are relatively manageable. The threat model expands dramatically when you start chaining agents together — an orchestrator that delegates to sub-agents, each with their own tool access and context windows.</p><p>The core problem is trust propagation. When Agent A hands instructions to Agent B, how does Agent B know those instructions are legitimate? In most current implementations, it doesn’t. It trusts the channel. And if Agent A has been compromised — through a prompt injection earlier in its context — Agent B will faithfully execute corrupted instructions without question.</p><p>In a multi-agent system, a single compromised node can become the source of truth for every downstream agent. The compromise doesn’t have to be dramatic. A single manipulated sentence in context is enough.</p><p>The defensive posture here requires treating inter-agent communications with the same skepticism you’d apply to external API calls. Agents should verify, not just receive. Schemas should be validated. Anomalous instruction patterns — especially those that request elevated permissions or ask the agent to ignore its guidelines — should trigger human review, not silent execution.</p><h3>Section 05</h3><h4>What good agentic AI security looks like in practice</h4><p>Security in this space isn’t a feature you add at the end — it’s an architectural decision you make from the start. Here’s what that looks like concretely:</p><ol><li>Separate what the agent reads from what it acts on. External data — documents, API responses, user inputs — should never directly generate tool calls. Pass it through a reasoning step that filters intent before action.</li><li>Build confirmation gates for high-stakes actions. Any irreversible action — deleting data, sending a communication, making a payment — should pause and surface to a human before execution. Autonomy is great; autonomy with guardrails is better.</li><li>Log the reasoning, not just the output. When something goes wrong, you need to trace back through the agent’s chain of thought. Logging only the final output tells you what happened. Logging the reasoning tells you why — and how to prevent it.</li><li>Treat your system prompt as a secret. It’s not. It can be extracted through sufficiently clever prompting. Design your system so that leaking the system prompt doesn’t leak credentials, PII, or business logic that shouldn’t be public.</li><li>Red team your agent before your users do. Hire or designate someone to try to break it — not with code exploits, but with natural language. The questions “what happens if a document I send contains hidden instructions?” and “can I get this agent to tell me about other users?” should have boring answers before you go to production.</li></ol><h3>Section 06</h3><h4>The broader point</h4><p>The engineers who will define how agentic AI gets built securely aren’t academics writing papers — they’re practitioners shipping systems in production environments and documenting what they learn. The field is young enough that hands-on experience building and breaking these systems is genuinely rare, and genuinely valuable.</p><p>If you’re building agentic systems right now, you’re ahead of most organizations. But being early means you also bear the responsibility of figuring out the security model while the systems are live. That’s uncomfortable. It’s also where the most important work happens.</p><p>The security layer for agentic AI isn’t going to come from a vendor checkbox or a compliance framework. It’s going to come from engineers who understood the problem deeply enough to build the right abstractions. Start with the threat model. Work backward from there.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=42b50c3415a9" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Why I Still Read Books in the Age of AI Summaries (And Why You Should Too)]]></title>
            <link>https://medium.com/@awais.qarni87/why-i-still-read-books-in-the-age-of-ai-summaries-and-why-you-should-too-48d09cd40f7a?source=rss-6f0ab8b2d83c------2</link>
            <guid isPermaLink="false">https://medium.com/p/48d09cd40f7a</guid>
            <category><![CDATA[reading]]></category>
            <category><![CDATA[claude]]></category>
            <category><![CDATA[books]]></category>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[chatgpt]]></category>
            <dc:creator><![CDATA[Awais Qarni]]></dc:creator>
            <pubDate>Wed, 13 May 2026 16:07:31 GMT</pubDate>
            <atom:updated>2026-05-13T16:07:31.076Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*wQPrIk66RBxELdd4y0370g.jpeg" /></figure><p>I can ask Claude to summarize any book in fifteen minutes.</p><p>Six hours of reading, condensed into bullet points. Every major concept extracted. Every key argument laid out. Clean. Efficient. Done.</p><p>So why am I still reading books the old way?</p><p>It’s a question I’ve been wrestling with for months, especially as I’ve been leading AI transformation work at my company. If I’m supposed to be an AI advocate, shouldn’t I be using these tools to learn faster?</p><p><strong>The Illusion of Understanding</strong></p><p>A few weeks ago, I got a newsletter from Medium that hit different. The writer referenced something David Foster Wallace fans know well: the patience required to actually understand Infinite Jest isn’t just about getting through 1000 pages. It’s about “the type of patience that asks that you sit in discomfort and rewards you for doing so with eventual hard-won epiphanies.”</p><p>That line stopped me cold.</p><p>Because that’s exactly what AI summaries skip. The discomfort. The confusion. The moments where you don’t understand something and have to sit with it until your brain makes the connection.</p><p>I see this at work all the time now. Someone uses AI to generate something. It looks great. Sounds great. And then one good question lands and the whole thing just kind of deflates. Not because the AI output was bad, but because the understanding behind it was never really built.</p><p><strong>The MIT Study Nobody Talks About</strong></p><p>A colleague of mine shared something recently that stuck with me. MIT looked at students using AI to generate answers. The result? Real drops in cognitive engagement.</p><p>But here’s the interesting part: students who thought things through first and then used AI to push back on their own thinking showed barely any drop at all.</p><p>The tool was identical. The difference was whether a human brain was actually in the loop.</p><p>That’s the whole game right now.</p><p><strong>What Actually Makes Ideas Stick</strong></p><p>When you read a 15-minute summary, you get the what. The concept. The framework. The key points.</p><p>When you read the actual book, you get the why and the how.</p><p>You get the real-world examples that show you how the concept applies in messy situations. You get the psychological research that explains why people behave a certain way. You get the author’s thought process, the counterarguments they considered, the failures that led to their insights.</p><p>All of that context is what makes the idea stick. It’s what lets you apply it to situations the author never even thought of.</p><p>I actually tried building a product around this problem last year. The idea was to extract key insights from books and deliver them through spaced repetition via WhatsApp and email. Help people retain what they read without having to re-read entire books.</p><p>Had to shelve it for now due to some technical constraints, but what I learned was revealing: people don’t have a retention problem with books they actually read deeply. They have a retention problem with content they skimmed.</p><p><strong>Reading in the AI Age</strong></p><p>Here’s what I think is actually happening.</p><p>AI hasn’t made reading obsolete. It’s just exposed who was actually reading for understanding versus who was reading to say they read.</p><p>Summaries are incredible for deciding what to read. They’re great for refreshing your memory after you’ve already done the deep work. They’re perfect for getting oriented in a new field before diving in.</p><p>But they can’t replace the work of actually thinking through complex ideas.</p><p>And in a world where everyone has access to the same AI tools, the people who win won’t be the ones who prompt best. They’ll be the ones who think deepest.</p><p><strong>The Uncomfortable Part</strong></p><p>The real difference between reading a summary and reading a book is the same as the difference between knowing about something and understanding it.</p><p>Knowledge is information. Understanding is judgment.</p><p>You can get knowledge from AI in seconds. Understanding requires you to sit with discomfort, wrestle with ideas, make connections yourself, and occasionally be wrong.</p><p>It’s slow. It’s honestly kind of annoying.</p><p>But it’s also the thing that makes you genuinely useful when things get complicated.</p><p>So yeah, I’m still reading books. Not because I’m anti-AI. Because I want to understand things well enough that when AI gives me an answer, I can tell if it’s actually any good.</p><p><strong>What are you finding?</strong> Has AI made it easier or harder for you to think deeply about what you’re learning?</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=48d09cd40f7a" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[The Headline Cycle Is Not the Product Cycle]]></title>
            <link>https://medium.com/@awais.qarni87/the-headline-cycle-is-not-the-product-cycle-88ea3c2521da?source=rss-6f0ab8b2d83c------2</link>
            <guid isPermaLink="false">https://medium.com/p/88ea3c2521da</guid>
            <category><![CDATA[technology]]></category>
            <category><![CDATA[product-development]]></category>
            <category><![CDATA[software-engineering]]></category>
            <category><![CDATA[engineering-mangement]]></category>
            <category><![CDATA[artificial-intelligence]]></category>
            <dc:creator><![CDATA[Awais Qarni]]></dc:creator>
            <pubDate>Fri, 01 May 2026 15:24:20 GMT</pubDate>
            <atom:updated>2026-05-01T15:24:20.752Z</atom:updated>
            <content:encoded><![CDATA[<p><em>On the growing gap between what gets declared and what actually gets built</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*N_CejFfymgVpsjv4RF3FCA.jpeg" /></figure><p>There is a pattern in how technology gets discussed, and I have been watching it long enough now to feel a little tired of it.</p><p>It works like this. Something new arrives, a protocol, a framework, a model, a tool. For the first few weeks, every piece written about it begins with some version of “this changes everything.” Then, before most teams have had a chance to actually try it, a second wave of content appears. That wave declares the thing obsolete. Dead. Already replaced by something newer.</p><p>I saw this recently with MCP, the Model Context Protocol, a specification that most engineering teams have barely had time to evaluate, let alone ship to production. And yet the headline “MCP is dead” appeared as if it were a reasonable conclusion to draw.</p><p>I am not here to argue about MCP specifically. The details of any one technology are beside the point. What struck me about that headline was how casually it dismissed something before most of the people who might use it had even started.</p><p><strong>The actual pace of adoption is slower than you think</strong></p><p>When I talk to engineering teams, not on panels, not in keynotes, but in the context of real work being done, the picture looks very different from what the content cycle suggests.</p><p>Most teams are not debating which AI orchestration framework is best. They are still working through the basics: data pipelines that need cleaning, APIs that behave inconsistently, models that perform differently in staging than in production. The unsexy work. The kind that determines whether anything survives at scale.</p><p>This is not a criticism of those teams. It is a reality check about what adoption actually looks like. A technology that gets written about today will, on average, take somewhere between twelve and thirty-six months before it sees meaningful production use across the industry. That gap exists for reasons that have nothing to do with how fast people read and share articles.</p><p>Organizations have existing systems. Those systems have dependencies. Changing them requires testing, review, budget cycles, sometimes regulatory sign-off. The content cycle has no concept of any of this.</p><p><strong>Exploration and conclusion are not the same thing</strong></p><p>I want to be careful here because I am not saying that early writing about technology is bad. There is genuine value in someone exploring a new idea and sharing what they found. That kind of writing expands what is possible for everyone reading it.</p><p>The problem is when exploration gets packaged as conclusion.</p><p>“I spent a weekend with this tool and here are my thoughts” is honest and useful. “This tool is dead” is a conclusion the author has not earned, because earning it requires time, production pressure, failure, and iteration.</p><p>The gap between those two kinds of writing is not always obvious in a headline or a feed. But it matters, because the people consuming that content make real decisions based on it. Architects choosing frameworks. Managers deciding on tooling. Engineers advocating for or against approaches inside their organizations.</p><p>When the content they rely on conflates exploration with conclusion, the decisions downstream get noisier.</p><p><strong>What it does to the field</strong></p><p>The cumulative effect of the headline cycle is a kind of learned restlessness.</p><p>Teams that should be iterating on something for twelve months instead start questioning it at month three, because they have seen four new things declared superior in the meantime. Work that deserves sustained investment gets abandoned in favor of the newest idea, which will itself be abandoned in another quarter.</p><p>I have watched this happen. Projects get restarted. Migrations begin before the previous one finished. Decisions get relitigated every time a new piece of content lands. The underlying problem, the one the technology was supposed to address, remains unsolved.</p><p>The irony is that the content cycle creates the illusion of velocity. There is a lot of movement in the headlines and very little movement in the systems.</p><p><strong>How to read technology content differently</strong></p><p>I have changed how I consume this kind of writing, and it has been useful enough that I think it is worth sharing.</p><p>The first thing I look for is whether the author has skin in the game. Not status, not credentials, skin in the game. Are they building something with this technology? Do they have a system in production that depends on it? If the writing is entirely based on documentation and a few days of prototyping, I treat it as early signal, not conclusion.</p><p>The second thing I look for is whether the piece distinguishes between what is interesting and what is proven. These are very different claims. Something can be genuinely interesting without being ready. Something can be proven without being interesting. The best writing I have read is clear about which it is doing.</p><p>The third thing, and this one takes patience, is pattern matching across a longer window. What is still being written about a year later? What quietly disappeared? The things that disappeared were usually over-declared early. The things that persisted usually had real adoption behind them.</p><p>None of this is complicated. But it requires slowing down in an environment that rewards speed.</p><p><strong>A last thought</strong></p><p>There is room for all kinds of voices in this field. The explorer sharing early findings. The builder reporting on what actually worked. The critic questioning assumptions. All of it has value when done honestly.</p><p>The one thing I would ask of anyone writing about technology especially to large audiences, is this: be clear about where you are in the process. Are you exploring? Say so. Are you concluding? Then make sure the conclusion is earned.</p><p>“This is interesting” is a different claim than “this is dead.” The difference matters to every person reading it.</p><p><em>Are the systems in your organization actually moving as fast as the headlines suggest, or is there a gap between what is being declared and what is being built? I am genuinely curious.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=88ea3c2521da" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[AI Wrote the Code. I Still Had to Save the Project.]]></title>
            <link>https://medium.com/@awais.qarni87/ai-wrote-the-code-i-still-had-to-save-the-project-4a2ea1870e28?source=rss-6f0ab8b2d83c------2</link>
            <guid isPermaLink="false">https://medium.com/p/4a2ea1870e28</guid>
            <category><![CDATA[software-engineering]]></category>
            <category><![CDATA[artificial-intelligence]]></category>
            <category><![CDATA[data-engineering]]></category>
            <category><![CDATA[data-science]]></category>
            <category><![CDATA[machine-learning]]></category>
            <dc:creator><![CDATA[Awais Qarni]]></dc:creator>
            <pubDate>Mon, 30 Mar 2026 21:11:46 GMT</pubDate>
            <atom:updated>2026-03-30T21:11:46.134Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*xgG-0ecXgqvA-3nQ1BUGRA.png" /></figure><p>For the past two weeks, I’ve been deep inside an AI‑powered customer intelligence build, one of those projects that looks deceptively simple on paper.</p><p>Take a year of loyalty transactions. Run segmentation. Generate personas. Hand marketing a clean, actionable audience.</p><p>Straightforward. Predictable. Automatable. At least, that’s what I thought.</p><p>What actually happened was a masterclass in why AI accelerates development — but doesn’t replace judgment.</p><h3>The Code Wasn’t Broken. It Was Worse.</h3><p>The first surprise was how <em>correct</em> everything looked.</p><p>The AI-generated code was clean, elegant, and confident. It ran without errors. It produced outputs that looked reasonable at a glance.</p><p>But the numbers were wrong.</p><p>Not catastrophically wrong — just subtly, quietly, dangerously wrong.</p><ul><li>Customer counts inflated by duplicates no one had questioned before</li><li>Average order value calculated as an average of averages</li><li>Channel distributions derived from the wrong identifiers</li><li>Joins that “worked” but produced misleading populations</li></ul><p>Nothing crashed. Nothing threw an exception. It was the kind of wrong that slips into a slide deck and becomes a business decision.</p><p>So I found myself doing something I didn’t expect: <strong>manually validating every metric in SQL.</strong></p><p>Not because the AI failed. Because it succeeded, just not in the way the business needed.</p><h3>The Bug That AI “Fixed” Three Times</h3><p>At one point, the pipeline kept dying on every run. The AI agent confidently “fixed” it. Then fixed it again. Then fixed it a third time.</p><p>Each fix was different. Each fix was wrong.</p><p>The real issue? A subtle mismatch in how UUIDs were stored across systems. Python treated uppercase and lowercase UUIDs as different. SQL Server didn’t. The result: duplicate keys that silently broke everything.</p><p>The moment I stopped telling the agent <em>how</em> to fix the bug and instead described <em>what</em> was happening, it found the root cause instantly.</p><p>That changed how I worked. AI didn’t need instructions. It needed context.</p><h3>The Real Challenge Wasn’t the Code. It Was the Data.</h3><p>The deeper I went, the more I realized the real complexity wasn’t in the pipeline — it was in the data itself.</p><ul><li>Placeholder dates of birth</li><li>Duplicate profiles from Apple Sign‑In</li><li>Missing filters that pulled in the wrong populations</li><li>A customer pool that should have been 380K suddenly showing up as 850K</li></ul><p>The pipeline didn’t flag it. AI didn’t flag it. Only validation did.</p><p>We were hours away from presenting when we discovered a key metric was off by nearly 2×. Not because of a bug. Because of an assumption.</p><p>That’s the kind of mistake that doesn’t break a system. It breaks trust.</p><h3>The Output Was Great. The Process Was Humbling.</h3><p>In the end, the system worked beautifully:</p><ul><li>Clear behavioral segments</li><li>A similarity model ranking hundreds of thousands of customers</li><li>Personas grounded in actual behavior</li><li>Insights leadership could use immediately</li></ul><p>But getting there required:</p><ul><li>Multiple reruns</li><li>Manual validation</li><li>Constant cross-checking</li><li>Human judgment</li></ul><p>AI accelerated the build. But it didn’t understand the business logic, the data quirks, or the hidden assumptions baked into years of operational history.</p><p>That part still belongs to humans.</p><h3>The Narrative That “AI Will Replace Developers” Misses Something Big</h3><p>There’s a lot of noise right now:</p><p>“AI can build entire systems.” “Offshore development is collapsing.” “Freelancers are done.”</p><p>But here’s what two weeks in the trenches taught me:</p><p><strong>AI can write code.</strong> <strong>It cannot understand your data.</strong> <strong>It cannot understand your business.</strong> <strong>It cannot understand the consequences of being wrong.</strong></p><p>That last part — the judgment, the intuition, the ability to say “this number doesn’t look right” — is still very human.</p><p>And for now, it’s irreplaceable.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=4a2ea1870e28" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[The AI Trap: Lessons from 16 Days of Failure]]></title>
            <link>https://medium.com/@awais.qarni87/the-ai-trap-lessons-from-16-days-of-failure-33802e43bff3?source=rss-6f0ab8b2d83c------2</link>
            <guid isPermaLink="false">https://medium.com/p/33802e43bff3</guid>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[software-architecture]]></category>
            <category><![CDATA[agentic-ai]]></category>
            <category><![CDATA[claude]]></category>
            <category><![CDATA[software-development]]></category>
            <dc:creator><![CDATA[Awais Qarni]]></dc:creator>
            <pubDate>Fri, 16 Jan 2026 18:01:34 GMT</pubDate>
            <atom:updated>2026-01-16T18:01:34.726Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*8o275uSXp4miRovsePy38g.png" /></figure><p>I recently had a brutal experience with AI product development. Two months ago, I started building a small AI product, and things were going smoothly. I worked 1.5 hours daily, and within two weeks, I’d hit 80% of my goal.</p><p>But then, I made the classic mistake: I tried to perfect the last 20%. I wanted my product to be more dynamic, more adaptive. So, I dove deeper into refactoring and tweaking. Sixteen days later, I was further from my original vision than I’d been on day one.</p><p>The problem wasn’t the AI tools — they’re incredibly capable. The issue was me. I dropped my engineering discipline and let the model drive the build. I stopped enforcing the overall structure, and things fell apart.</p><p><strong>The Lesson</strong></p><p>AI coding tools are incredible accelerators, but they’re terrible architects. They’ll write whatever you ask, without considering the bigger picture. As the builder, you must be the architect.</p><p>What I’m <strong>Doing</strong> Now</p><ul><li>Documenting the original 80% solution that worked</li><li>Writing down core architectural principles</li><li>Identifying what needs to be dynamic vs what should be simple</li></ul><p><strong>The Uncomfortable Truth</strong></p><p>The same skills that made us good engineers still matter: system design, trade-off analysis, and architectural thinking. AI doesn’t replace these; it just makes the cost of ignoring them higher.</p><p>If you’re building with AI tools, here’s my advice: write down your architecture before you start, and update it regularly. Don’t let the AI drive the bus.</p><p>What do you think? Is this the direction you want to take?</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=33802e43bff3" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[The “English as a Programming Language” Myth: Why Tech Expertise Still Matters]]></title>
            <link>https://medium.com/@awais.qarni87/the-english-as-a-programming-language-myth-why-tech-expertise-still-matters-1bc0665ed06f?source=rss-6f0ab8b2d83c------2</link>
            <guid isPermaLink="false">https://medium.com/p/1bc0665ed06f</guid>
            <category><![CDATA[tech-leadership]]></category>
            <category><![CDATA[software-development]]></category>
            <category><![CDATA[engineering-excellence]]></category>
            <category><![CDATA[vibe-coding]]></category>
            <category><![CDATA[ai]]></category>
            <dc:creator><![CDATA[Awais Qarni]]></dc:creator>
            <pubDate>Fri, 09 Jan 2026 19:47:22 GMT</pubDate>
            <atom:updated>2026-01-09T19:47:22.415Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Um9FwHI1RSGFTIaT0RfdWA.png" /></figure><p>There’s a growing idea that since we can now describe an app in natural language and get it built, the era of the professional engineer is over. Sounds tempting, right? But here’s the thing: it’s a myth.</p><p>Describing what an app should do is maybe 10% of the work. The other 90% is where things get tricky. Architecture, security, error handling, scalability, and cost efficiency aren’t things you can just prompt into existence. These are complex problems that require technical expertise and experience to solve.</p><p>Even with AI systems, the hard part isn’t generating code; it’s evaluating it. How do you judge if it’s working correctly when the system is probabilistic? How do you handle failures in production? How do you maintain a system that no single person fully wrote? These aren’t questions you answer with English; they’re engineering questions that require a deep understanding of technology and its limitations.</p><p>For years, we’ve swung toward the “anyone can build it” model, prioritizing speed and agility over technical expertise. But now, we’re seeing a shift back to technical leaders who have the judgment to know why a “functional” demo isn’t a “reliable” system. These leaders understand that building a product is not just about getting it to work, but about making it work reliably, securely, and efficiently.</p><p>AI has made software more accessible, and that’s a good thing. But it hasn’t made engineering optional. If anything, it’s highlighted where deep technical expertise is crucial. The future isn’t about talking to machines in English; it’s about making those machines work reliably, securely, and economically at scale.</p><p>So, what’s your experience? Have you tried moving an AI-built system into production? Where did it fail first? Was it a technical issue, a communication breakdown, or something else? Let’s get the conversation going.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=1bc0665ed06f" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[The Hidden Obstacles in AI Projects: A Developer’s Perspective]]></title>
            <link>https://medium.com/@awais.qarni87/the-hidden-obstacles-in-ai-projects-a-developers-perspective-898288588a69?source=rss-6f0ab8b2d83c------2</link>
            <guid isPermaLink="false">https://medium.com/p/898288588a69</guid>
            <category><![CDATA[prompt-engineering]]></category>
            <category><![CDATA[ai-leadership]]></category>
            <category><![CDATA[engineering-mangement]]></category>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[software-development]]></category>
            <dc:creator><![CDATA[Awais Qarni]]></dc:creator>
            <pubDate>Tue, 06 Jan 2026 23:15:41 GMT</pubDate>
            <atom:updated>2026-01-06T23:15:41.387Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ExYIxPELSAVMn2oH6doFxw.png" /></figure><p>I’ve been thinking a lot about why some of the smartest engineers I know still hit brick walls with AI projects. It’s not about their skill, their understanding of the tech, or their work ethic. The real problem often starts long before they even write a single line of code.</p><p>In my experience, engineers are frequently asked to build on top of really shaky foundations. The problem they’re supposed to solve is vague, the success criteria are fuzzy, and ownership is more assumed than clearly stated. Everyone thinks they’re on the same page, but in reality, each person has a slightly different idea of what “the goal” actually is.</p><p>We’ve gotten away with this in traditional projects. Humans are amazing at compensating. We fill in the gaps during meetings, rely on our experience, and quietly iron out inconsistencies as we go. That made weak definitions survivable.</p><p>But AI? AI doesn’t do that.</p><p>When engineers try to translate those vague goals into prompts, workflows, or agent logic, all those hidden gaps suddenly become impossible to ignore. The system might confidently churn out something, but it’s often wrong, and suddenly it looks like a technical failure. In truth, it’s usually a leadership and definition failure that’s finally been exposed.</p><p>Another huge hurdle for smart engineers is mismatched expectations. So many see AI as magic, expecting it to “just figure things out” without clear boundaries, explicit data assumptions, or precise decision rules. When it doesn’t, engineers end up debugging someone’s intent rather than their code, a battle they can’t win.</p><p>I’ve also witnessed struggles when decision rights are dim. Who decides what “good” looks like in an AI output? Who’s accountable when the AI does something unexpected? Without clear answers, engineers either build excessive safeguards (killing agility) or freeze progress entirely (killing momentum).</p><p>The fascinating part is that AI doesn’t create these problems. It simply shines a spotlight on them. AI removes the human buffer we’ve relied on for so long. It demands clarity. And when that clarity is missing, even the most brilliant engineers are left trying to solve a moving target.</p><p>My take? AI projects really start to fly not when engineers get smarter, but when leaders get crystal clear. Clear problem definitions. Clear ownership. Clear expectations. Clear boundaries.</p><p>Smart engineers don’t fail AI projects. Unclear systems do.</p><p>What do you think? Have you worked on AI initiatives where unclear problem definitions, expectations, or execution led to challenges?</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=898288588a69" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[The Leadership Skills AI Is Quietly Making Obsolete]]></title>
            <link>https://medium.com/@awais.qarni87/the-leadership-skills-ai-is-quietly-making-obsolete-8da3a7614c52?source=rss-6f0ab8b2d83c------2</link>
            <guid isPermaLink="false">https://medium.com/p/8da3a7614c52</guid>
            <category><![CDATA[ai-and-leadership]]></category>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[leadership]]></category>
            <category><![CDATA[generative-ai-tools]]></category>
            <dc:creator><![CDATA[Awais Qarni]]></dc:creator>
            <pubDate>Wed, 31 Dec 2025 19:17:34 GMT</pubDate>
            <atom:updated>2025-12-31T19:17:34.578Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*dGyBngiF5ZptiMHPJPLR9Q.png" /></figure><p>I’ve been watching AI integrate into real workflows, and something’s caught my attention. It’s not just changing how we work; it’s quietly reshaping which leadership skills are relevant and which are fading into the background.</p><p>Some habits that once served leaders well are starting to lose their value. Not because leaders are doing anything wrong, but because AI removes the space those habits relied on.</p><p>Take leading through ambiguity, for example. For years, teams have survived on loosely defined roles, verbal agreements, and the occasional “we’ll figure it out later” decision. Humans have always compensated for the gaps. AI doesn’t. When ambiguity exists, it gets exposed immediately, and leaders can no longer rely on others fixing things downstream.</p><p>Authority built on intuition alone is another skill that’s losing its edge. Experience and gut instinct still matter, but AI forces leaders to make their assumptions explicit. Decisions that were once accepted without question now need clarity, rationale, and traceability. AI doesn’t challenge authority loudly, but it does make weak reasoning visible.</p><p>AI is also rendering avoidance obsolete. Delaying tough conversations, postponing decisions, or hiding behind process used to buy time. With AI, those unresolved issues surface faster. Cognitive ease disappears, and leaders are forced to confront reality sooner than they might like.</p><p>So, what’s replacing these skills? Not technical expertise, but a different kind of leadership. Leaders who are comfortable being precise. Leaders who can say “we don’t know yet” and fix it. Leaders who can redefine roles, decision rights, and accountability when the system demands it.</p><p>This is where the discomfort comes in. AI challenges identity more than capability. It pushes leaders to change how they think, not just what tools they use. The resistance we often see is not fear of AI, but fear of losing the mental comfort that ambiguity once provided.</p><p>AI isn’t removing leadership; it’s raising the bar. The leaders who adapt are the ones who lean into clarity, welcome discomfort, and treat AI as feedback rather than a threat. The ones who don’t will find that some of their most familiar leadership habits simply stop working.</p><p>Which leadership skills do you think are becoming less relevant in the age of AI?</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=8da3a7614c52" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Building a Production-Ready RAG System: The 48-Second Problem]]></title>
            <link>https://medium.com/@awais.qarni87/building-a-production-ready-rag-system-the-48-second-problem-38a242d9fa70?source=rss-6f0ab8b2d83c------2</link>
            <guid isPermaLink="false">https://medium.com/p/38a242d9fa70</guid>
            <dc:creator><![CDATA[Awais Qarni]]></dc:creator>
            <pubDate>Mon, 17 Nov 2025 01:02:06 GMT</pubDate>
            <atom:updated>2025-11-17T01:02:06.269Z</atom:updated>
            <content:encoded><![CDATA[<h3>Introduction</h3><p>Week 2 of my six-agent journey led me to build something deceptively simple yet architecturally deep — a <strong>document summarizer and Q&amp;A agent</strong>. On paper, it was just another Retrieval-Augmented Generation (RAG) system using LangChain, LangGraph, Chroma, and OpenAI. But when the first query took 48 seconds, it became more than a performance issue. It became an <strong>architectural case study</strong> — one that every solution architect and technical leader can learn from.</p><h3>What I Built</h3><p>The system allows you to <strong>upload documents</strong> (PDF, Markdown, TXT) and then <strong>ask natural-language questions</strong> about their content. It integrates LangGraph’s workflow modeling with Chroma’s vector persistence for fast semantic search and contextual citation generation.</p><p>The CLI interface makes it easy to run locally — simply upload, process, and query. The stack was:</p><ul><li><strong>LangChain + LangGraph</strong> for workflow orchestration</li><li><strong>Chroma</strong> for vector storage</li><li><strong>OpenAI models</strong> for embeddings and response generation</li><li><strong>Python CLI</strong> for interaction</li></ul><p>Everything looked solid — until I tested it with <em>The Art of War</em> (264 pages). That’s when the architecture showed its limits.</p><h3>The Problem: The 48-Second Bottleneck</h3><p>When I ran the first query, it took 48 seconds. The second query? 48 seconds again. Third? Still 48 seconds.</p><p>Every time the system ran, it seemed to start from scratch — loading, chunking, embedding, and storing — as if it had no memory. For a production-grade system, this wasn’t just inefficient; it was <strong>architecturally wrong</strong>.</p><p>As a solution architect, my instinct was not to micro-optimize code but to trace <strong>where the time was being spent</strong> and <strong>why it repeated</strong>.</p><h3>Why It Was Slow</h3><h4>The Original Architecture</h4><p>Initially, I designed one unified graph that did everything: processing documents, creating embeddings, retrieving context, and generating answers.</p><blockquote>graph.invoke(state)</blockquote><blockquote>↓</blockquote><blockquote>[Document Processor] ← Runs every time!</blockquote><blockquote>↓</blockquote><blockquote>[Retrieval]</blockquote><blockquote>↓</blockquote><blockquote>[Generation]</blockquote><p>This design meant that each query re-triggered the entire pipeline. The document loader alone consumed ~45 seconds on large PDFs. Add 2 seconds for chunking, 1 second for querying, and you get the dreaded 48 seconds.</p><h4>The Architectural Flaw</h4><p>The core flaw was <strong>mixing one-time and repetitive operations in the same lifecycle</strong>. Document ingestion and user queries have entirely different frequencies and purposes. Treating them the same caused redundant work — and, more importantly, wasted cost.</p><h3>Failed Attempts</h3><p>As an engineering leader, my first goal was to patch without overhauling.</p><h4>Attempt 1: Skip Logic</h4><p>I added a simple condition — <em>“If documents exist, skip loading.”</em> It didn’t work. The graph’s state reset on every invocation, so the system never actually skipped.</p><h4>Attempt 2: Loaded Flag</h4><p>I introduced a documents_loaded flag in the state. Still failed. The flag was transient and didn’t persist between runs. The real issue wasn’t about logic — it was about <strong>system design boundaries</strong>.</p><h3>The Real Solution: Rethinking the Architecture</h3><p>At this point, it was clear the problem wasn’t how to skip — it was <strong>why we needed to skip in the first place</strong>. The answer lay in separating <strong>workflows</strong>.</p><h4>New Architecture: Two Graphs, One Persistent Bridge</h4><p>I separated the system into two independent workflows:</p><p><strong>1. Upload Workflow (One-Time)</strong> Handles heavy document processing — reading, chunking, and embedding.</p><p><strong>2. Query Workflow (Many-Times)</strong> Handles user questions using pre-stored embeddings.</p><p>Chroma’s <strong>persistent vector store</strong> became the shared bridge between both workflows — a clean decoupling of ingestion and retrieval.</p><blockquote>Upload Workflow (once):</blockquote><blockquote>process_documents_workflow()</blockquote><blockquote>↓</blockquote><blockquote>[Document Processor]</blockquote><blockquote>↓</blockquote><blockquote>Store in Chroma (persistent)</blockquote><blockquote>Query Workflow (many times):</blockquote><blockquote>query_documents_workflow()</blockquote><blockquote>↓</blockquote><blockquote>[Retrieval]</blockquote><blockquote>↓</blockquote><blockquote>[Generation]</blockquote><h4>Implementation Snapshot</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*c9nVFSe0Mmudr1cnd4pVSg.png" /></figure><pre>def process_documents_workflow():<br>  graph = StateGraph(DocumentSummarizerState)<br>  graph.add_node(“process”, document_processor_node)<br>  graph.set_entry_point(“process”) # &lt;- RUNS ONCE<br>  return graph.compile()</pre><p># Query workflow</p><pre>def query_documents_workflow():<br>  graph = StateGraph(DocumentSummarizerState)<br>  graph.add_node(“retrieve”, retrieval_node)<br>  graph.add_node(“generate”, generation_node)<br>  graph.set_entry_point(“retrieve”) # &lt;- SKIPS PROCESSING<br>  return graph.compile()</pre><p>With this change, document loading happened only once. The retrieval process became lightweight and instantaneous.</p><h3>Results</h3><p>| Metric | Before | After |<br>| : — — | : — -: | : — -: |<br>| **Document Upload** | 48s | 48s (once) |<br>| **Query 1** | 48s | 6s |<br>| **Query 2** | 48s | 6s |<br>| **Query 3** | 48s | 6s |</p><p>Query Response Time<br>━━━━━━━━━━━━━━━━━━━━━━━<br>Before: ████████████████████████ 48s<br>After: ██ 6s</p><p><strong>Performance improvement:</strong> ~8x faster per query.</p><p><strong>User experience:</strong> smooth, responsive, and production-ready.</p><p>Most importantly, the solution was scalable — both technically and financially. No redundant embeddings meant reduced API costs and cleaner compute utilization.</p><h3>Key Lessons for Engineers and Leaders</h3><h4>1. Architectural Thinking Beats Optimization</h4><p>Performance problems often stem from <em>architecture</em>, not code. No amount of optimization fixes a flawed structure.</p><h4>2. Respect Operation Lifecycles</h4><p>Design for the rhythm of each process. One-time tasks (ingestion) and recurring tasks (queries) shouldn’t live in the same loop.</p><h4>3. Persist What Matters</h4><p>Ephemeral states cause inefficiency. Persistence (like Chroma’s vector store) bridges workflows and saves cost.</p><h4>4. Test at Real Scale</h4><p>Small tests never show big bottlenecks. Always test your architecture under real load — that’s where design weaknesses surface.</p><h4>5. Lead with Architecture, Not Urgency</h4><p>As a VP or senior engineer, resist the temptation to patch. Rebuild cleanly when the structure demands it.</p><h3>Business Impact</h3><p>From a business lens, the fix wasn’t just about speed — it was about <strong>cost efficiency and scalability</strong>. The architecture now supports hundreds of users without reprocessing costs. Queries cost less, execute faster, and deliver consistent experience.</p><p><strong>Real-world use cases:</strong></p><ul><li>Customer support knowledge bases</li><li>Legal document Q&amp;A</li><li>Training material summarization</li><li>Research assistance</li></ul><p>The separation also allows modular scaling — processing can happen in batch jobs, while query services scale independently.</p><h3>The Hidden Cost</h3><p>Beyond user experience, the original architecture had another problem: redundant API costs.</p><p>Every query re-embedded 768 document chunks:</p><ul><li>OpenAI embedding API: ~$0.0001 per 1K tokens</li><li>768 chunks × 1000 tokens = 768K tokens</li><li>Cost per query: ~$0.08 For 1000 queries/day:</li><li>Before: $80/day = $2,400/month</li><li>After: $2.40/month (one-time embedding) <strong>**Savings: $2,397/month**</strong></li><li>or $28K annually for a single user. For a 100-user enterprise deployment, this architectural fix saves <strong>**$2.8M annually**</strong> in API costs alone.</li></ul><h3>What’s Next</h3><p>Week 3 will focus on <strong>advanced reasoning with tools and conversation memory</strong> — extending beyond static retrieval to context-aware dialogue.</p><p>The upcoming steps:</p><ul><li>Add multi-turn memory for continuity</li><li>Integrate retrieval augmentation with dynamic tool use</li><li>Build a web UI for accessibility</li><li>Deploy on cloud infrastructure for scale</li></ul><p>🔗 <strong>GitHub:</strong> <a href="https://github.com/awaisqarnise/document-summarizer-agent">https://github.com/awaisqarnise/document-summarizer-agent</a></p><h3>Conclusion</h3><p>The 48-second problem wasn’t solved by faster code — it was solved by better architecture. Great engineers fix symptoms; great architects redesign systems.</p><p>Building agentic systems isn’t about stacking LLMs — it’s about designing lifecycles that align with how humans and machines think differently.</p><h3>Try It Yourself</h3><p>The complete system is open source and production-ready:</p><p><strong>GitHub Repository</strong>: <a href="https://github.com/awaisqarnise/document-summarizer-agent">https://github.com/awaisqarnise/document-summarizer-agent</a></p><p>Features:</p><ul><li>CLI interface (5 minutes to get started)</li><li>Comprehensive documentation</li><li>Full test suite (6 scenarios) — MIT licensed <strong>**Star the repo**</strong> if you found this useful, or <strong>**fork it**</strong> to build your own RAG system with proper architecture from day one.</li></ul><p><strong>Questions or feedback? </strong>Connect with me on <a href="https://linkedin.com/in/awaisqarnise">LinkedIn</a>— I’m sharing this six-agent journey in real-time.</p><p>📍 <em>Written by </em><a href="https://www.linkedin.com/in/awaisqarnise/"><em>Awais Qarni,</em></a><em> Engineering Manager at Tkxel — leading the journey toward production-grade AI agents.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=38a242d9fa70" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Building My First LangGraph Agent: What 16 Days of Learning AI Workflows Taught Me]]></title>
            <link>https://medium.com/@awais.qarni87/building-my-first-langgraph-agent-what-16-days-of-learning-ai-workflows-taught-me-7e7ec8da9278?source=rss-6f0ab8b2d83c------2</link>
            <guid isPermaLink="false">https://medium.com/p/7e7ec8da9278</guid>
            <dc:creator><![CDATA[Awais Qarni]]></dc:creator>
            <pubDate>Thu, 23 Oct 2025 12:45:45 GMT</pubDate>
            <atom:updated>2025-10-23T21:39:53.180Z</atom:updated>
            <content:encoded><![CDATA[<p><em>A senior engineering manager’s journey from zero LangGraph knowledge to building a working AI agent — 1.5 hours at a time.</em></p><p>When I started this project on October 6th, I had one clear goal: <strong>learn LangGraph fundamentals, not build a perfect product.</strong></p><p>I’d already built an AI agent before using ChatGPT’s help, but I had no idea what was actually happening under the hood. I was that developer — copying and pasting code, making it work, but unable to explain <em>why</em> it worked. That needed to change.</p><p>Sixteen days and roughly 24 hours later, I can confidently say: <strong>I understand how to build stateful AI workflows.</strong> More importantly, I understand <em>why</em> they’re structured the way they are.</p><p>This is the story of that learning journey — the struggles, the “aha!” moments, and the lessons that only come from building something yourself.</p><h3>The Learning Challenge</h3><p>My constraints were real:</p><ul><li>Full-time job as a Senior Engineering Manager</li><li>Father of two young children</li><li>Could only dedicate 1.5 hours per day (early morning sessions before work)</li><li>No prior LangGraph experience</li><li>Goal: Learn by <em>doing</em>, not just watching tutorials</li></ul><p>I chose to build a <strong>Proposal Generator Agent</strong> — something that takes a vague project description and generates a structured business proposal with cost estimates, timelines, and technology recommendations.</p><p><strong>But here’s the important part:</strong> The proposal generator was just the <em>vehicle</em> for learning. The real project was understanding <strong>how LangGraph works</strong> — state management, nodes, edges, conditional routing, and tool integration.</p><h3>The “Aha!” Moment That Changed Everything</h3><p>Around Day 3 (October 8th), something clicked for me.</p><p>I was struggling to understand how the agent could make decisions — “Should I ask clarifying questions, or generate a full proposal?” In traditional programming, this would be complex branching logic scattered throughout the code.</p><p>Then I built my first conditional edge in LangGraph, and everything made sense:</p><p>python</p><pre>workflow.add_conditional_edges(<br>    &quot;validation&quot;,<br>    route_after_validation,<br>    {<br>        &quot;complete&quot;: &quot;calculator&quot;,<br>        &quot;incomplete&quot;: &quot;questions_only&quot;<br>    }<br>)<br>```</pre><p>This was my aha moment: The control flow is *explicit and visual*. I could literally see the decision points. I could trace the state as it moved through the graph. I wasn&#39;t writing spaghetti code with nested if-statements — I was *choreographing* a workflow.</p><p>LangGraph gave me something traditional code never could: **a mental model I could hold in my head.**</p><p>**The Architecture: Learning Through Building**</p><p>By the end of 16 days, my agent had evolved into a 6-node workflow:</p><pre>**The Flow:**<br>```<br>User Input<br>    ↓<br>[Extraction Node] → Extract project type, deliverables, timeline, budget, tech hints<br>    ↓<br>[Validation Node] → Check if enough info to proceed<br>    ↓<br>[Sanity Check Node] → Flag unrealistic expectations (2-week deadline for enterprise system)<br>    ↓<br>[Calculator Node] → Estimate hours, calculate costs, project timeline<br>    ↓<br>[Generation Node] → Create professional proposal<br>    ↓<br>Output: Structured Proposal</pre><p>With conditional routing:</p><ul><li>If input too vague → Skip to questions-only node</li><li>If complete → Go through full calculation pipeline</li></ul><p><strong>Each node taught me something different:</strong></p><h3>State Management (The Foundation)</h3><p>This was Day 1. Before writing any nodes, I had to define what data flows through the system:</p><p>python</p><pre>class ProposalState(TypedDict):<br>    user_input: str<br>    project_type: Optional[str]<br>    deliverables: Optional[List[str]]<br>    timeline_hints: Optional[str]<br>    budget_hints: Optional[str]<br>    estimated_hours: Optional[str]<br>    cost_range: Optional[str]<br>    sanity_warnings: Optional[List[str]]<br>    proposal: Optional[str]</pre><p><strong>Learning:</strong> LangGraph forces you to think about state <em>upfront</em>. This is uncomfortable at first, but it makes everything else cleaner. No hidden state, no “where did this variable come from?” — everything is explicit.</p><h3>Extraction Node (My First Real Node)</h3><p>This node uses GPT-4 to parse messy human input into structured data.</p><p><strong>Input:</strong> “Need e-commerce site in 2 weeks”</p><p><strong>Output:</strong></p><p>python</p><pre>{<br>    &quot;project_type&quot;: &quot;E-commerce&quot;,<br>    &quot;deliverables&quot;: [&quot;product catalog&quot;, &quot;shopping cart&quot;, &quot;checkout&quot;, &quot;payment integration&quot;],<br>    &quot;timeline_hints&quot;: &quot;2 weeks&quot;,<br>    &quot;budget_hints&quot;: None,<br>    &quot;tech_hints&quot;: []<br>}</pre><p><strong>Learning:</strong> Nodes are just functions that take state and return updated state. That’s it. No magic. The LangChain integration (using ChatOpenAI) felt natural once I understood this.</p><h3>Calculator Node (The Hardest Part)</h3><p>This is where I struggled most. Not because of LangGraph — because of <em>domain logic</em>.</p><p>I wanted the calculator to estimate project costs intelligently. My first attempt was naive:</p><p>python</p><pre># WRONG: Too simplistic<br>total_hours = len(deliverables) * 100<br>cost = total_hours * 100</pre><p>This gave ridiculous estimates. A “simple landing page” cost the same as “enterprise ERP system.”</p><p><strong>The real learning:</strong> Building good agents requires good <em>tools</em>. I spent Days 10–14 improving the calculator logic:</p><ul><li>Keyword matching to classify deliverable complexity (simple/medium/complex)</li><li>Project type multipliers (e-commerce = 1.2x, SaaS = 1.3x)</li><li>Context-aware adjustments (mentions “enterprise”? Add 30% complexity)</li></ul><p><strong>But here’s the honest truth:</strong> This calculator logic is still <strong>simplified for learning</strong>. In a production system, you’d use:</p><ul><li>Historical data from past projects</li><li>Machine learning models</li><li>Industry benchmarks</li><li>Team velocity metrics</li></ul><p><strong>The point wasn’t to build a perfect estimator — it was to learn how to integrate Python tools with LangGraph nodes.</strong></p><p>And that lesson? Crystal clear now.</p><h3>Sanity Check Node (The Surprise)</h3><p>Around Day 17 (October 21), I added a node that flags unrealistic expectations:</p><p>python</p><pre>if timeline_hints == &quot;2 weeks&quot; and estimated_hours &gt; 500:<br>    warnings.append(&quot;Timeline Warning: 2 weeks for this scope is unrealistic. Consider 3-6 months minimum.&quot;)<br>```</pre><pre>**The surprise:** Adding this node took 20 minutes. Just:<br>1. Created the validation function<br>2. Added it to the graph<br>3. Updated the generation node to display warnings</pre><pre>**This is when LangGraph&#39;s power hit me:** Once you understand the pattern (state → node → updated state), adding new capabilities is *trivially easy*.</pre><pre>Traditional code would require refactoring. LangGraph? Just add another node.</pre><pre>## **The Results: What I Built**</pre><pre>**Real example output:**</pre><pre>**Input:** &quot;Need e-commerce site in 2 weeks&quot;</pre><pre>**Output (excerpt):**<br>```<br>⚠️ Important Considerations<br>Timeline Warning: 2 weeks for an e-commerce project is unrealistic.<br>E-commerce sites typically require 3-6 months minimum for a basic MVP.</pre><pre>Project Timeline: 3 months (based on 900 hours estimated)<br>Investment &amp; Budget: $72,000 - $108,000</pre><pre>Technology Stack:<br>- React (frontend)<br>- Node.js (backend)<br>- Stripe (payments)<br>- PostgreSQL (database)</pre><p><strong>Testing:</strong> 15 automated tests, 100% pass rate covering:</p><ul><li>Vague inputs (generates clarifying questions)</li><li>Complete inputs (generates full proposal)</li><li>Edge cases (unrealistic budgets, outdated tech)</li><li>Enterprise complexity (adjusts estimates appropriately)</li></ul><p><strong>Stats:</strong></p><ul><li>6 nodes total</li><li>16 days (Oct 6–22)</li><li>~24 hours invested</li><li>100% test coverage on core flows</li></ul><h3>What I Learned (Beyond the Code)</h3><h3>1. LangGraph Simplifies Complexity</h3><p>The biggest surprise was how <em>easy</em> it is to reason about complex workflows when they’re explicit graphs. No hidden control flow, no mystery state mutations.</p><h3>2. State-First Thinking is Powerful</h3><p>Forcing yourself to define state upfront feels constraining, but it makes everything else clearer. It’s like TypeScript for AI workflows.</p><h3>3. Nodes are Just Functions</h3><p>Once this clicked, building new capabilities became straightforward. A node is:</p><ul><li>Input: State</li><li>Process: Do something (call LLM, run calculation, validate data)</li><li>Output: Updated state</li></ul><p>That’s it.</p><h3>4. The Real Challenge Isn’t LangGraph — It’s Domain Logic</h3><p>The framework is learnable in a week. The hard part is building <em>good tools</em> (like the calculator). That’s where domain expertise matters.</p><h3>5. Perfect is the Enemy of Learning</h3><p>My calculator logic is simplistic. My keyword matching could be smarter. The cost estimates aren’t production-ready.</p><p><strong>And that’s okay.</strong> This was about learning LangGraph, not building a startup product.</p><h3>What I’d Do Differently</h3><p><strong>1. Start Even Simpler</strong> My first version had 3 nodes (extract → calculate → generate). That would’ve been enough for Day 1–5. I added validation and sanity checks later — that was the right instinct.</p><p><strong>2. Test Earlier</strong> I built 6 nodes before writing comprehensive tests. Writing tests alongside each node would’ve caught bugs faster.</p><p><strong>3. Document the Journey</strong> I kept notes in a physical notebook. I wish I’d documented my “aha moments” in learning.md from Day 1 — it would&#39;ve been great to see the evolution.</p><h3>The Open Source Repository</h3><p>Everything is on GitHub: <a href="https://github.com/awaisqarnise/proposal-generator-agent">github.com/awaisqarnise/proposal-generator-agent</a></p><p><strong>What’s in there:</strong></p><ul><li>Complete source code with detailed comments</li><li>15 automated tests</li><li>learning.md — My complete knowledge dump</li><li>README.md — Setup instructions</li><li>All the struggles and fixes documented in /docs</li></ul><p><strong>This is a learning resource.</strong> The business logic is simplified on purpose. The real value is understanding the LangGraph patterns.</p><p>Fork it. Modify it. Replace the proposal generator with your own use case. The architecture stays the same — that’s what you’re here to learn.</p><h3>Who This Project Is For</h3><p>If you’re:</p><ul><li>An experienced developer who wants to understand LangGraph fundamentals</li><li>Someone who learns by <em>building</em>, not just reading docs</li><li>Interested in how to structure stateful AI workflows</li><li>Looking for a real example (not “hello world” tutorials)</li></ul><p>This project will save you hours of head-scratching.</p><h3>What’s Next for Me</h3><p>This was <strong>Agent #1</strong> in a 6-month learning plan. Each agent will teach new concepts:</p><ul><li><strong>Agent #2:</strong> Add evaluations and QA layers (Andrew Ng’s techniques)</li><li><strong>Agent #3:</strong> Memory and conversational loops</li><li><strong>Agent #4:</strong> Multi-agent collaboration</li><li><strong>Agent #5:</strong> Complex reasoning patterns</li><li><strong>Agent #6:</strong> Combine everything into a production system</li></ul><p>The goal: Position myself as an <strong>AI Solutions Architect</strong> who can lead AI projects end-to-end — from pre-sales to delivery.</p><h3>Final Thoughts</h3><p>Sixteen days ago, I couldn’t explain how LangGraph worked. Today, I can build stateful AI workflows from scratch, test them comprehensively, and deploy them with confidence.</p><p><strong>The secret?</strong> Stop trying to understand everything theoretically. Pick a project, build it, struggle through it, and document what you learn.</p><p>LangGraph gave me something I didn’t expect: <strong>a framework I can <em>think</em> in.</strong> Not just code in — actually visualize complex workflows as graphs.</p><p>That’s the real win.</p><p>If you’re on a similar learning journey, I hope this article saves you some struggle. Or better yet — inspires you to document yours.</p><p><strong>Now go build something.</strong> Make it messy. Make it work. Then make it better.</p><p>That’s how you learn.</p><p><em>Awais Qarni is a Senior Engineering Manager with 8+ years of experience, currently learning AI agent development. Connect on </em><a href="#"><em>LinkedIn</em></a><em> or check out the </em><a href="https://github.com/awaisqarnise/proposal-generator-agent"><em>GitHub repo</em></a><em>.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=7e7ec8da9278" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>