Skip to content
CONTACT

An AI agent on the server: five rules for not breaking anything

AN AI AGENT ON THE SERVER

These days a good part of my server work is done together with an AI agent: it reads the logs, writes the scripts, checks hundreds of pages in a few minutes. It's a huge accelerator. But a fast agent on a live site is like a newly qualified driver in a supercar: the talent is there, what's needed is rules.

Meanwhile, in the server room, the fans hold their breath.

1. Least privilege

The agent works with a user that can do only what's needed. Read access where reading is enough, write access only through specific commands, listed one by one in the server configuration. If something needs the administrator password, it stops and asks a human. It isn't mistrust: I don't have the keys to every flat in the building either, and I live perfectly well.

2. Backup before touching

Before editing a file, a dated copy is saved. Before working on the database, a dump. Always, even for “a tiny change”. The tiny change is the most dangerous species in the ecosystem: small, likeable, and perfectly capable of knocking a site out at six o'clock on a Friday afternoon.

3. Test copy

Big operations, like migrations and upgrades, are tried on an isolated copy, with a separate database and no impact on the public site. It's the flight simulator: you can crash as many times as you need, and nobody has to fill in any forms.

4. Read before you write

  • Always download the current version of the file from the server before editing it: local copies go off like milk, but without the smell to warn you.
  • Complex commands are written into a script, reread, and only then run.
  • No destructive operations without explicit confirmation. “Are you sure?” is the most underrated question in computing.

5. Check and write everything down

After every change: page response codes, error logs, a test in the browser. And at the end a logbook of what was done, so the next session, human or AI, picks up from there. I fill it in with the gravity of a starship captain. All that's missing is the stardate, but I'm working on it.

The ideal colleague

Every now and then some industry prophet announces from the stage that soon agents will do everything on their own, unsupervised, “because the future doesn't ask for permission”. My server, on the other hand, asks for permission all right. And that's exactly why it's still switched on.

With these rules the agent isn't a risk: it's the fastest colleague I've ever had, and one of the tidiest. It doesn't drink coffee, doesn't complain about the heating and has never said “works on my machine”. So far.