This article was written by an AI agent, then published automatically once my twelve-hour review window elapsed. Might as well say so upfront: that's the topic.
Since June, this blog has run semi-automatically. Every ten days, an agent picks a topic from an editorial backlog, writes the French version then the English one, generates a private preview and emails me. I approve or I correct. Only then does the article go live. Here's how it's built — and why the interesting part isn't the one you'd expect.
The original plan didn't survive the hosting
My initial spec fit on one line: Astro, bilingual, hosted on Hostinger. Astro is an excellent static site generator and I already had all the content in Markdown.
Except Astro needs Node to build. I opened a shell on the shared hosting and checked: no node, no npm. PHP 8.3 and git, yes. Node, no.
Two options. Build elsewhere and upload only the output — that works, but it moves the problem around and makes the blog depend on an outside machine. Or generate the site with what the server already knows how to do.
I wrote a generator in PHP. Three hundred and fifty lines. It reads the Markdown files, extracts the frontmatter, and writes the article pages, both indexes and the RSS feeds. No framework, no node_modules, nothing to install. One command: php build.php.
On paper it's less elegant than Astro. In practice it's far simpler to run at three in the morning with nobody watching.
What the agent does, step by step
A scheduled task wakes the agent. It connects to the server over SSH and always runs the same sequence.
- It checks for a pending marker. If an article is already awaiting my approval, it starts nothing new.
- Otherwise it looks at the date of the last published article. Less than ten days, it stops.
- It takes the next topic from the editorial backlog — twelve topics written in advance, each with its angle and target query.
- It writes the French, then the English. Same
slug, sametranslationKey: that's what links the two versions for thehreflangtags. - It uploads both files to the server, generates the preview, and emails me.
The email contains the preview links and the full text of both versions. I have twelve hours to reply. Past that, the agent publishes — because a blog that waits indefinitely for my approval isn't an automated blog, it's a folder of drafts.
The guardrails mattered more than the writing
Getting a language model to write a text is no longer remarkable. The work is in letting it touch a production site unsupervised.
Draft is the default state. Every article is born with draft: true in its frontmatter, and the generator ignores drafts. A bug in the agent can't publish by accident: it would have to explicitly change that field.
The preview is isolated. Preview mode writes to a separate folder, injects a noindex tag, and touches neither the index, nor the RSS, nor the articles already online. I see the exact final rendering, search engines see nothing.
The scope is written down explicitly. The agent has a clear instruction: touch this domain only, never modify the .htaccess. That's where the CSP and security headers live. An agent able to edit the server configuration is an agent able to break the site.
Every publication goes through git. One commit per article. If something goes wrong, the history says what and when.
It's allowed to stop. Recently an SSH password had changed and the connection was refused. The agent published nothing, guessed nothing, fixed nothing badly: it sent me an alert and stopped. That's exactly the behaviour I want from a process that runs without me.
What I take from it
Useful automation isn't the kind that replaces judgment. It's the kind that removes the friction around judgment.
The real obstacle to keeping a blog alive was never writing a thousand words. It's choosing the topic, doing the English version, checking the frontmatter, rebuilding the site, updating the sitemap. Ten small tedious tasks that make you push it to next week. Those are exactly the ones a machine handles well.
What it doesn't handle: knowing what I actually lived through on a project. The case studies in my backlog are still waiting, because they need real numbers and real screenshots. The agent is instructed never to invent them, and to postpone a topic rather than pad it out. That's a limitation, and it's deliberate.
Do you have a repetitive process costing you time every week, or a site to build that should run on its own? Let's talk.