As with many, I played around with AI agents in code. Contrary to some opinions, AI agents made me rediscover the joy of coding (for many reasons I may discuss another time). However, I am not blind, and I owe my satisfaction with AI agents to a strict mental model and practice.
If you are not a software developer and you use AI to jam together personal scripts for yourself, do not worry, you can do as you want. If you are using them to learn something, don’t worry either.
But if you are a professional coder or you want to publish your work, you have to follow the Golden Rule:
You must use an AI Agent only to do what you know how to do.
Only in this way can you be efficient with them. Only if you know how to do something can you instantly spot when the agent is doing something decent or not. Only if you know how to do something can you recognize whether the generated code is good.
This doesn’t make them less useful. I like to code algorithms, solve problems, and sketch the architecture of the various elements. So I focus on that while I let the robot work on things I loathe. Things like CLI interfaces, reporting, writing diagnostic endpoints, and other tasks I find super boring. I know how to do them; they are just boring. So I let the robot do them while I focus on the math and the algorithms.
However, be careful. The siren’s song is strong. If you are not disciplined, you may think, Why not? Why should I not use the robot for this thing I don’t know how to do?
And that’s the moment you open yourself to fatal mistakes.