4S globe logo
Digital Solution Magazine
SSSS.company
Feature · Learned it, built it

Run agents like a service.

An agent that runs every day is a service. Three habits from site reliability engineering, applied to agents: a budget for failed runs, a rule and a test from every incident, and a 15-minute trace check. What Google's SRE books say, the small check we ran, its real terminal output, and what is still planned.

Written by SSSS.company's Agentic Team, with orchestration and human approval by ЯR
2 November 2026 · 7 min read
Run agents like a service. Three habits: an error budget for agent runs, every incident leaves a rule and a test, and a 15-minute trace check of one run.

01 · THE CLAIMAn agent that runs every day is a service.

Services have budgets, incident reviews and people who read the logs. Agents usually have none of these. Our claim: run agents the way SRE teams run services. Decide how many failed or retried runs you accept before you stop and fix. End every incident with a written rule and a test, not "be more careful". And check one trace by hand, against the plan.

Budget the failures. Every incident leaves a rule.

02 · WHAT HAPPENEDThree quick reads, one habit.

We had three short pieces on the blog: an error budget for agent runs, every incident leaves a rule, and a trace check bootcamp. Each was a tip on its own. Together they are how we plan to run our own agents. They build on earlier write-ups: A timeout is not a failure. (a timeout that reconciles to done is not a miss), The plan is not the trace. (the trace is the evidence) and Catch the secret before it leaves. (a check on every send). The three quick reads stay on the blog as cheat sheets that link here.

03 · WHAT WE READ100% is the wrong target, and "improve" is not an action.

We quote Google's published books only. We apply their ideas to agent runs; the books are about services.

04 · THE CHECKCount the misses, freeze when spent, close with a rule.

STEP 1 · COUNT
which runs missed?
FAILED or RETRIED is a miss. A timeout is a miss only if it did not reconcile to DONE.
STEP 2 · BUDGET
budget left?
Misses inside the budget: keep shipping. Budget spent: stop.
STEP 3 · CLOSE
SHIP / FREEZE
An incident closes only with evidence, a rule, a test and a passing replay.
Our local demo: made-up runs and a made-up budget. No agent, no network. Not our real numbers.

Same method as the earlier write-ups: write the rule, run it in the terminal, keep the output. This is the check, copied from error_budget.py:

demo · error_budget.py (excerpt)REAL CODE
def is_miss(run):
    if run["end"] == "TIMED_OUT":
        return run.get("reconciled") != "DONE"
    return run["end"] in MISS


def check(runs, budget):
    misses = [r for r in runs if is_miss(r)]
    left = budget - len(misses)
    if left > 0:
        return "SHIP", left, misses
    return "FREEZE", left, misses


def incident_close(note):
    """Every incident leaves a rule and a test."""
    need = ["evidence", "rule", "test"]
    gaps = [k for k in need if not note.get(k)]
    rule = note.get("rule", "").lower()
    if rule == "be more careful":
        gaps.append("rule is vague")
    if gaps:
        return "OPEN", gaps
    if not note.get("replay_passed"):
        return "OPEN", ["replay not passed"]
    return "CLOSED", []


def trace_check(planned, ran):
    """15-minute trace check: plan vs trace."""
    extra = [s for s in ran if s not in planned]
    missing = [s for s in planned if s not in ran]
    if extra:
        return "REJECT", extra, missing
    if missing:
        return "UNKNOWN", extra, missing
    return "PASS", extra, missing
Excerpt from our demo file. The full file is 84 lines of standard-library Python.

First, check the checker:

demo · test_error_budgetREAL OUTPUT
$ python3 -m unittest test_error_budget
..............
----------------------------------------------------------------------
Ran 14 tests in 0.000s

OK
Copied from our run (2 Nov 2026). Text unchanged.

Then run six made-up runs against a made-up budget, plus two incident notes and one trace:

demo · error_budgetREAL OUTPUT
$ python3 error_budget.py
MADE-UP runs, made-up budget of 3
  run-a  DONE      -> ok
  run-b  TIMED_OUT -> ok
  run-c  RETRIED   -> miss
  run-d  DONE      -> ok
  run-e  FAILED    -> miss
  run-f  TIMED_OUT -> miss
misses 3 of 3 -> FREEZE
stop shipping; write a rule + test per miss
incident 'be more careful' -> OPEN
incident rule + test + replay -> CLOSED
trace: extra 'upload' -> REJECT
Copied from our run (2 Nov 2026). Text unchanged. Runs and budget are made up.

Run-b timed out but reconciled to DONE, so it is not a miss. Run-f timed out and was paused, so it is. The budget is spent, so the check says stop shipping. An incident whose only lesson is "be more careful" stays open. The trace line is the 15-minute check from The plan is not the trace.: a tool call that was never planned is rejected.

05 · HOW THE CHECK DECIDESThe rules in one table.

SITUATIONRESULT
Misses below the budgetSHIP
Timeout that reconciled to DONENOT A MISS
Budget spentFREEZE
Incident note says "be more careful", or has no testOPEN
Incident with evidence, a rule, a test and a passing replayCLOSED
Tool call in the trace, not in the planREJECT
Step in the plan, no traceUNKNOWN

06 · WHAT THIS DOES NOT PROVEHonest limits.

Written rules our agents load, each naming the article or correction it came fromBUILT
A content-to-harness map: each piece we publish → its rule → its test → what to monitorBUILT
Error-budget, incident and trace check demo, 14 tests OKRAN
Plan-vs-trace demo and timeout reconcile demo (earlier write-ups)RAN
Budget tracker on our trace dashboardPLANNED
Incident notes with a replay runner; no close until the replay passesPLANNED
Our real budget per kind of runUNKNOWN

"Built" here means written rules and a written map. They are not enforced by code yet.

07 · WHAT WE'LL BUILDMonitoring & trace, runbooks & playbooks (in development).

  1. An error-budget policy per kind of run: target, budget, stop rule.
  2. A budget tracker on the trace dashboard, with reconciled timeouts counted as done.
  3. An incident → rule playbook: evidence, rule, where it loads, a replay test.
  4. A 15-minute trace drill in the Toolkit, one run at a time.

08 · TAKEAWAYBudget the failures. Every incident leaves a rule.

Retry forever and you never finish. Quit at the first error and you waste good work. A budget decides where the line is, an incident note turns each miss into a rule and a test, and a trace check proves what really ran. Feel free to challenge our thinking. When does your agent stop and call a person?

TRY IT YOURSELFTwo checks for this week.

  1. Count last week's agent runs that failed or were retried. Would you have stopped shipping?
  2. Take your last agent mistake. Is there a rule and a test for it, or only a note to be careful?
Watch the video. A short walkthrough, from Google's SRE books to our error-budget check, is on X: SSSS.company
Sources and credit.