Agents and AutomationLesson 2 of 72

Contents

Agents and Automation

Lesson 2 of 72. Sign in to keep your place.

Module 1 · Before you build: script, workflow, or agent

The boring stack that already does this

8 min read

Walk the request backwards

Someone asks whether AI can automate the Monday report. Before answering, find out what the report is. Usually: three numbers pulled from a database, arranged in an email, sent at six on Monday morning.

There is nothing in that description a model does better than a SELECT and a scheduler. It will do it more expensively, more slowly, and with a small chance of inventing a number.

This is not a reason to avoid models. It is a reason to find the step that actually needs one.

The five fields, and the trap in them

Text
0 6 * * 1   /usr/bin/python3 /opt/reports/weekly.py

Minute, hour, day-of-month, month, day-of-week. That line means 06:00 every Monday.

Here is the part that catches people: when you set both day-of-month and day-of-week, cron treats them as OR, not AND. 0 6 13 * 5 runs on the 13th of every month and on every Friday. Most people read it as “Friday the 13th” and write a job that fires about 62 times a year instead of one to three times: roughly 36 times as often as they intended.

Four parts, and only one of them is clever

Nearly every automation is:

  1. A trigger: a schedule, a webhook, a new row, a person pressing a button.
  2. A fetch: an API call, a query, a file read.
  3. A transform: the actual work.
  4. A delivery: an email, a message, a row written back, a file saved.

Steps 1, 2 and 4 have had good deterministic answers for thirty years. Step 3 is where you decide.

Where a model earns its place

Put a model in the transform when the input is unstructured and varied:

  • free text a human wrote, which needs classifying, summarising or extracting
  • a document whose layout changes between senders
  • a decision that depends on meaning rather than on a field

Everything else (arithmetic, formatting, routing on a known value, sending) stays as code. A pipeline with one model call in the middle is cheaper to run, easier to test, and fails in ways you can read.

The failure the boring stack has, and its mechanism

Deterministic pipelines break silently when the shape of the data changes, and the mechanism is almost always a default value.

Python
total = row.get("total", 0)      # silent: the report says revenue is zero
total = row["total"]             # loud: KeyError, and you find out tonight

Upstream renames total to total_amount. The first line keeps running and reports zero revenue every night. The second stops and pages you. Never default a missing field to a plausible value. A crash is a message; a zero is a lie.

Add one sanity assertion at the end of the transform (this week’s total is within some sane multiple of last week’s) and you catch the entire class of failure that no exception will ever throw.

The free path

You do not need a platform to start.

  • cron, on any Linux box you already pay for.
  • systemd timers, if you want a missed run to catch up after a reboot: OnCalendar=Mon *-*-* 06:00:00 plus Persistent=true. Cron skips a run it slept through.
  • GitHub Actions schedule:: free minutes on public repositories, five-minute minimum granularity. Be aware that scheduled workflows get disabled automatically after around 60 days without repository activity, and that runs at popular times drift by minutes.
  • Cloudflare Workers cron triggers, if the work is short and lives at the edge.

Job adverts name Zapier and Make, and you should know them: both are excellent at connectors and both meter you per task or per operation. n8n self-hosted, Node-RED and Windmill do the same job for the price of a small server, and n8n has its own cloud if you would rather not run it.

Start with the boring one. You can always add a model to step 3 later; it is much harder to take an agent apart once a business depends on it.

Every lesson here is open. Your progress is recorded once you pass the Context Engineering exam.

Check your understanding

A nightly job pulls yesterday’s orders and emails a revenue total. The upstream team renames the total column to total_amount. The job keeps running, and the email reports revenue of zero every night for nine days before anyone notices. Which change would most directly have surfaced the break on night one?

Pick the one you would defend. Your answer stays private.

Next lesson · 9 minWatch the process before you automate it

Stuck on something?Ask Mai, your AI tutor

How to cite: Addaly (2026) ‘The boring stack that already does this’, in Agents and Automation. Edited by M. Mun. Addaly. Available at: https://addaly.com/learn/agents-and-automation/automation-before-agents (Accessed: 13 October 2026).