AI

Agents on call: DevOps, QA and incidents without a rota

An operations loop where agents detect, patch and deploy

Building a product is a project. Running it is a payroll line that never ends. For a small SaaS the operations burden — monitoring, deploys, incidents, the on-call rota nobody wants — is usually what forces the first two or three hires, long before feature work does.

This is the part of the stack where agents have moved fastest, because operations work is unusually well suited to them: the inputs are structured, the actions are scriptable, and success is measurable.

Productionlive trafficTelemetrylogs, traces, SLOsTriage agentcorrelate + rankFix agentpatch + PRReview + testsgate before deployDeploy agentcanary + rollbackships, then watches its own changenotifiesSlack#alertsDiscord#deploysEmail digestdailyHuman on calllow confidence onlyThe owner reads a channel, not a dashboard.Every state change — alert raised, patch opened, deploy shipped, rollback fired — arrives as a message with a link to the diff.
The run-time half. The loop closes on itself: an alert becomes a patch, a patch becomes a deploy, and the deploy is watched by the thing that raised the alert. A human is paged only when the triage agent's confidence is low.

What the loop actually does

An alert fires. A triage agent correlates it against recent deploys, error rates and traces, forms a hypothesis, and either acts or escalates. If it acts, it opens a pull request with the patch and the reasoning, which goes through the same review and test gates as any other change. If the change passes, a deploy agent canaries it and watches its own rollout.

The important property is that the loop closes. The thing that raised the alert is the thing that verifies the fix, so a patch that does not actually resolve the symptom does not get quietly marked done.

Deciding what an agent may do unsupervised

Not all remediation is equal, and the useful split is by reversibility rather than by severity.

ActionReversible?Let the agent do it?
Restart a pod, scale a worker poolYes, instantlyYes, unattended
Roll back a deployYesYes — faster than a human, and this is the 3am job worth deleting
Open a PR with a proposed fixYes, it is a diffYes, always
Merge and deploy that PR to productionMostlyOnly after the staging record is boring
Run a schema migrationNoNo. Draft it, then have a human approve
Delete or mutate customer dataNoNever

That last row is not a performance judgement. Some actions should require a human because the cost of being wrong is unbounded, and that is true regardless of how good the agent gets.

The channel is the interface

The owner of an agent-run system should not be watching dashboards. Dashboards are a pull interface, and the whole point is that you are not sitting there. Every state change should arrive as a message in Slack or Discord with a link to the underlying artefact.

  • Alert raised — what fired, what changed recently, the agent's current hypothesis.
  • Patch opened — a link to the PR, the diff summary, and what evidence led to it.
  • Deploy shipped — which environment, which commit, the canary result.
  • Rollback fired — this one should be loud, and should say what triggered it.
  • Daily digest — everything that resolved itself, so you can see the system working without being interrupted by it.

Route them to separate channels by urgency. A rollback and a nightly digest in the same channel means one of them gets ignored, and it will be the wrong one.

Webhooks are the mechanism and they are unglamorous: an incoming webhook per channel, a formatter that turns an event into a message with a link. The engineering effort is small. The discipline is in deciding what is worth a notification, because a channel that fires forty times a day gets muted within a week, and a muted channel is worse than no channel at all.

QA agents, and what they are actually for

A QA agent checks a deployed build against the specification, not against the code. It drives the real interface, follows the acceptance criteria from the SRS, and reports what it could not do. This catches a category of failure unit tests structurally cannot: the feature works exactly as implemented, and the implementation is not what was asked for.

Run it against staging on every deploy and against production on a schedule. Production QA is how you find the failures that only exist with real data — the ones that never appear in a seeded test environment.

The threshold that keeps it honest

The single most important setting in this system is when the agent stops and pages a human. Set it too high and you are on call anyway; too low and you find out about outages from customers.

Something has to escalate on: an alert the agent cannot correlate to a known pattern, a fix that failed twice, anything touching data or money, and any incident that lasts longer than a set wall-clock time regardless of confidence. That last one matters most — an agent quietly failing to resolve something for forty minutes is the failure mode you will actually meet.

Google's SRE book predates all of this and remains the best description of what you are automating. The DORA research has the metrics worth measuring against — if deploy frequency rises while change failure rate holds, the system is working.

Getting there without a bad month

  1. Run the agent in observe-only mode first. It posts what it would have done, and you compare that against what you did. Two weeks of this tells you whether to trust it.
  2. Grant the reversible actions: restarts, scaling, rollbacks. These are the highest-value and lowest-risk, and rollback alone removes most of the 3am pages.
  3. Let it open PRs for everything else. A patch you review at 9am beats an outage you fix at 4am.
  4. Move to unattended merge per service, starting with the least critical one, only once the record is dull.
  5. Keep the escalation path permanently. A system that cannot page a human is not more autonomous, it is less safe.

The end state is not zero humans. It is that the human is asleep during most incidents and reads about them over coffee. That is a genuinely different business — it is the difference between needing an on-call rota and not. How small a SaaS team can be works through what that does to headcount, and scale and re-architecture is where we do this work.

Frequently asked questions

What is an AI SRE agent?

An AI SRE agent monitors a production system, correlates alerts against recent deploys and traces, forms a hypothesis about the cause, and either remediates directly or opens a pull request with a proposed fix. It reports through a channel such as Slack or Discord and escalates to a human when its confidence is low or the action is irreversible.

Which production actions should an AI agent be allowed to take?

Split by reversibility rather than severity. Restarts, scaling and rollbacks are instantly reversible and should run unattended — rollback in particular is the 3am job most worth deleting. Opening a pull request is always safe because it is only a diff. Schema migrations should be drafted but approved by a human, and anything that deletes or mutates customer data should never be unattended.

How should agents notify a team about production issues?

Through webhooks into Slack or Discord, with one message per state change — alert raised, patch opened, deploy shipped, rollback fired — each linking to the underlying artefact, plus a daily digest of what resolved itself. Route by urgency into separate channels: a rollback and a nightly digest in the same channel means the wrong one gets ignored.

When should an agent page a human?

On an alert it cannot correlate to a known pattern, a fix that has failed twice, anything touching customer data or payments, and any incident exceeding a fixed wall-clock time regardless of the agent's confidence. The time-based rule matters most, because an agent quietly failing to resolve something for forty minutes is the failure mode teams actually encounter.

References

  1. Site Reliability EngineeringGoogle
  2. DORA research programmeDORA
  3. Claude Code hooksAnthropic
  4. Model Context ProtocolMCP

Keep reading

A software delivery pipeline run end to end by agents
AI

The Agentic SDLC, Explained

One person writes the spec and approves the release. Between those two moments, a chain of agents plans, builds, reviews, tests and ships. Here is the wiring.

Delivery phases split between agent-run and human-owned work
AI

How Small Can a SaaS Team Be?

The honest answer is smaller than it was and larger than the marketing says. Here is which work actually moved, phase by phase.

Jobs moving from a request path into queued worker pools
Architecture

BullMQ vs RabbitMQ vs Kafka

Most teams asking this question do not have a queue problem yet — they have work happening inside the request. That changes which answer is right.

Let's put it into production.

Book a 30-minute call — you'll walk away with a scope, a timeline and a fixed price.

Book a call