Hayz Labs

Script, workflow or agent: how much to automate

Eight rungs from doing it by hand to an unattended agent, five questions to pick the lowest rung that does the job, and the tasks where a plain script beats a model.

Advanced6 min readChecked 11 Oct 2026

What this is
How to choose between a plain program, a fixed chain of AI steps, or an AI that picks its own next steps, for a repeated task.
Why it matters
Each step up costs more and is harder to check, so starting low saves money and gives you results you can verify.
The short version
  • Pick the lowest rung that does the job; many agent tasks need only a script, or a script with one model call.
  • Use a plain script when the answer must be exact or the same every run, such as arithmetic, dates, sorting or renaming.
  • Move up only when the lower rung has shown it fails, and confirm each action that sends, pays or deletes.
On this page
  1. Short answer
  2. Why start low
  3. The ladder
  4. Five questions, in order
  5. When a script beats a model
  6. Four tasks, four rungs
  7. What each rung costs to check
  8. How to tell it worked
  9. Limits
  10. Try this next
  11. Sources
  12. Changes

Short answer

Pick the lowest rung that does the job. Many tasks handed to an agent need less: a plain script, or a script with one model call in the middle. Higher rungs cost more tokens, are harder to check and fail in less predictable ways. The ladder, the five questions and the examples below are our suggestion and untested.

Why start low

Anthropic describes five workflow patterns plus autonomous agents, and advises "finding the simplest solution possible, and only increasing complexity when needed" (Anthropic, 19 Dec 2024, vendor guidance).

Each rung up costs more and repeats less: Anthropic found agents use about four times the tokens of a chat and multi-agent setups about fifteen times (Anthropic, multi-agent research system, vendor report), and on one open model 1,000 runs of one prompt at temperature 0 produced 80 different completions (Thinking Machines, vendor test).

The ladder

RungWhat it isUse whenCheck by
0Do it by handYou will do it fewer than about ten times, or it takes judgmentYou
1Checklist or templateThe steps are fixed and a person must decideTicking the list
2Script, no modelThe input format is fixed and the rule can be written downTests; the same input gives the same output
3Script with one model callOne step needs reading language: classify, extract, summariseA fixed output format, plus a spot-check of a sample
4Workflow: a fixed chain of model calls with a check between stepsSeveral language steps, in a known orderThe check after each step
5Agent with read-only toolsThe steps are not known in advance, and nothing it does can change anythingRead its sources
6Agent that can act, confirming each risky actionIt must send, buy or editThe confirmation prompts and its logs
7Agent running unattended in a sandboxA long job that cannot damage anything outside the boxReview the result afterwards

Some products call a fixed workflow an agent. Judge by who picks the next step: your code or the model.

Five questions, in order

  1. Can you write the rule down in under a page? If yes, start at rung 2. If not, start at 3 or higher.
  2. Is the input free text, images or messy formats? If yes, you need a model somewhere, so rung 3 at least.
  3. Do you know the steps in advance? If yes, rung 3 or 4. If not, rung 5 or higher.
  4. Does any step change something outside your machine, such as sending, paying, deleting or publishing? If yes, rung 6 with a confirmation for each risky action, or keep a person on that step. Before you give an agent your email, files or accounts, read Letting an agent near your email, browser and files.
  5. Can you check the output cheaply? If not, drop a rung or add a check between steps.

Try the five questions on a task of your own:

This part of the page is interactive and needs JavaScript.

When a script beats a model

Use a script when the answer must be exact or the same every run:

  • exact arithmetic, dates and sorting;
  • removing duplicates, renaming files and converting a format, such as CSV to JSON;
  • anything that needs an audit trail, such as a task with a legal or money consequence;
  • very high volume, where even a small cost per item adds up.

A model beats a script when the input is language that varies (emails, notes, receipts photographed at angles), when the rule has many exceptions, or when good enough most of the time is acceptable and errors are cheap to catch.

Try a script with one model call and a check after it first. A model can write the script for you. This prompt asks for one that makes no model calls and refuses to guess:

Build the script version · v1.0
Here are <N> example inputs and the outputs I want. Write a Python script
that does this with no AI calls. If a case cannot be handled by fixed
rules, have the script write it to needs_review.csv instead of guessing.
Include 5 tests using my examples.
Examples:
<EXAMPLES>

Replace the following:

  • <N>: how many examples you are pasting, such as 5.
  • <EXAMPLES>: each input and the output you want from it. Leave out anything you should not paste: What not to paste.

Run the script on a copy of your files first, and read the tests before you trust them.

Four tasks, four rungs

An illustration: a small online shop owner with four jobs.

  • Rename 400 product photos to a fixed pattern. Rung 2. The rule fits on a page and the steps are known. Run it on a copy and check the tests; the same folder always gives the same result.
  • Sort 400 receipts into categories. Rung 3. A script handles the files, makes one model call per receipt with a fixed list of categories, and writes the answer to a table. Spot-check a sample and read every receipt the model marks unsure.
  • Plan a supplier visit abroad. Rung 5. The steps are not known in advance, so an agent with live search and read-only tools suits it. Check each place and price against the official page.
  • Clear the inbox. Rung 6, held back to drafts. Sending changes something outside the machine, so the agent drafts replies and a person sends them.

What each rung costs to check

Each step up makes the check longer. A script check is a test you run once. A rung 3 check is a sample you read each time. Above that you are checking a process and not a result, and you may need logs. If you cannot say how you would check the work at a rung, it is the wrong rung for now. For checking agent output, see Checking agent work.

How to tell it worked

  • You can name the rung you chose for the task.
  • You can give the reason in one line, using the five questions.
  • You can name the failure that would move you up a rung, such as a pile of cases the script sent to needs_review.csv that you will not review by hand.
  • It has not worked if you picked a rung because it sounded smarter. Go back to the five questions.

Limits

Try this next

  1. Take one repeated task from this week and answer the five questions. (10 minutes)
  2. If it lands on rung 2 or 3, ask for the script with the prompt above. (20 minutes)
  3. For a big job that needs an agent, see Long agent jobs: pieces, milestones and stop rules.

Sources

  1. Anthropic. Building effective agents, 2024. Vendor guidance. Link
  2. Anthropic. How we built our multi-agent research system. Vendor report. Link
  3. Thinking Machines. Defeating nondeterminism in LLM inference. Vendor test on one open model. Link

Changes

  1. v1.010 Oct 2026first version
Sources
3
Updated
10 Oct 2026
Last checked
11 Oct 2026
esc
↑↓ move↵ openesc closeType a product, a job or a question

Keyboard shortcuts

CtrlK
search everything
/
search everything
gr
reviews: all AI, scored
gg
start here
gu
guides
gw
step-by-step workflows
gt
try-it tools
gs
setup
ga
about
[ ]
previous and next entry, or collection
t
theme: auto, light, dark
?
this sheet