Klankers

Script or AI agent? Split your automation at the judgment line

How I split a weekly SEO check into a plain script and an agent. The script does the mechanical work, and the agent only reads the diff and makes the decision.

The problem

I run three small sites: rico.wtf, bubbleio.wtf and whoistyping.wtf. Each has a short list of target search terms. Every week I want three answers: are those terms getting impressions, where do they rank, and what moved since last week. Done by hand, that is three Search Console views, a search for each keyword, and notes kept somewhere.

The old process

Open Search Console, filter each site by query, copy numbers into a sheet. Search each target keyword, scroll for my domain, record a position or “not found”. Compare with last week. Then decide what to do.

The re-engineered process

I split the work along one question: does this step need judgment?

  • Mechanical: a Python script with no model in it. It calls the Search Console API through a CLI wrapper, pulls the last 28 days per site, and checks each target keyword with a “contains” filter on its first three significant words. It also checks the top 20 search results for my domain. It writes one JSON snapshot per run, and a second function diffs it against the previous snapshot.
  • Judgment: an agent. It reads the diff and proposes next tasks. It does not fetch data itself. It works from the snapshot file, so each claim can be checked against a number.

The rule the agent has to follow: no claim about a ranking change without the snapshot numbers behind it.

My reasoning for the split: a script is cheap to rerun and gives the same output for the same input. Having a model re-fetch the data every week adds cost and more places for it to go wrong. The model earns its place where the output has to be read and a decision made.

What the first snapshot showed

The first snapshot covers 2026-09-16 to 2026-10-13:

  • rico.wtf got 220 impressions and 2 clicks. Most of that came from “klanker” (111 impressions, average position 9.2) and brand queries, none of which were targets.
  • All nine target keywords across the three sites had zero Search Console impressions in that window.
  • For rico.wtf’s three targets, my domain did not appear in Brave’s top 20.

That is one snapshot, so it is a baseline, not a trend. The useful part is that the zeros are now a number in a file, and the next run can be compared against them.

What I am not claiming

I have not timed the manual version, so this post doesn’t claim hours saved. The script is one run, and its output is a file that can be diffed.

Where this breaks

  • The keyword match requires all of a target’s first three significant words to appear in the query. It can miss a different phrasing and can match a related query that is not the target. Zero means “no query containing those words”, not “no visibility”.
  • Search Console positions are impression-weighted averages. A move on 9 impressions is noise.
  • Search-result checks are one engine’s top 20 at one moment. That is not what a buyer sees.

Try it

If you run a small operation, pick one weekly question you answer by hand. Write the mechanical part as a script with no model in it. Give the agent the diff, not the raw data. Keep the numbers next to every claim.

Related posts