AI Strategy for SMBs · Codex and Claude Code

AI Agent vs Automation for Small Businesses: Turn Repeat Codex Work Into a Script

For small business owners: use a chat for writing, a script for work done the same way every time, and an AI agent only when the job needs real decisions.

Shanee Moret thumbnail with the words SCRIPT YOUR REPEAT WORK

AI agent vs automation comes down to who does the work each time. An agent in Codex or Claude Code reads, thinks and decides on every run, while an automation script repeats fixed steps and uses none of your AI limit. If a job is done the exact same way every time, turn it into a script. I have been creating AI tutorials for business owners since January 2023, and I help established business owners build agents inside their companies. When I ran a usage audit on my own Codex account, one hourly check had Codex run the same script 154 times in one week. If you skip this, you pay an agent to think through the same steps every day for a job that doesn't need thinking anymore.

20 Ways to Optimize How You Use Codex and Claude Code Part 2. Watch the full video on YouTube (published 2026-10-03).

In short: - A chat is for writing and reactive work, a script is for work done the same way every time, and an AI agent is for work that needs real thinking and decisions across your apps. - If Codex or Claude Code does a job the exact same way every time, ask it to turn that job into a script. - A script uses none of your AI limit, runs in seconds, and gives the same result every time.

Part of the series: How to Reduce Codex and Claude Code Token Usage: 20 Ways. This is way 18. Previous: Test your agent on a small piece first · Next: Audit your scheduled AI agents

1. Turn repeat work into a script

If the agent does a job the exact same way every time, turn it into a script. A script is a small set of steps that runs by itself, with no AI deciding anything along the way.

Why it matters for your business: small businesses have a lot of chores that never change. Reports, copying data, checking that things work.

Way 18 card titled "Turn the same job, done the same way, into a script" with what it is, why it matters, and examples
Shanee's card for way 18, including the morning lead-count example. From Shanee's field guide on the 20 ways. Shown in the video at 20:12.

What it costs when you skip it

Example: every morning the agent logs in, counts yesterday's new leads, and emails you the number. It is the same step every day, but you pay for the thinking every day. So instead, you would write a script that replaces that action. The email still comes every morning, and it uses almost nothing.

When should a small business start using scripts?

I'd say that scripts are more for once you have your baseline cleanup done. For example, a great script could be making sure that the files that were added to the SharePoint, iCloud or Google Drive today really abided by all of the rules that you have in your new agentic infrastructure. That could happen every day in the same way. (The cleanup itself is way 8 in this series.)

2. AI agent vs script vs chat: which jobs need which

A chat is for writing and something reactive. A script is for work done in the same way every time: tidying a download, checking that your website is up, renaming files. An agent is for work that needs real thinking across your apps. It has to make decisions the way that a human would.

Chat Script Agent
What it's for Writing and reactive work: rewriting a paragraph, coming up with ideas, summing up what you already have, thinking through a choice Work done the same way every time: tidying a download, checking that your website is up, renaming files, copying data from one app to another Work that needs real thinking across your apps and decisions the way a human would make them
Files, tools, web None Has the agent write it once, then runs by itself with no AI Reads and acts across several apps
Late-bills example "Rewrite this overdue-payment reminder so it's firm but still friendly." "Every Monday, pull overdue invoices from QuickBooks into a spreadsheet and email it to me." "Check every overdue client's emails and contract terms, draft a personal follow-up for each, and flag anyone I should call instead."
Uses your AI limit Once, for one answer No Every time it runs

The examples in the last two rows come from Shanee's slide and her field guide for this series.

Three cards, chat, script and agent, solving one late-bills problem three ways
"Some jobs need a chat. Some need a script. Only some need an agent." One business problem, late bills, and three different tools. From Shanee's field guide on the 20 ways. Shown in the video at 21:20.

3. AI agent vs automation workflow: a repeated Codex job compared with a script

So what actually runs? A repeated job in Codex versus a script. Both can run every Monday at 8am. The difference is who does the work each time.

Repeated job in Codex or Claude Script
What actually runs The AI reads your instructions, thinks, and decides what to do, every time A fixed list of steps that runs the same way, in the same order
Cost each time it runs Uses some of your limit every single time Uses none of your AI limit
Same result every time? Usually, but it can change a little each time Yes, exactly the same every time
When something surprising happens Can think its way around it Stops or warns you, and calls you or an agent
Speed Minutes, while it reads and thinks Seconds
Best for Work that needs thinking: reading emails, writing replies, deciding what matters Work that never changes: downloads, checks, renaming, copying data between two apps
Comparison table of a repeated job in Codex or Claude versus a script, by cost, consistency, surprises, speed and best use
The comparison table. A script uses none of your AI limit and runs in seconds. From Shanee's field guide on the 20 ways. Shown in the video at 22:00.

The best setups use both. A script does the boring part for free, and it calls an agent only when something needs a decision.

The reason why you want to lean towards scripts eventually for some things is that it's not going to burn through your token usage, it's going to be faster, and it's going to help you build an infrastructure where you eventually become model independent. Model independence is the same goal Shanee gives for API keys in way 3.

4. Shanee's own audit: 154 runs of the same script

From her own audit, shown on screen and in the usage report in her field guide: a check that ran every hour had Codex run the same script 154 times in one week, and it used 8.5% of her week. The recommended fix was to let a normal timer run the script, and call Codex only when something breaks, gets worse, gets fixed, or needs a decision. The full report is in way 20.

How to turn a repeat job into a script in Codex or Claude Code

Step 1. Pick one job the agent has done the same way several times.

Step 2. Ask the agent to write it as a script and recommend where it should run.

Step 3. Review the script and the schedule before anything is turned on.

Copy-ready
You've done this same job [number] times. Turn it into a script.
- Write a script that does exactly what you've been doing, with no AI involved.
- Run it on a normal scheduler.
- Only wake me or an agent when something fails, looks wrong, or needs a decision.
Show me the script and the schedule before turning anything on.

A script is just a file, so it needs a place to run on a schedule. Shanee's field guide lists the usual places:

Where How it runs Good for Watch out for
Your own computer The timer built into Mac or Windows runs it at a set time Free, nothing to sign up for Only runs when that computer is on and awake
A free cloud scheduler GitHub Actions or Cloudflare Workers run it on a schedule Runs day and night, even when your laptop is closed You need an account there. App passwords must be stored in their safe spot, never in the script
An automation tool Zapier, Make, or n8n run the steps for you No code to look after. Easy to see each step Monthly fee, and limits on how often it runs on cheaper plans
Inside an app you already use Google Apps Script for Sheets and Gmail, or built-in automations in Airtable, HubSpot, or QuickBooks Lives right next to the data it uses Only works inside that one app
Table of where a script can live: your own computer, a free cloud scheduler, an automation tool, or inside an app you already use
Where the script lives: the four usual places, what each is good for, and what to watch out for. From Shanee's field guide on the 20 ways. Shown in the video at 22:05.

You don't have to pick. Ask the agent to write it as a script, tell you where it should run for your setup, and walk you through turning it on.

Frequently asked questions

What is the difference between an AI agent and an automation?

An AI agent in Codex or Claude Code reads your instructions, thinks, and decides what to do every time it runs, so it uses some of your limit on every run. An automation script runs a fixed list of steps the same way, in the same order, in seconds, and uses none of your AI limit.

AI agent vs script: how do I know which one a job needs?

If the agent does the job the exact same way every time, like counting yesterday's leads and emailing you the number, it should be a script. If the job needs real thinking across your apps and decisions the way a human would make them, keep it as an agent (21:11).

Do I need a developer to turn agent work into a script?

No. Codex or Claude Code writes the script. Your job is to name the repeat work, review what it wrote and where it will run, and approve it before it is turned on.

What does it cost my business to leave repeat work with an agent?

You pay for the thinking every time the job runs, even when nothing about the job changes. In Shanee's own audit, one hourly check had Codex run the same script 154 times in one week and used 8.5% of her week (22:05).

When should I start converting work to scripts?

Once your baseline file cleanup is done. Shanee's example is a daily script that checks that the files added today follow the rules of your new agentic infrastructure (20:25).

Sources

Official / Primary Sources