AI runbook automation replaces written operational procedures with an agent that reads live cluster state and decides what to do, instead of replaying steps someone wrote months ago. The problem it solves is not that runbooks are hard to write. It is that a runbook is a snapshot of a cluster, clusters change weekly, and snapshots do not.
This piece covers what actually rots in a runbook, a line-by-line walkthrough of one failing during a real incident class, what an agent does with the same alert, how far to let auto-remediation go, and the cases where a written runbook is still the correct answer. For the wider picture of how detection, diagnosis and remediation fit together, start with the AI SRE for Kubernetes guide.
What is AI runbook automation?
AI runbook automation is the replacement of static, human-authored operational procedures with an agent that determines the target, the values and the preconditions at the moment of the incident rather than at the moment of writing.
The distinction from earlier automation is narrow and it is the whole thing. A shell script, an Ansible playbook and a Rundeck job are all runbook automation — they execute faster than a human and they still encode every decision at authoring time. An agent resolves the workload from the cluster's own ownership references, reads the current resource limits off the live Pod, checks whether the fix is even applicable, and then acts.
Why Kubernetes runbooks go stale
The failure is not that engineers are lazy about documentation. It is that a runbook contains a set of assertions about a system, and each assertion has an independent chance of becoming false every week.
Every hardcoded fact is a dependency
A runbook step like kubectl scale deploy/api --replicas=6 depends on the Deployment still being called api, six still being the right number, and scaling still being the correct response. Three assertions in one line, none of them version-controlled alongside the thing they describe.
Rename the Deployment during a refactor and the step fails loudly, which is the good case. Change the HPA bounds and the step succeeds while accomplishing nothing, which is the bad one.
The ones you need most are exercised least
Runbook decay is not uniform. The procedure for a weekly task stays correct because it runs weekly and someone fixes it when it breaks. The procedure for the database failover you have performed twice in three years is the one that has silently rotted, and it is the one you reach for at 3am under maximum pressure.
This inverse relationship between how much you need a runbook and how likely it is to be correct is the strongest argument against relying on them for severe incidents.
The maintenance tax nobody budgets
Keeping a library of 80 runbooks accurate against a cluster that changes weekly is a standing engineering commitment that appears on no roadmap. Teams do not decide to stop maintaining them. They decide to ship a feature this sprint, eleven times in a row.
Find out which of your runbooks still match reality.
Connect a cluster read-only in about 5 minutes and see the live issue list — no write access, nothing changes.
Google's SRE book classifies this kind of work as toil — manual, repetitive, automatable, and scaling linearly with service growth. Runbook maintenance is toil that exists to reduce other toil, which is a poor trade.
Runbook vs AI agent: the same OOMKilled pod
Take a pod in CrashLoopBackOff with exit code 137, the standard OOMKilled signature.
The runbook version
A typical procedure, and a reasonable one when it was written:
# Runbook: pod crashlooping
# 1. Identify the pod
kubectl get pods -n prod | grep -i crash
# 2. Check the exit code
kubectl describe pod $POD -n prod | grep -A3 "Last State"
# 3. If exit code is 137, it is OOM. Raise the memory limit.
kubectl set resources deploy/api -n prod --limits=memory=768Mi
# 4. Watch it come back
kubectl get pods -n prod -wFour failure modes, all of them ordinary:
- Step 3 patches the wrong object when the pod belongs to a StatefulSet, or when the Deployment was renamed. The command succeeds against a resource that is not the one crashing, or errors out.
- Step 3 patches the wrong container. On a pod with a sidecar,
--limitsapplies to every container. The OOMKilled one might be the second. - 768Mi is a number from the past. If the limit is already 2Gi because someone raised it in June, this step proposes a downgrade that will make the crash loop worse.
- Step 4 is not verification. Watching a pod reach Running tells you it started, not that it stopped being killed. An OOMKill on a 40-minute cycle looks identical to a fix for the first 39 minutes.
The agent version
Given the same alert, the sequence is different in kind, not in speed.
At detection, the agent reads the live Pod object: current memory limit, current request, which container terminated with reason OOMKilled, and the restart count. It resolves the owning controller from ownerReferences — collapsing a ReplicaSet to its Deployment, or correctly identifying a StatefulSet or DaemonSet — and the index of the container that actually died.
Diagnosis runs against the full declared pod spec rather than log text alone, so exit code 137 with no readiness probe declared reads as memory exhaustion rather than a probe misconfiguration. The proposed limit derives from what it observed: near the current limit at peak, it proposes peak plus 20%; where the peak is well below a still-OOMing limit, it treats the spike as under-sampled and proposes plus 50%. Where it has no usage data at all, it says so in the interface rather than presenting a default as an analysis.
The change is delivered either as a pull request against the source repository or as a direct patch behind an approval gate. It captures a rollback specification before mutating anything. Then it re-checks the workload every three minutes and returns one of three verdicts — healthy, still firing, or regressed — rolling back automatically only on the third.
Anatomy of an AI SRE fix walks a single incident through that path in detail, and GitOps remediation for Kubernetes covers the pull request mechanics.
Where the difference actually lies
| Decision | Runbook | Agent |
|---|---|---|
| Target | A name typed months ago | Resolved from ownerReferences, correct container index |
| Value | A number that was right once | Read off the live Pod, with the basis stated |
| Preconditions | Assumed | Probed before the fix is offered |
| Verification | Whoever ran it says so | Re-checked every 3 minutes, three verdicts |
The precondition row is the underrated one. Offering "roll back to the previous revision" on a Deployment with a single revision is a no-op dressed as a fix — it reports success and changes nothing. An agent that checks rollout history depth before offering that option removes a whole class of wasted incident minutes.
Where runbooks still win
Three cases, and they are not edge cases.
Anything requiring authority rather than knowledge. Failing over a region, declaring a customer-facing incident, deciding to accept data loss to restore service. The hard part is not knowing the steps, it is having the standing to decide. Write these down and keep them current, because they are the ones you will actually reach for.
Procedures spanning systems the agent cannot see. If recovery involves a payment provider's dashboard, a DNS registrar and a Slack announcement, a Kubernetes-scoped agent covers one third of it. A checklist that spans all three beats automation of the middle piece.
Anything with legal or compliance weight. When an auditor needs to see the documented procedure, the document is the deliverable. Automation supplements it; it does not replace the artefact.
How far should auto-remediation go?
The useful framing is not a single autonomy dial but a per-action question: if this fix is wrong, how do I find out and how fast can I undo it?
- Reversible and verifiable — a memory limit change, a rollout undo. The blast radius is one workload, the previous state is captured, and the verification sweep tells you within minutes. These are candidates for direct apply.
- Reversible but slow to verify — anything where the symptom takes an hour to recur. Deliver as a pull request so a human confirms the reasoning before the change lands.
- Not cleanly reversible — deleting a PVC, draining a node, mutating a secret. These need a human, and a well-built agent should escalate rather than attempt them.
Worth knowing on the third category: Atmosly Astra declares ten remediation primitives and executes four. The ones not yet executable are precisely the classic runbook actions — node cordon and drain, PVC expansion, quota adjustment, secret and ConfigMap mutation. If your runbook library is mostly node operations, an agent covers less of it today than the category's marketing implies. Ask any vendor which primitives they apply rather than which they propose; the lists differ.
Migrating from a runbook library
A sequence that works without a big-bang rewrite:
- Sort by frequency. Pull the last six months of incidents and count them by type. The top five almost always cover more than half the volume, and they are the OOMKills, image pull failures and crash loops that agents handle well.
- Run detection read-only against those five. No write access. Compare the agent's diagnosis with what your runbook prescribes, incident by incident. Where they agree, you have evidence. Where they disagree, one of them is stale and finding out which is free.
- Retire, do not archive. When a procedure is reliably covered, delete it. A runbook library nobody trusts is worse than a small one everybody does, because engineers waste minutes checking documents they have learned to doubt.
- Rewrite what remains as decision documents. The surviving runbooks should record what a human needs to decide and who is allowed to decide it — not commands to paste.
- Measure it. Track incidents resolved without a human touching a terminal, and how often an agent-proposed fix was edited before approval. The second number is your calibration signal.
One caution on measurement: Astra does not currently report mean time to resolution or fix success rate, so those numbers come from your own tracking. How to reduce MTTR in Kubernetes covers the method.
What to keep documenting
Agents replace the mechanical parts of a runbook — find the thing, read its state, apply the change, check it worked. They do not replace institutional knowledge.
Keep documenting the reasoning that is not visible in cluster state: why this service has a 4Gi limit when 1Gi would fit its steady state, which downstream team to warn before restarting the queue consumer, that the nightly batch makes memory look alarming between 02:00 and 04:00. None of that is recoverable from an API. All of it is what a new on-call engineer actually needs.
The pattern that holds up is a small set of decision documents next to an agent that handles the mechanical work, rather than a large library of command lists slowly drifting out of sync. Grouping matters here too — an agent that raises one incident per root cause instead of forty pod alerts is what makes the remaining human judgement affordable, which we covered in alert fatigue in Kubernetes.
If you want to see which of your procedures still match reality, connect a cluster read-only and compare the agent's diagnoses against what your runbooks prescribe — Atmosly Astra runs detection with no write access, and you can start free.