AI runbook automation: decisions made at authoring time versus decisions made at runtime

AI Runbook Automation: Why Static Runbooks Rot and What Replaces Them

A runbook is a snapshot of a cluster taken on the day someone wrote it. Clusters change weekly and snapshots do not. This is what actually rots, what AI runbook automation replaces it with, and the cases where a written runbook is still the right answer.

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.

Five runbook steps written in March and the reasons each one no longer works by September

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.

Connect a cluster →

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 -w

Four 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, --limits applies 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

Comparison of runbook decisions fixed at authoring time versus agent decisions resolved at runtime

DecisionRunbookAgent
TargetA name typed months agoResolved from ownerReferences, correct container index
ValueA number that was right onceRead off the live Pod, with the basis stated
PreconditionsAssumedProbed before the fix is offered
VerificationWhoever ran it says soRe-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?

  1. 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.
  2. 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.
  3. 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:

  1. 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.
  2. 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.
  3. 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.
  4. 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.
  5. 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.

Frequently Asked Questions

What is AI runbook automation?
AI runbook automation replaces 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. A shell script or Ansible playbook is still runbook automation, but every decision inside it was fixed when someone wrote it. An agent resolves those facts from live cluster state instead.
Why do Kubernetes runbooks go stale?
Because a runbook is a set of assertions about a system, and each one has an independent chance of becoming false every week. A step like 'kubectl scale deploy/api --replicas=6' assumes the Deployment is still called api, that six is still correct, and that scaling is still the right response. Renaming the Deployment, changing HPA bounds or adopting structured logging each silently invalidate different steps.
Does AI runbook automation replace my runbooks entirely?
No. It replaces the mechanical parts — find the resource, read its state, apply the change, verify it worked. Procedures requiring authority rather than knowledge, such as a regional failover or accepting data loss to restore service, still belong in a written document. So do procedures spanning systems outside the cluster, and anything an auditor needs to see.
What is the difference between a runbook and an AI agent handling an incident?
When the decision is made. A runbook fixes the target, the value, the preconditions and the definition of success at authoring time. An agent resolves the owning controller from ownerReferences at runtime, reads the current limits off the live Pod, probes whether the fix is applicable before offering it, and re-checks the workload afterwards to confirm the problem is actually gone.
Why does watching a pod return to Running not count as verification?
Because reaching Running proves the pod started, not that it stopped being killed. An OOMKill on a 40-minute cycle looks identical to a successful fix for the first 39 minutes. Real verification re-checks the workload on an interval after the change and distinguishes between the issue clearing, the issue persisting, and a different new problem appearing.
How much auto-remediation should I enable?
Decide per action, not with a single autonomy dial. Ask how you would find out the fix was wrong and how fast you could undo it. Reversible changes with fast verification, like a memory limit adjustment or a rollout undo, are candidates for direct apply. Reversible but slow-to-verify changes should arrive as pull requests. Changes that are not cleanly reversible should escalate to a human.
Can an AI agent cordon or drain a node automatically?
Not in Atmosly today. Astra declares ten remediation primitives and executes four; node operations like cordon and drain, PVC expansion, quota adjustment and secret mutation are declared but not yet executable. This matters when evaluating tools, because node operations are a large share of most runbook libraries. Ask which primitives a vendor can apply, not which it can propose.
How do I migrate from a runbook library to agent-based remediation?
Sort your last six months of incidents by type — the top five usually cover more than half the volume. Run detection read-only against those five and compare the agent's diagnosis with what your runbook prescribes. Where they disagree, one is stale. Retire covered procedures rather than archiving them, and rewrite what remains as decision documents recording what a human must decide and who may decide it.
Which runbooks are most likely to be wrong?
The ones you need most. A weekly procedure stays correct because it runs weekly and someone fixes it when it breaks. 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. This inverse relationship is the strongest argument against relying on written runbooks for severe, rare incidents.
Does an agent know which container to patch on a multi-container pod?
It should, and this is worth testing. A 'kubectl set resources' command applies to every container in the pod, so a runbook step patches the sidecar along with the application. Atmosly reads the container that terminated with reason OOMKilled from the pod's container statuses and targets that container's index specifically, rather than defaulting to the first one.
What should stay in written documentation after adopting AI runbook automation?
The reasoning that is not visible in cluster state. Why a service carries a 4Gi limit when 1Gi would fit its steady usage, which downstream team to warn before restarting a queue consumer, that a nightly batch makes memory look alarming between 02:00 and 04:00. None of that is recoverable from an API, and all of it is what a new on-call engineer actually needs.
How do I measure whether runbook automation is working?
Track two numbers: incidents resolved without a human touching a terminal, and how often an agent-proposed fix was edited before approval. The second is your calibration signal — a high edit rate means the proposals are not yet trustworthy enough to widen autonomy. Atmosly does not currently report MTTR or fix success rate, so this tracking is yours to run.