Hopwise Labs
Request a pilot
Automation

IT automation: a script first, then an agent

IT automation hands a repetitive operations task, once done by hand, to a program. It works as a funnel: a script for everything that follows a rule, an agent only on the ambiguous residue, human approval before any write, and a log of every decision. Start with a frequent task you can measure, not with a platform.

IT automation rarely fails for lack of a tool. It fails when a team automates without first separating what follows a rule from what doesn’t.

The term covers several families of tasks: provisioning machines, applying configuration, deploying, backing up, patching, handling requests. This guide deals with another one, the work done between operations tools, which none of them automates on its own.

What should you automate first in operations?

Repetitive work whose result a rule can describe. Google’s Site Reliability Engineering book calls this work “toil”: manual, repetitive, automatable, tactical, devoid of enduring value, and growing with the service. The teams described in the book aim to keep it under 50% of each engineer’s time. Their quarterly surveys put the average at about 33%, ranging from 0% to 80% depending on the person.

There’s a simple test. If two people following the same instruction reach the same result, the instruction can become a script. Typical cases:

  • reconciling two lists on a stable key, such as a serial number;
  • checking that a device declared in production is actually monitored;
  • verifying that a threshold, an expiry date or an end of support hasn’t been passed;
  • alerting the right team when a state changes, with the context they need;
  • opening a ticket whose fields can be filled from data you already have.

A script can run on a schedule, on an event (a state change, a new ticket, a crossed threshold) or when someone asks for it. Events make it react faster, but you need a way to catch up on a missed one. A schedule is easier to monitor, since a missing run shows up at the next one.

A script like this treats every case the same way, costs almost nothing per run, and anyone on the team can read and review it. It’s the first stage of the funnel, and often the widest.

What can’t a script do?

Read free text, or choose between sources that contradict each other. A supplier email that announces work in prose, with the date buried mid-paragraph. A customer request that describes a symptom but gives no identifier. Two records whose names match and whose serial numbers don’t.

You can try to cover these cases with rules, but each exception adds a branch. The script turns brittle, breaks on the first new format, and soon nobody dares touch it. What’s left after the deterministic rules is the ambiguous residue. It’s usually a small part of the volume, yet it’s what eats the team’s time.

When is an agent justified?

When three conditions hold: the task recurs often, an ambiguous residue remains after the rules, and a person can check a proposal faster than they could do the work themselves. If any one is missing, a script, a form or a written procedure will do.

By agent we mean a program that uses a language model to read text, cross-check sources and propose an action. It only gets the cases the rules couldn’t handle, with only the information each case needs. It doesn’t read the whole estate. It works incrementally, on what has changed since the last run.

Stage What it handles How it gets things wrong What it costs
Script Rules, stable keys, thresholds, known formats Always the same way: the error shows and is fixed once Almost nothing per run, predictable cost
Agent Free text, contradictory sources, cases without a key On an isolated case, with a plausible answer One model call per case, tests, monitoring
Person Decisions, validation, exceptions Through fatigue, on repetitive cases The most expensive time, to keep for decisions

Why does an agent cost more than a script?

Each case it handles means a model call, and its output has to be checked because it can’t be proven correct. A script is tested once against its rules. An agent is tested on a set of real cases, re-evaluated whenever the model or the instruction changes, and monitored all the time.

It also fails differently. A wrong script is wrong the same way on every case, so the error is obvious and one fix settles it. Chapter 7 of Google’s book makes this point about an automation platform: it centralizes mistakes, and a defect fixed there is fixed for good. A wrong agent gives a believable answer on one case in a hundred, and only a review catches it.

The same chapter shows that scripts aren’t harmless either. An automation for decommissioning machines read an empty set as “all”, and the disk-erase tool wiped the machines of an entire content delivery network. Both stages need the same safeguard: refuse an empty or unusually large batch, and stop until someone decides.

Why validate before any change?

An error written into a reference tool spreads to everything that reads it: tickets, monitoring, the customer portal. So the agent proposes and never writes. Its access stays read-only, and a separate component applies only the accepted proposals.

A useful proposal states the exact change, the facts behind it and where each fact comes from. The responsible person accepts it, corrects it or rejects it with a reason. Scripts follow the same rule for high-impact writes, though a plain notification can go out without approval.

What should the log keep?

Enough to replay every proposal. At minimum:

  • the date, the input received and the sources consulted;
  • the version of the script, the instruction and the model;
  • the proposal and what justifies it;
  • the decision, who made it and, for a rejection, the reason;
  • what was actually written, and in which tool.

With this log you can answer “who changed this, and why?”. On the day of an incident it gives you a reliable timeline, as in a post-mortem built from the tools’ traces. And the rejections become the test set for the next version.

How do you measure the result?

Track the same task before and after, at each stage of the funnel:

  • the share of cases the script settles alone, with no review;
  • the share sent to the agent, which is the size of the ambiguous residue and should shrink as new rules absorb it;
  • the rate of rejected proposals, broken down by reason;
  • the rate of proposals corrected before acceptance;
  • the time from detection to decision, per stage;
  • human time per case, before and after;
  • errors found afterward, despite validation.

A high rejection rate means the agent is badly scoped, or that it’s getting cases a rule should settle. A rejection reason that keeps coming back is a rule waiting to be written. That’s how the funnel narrows: the script takes a growing share, and the agent keeps what’s left.

Who maintains an automation?

A named team, as for any service. The code is versioned, the rules are written in plain language next to it, and alerts go to that team rather than to whoever wrote it. When a tool it reads changes format, the automation is the first thing to break. The log and the refusal of abnormal batches are what raise the alarm.

Where do you start?

With a task, not a platform. Pick a frequent task whose cost you can measure, and record its volume and how long it takes. Write down its rules, then run the script in proposal mode, where it reports what it would do and changes nothing.

Compare its proposals with what the team would have decided, and enable writes on the safe cases only once you understand the gaps. The agent comes after that, on what remains. Inventory reconciliation is a good place to begin because its rules are easy to write: see how to keep a CMDB up to date. Our automation work follows this approach.

Frequently asked questions

What is IT automation, in one sentence?

Handing a repetitive operations task that someone used to do by hand to a program: checking, reconciling, notifying, opening a ticket, applying a fix. The team gets time back, and the task runs the same way every time and leaves a trace. It won’t fix a badly defined process, only make it run faster.

What is the difference between a script and an agent?

A script applies written rules: same input, same output. An agent uses a language model to read free text and cross-check sources, and its answer isn’t strictly reproducible. A wrong script is wrong every time in the same way; a wrong agent is wrong now and then, and plausibly.

Can an agent modify our tools directly?

We advise against it. The agent reads and proposes, and a separate component writes only the proposals a responsible person has accepted. The agent keeps read-only access, and every proposal is logged with its decision.

What is the difference between automation and orchestration?

Automation hands one task to a program. Orchestration chains several automated tasks in order, with their dependencies, retries on error and a shared log. You need orchestration, and a platform for it, once one task depends on another’s result. Until then, a versioned script that logs its runs is enough.

How do you know whether the automation works?

Track the share of cases handled without intervention, the rate of rejected proposals and why they were rejected, the time from detection to decision, and errors found afterward. Compare with the time the same task took before.

Sources