Who Is Accountable for AI Agents? (with Ran Aroussi)

As AI agents move beyond simply generating code and begin taking actions autonomously, who is ultimately accountable for what they do?
In this episode of The Product Engineering Podcast, I'm joined by Ran Aroussi, creator of the hugely popular Python library yfinance and author of Production-Grade Agentic AI, to discuss the changing relationship between human engineers and autonomous AI agents.
We explore what happens when AI agents can write, test, review and even deploy software, and whether expecting a human to approve every line of generated code is still realistic. We also discuss how engineering teams can build trust in AI agents, introduce appropriate safeguards, and gradually increase autonomy without sacrificing accountability.
Topics covered:
- How AI agents are evolving from assistants into autonomous systems
- Where to draw the line between human oversight and agent autonomy
- Why accountability may be shifting from reviewing code to designing safeguards
- Whether trusting an AI agent is really different from trusting a junior engineer
- The role of engineering judgement when AI can generate almost unlimited code
- How AI agents can earn greater autonomy over time
- Why engineers should increasingly focus on architecture, systems thinking and product outcomes
Links and resources:
Ran Aroussi on X: https://x.com/aroussi
Ran's company, VarOps: https://varops.com/
Ran's book, Production-Grade Agentic AI: https://productionaibook.com/
The Product Engineering Podcast: https://doproductengineering.com/
Transcript
It's very exploratory. You want to test something. I'm not sure you know what that's moving there. Let's you want to see what's happening. You need this fast feedback loop. So yeah, we for that we work with the traditional the quote unquote coding agents. (Upbeat Music) Hi, welcome back to the product engineering podcast. This week I'm joined by Ran Aruci, who is the creator of the hugely popular Python library, Wi-finance, and also author of production grade, Agenic AI. And today we're going to talk about that very topic, Agenic AI, and particularly like accountability around AI agents. So Ran, welcome to the podcast. Hi, and welcome, welcome myself. And thanks for having me. No worries. So Agenic AI is obviously, it's much more than just a buzzword, right? This is something that's come about over the last few years. And the audience for this podcast to be engineering focused people and product focused people who are trying to create a more product engineering approach to building software. And it is impossible to ignore Agenic AI when you're trying to do that because agents are filling in so many of the gaps. But I think the topic we're going to talk about today is about accountability and what happens when you give agents the ability to actually take actions, which is a super interesting topic. And it's something that not enough people really talk about because it often gets brushed under the carpet and left aside. So let's think about the trajectory that AI has gone on, right? We had chatbots like chatgpt. And then we had chatbots that had tool calling so they could go off and search the web. And then tool calling turned into tools that could actually take actions. And then we ended up in this situation we're in now where agents can work largely autonomously and they can take actions. So yeah, do you want to give us a small amount of background and then we'll talk about how you actually create accountability around AI agents. Yeah, very quickly, I've been programming, coding, and starting businesses for the past 30 years. I started my first models in 97. So I've done pretty much anything under the sun. And anyway, it's related to tech, health tech, ed tech, FinTech, and now it's AI. And I try to keep things fresh and interesting. So about every seven to eight years, I'm kind of shifting within the coding space because that's what I love to do. And to go back to your question, what I think about AI and agents, we are kind of in the fourth wave of AI, I think. We started, as you mentioned, with chatbots and then a little bit more tools. And now agents can be a lot more autonomous. Just today, I had so much fun because my agents have been working on an open source project that I just open sourced today. It basically allows your agents to create documents and contracts for signing, which is a pet project, something that I needed. And what I really, really liked is that this is the sketch that I had to give my agent. This is how I want the layout to be. So I can basically tell it, and the fact that I can go back to paper, and that they're smart enough now to figure this out is really great. But yeah, agents are taking more and more action, more and more autonomously. We've seen the flatter of a personal assistant that you don't have to create routines and automations. Well, they created behind the scenes. We know that they're not just remembering that you need to go to work, but they have a prong of the checks. But from the user experience, they're doing something for you. There are in a constant state of a loop, is something needs my attention, or someone needs my owner's attention. And it's great, it's extremely useful, but it also calls for a lot of new security measures and just awareness to be implemented. Yeah, what do you think are the most important things to be a well? I mean, what really changes when you go from a world of agents just offering you assistance to actually autonomously taking action? Well, that's the paradox with AI. The more it knows about you and the more access it has to the tools and services that runs your world, the more effective it can be. So you need to try to find the sweet spot. Ideally, we would like to be able to tell the AI, have access to everything, and still be able to sleep soundly overnight and knowing that nothing will get leaked or abused. That's even more important. So I can tell you the way that I mitigate some of that stuff is first, I own as much of the stack as possible. It's not like I'm creating my own models or anything like that, but I am using my own harness for pretty much everything. And like recently, I really fell in love with the simplicity of Claude's office suite, quote unquote. But I'm still behind the scenes. It still goes to my memory bank, to my tools. So I live within my ecosystem and not theirs. So that's one thing that you can do. The other thing that you can do is make sure that if something doesn't need right permission, don't give it right permissions. If you just want to do triage with your emails or stuff, great, let it read your emails, let it organize except for deleting, let it write drafts, but don't give it permission to send. And then you know that your job is, okay, I'm gonna set aside a few minutes every day and I'm going to review the drafts, I'm gonna send them. So to try to gate as much, as reasonably possible, you give it access to your bank account to check for your statements, or if a deposit came through, great, don't give it the permission to send money. So it's really all about being able to mitigate the risk. I know that my preference is not always possible, but my preference is to have the agent act on its own behalf whenever it's possible. So if I need to send automated email, except for or any of that stuff, then yeah, it's not coming from me. And it comes with a disclaimer, this is a I can mistake, but we still try to provide links to the references of why the AI said what it said. So yeah, I rather not send like a stupid policy that comes from me and then I have to apologize, or even worse, pretend that it's not AI. We all know that we're using AI, everybody knows that everybody's using AI. So let's stop pretending. No, that's fair. So it feels like there's an escalation of actions an agent can take and you wanna draw a line at some point. But then I often think if that line is moving further towards kind of autonomy, right? Because if you think about the way that a team might build some software, the first action will be writing some code and then you would review the code and then you might ship that code to production and then measure it with a sequence of users and collect their feedback. Now, I think at the minute, the line is probably at review the code. So most people are okay with it taking the action of writing some code and then the action of testing that code and then human probably has to review at some point. Some people are having that completely automated, but let's say we move that one step further and so we're saying that AI can now review the code and then can it release it into production and then can it actually ship that feature out to a few users and at what point is that line just moving further and further towards full autonomy or do you think we'll stop talking? Yes, and I do believe that within a year's time we'll be able to completely trust the AI to make decisions, but it's funny you should mention because we recently, one of our companies, Automaze, we started a relauncher service, it's called Managed Software Factory, we call it Automaze Works. And what we've realized is that a lot of the bottlenecks that shows up in review is because of lack of planning. Not all of them, obviously some just need review, but a lot of the issues wouldn't even come to light if the planning was in place. So yeah, it's something that I think we're gonna see more of where it's a lights on factory where the human is very much in the loop for the parts that actually need the judgment, the review, the governance. And I think this answers two questions at the same time. One, why do I need a developer to pay the developers? Well, you don't, you pay them for the, you don't pay anyone to code, you pay people for the judgment. And the other question is, which is funny that it leads, it coincides, the first one is, how the hell did I get this out of my computer? I coded it myself, I don't know what to do next. And it also helps people kind of sleep better at night that they're not the developers and the engineers and everything try to keep things. Yeah, I mean, I agree with you saying, one of the things that I've, the challenges I've had with a human in a loop model is even though it's the correct thing to do from a knowledge and judgment point of view, is it ranges this question of accountability because what you're essentially almost tending to say there is that the human in the loop is therefore accountable for everything the agent does. So often those humans in the loop can find themselves a little bit under pressure to know absolutely everything that the AI has done because they know that they're accountable for it. And if that human is trying to learn like every single thing that the AI has done, then they almost feel, oh, I could have just done that myself, right? So like, so how would you make it so that the AI still has a bit of autonomy, but there is still a certain amount of accountability around what it does? Yeah, so when we take on a project, we have a process which internally we call kind of the factory readiness. We make sure that the code is very clear for AI that is simplified, that the agent can start and stop its services and run the proper test that it has access to things. It never touches production. That's why it has a staging environment and sandbox that it can play with. And it builds a full map of the code, some variations of knowledge code and STs. And it also keeps, and that's for the humans, it also keeps a very up-to-date wiki with every chance. So once you merge something, it goes in the wiki and we can read what had happened. Now it is almost impossible on the way to becoming completely impossible to actually read the code due to the sheer volume. So our job as human is to put so many constraints on the agents for the definition of done that if all these constraints are met and it gets to the other side, we have a very high confidence in the code that it produced. That's why we also tend to pick, to have the choice of the programming languages. If it's a new project and not a legacy where we inherited the stack, then we are going to go with, for backends with Rust or stuff like that, it won't even compile if there's an issue. So this is another type of constraint that we bring in. We rather work with languages that won't even compile if there's any sort of problem. So it feels like you're saying that the human is not necessarily accountable for absolutely everything the agent outputs, but they're accountable for making sure that the safeguards are there around the agent. Is that what you're saying? Right, and they need to be able to draw a flowchart of how the app works. If you wake up in the middle of the night, you need to be able to do that. But you don't need to know every line in the code. So back to your previous example of an agent that like my email on your behalf, which I'm sure a lot of people are using, some people aren't. It's almost like saying you're not necessarily accountable for reading every single email that the agent's sending out, but you're accountable for making sure you've put something in place to put some kind of quality check around it. If it sends email from under my own name, everything gets reviewed. It doesn't have permission to send emails automatically under my, I review everything. I often change. Maybe if I'll get to a point where for two months I hadn't edited any of the drafts, maybe I'll have enough trust to just run it automatically. But it's not only that. I need to know what's being said in my name. So if I'm gonna get a WhatsApp all of a sudden because of an email I send, I can't be clueless. I need to be in the loop. Now I'm fine that because of my desire to be in the loop, I'm only gonna be 10 times more productive than I was a year ago instead of 100. I'm okay with that. I'm not in any rush. The amount of content and output that we're generating is unparalleled. So I'm fine if I'm not at the very tippy top of what in theory would have been possible if it wasn't part of the-- The reason I brought that analogy up though because reading every email that gets sent from your account is a little bit like a software developer putting their name on a code review and saying they've approved it and having that same kind of sense of, well, I should have read it all. If I'm gonna approve it, I need to have understood everything in it. Now obviously it's a lot easier to read and approve an email than it is to prove a pull request. But the only real difference in that model in terms of accountability is the amount of stuff you need to read. And so at what point do we get to the point, maybe with emails that we have with pull requests where we just think, oh, I can just see directionally, this is what I wanted to say. Let's say you were sending a very long email or a document. Let's say you'd written a document. How detailed are you going to read that document before you email it out? That kind of question is much more like a code reviewer. Might think about it. What do you think like, what is actually my accountability as a code reviewer? Am I there to make sure absolutely everything was done correctly? Well, luckily I'm sending a lot less emails than code. So I have the time to read. And I will look in the business environment, I will not go, I will not let a contract be sent to customer before reading every single word of it. Yeah, I will let the agent kind of have the first path of it. Okay, tell me what's obviously risky here. Tell me, but just point me in the right direction. And that's what I will be dealing with first. But there's no way I'm going to sign something without actually reading it or ask someone to sign something that I'm not aware of what's in it. But in terms of how I work with my agents in general, I'm very conversational. Very, very conversational. And I found this to work the best for me because I want to make sure that everything that's in my head and my request is there. They say back to me, just so I know we're on the same page. And we go through this back and forth. And again, because the execution is so fast now, I'm okay with spending more time on the planning. Right, so that's fine. It doesn't scare me to do a back and forth of two hours with the agents to make sure that the plan is really pinned down. Because then I have trust in its ability to work. But don't have to worry if it's on track or if it's distracted from the goal or anything like that. So that's how I work with it. I want to have this conversational confirmation that we're on the same page. Let's talk about trust though. How is trusting an agent different to trusting a person you might have hired to do a task? Because you mentioned emails, right? Before AI, very important people might have had an executive assistant to read their emails multiple times a day and similar kind of workflow to what you're describing there. And that was a matter of trust. The person hiring that executive assistant that they would flag the right things, right? So how, like maybe psychologically, how is the trust that you give to an AI different to the trust that you would give to somebody that you would hire? Well, it's not to be honest. I mean, for me, I treat it exactly like I would when I'm hiring a junior employee, any sort of task. And I see it as a training period. So I have very elaborate, I wouldn't say necessarily complex, but elaborate workflows and rules. And for everything like that, I've spent probably anywhere between a few hours to a few days perfecting this workflow with the agent, just like I would have with training an individual. The benefits of AI that it doesn't get sick, it works 24 seven. These are the benefits that I'm taking from it. And the fact that it will always follow the same rules and not just depends on the constraints you put on it, but won't go rogue. That's the benefits or the differences that I see between having a personal human assistance, not in terms of the effort that it takes out of me in order to, if you download, do it, or go up and just expect it to start doing excellent work for you. Yeah, you're in for a disappointment. Yeah, I know that's fair. And I guess the same question about software engineering as well, like what's an AI coding agent might fill the role of one or two junior software engineers in the past. And how is your relationship to an AI coding agent that wrote some code that still needs a human in the loop to review it, any different to a group of sort of earlier career software engineers? I hate the term junior, but junior software engineers that might have also needed a senior in the loop, right? Like that old model of having your code reviewed by a senior. How is that relationship different now that those people are often being augmented or sometimes even replaced by AI? Yeah. Well, it's funny because I just made the, like I was joking, telling someone that we've always had software factories. We just use humans. That's what a software development company is. It's software factory. But yeah, what, there are two stages in coding and product development. There is the exploratory part where you're just getting something off the ground. I don't think that a software factory in any sense would make, has a place there. It's not that, we're not at that stage in the relationship, right? So it's very exploratory. You want to test something. I'm not sure, you know what, let's move it there. You want to see what's happening. You need this fast feedback loop. So yeah, for that we work with the traditional, the quote unquote coding agents. So we work iteratively with Claude or I specifically love using Droid. And then once we have something that, okay, we got most of that, now it's just a matter of upping the, because we've settled on how we want the database to be structured. We've settled on how we want the user experience to happen. We've settled on everything. Design can come in later where we, it's usually in two tracks. We just need to figure out the stack first and then two tracks can work in parallel. But only then we move it to, I'm not an overly fan of the term software factory, but only then we move it to kind of the loop model where we just have an idea and we meet it on the other side. But there are two very different approaches. So I would say that the junior model is a lot, belongs a lot more to the first part, to the iterative and explorative part rather than the automated part. The automated part is, they may be junior in experience, but they've been working on the product for a while. They know the ins and outs. They're senior on that product, right? Even if they're only been coding for a year to go back to you, but they're seniors on that product. Only then you can start automating stuff. But at the beginning, everything needs your opinion. Everything needs you in the loop. You are gonna, and based on your experience, if you just accept everything, then you're gonna end up with AI stop. But that's where the true engineering comes in place. We are able to, on a daily basis, reduce the amount of code that's being outputted by the agent or the would have been output by tens fold. Because it, just a simple thing that I wanna log in with Google as well as log in with Apple, it will just go and create duplicate code and you can reuse 90% of it and just have different vendors on the other side. So it doesn't think like that, right? It's not a problem for a coding agent to maintain 17 different authentication methods. But just because it's not a problem for the AI agent doesn't mean that it's right. Yeah, that's true. I don't have a million token context in my head that I can juggle with. (Laughing) No, that's a really interesting point. And then on autonomy, right? So the end goal for a lot of this is just to sort of take that human in the loop and bring them further and further on higher and a higher level until the amount of autonomy the agent has got is kind of to the point that a human being might have, right? And then how does the agent earn that autonomy? How do you know when to go one level up and how to give it a slightly more amount of authority, a more amount of autonomy? When you notice that you're almost always accept the agent's work, only then you can say, "Okay, I'm done at this level. "The agent is pretty much on track with me." And by the way, one of the best thing to do that is to build a skill and update the skill weekly based on all your interactions with the agents. And so I have a skill called what would run do. So it is able to simulate what I would have answered for that architecture or for that idea. And it does help. Now you can't build a skill after one interaction, but if you're like me, if you're going through billions of tokens every day, then you have a lot of data to work with. But yeah, I, you know, to quote Jeff Bezos in one of his interviews 10 years ago, maybe, he said that, he said about himself, "I'm getting paid very handsomely "to make a very small number "of high impact decisions every day." And that's where we're all going to be. I don't wanna be there to decide if we're going to use my sequel of Postgres, okay? I wanna be able to decide if we are going to build a system so that we can iterate on quickly because we don't know what users or the no program or their feet or whatever it is, rather than build the ultimate system that nobody will use, you know? That's the common problem with developers. We wanna make perfect system and we tend to not ship. So that's kind of decision that I wanna step in whether or not of picking Next.js or Next.js or who cares? Yeah, no, that is something you hear a lot about. Like a lot of the things that developers used to care about just don't matter anymore, right? Like does it matter if you use TypeScript or Rust or whatever on the backend, PHP? Rust is a perfect example. I've avoided using Rust for years, not because I didn't think it's great or it wasn't powerful. I was aware of all of that, just because it's, in my opinion, at least, I don't wanna offend anyone. It's an extremely ugly language. The learning curve is huge, yeah. It's not even the long, the learning curve as it is, it's just ugly to look at, seriously. It's, you need a cheat sheet next to you with all these symbols that they're using. And that's coming from someone who has been programming in multiple languages for years. I just couldn't get myself to like Rust because of the syntax. Now I get all the benefits, zero of the drawbacks. I don't get to look at it, but I get everything that it has to offer. You're not gonna like me saying it. So the amount of Rust code that I've was in charge of producing just grew exponentially. You're not gonna like me saying this, but I felt like that about Python for a long time, because I don't think white space should mean things in programming language. And I just didn't wanna go near Python. I just saw it as something that you learn in school. I get that. And then AI. I don't share that, but I completely understand the white space that shouldn't mean things. But then AI, Python is the language for AI, particularly like in the early days, we were training up our own neural networks and things like that. And now, I don't care if the LLM wants to go off and create, if Python's got the best library for something, then absolutely, I have no problems with it at all, because I don't need to read it, and I don't need to know that kind of stuff. And you don't, like I know enough Python to be able to conceptually see what it's trying to do. So I don't necessarily care anymore what the actual syntax is doing. I can just see what it's trying to do. I can see what libraries it's using, how the data's flying around, stuff like that. And I sort of understand it. It's funny, you know, about what was it? Maybe 10 years ago, I volunteered at my daughter's school and teach them my computer. So we use Python, but for like two months, I didn't let anyone touch a computer. I only wanted to see flowcharts and graphs of how the software works, because I didn't want them to get bothered by how do I write this. I want you to focus on what needs to happen rather than how do I write this, because only then, you know, that the syntax doesn't matter. If you need to write it in this language or that language, you'll be able to get up to speed within a month or two. So don't be a Python developer or a PHP developer, just be a developer. And now, knowing the syntax is really not important if you have that systems thinking, if you're able to visualize how every little thing in the company works. Yeah, no, that's completely true. And you could even go one level higher and go back to product engineering. It's actually all just the implementation. And so if you can go one level higher up and think about what is the actual problem and what, you know, speak to some customers and that kind of stuff, then everything below build just become an implementation detail that the AI can handle for you. And you get to pick and choose. If something really interests you, yeah, go to the lower decks and deal with it and find you and mess around, that's fine, but you get to choose to do that. Yeah, brilliant. Well, Ron, thank you so much for coming on the podcast. This is a really interesting chat. I could probably talk about this for hours because it is a really interesting topic. If people want to hear more from you, where's the best place to find you? Probably the two places is X at Aruce and our company's website, varops.com. I have the podcast there in my books and everything, just go there, varops.com. Brilliant. I'll be sure to put a link in the show notes for this episode and don't forget to check out production grade at GenTec AI, which is Ron Aruce's book. And thank you, we'll join you next week for another episode on product engineering. Thanks everyone.