Back to blogYouTube Video

Published August 17, 2026

AI agents are just hype. Focus on reliability. - Automation Tip #4

Can't play the video or having issues? Here's the direct link.

AI Summary

The video argues that the current hype around AI agents is misplaced for most automation use cases. Large Language Models (LLMs) are inherently non-deterministic, expensive, prone to hallucination, and require constant human supervision, making them unsuitable for autonomous, high-volume workflows. The speaker advocates for a 'deterministic-first' architecture: breaking down a process into granular steps, implementing the vast majority of logic (data transformation, API calls, browser interactions, control flow) using traditional code (Python, TypeScript, Playwright), and restricting LLM usage strictly to steps requiring genuine complex reasoning. The recommended workflow involves mapping the process manually, using a coding agent (like Cursor or Codex) to write the deterministic automation skeleton, iterating to replace vague LLM-driven steps with deterministic code once the workflow is understood, and only invoking LLMs via API for specific reasoning sub-tasks. This approach yields automations that are significantly cheaper, faster, and reliable enough to run thousands of times daily without supervision.

Key Takeaways

  • Default to deterministic code (if/else, traditional scripts, Playwright/Puppeteer) for 99% of automation steps; reserve LLMs exclusively for genuine complex reasoning that cannot be coded deterministically.
  • LLMs are non-deterministic, expensive, and hallucinate; treating them as the primary engine for automation creates unreliable, costly systems that require constant human babysitting.
  • Adopt a 'Deterministic-First' workflow: 1) Document the process step-by-step. 2) Build the automation skeleton with a coding agent (Cursor, Codex, Claude Code) using traditional code. 3) Iterate by replacing LLM-driven exploration steps with deterministic code once the workflow is known.
  • For browser automation: Use an LLM agent (e.g., Claude) once to discover the workflow/selectors, then immediately rewrite the execution in Playwright/Puppeteer for cheap, reliable, repeatable runs.
  • Separate data acquisition (scraping, API calls) from data analysis: Keep ingestion 100% deterministic; pass the clean, structured output (JSON/DB) to an LLM only for the final reasoning/analysis layer.
  • Coding agents eliminate the excuse of 'deterministic code is too slow to write'; use them to generate the reliable plumbing so you can focus on the few steps actually needing LLM reasoning.

Description

Book a call: https://calendly.com/itshassanaziz/discuss-a-project ==== ==== ==== Hey all, starting a new mini-series on my channel. Automation Tips. I've been building a lot of automations recently, both for myself and for other business owners. Unlike 99% of automations you see going viral on Twitter and IG that barely work beyond a demo, my automations are fast, reliable, and cheap. They don't cost $50k in LLM tokens because I know how to write efficient automations. They run fast. They have maximum deterministic capabilities so they're as reliable as possible. I've learned a lot after building these automations, and I'm gonna be sharing all of that in these mini tips. Hope that helps y'all in your own automation projects.\n\nMake sure you SUBSCRIBE so you don't miss any part of this series, and leave a like (it helps a ton! Especially for small channels like mine lmao) ==== ==== ==== LINKS Website: https://www.hassandev.me Portfolio: https://www.hassandev.me/work YouTube: https://www.youtube.com/@itshassanaziz?sub_confirmation=1 My Book: https://www.hassandev.me/designing-websites X / Twitter: https://x.com/intent/user?screen_name=nothassanaziz

Transcript

Auto-generated transcript
guys welcome back to the automation tips series where i am explaining to you a bunch of really useful automation tips you can apply to your ai agents and workflows and not only make it much easier for you to automate different tasks no matter how complicated they may be but also make them much more reliable so you don't have to constantly babysit some hallucinatory ai agent that keeps breaking your json output or whatever this is probably tip three or four of the series I don't know, I lost count. I've been recording all of these in one go. I don't know. This is probably tip three or four. And the tip is, reliable is better than fancy automations. Now let me explain. Modern AI models like LLMs are getting a lot of hype. Everyone wants an AI agent. Almost nobody actually needs an AI agent. I've automated some really complicated tasks, not just for myself, but for different various business clients as well. And let me tell you, almost none of them have needed an AI agent. In fact, even I myself have not needed an AI agent for a very long time. I built a ton of automations. I'm using LLMs in these automations, but I don't need an agent architecture at all. Why? Because most of my automations have deterministic elements, right? And I'm going to explain what that means. And I'm going to explain how my automations are so much more reliable than 99% of the ones you see on Twitter, on YouTube, on all of these other people that are advertising their fancy agents that work some of the time, not all of the time. Here's the big problem with LLMs, right? LLMs are hallucinatory, meaning they hallucinate bad output. They need constant babysitting because they hallucinate bad output. So you always need a human to review the LLMs output to make sure it's not, you know, producing something completely garbage. And because of both of those things, they are unreliable. You can't have an LLM running autonomously making decisions, making changes in your systems and processes without having some sort of a human review step to make sure that everything is proceeding nicely and the LLM is not you know spouting garbage. And if that wasn't enough, these LLM tokens are extremely expensive as well, which is a huge problem, right? I've made videos on token maxing before, you know, all these different companies burning millions and millions of dollars on LLM tokens that accomplish nothing. Meta has burned almost $900 million last I checked. Uber burned like, I don't know, three, four billion with a B, right? Billion dollars in just four months. So having all these LLMs doing all of these fancy tasks for us is just the horrible, the wrong approach, right? Not only is it really expensive and completely unnecessary, it hallucinates, it needs babysitting, it's unreliable. It's not something you can deploy on your machine and just let it run behind the scenes. It's something that needs constant babysitting and costs you millions of dollars. At that point, why not just do it yourself, right? So this is not the right approach in most cases. Now, LLMs do have their own benefits. When it comes to reasoning tasks, right? When you need to understand natural language, when you need to reason about things, when you need to, you know, do the reasoning kind of complex tasks, LLMs shine, right this is where they are actually really useful but a lot of reasoning like you'd be surprised over here a lot of reasoning tasks can be done with traditional code why because in my experience when people describe a reasoning task to me it is such a simple process that you could easily do it in a bunch of if statements You wouldn even need LLM reasoning because the reasoning involved is so simple. And most automations are like that. I'm not saying all of them are like this, but most of them are like this. And for the really complicated reasoning tasks, sure, you could use an LLM. But you'd be surprised how many of your reasoning tasks are just simple if-else statements in disguise, right? Like, don't forget, even before LLMs came out, we still had things like, I don't know, Siri in Apple and iOS, right? And Google Assistant in Android devices. And even before LLMs came out, these things were so frigging smart, right? You would think that they're using some sort of complicated AI, but really, it's just traditional code. So you'd be surprised how far you can get in what you would consider reasoning tasks. But really, it's just a bunch of FL statements it's a bunch of traditional code it's a bunch of deterministic operations that you're doing and doing it this way is a lot more reliable than doing it with llms so i'm not saying that llms are bad or that you can't use them at all i'm saying they have their special place in an automation process alongside traditional code the problem is that most new developers and most businesses and non-technical people they don't understand just how much power there is in traditional code and automation tools before llms so they're trying to do things with llms that traditional code can already do way cheaper way more reliably and way faster so with all of that being said here is the big meta here is the best way to create reliable automations that run fast they're cheap to run you can run them a hundred times a day and still not cost even a thousand dollars in llm tokens the first thing you need to do write down the entire process step by step so So you understand all of it in really granular, really precise detail. Because if you don't write it down, you won't understand it. If you don't understand each step, you won't be able to automate it. Step two, don't try to build an AI agent. In 99% of the cases, you won't need an AI agent. What you need is a deterministic automation. By the way, when I say deterministic, it means that the automation is guaranteed to run the exact same way, no matter how many times you run it, no matter when you run it, right? basically if i if i run two plus two it always needs to give me four right if you use traditional code it's always going to give you four if you use llms it might give you four it might give you four in double quotes it might give you the letters f-o-u-r instead of the number four like it's going to give you all kinds of different output right for the exact same prompt again and again so it's not reliable it's not deterministic so don't try to build an ai agent like i said 99% of people don't need one build a deterministic automation that only uses llms when reasoning is required right you can send an api call to open ai and then drop it you can send an api call to whatever lm provider you're using you can pass in the prompts you can get the output from there without having to build an ai agent right so build a reliable deterministic automation filled with as much deterministic code as you can That going to make it really reliable And in the really rare cases where you need reasoning send an API call to the LLM let it do the reasoning grab the response clean it up and then use that in your automation pipeline Now step three because step two sounds like a lot of work Step three is to use a coding agent to write all of this code for you This is going to make you a hundred times faster Nobody asking you to write all of this deterministic code for your automation by hand, right? We don't do that anymore. Use an AI agent, use cursor, cloud code, codex, whatever you want to use. I've been having really great results with cloud code and codex nowadays. And if you ask me which model to pick, I would just go with codex and the latest models that they have over there, but use a coding agent, use it to build the automation that you're trying to build, all right? Write the code for it. Now, step four is to add as much determinism as you possibly can into this whole automation pipeline, right? Meaning Python code, TypeScript code, Bash code, traditional code that is guaranteed to run the exact same way no matter how many times you run it. You're only going to invoke an LLM when you need the actual reasoning, when you need the complex reasoning that a large language model offers you. But for every other step, you're going to just fill it with as much determinism as you possibly can. I was going to say determination, but fill it with as much determinism as you possibly can. That's going to make your automations way more reliable. Now, a little caveat that you should probably know. In many cases, you don't necessarily know the full steps of the automation pipeline beforehand, so you can't figure out what steps to make deterministic and which steps are better off in the hands of an LLM or an agent, right? In those cases, feel free to use an LLM for those vague parts of the workflow. But once you run it a few times, you're probably going to notice that a lot of the work that the LLM is doing, you could probably capture it in a deterministic fashion, right? And so that's where the iteration or the feedback loop comes in, right? As you keep finding more and more ways to add deterministic code to the entire automation you'll keep updating this automation process and keep adding more deterministic code to it until you're satisfied with the reliability score right and reliability score is just a fancy way of saying until you're satisfied with the reliability that this automation offers right a good example of this is let's say browser automation right and i'm going with this one because it's super popular a lot of people are trying to do it and a lot of people are doing it i would say wrong like they're doing it in a wrong and inefficient way so let me explain most people when they're trying to automate a task on their browser what they're going to do is they're just going to hand over control of their browser to cloud right they're going to give cloud a browser and just ask it to do the task and just let it run right now anything wrong with this right when you're trying to automate a browser task for the first time you probably don't know the exact workflow right and so using cloud to do this for you is completely fine it's actually a really great way to figure out the exact workflow right but then once you've done that and once you know the exact steps involved you need to add determinism to it you can't just run cloud a hundred times to do the exact same task again and again that's a waste of llm tokens it's going to cost you a lot of money and it's unreliable and it needs constant babysitting why because we've already discussed somewhere over here right here the llms are unreliable right so here's what you do once you've figured out the workflow using using Plot, right, you gave Plot access to your browser, and it executed the task perfectly, right Now that you have the now that you know exactly what the workflow is like you can add deterministic steps to it And the way you add determinism to browser automation is by using something like Playwright or Puppeteer I use Playwright, which is a browser automation tool, right? And Playwright can grab a browser, grab an HTML page, scan its HTML, CSS, etc., and find the buttons it needs to click and all that, right? once you figure out the workflow that you're trying to do with cloud you can just ask it to write the entire automation in playwright and then you'll be using traditional code deterministic code to run the automation again and again right and that is such a better approach than having cloud run the entire thing manually again and again right so a bit of a real world example over here i do a lot of web scraping right i've got a bunch of websites and platforms where i scrape a ton of data from right because i'm too lazy to go in there and grab thousands of records by hand i've got automations that do it for me and i need to run these automations regularly every day every couple of days maybe every week if i ask claude to do this for me once that's one thing right i'm just trying to figure out the workflow if i then ask it to run this every single day and grab thousands of records for me i'm going to be paying huge bills in llms i'm going to be paying anthropic millions of dollars which i don't have yet all right i'm still working on that so this would be a horrible way to do this right but if i just ask claude to write a playwright automation for me in simple python code that i can then run hundreds of times thousands of times and it costs me zero dollars after that that's the right approach right and now here's an even better example, right? I'm using deterministic code to scrape all of this data, but what if I want to analyze it using an agent later, right? Well, I can keep the web scraping part completely deterministic, grab all of the data, save it in some JSON file or some database, and then I can have an agent analyze it there in the database or in the JSON file. I don't need an agent to scrape the data itself, right? So I'm still making as much of this whole process deterministic as much as possible and reducing the reliance on llms and non-deterministic and unreliable tools right and that's the big lesson over here you want to add as much determinism as you possibly can into your automation that's going to reduce your reliance on these unreliable and expensive llms which are still very useful in reasoning tasks don't get me wrong i don't want this to be a video where i'm just bashing on llms they are extremely useful i'm using them every day i'm I'm using them in so many different cases, but they have a place, right? They have a place in the automation pipeline. And that's when it comes to high complex reasoning tasks. So that's the big lesson. Add as much determinism as you can into your automations. Use traditional code wherever possible and just reduce the reliance that you have on LLMs, right? And if you do all of these things, your automations are going to be way more reliable. They're going to run correctly way more times. And depending on how well you do this, you could probably run the exact same automation a thousand times a day, which you probably don't need to do, but you could, without costing hundreds of thousands of dollars in LLM tokens. So, hope that helps. Subscribe to the channel, if you haven't already, and you can get this kind of quality content every single day, every two days. I don't know, I don't have an upload schedule, but I upload pretty frequently. So subscribe, turn on the bell icon, and make sure you don't miss another video.

Share this article

All great things started with a conversation

If you've got a cool project or opportunity and you want me to be a part of it, set up a free meeting with me here, and let's talk. 😊