Why SREs
and AI Agents
Are a Perfect Match

Paul Stack
Co-founder / VP of Product · Swamp Club
@stack72 · stack72.dev

Every team has a list

OPS-212Create a VPC for eu-west-1open 3 yrsassignee: leftBacklog · Someday
OPS-388Investigate the EC2 instances with no tagsopen 2 yrsunassignedBacklog · Someday
OPS-401Clean up the EBS volumes no longer in use in the sandbox accountopen 2 yrsunassignedBacklog · Someday
OPS-517Recycle certs on the legacy nodes we're trying to decommissionopen 18 mounassignedBacklog · Someday
OPS-604Upgrade to Terraform 1.17.0on Terraform 1.1.0nopeBacklog · Soon
01 · Toil

Toil

ManualRepetitiveAutomatableTacticalNo enduring valueScales with the service
An SRE's week
toil
engineering
Google's aim: under 50%
Most teams I talk to would love to be under half
01 · Toil

Agents love toil

#87 = #1

They don't get bored

The 87th volume gets the same attention as the first

✓ attachments
✓ snapshots
✓ tags
✓ then delete

They don't skip the steps you've written down

They hold the state

A hundred resources, one at a time

02 · What goes wrong

How most teams start

zsh — ~/infra
$ claude
> clean up the unused resources in the sandbox account
$ aws sts get-caller-identity
{
  "Account": "123456789012", ← is that the sandbox?
  "Arn": "arn:aws:sts::123456789012:assumed-role/AdministratorAccess/you"
}

Whatever credentials are already in the shell, the raw CLI, and hoping for the best

02 · What goes wrong

No one gets root on day one

A new hire gets
Read-only access
Runbooks and someone to pair with
Their changes reviewed
The agent usually gets
Whatever creds are in the shell
A one-line prompt
Straight to prod
02 · What goes wrong

So it guesses

"clean up the unused resources"
What does "unused" mean?
run 1stopped + no tags
run 2unattached > 30 days
What order?
run 1SG first → DependencyViolation
run 2delete whatever's in the way
Should it ask first?
run 1no
run 2no

Run the same prompt twice and you can get two different clean-ups.

03 · Guardrails

Guardrails fill in the missing context

The agent had to guessA guardrail tells it
? What "unused" means→✓ A definition, written once for the AI agent
? What order things come down in→✓ The order, declared in the workflow
? Whether it should ask first→✓ A dry run and a human approval before any change
? What it was allowed to touch→✓ Only the operations the AI agent has been given
03 · Guardrails

Deterministic output
from a probabilistic system

the workflow around it · deterministic the model's reasoning probabilistic list filter dry run approve apply record
03 · Guardrails

The same cleanup, as a workflow

agentprobabilistic
listread-only
nothing can
change yet
filterour definition
payment SG
→ excluded
plandeclared order
ENIs → volumes
→ SGs
dry runno changes
exactly what
would go
approvea human
no yes →
nothing happens
deleteallowed ops
no op →
can't delete
verifyis it gone?
still there →
back to plan
recordwho approved
who approved
what
The same request as beforeThis time it goes through a workflow
agentprobabilistic
The agent still gets the one-line instruction and works out what needs doing. The workflow decides how it gets done.
> clean up the unused resources in the sandbox account
listread-only
List the volumes, network interfaces and security groups. Read-only, so nothing can change at this stage.
describe-volumes · describe-network-interfaces · describe-security-groups
filterwritten once
Our definition of unused, written down: unattached for 14+ days, no owner tag, in no Terraform state, not on the exclusion list.
sg-payment-provider → on the exclusion list → never touched
plandeclared
Network interfaces, then volumes, then security groups. The agent never discovers the order by hitting an error.
no DependencyViolation to work around
dry runnothing changes
It shows exactly what would be deleted, before anything is.
e.g. would delete: 3 ENIs · 12 volumes · 4 security groups
approvealways a person
A human reads the dry run and says yes. This is where you spot the volume someone needs for a restore, and fix the definition.
the workflow can't continue without it
deleteallowed operations
Only the operations it's been given. If delete isn't one of them, it can't delete, however sure of itself it is.
list · describe · delete-volume, not the whole AWS API
verifyis it actually gone?
If something's still there, it goes back and replans, instead of carrying on from a half-finished state.
still there → back to plan
recordaudit trail
What it found, what it planned, who approved it, and what actually happened.
found · planned · approved by · what actually happened
Every problem from earlier has a box on here.
03 · Guardrails

Asking for it properly

you
"Using swamp, find the orphaned EBS volumes, unattached ENIs and unused security groups in eu-west-1. Build a reusable cleanup workflow that deletes them in dependency order. Dry run first, and wait for my approval before anything is deleted."
names the resource typesreusable next timedependency orderdry runwaits for a human
03 · Guardrails

Demo

RECORDED
claude — ~/code/swamp-ubiquity
> Use the swamp behavior to help me find the health and data usage of my WiFi network
claude — ~/code/swamp-ubiquity
03 · Guardrails

Or run it directly

zsh — ~/code/swamp-ubiquity · no agent
no LLM in the looprun it yourselfon a schedulefrom CIanyone on the team
04 · In production

Our alerts, handled by an agent

Before: four pages
[FIRING] Certificate renewal overdue · telemetry-tls21:53
[FIRING] Certificate renewal overdue · swamp-club-tls21:58
[FIRING] Certificate renewal overdue · telemetry-tlsWed 11:48
[FIRING] Certificate renewal overdue · swamp-club-tlsWed 11:48
→
After: one incident
[P2] Certificate renewal overdue: multiple certs
A systemic cert-manager issuance problem, not two separate ones
Signals2Occurrences2Re-pagednobody
Ask

Verified · de-duplicated · screened · triaged by an AI agent · correlated · investigated from inside the ops channel

04 · In production

Alert in, incident out

alertsGrafana·Axiom·GCP
verifyswamp serve
unsigned
→ rejected
ingestcode
duplicate →
never applied twice
screenJev · ≥ 0.7
below 0.7 →
dismissed, recorded
triageClaude · JSON
noise
→ ignore
applycode
bad JSON
→ run fails
card→ you
Every alert goes through the same steps.One station at a time.
alertsthe outside world
Grafana, Axiom and GCP push every alert to us as a signed webhook. Nobody has to be awake for any of this.
Sat 31 Oct, 21:53:20 · Grafana: “Certificate renewal overdue” · telemetry-tls
verifyswamp serve · code
Every route checks a signature before a workflow is even queued. Wrong signature, it never gets in.
/hooks/grafana-alerts → signal-ingest
ingestcode · no AI · no API calls
Normalise it, give it an ID from what the alert is rather than its values, and correlate it against the last four hours. One run at a time, so twenty alerts become one incident.
21:58 · swamp-club-tls joins the open incident · occurrences 2
screenJev · TypeSafe
Claude is the expensive step, so a new alert first gets one calibrated probability: is it real and actionable? Below 0.7 it's dismissed, score recorded. If the screen breaks, it fails open.
the threshold is a number we chose, and we can move it
triageClaude · the one LLM step
Code builds the prompt. One strict JSON object comes back: new, attach or ignore, a priority, and why it fired and what it hurts.
“…a shared root cause in the cert-manager issuance pipeline rather than an isolated signal”
applycode
The answer is checked against a schema before anything changes. If it doesn't fit, the run fails. Resolutions are closed by code, whatever the model says.
Wed 4 Nov, 11:48 · the same alert again → “Incident triage already applied” → nothing changes
card→ the person on call
One Discord message per incident, edited in place as things change.
31 Oct, 21:53:29 · card posted, nine seconds after the alert
Only the signal reaches whoever is on call
04 · In production

What on-call sees

swamp opsAPP
[P2] Certificate renewal overdue: multiple certs (swamp-club-tls, telemetry-tls) via letsencrypt-prod
cert-manager's issuance pipeline for ClusterIssuer letsencrypt-prod appears stuck across multiple namespaces (telemetry, swamp-club), with renewals overdue by 25+ hours despite Ready=True. This points to a systemic controller/ACME issue rather than a single cert problem, risking TLS expiry for both services.
Statusopen
Categorycertificate-management
Occurrences2
Signals2632f6c9fec5fc29, 74a441965d4e23b3
Incident data ↗Grafana alert ↗Ask
One message per incident,
edited as things change

Two certificates,
one incident

Links to the incident data
and the alert

Ask runs a read-only
investigation, and posts
the report back
04 · In production

What came back when someone pressed Ask

A real incident investigation report produced by the swamp ops workflow
who asked
Incidentinc-dd36335118c36438
Requested bydiscord:johnrwat
Workflow runc41a14d7-d324-445e-bbde-4b9a3b1dcecc
Axiom rows matched90
"Can you see why the last rotation failed?"
finding

The telemetry evidence provided does not contain any span or event clearly identifying a "rotation" process (e.g., credential rotation, key rotation, secret rotation). No span names, exception slugs, or routes reference rotation-related operations. I cannot confirm why "the last rotation" failed from this data set.

evidence

The 90 matched rows fall into a few distinct categories, none of which are rotation-related:

  • http-client.swamp-telemetry.post → network_error (timeout) on route /ingest, recurring throughout the window (~11:00 to 11:29 UTC)
  • http.request.handle → validation_error: dozens of hits at 11:14:55–11:15:19 UTC on .php and known scanner paths. Consistent with automated bot/vulnerability scanning traffic, not application logic.
  • watcher.nurture.tick, watcher.nurture.sweep and infrastructure.mongo.nurture-send.claimRun each failed together twice

None of the status, duration, or service fields are populated in any row.

likely cause

Hypothesis (unconfirmed): If "rotation" refers to the watcher.nurture.tick / sweep / claimRun chain, the correlated failures across all three spans at the same timestamps suggest a shared downstream dependency (likely MongoDB) is failing to acquire a claim/lock, cascading up through the sweep and tick watchers. This is speculative: no explicit "rotation" identifier appears in the evidence.

recommended next steps
  • Clarify what system/job "rotation" refers to, so the correct span/service can be queried.
  • Query Axiom for spans explicitly containing rotation, rotate, or the specific job/cron name, over a wider time window.
  • Pull full stack traces for the correlated watcher.nurture.* and claimRun failures at 11:07:03Z and 11:11:02Z.
  • Check MongoDB connectivity/health around those timestamps.
04 · In production

The guardrails in it

codeCode ingests, dedupes and correlates. The AI agent is one step
screenBelow a 0.7 screen, it never reaches Claude. A human chose that threshold
schemaIts answer has to fit a strict schema before anything changes
dataAlert text is data, never instructions
by codeResolutions are closed by code. The model never gets a vote
read-onlyInvestigations are read-only. They recommend, and never remediate
gatedOnly the ops role, in the ops channel, can ask

code gathers · the AI agent reads · a human decides

04 · In production

What broke, and what we changed

27 SepAfter a VM move, every Ask investigation failed, loudlyReads from the right place. Failed run re-run
28 SepTriage and investigation answers collided after the first AskEvery answer is tied to the run that asked for it
20 OctSeven-day retention could expire an incident that was still openReconcile refreshes it every five minutes
4 NovThe new screen broke a guard: every alert failed for 20 minFixed, with tests for no score, dismissed and kept
TodayA duplicate alert still costs one Claude callOur next fix

Every fix went into the workflow, so nobody has to remember it

05 · Bus factor

Your most critical systems knowledge lives in the heads of one or two people

A
"Drain the queue before you fail over."
"That SG looks unused. It isn't."
B
"Not on a Monday morning. The batch job's running."
LEFT THE COMPANY

When they leave, that knowledge goes with them

05 · Bus factor

Where that knowledge lives now

Before, in someone's head
1"Leave that SG, the payment provider needs it"
2"ENIs have to go before the security groups"
3"Check with me before you delete anything"
→
Now, in the workflow
cleanup workflow · excerpt
steps:
  - name: find-unused
    task:
      type: behavior
      behavior: aws-orphans
      methodName: find
      inputs: { exclude: [sg-payment-provider] }1
  - name: approve
    task: { type: manual_approval,3
            prompt: Delete these? }3
    dependsOn: [{ step: find-unused }]
  - name: delete-enis
    dependsOn: [{ step: approve }]3
  - name: delete-volumes
    dependsOn: [{ step: delete-enis }]2
  - name: delete-sgs
    dependsOn: [{ step: delete-volumes }]2
05 · Bus factor

Bus factor: 1 → the whole team

yousomeone who joined last monthan AI agent
→
the workflow
→
same definitionsame ordersame approval

Nobody has to find the person who wrote it

06 · Why SREs

You already know how to build the guardrails

1
You already
Look before you touch anything
1
The workflow
Lists everything read-only, before anything changes
list · read-only
2
You already
Know what depends on what
2
The workflow
Takes things down in a declared order
ENIs → volumes → SGs
3
You already
Nothing changes without a review
3
The workflow
Shows a dry run and waits for a human to say yes
dry run → approve
4
You already
Keep a record of what ran
4
The workflow
Records what it found, what it planned and who approved it
record
5
You already
Fix it so it can't happen again
5
The workflow
Every failure becomes a new guardrail
+ new guardrail

Everything that made that workflow safe is something SREs already do

06 · Why SREs

AI was supposed to replace radiologists

2016 · the prediction
"People should stop training radiologists now."
Geoffrey Hinton. AI would read scans better within five years.
2025 · what happened
1,208
places offered to train new radiologists in the US, up again on the year before. And there's still a shortage.
why it was wrong
Reading scans is only about a third of the job. The job is diagnosing patients.

It's the same for SREs. Toil is part of the work, but the job is keeping systems reliable.

06 · Why SREs
A COMPUTER CAN NEVER BE HELD ACCOUNTABLE

THEREFORE A COMPUTER MUST NEVER MAKE A MANAGEMENT DECISION

IBM training slide, 1979

How do I get started?

Step 1
Commit to one item from your list
Step 2
Write down what “safe” means for it
Step 3
Start read-only: find out what’s really there
Step 4
Add a dry run and a human approval
Step 5
When it goes wrong, add a guardrail

Nothing on the list needs a hero any more

OPS-212Create a VPC for eu-west-1Backlog · SomedayReady to pick up
OPS-388Investigate the EC2 instances with no tagsBacklog · SomedayReady to pick up
OPS-401Clean up the EBS volumes no longer in use in the sandbox accountBacklog · SomedayReady to pick up
OPS-517Recycle certs on the legacy nodes we're trying to decommissionBacklog · SomedayReady to pick up
OPS-604Upgrade to Terraform 1.17.0Backlog · SoonReady to pick up

You're not being replaced

You're being empowered

Agents handle the toil. You get to focus on the work that actually needs a human.

Questions…

Try it out at swamp-club.com

I blog about this entire journey into
agentic software delivery at stack72.dev