Tldr; Current way I see majority of people using AI (and writing software in general) is abhorrent.

Majority of people I know, see on the web, or discussed in articles are doing something in the range of “ai cannot code delusionalist” to “vibe code the world even if i have no idea what’s going on” without landing on a “proper”.

Proper way is running AI in a way that is

  • safe (risk of disastrous action is minimized)
  • transparent (you can see what’s going on and what was going on in any point of time, and trace the decision tree)
  • autonomous (AI has freedom to explore solutions in a given frame of solutions)
  • each task given to AI contains minimum amount of context (information) required for understanding the task and solving it
  • for each task you can trivially add “more perspectives” (human or AI) to the box to increase the probability on landing on the optimal solution.

Oke, but above are just properties, so how do we achieve those?

  1. Safety Isolated execution with minimized privileges to elevated actions. Or in other words, if you run AI agent that does anything else than “think”, you must make sure that
    it has only capabilities it 100% needs.
  • This has two fold advantage –> Obvious one, minimized risk of unwanted actions (eg. dropping your database, deleting files, spawning 100x GPUs for 3$ per hour*)
  • I kid you not, I saw few days ago a post on reddit called “AI shaming” by “very reasonable person” who gave full access to vastcli
    (virtual compute management tooling) and was crying about AI deleting his GPU instance which was doing some real work. Obviously the main
    result for the unwanted outcome then was poor communication by the dude, but regardless, the more than needed capabilities for the AI
    automated execution, played a major role in this outcome. –> “As per minimum context per task rule” if AI (same applies to humans btw) doesn’t need to think about stuff it shouldn’t
    (like whether to use CLI X it doesn’t need or not at each “decision” tree step) it has easier time solving things, and it’s
    more likely to produce good outcomes.

You can achieve this for example via running AI in isolated virtualized environments with only the system capabilities and secrets it needs, starting with the least privilege default (eg. u start with container/process that is read only in the secure container space and you expand from there)

  1. Transparency This one is “straightforward”. You just need to make sure that all prompts, thoughts, tool usage, compute environments, etc. are stored somewhere and correlated via traces, so when u wake up and check out what your 100 agents were doing when u were asleep it’s easy to figure out.

The technicallity of this is a bit harder, but using tracing tools like Langfuse for example is a good start. Even better setup would be to create some custom hierarchical traces which allow you to eagle view things and understand sort-of
what was going on.

  1. Autonomous If you run “agent” it shouldn’t need to ask about any permissions inside its execution sandbox so it can run without human oversight. Obviously, if the agent has access to some high-risk capabilities (eg. payout money from your stripe account) then adding some oversight
    is a wanted behavior. Even if the oversight comes from other AI agent.

  2. This is hard to explain in exact terms, but simple in approximate terms so we shall go with it. Basically, if u know something would be needed then provide it as context, otherwise don’t. If the task will fail due to lack of information, you can run auto retry with higher amount of information
    but AI agents same as humans, do work better with exact, clear, information. Many benchmarks which try to explore how AI agents work across varied contexts show this clearly, yet
    for some reason big AI companies seem to think a lot about that and try to optimize for larger context sizes
    … Likely this is not because they are putting big wig borrowed money into bonkers massive datacenters,
    and high token usage == high gpu usage, which increases the chance of their wild bets being successful
    but what do I know.

  3. Perspectives. This is big, and one of the most overlooked (at least from my perspective xd)

AI is super, giga good at being “actor”. But not in a way that it pretends to know, but that it can dynamically switch
what it deems important and how it approaches problems, by simply asking it do so.

So, when you do code.

You ask.

“Hey, can you solve A”

U get answer -> Implementation_A

Then u ask -> “Can you check if Implementation A is secure?”

This forces AI to think differently than before about the same code. It’s basically review from security perspective.

And you can do this for any problem, with any amount of perspectives that makes sense easily. For humans that’s hard. If you have a frontend engineer it’s hard for that person to change the bias in their thinking to cybersecurity specialist
and those who can wear many deeply specialized hats are really rare. For AI though? That change in perspective is trivial and one of the most powerful traits, and it should be applied at
any step of work. After all, two heads are better than one… and ten heads are better than two.

So you should have workflows which makes this approach simple.