Home cluster

I let an AI agent manage my cluster. The catch? It can't change anything without me.

Hermes runs as a pod in my home Kubernetes cluster. It has read-only RBAC, no access to any secrets, and no way to modify itself - except via a PR. To change anything at all it opens a pull request, and I review and merge it.

Everything it does and everything the cluster notifies (alerts/notifications) arrives in a few Discord channels. The guardrails, what it monitors, how it alerts, and what's still broken.

Discord bot screenshot
Hermes in action. The AI agent and human communicate through Discord channels.

Why bother with this at all

Two versions of this are easy and neither one is useful. An agent that can only look at the cluster is safe and pointless. An agent that can apply and delete is genuinely useful and one bad guess away from a disaster I clean up by hand at 1am.

So I split reach from authority. It gets maximum reach for reading: every workload, log, event, metric and Flux object. It gets zero authority to mutate. It can see the world, but the only way it interacts with the cluster is a pull request that a human gates. The cluster is still its job to fix, it just has to write the fix down and get it reviewed first.

It's safe because the cluster is reconciled from git by Flux. Anything not in a merged commit gets reverted on the next reconcile. A bad idea from the agent costs a rejected pull request, not an outage.

Flow diagram of the only write path. Three authors open a pull request on the same queue: me, Hermes and Renovate. Required checks run: a failure goes back to the pull request along a red arrow and a pass goes forward along a green one to a gate asking who merges, which only a human can pass. The merge goes to main, Flux reconciles, and the result is a new state. An amber dashed arrow returns from Flux to me when a reconcile fails and raises an alert, so the only way out is another pull request through the same gate.
The only write path. Including for me. No apply, no patch, no "just this once" — because the moment there is, the rest of this stops being true.
The part I didn't expect

Reviewing every change is nowhere near the tax I thought it would be. It's the only reason I'm comfortable pointing a model at my infrastructure, and it leaves a written record of every change anything made, including me.

What it has actually done

These are from the last while, and most of them are boring on purpose.

What it costs

Every wake spends real money, and the number moves as the models do, so I am not going to quote one here — it would be a measurement of a month that has already changed. What I can say is where the money went and what I changed because of it.

Alert-driven wakes were the dominant cost at the start, by a wide margin. I turned that path off, rebuilt it much narrower, then turned it back on: an hourly poll instead of a frequent one, a short allow-list of alert names genuinely worth an unattended run, a dedupe gate so a standing alert cannot wake it again every hour, and a hard ceiling on runs.

The lesson, and the mistake I nearly made

The fix was the intelligent filters, not disabling the feedback path entirely. The measurement that first stopped me was the whole provider account's spend for a day, not this path — and the agent's share of it was a fraction of that headline number. Read what a cost figure actually measures before rebuilding anything because of it.

What's weak right now

These are open today.

Read on

Guardrails are the leash: permissions, secrets, networking, and the policies that stop the agent widening its own rights. Monitoring is what's measured, and why that list is short. Alerting is the pipeline and the decisions that keep it quiet enough to trust. The loop is how a change actually gets in. The stack is every tool, and why that tool was chosen.

What others said

This is a serious, adult implementation of constrained AI ops. The author understood the failure modes most people hand-wave past (agent that can apply/delete, prompt that can be talked out of rules, accidental privilege expansion, alert fatigue, silent cost). The documentation is better than most commercial "platform" write-ups.

It is not revolutionary — GitOps + least privilege + human gate is the correct pattern — but it is executed with unusual care and honesty about what still sucks. Worth reading if you are thinking about putting any agent near real infrastructure.

— Grok

This repository and documentation site provide an exceptional, pragmatic masterclass in GitOps and AI safety by decoupling operational reach from mutation authority. By restricting the cluster's AI agent to read-only visibility while forcing all system changes through human-reviewed pull requests, it achieves a remarkably disciplined balance between automated observability and deterministic infrastructure control.

— Gemini

An unusually transparent homelab project that treats AI-assisted infrastructure management as an engineering problem rather than a magic trick, with strong GitOps guardrails and a clear audit trail. The combination of Flux, automated validation, security controls, monitoring, and a human-reviewed PR-only write path makes the repo genuinely interesting beyond the Kubernetes hobbyist crowd.

— ChatGPT

A refreshingly honest write-up of a sensible AI-agent setup: broad read access, zero write authority, and every change routed through a Flux-reconciled pull request. The 'what's weak right now' section and the lessons on alert noise and cost filtering show real operational maturity. The repo (1,100+ commits of Flux and MicroK8s manifests) backs it up as a living system rather than a weekend demo.