Automations

A few things I’ve built keep themselves up to date. My inbox gets sorted every hour. A page of what I saved gets written every Monday. My token counts update every five minutes. I don’t touch any of it.

Each one is just a job with a schedule. Here’s everything I’ve got running:

Most of these don’t need an agent. Realtime Tokens reads a page and saves some numbers. That’s the same every time, so it’s a script. The agent ones are where something needs deciding: which emails need me, which bookmarks are worth reading.

Where it runs

A job only runs if the computer it’s on is awake. Shut my laptop and everything on it stops.

That’s why people use a Mac Mini for this: it’s a computer that’s always on. Or they rent one, a VPS.

My laptop and the Mac Mini. The laptop runs Email, Dev trends, Transcripts and a token count, and sends its token counts to the Mini every hour. The Mini is always on and runs Realtime Tokens, Token Activity, the Weekly brief and the Wayback. With the laptop lid shut, the laptop's jobs stop and the Mini carries on. z z z my laptop Mac Mini, always on token counts Email Dev trends Transcripts Token count Realtime Tokens Token Activity Weekly brief Wayback

Token Activity uses both. Every hour my laptop counts the tokens its agent apps used and sends them to the Mini over Tailscale. The Mini adds its own and updates the graph (Working with data). When my laptop’s shut, the Mini carries on. It just doesn’t get my laptop’s numbers until I open it again.

My email runs in Codex on my laptop. So it only runs while it’s open.

How a run works

It’s a schedule, a prompt runs, it looks through files, folders and instructions, and then the thing is done. Then the result gets to me however suits the job: the same page updated, my inbox sorted, a new file in a folder.

  1. when
    Mondays, 7amon the Mac Mini
  2. the prompt

    write last week’s bookmarks brief. follow scripts/weekly-brief/README.md, monday to monday. leave out anything private, the page is public. publish it to the same url and check it’s live

  3. reads
    • README.md
    • the week’s bookmarks
    • their views, saves and replies
  4. does
    • groups the week into themes
    • ranks it: hidden gems, most saved, most talked about
    • splits it into try, read and skim
  5. checks
    • nothing private made it onto the page
    • the page is live and shows the right week
lands The weekly brief for 20 to 27 September: Week 39, a headline about AI agents converging on a new operating layer, a short overview, and 113 bookmarks from 88 people in 7 themes

Same page, new week: centered-hill-n7ws.here.now

The prompts are short. The detail is in the files the job reads. RULES.md says how to decide. memory.md is where each run writes down where it got to, so the next one starts from there.

What the weekly brief is for is on Keeping up to date.

Email, up close

I want to open my inbox and see the things that still need me. A receipt can be filed. A newsletter can wait. An email asking me to decide something stays where I can see it.

My inbox / example
09:00

After the run, the receipt and newsletter still exist. They have labels, so I can find them later. Archived means out of the inbox, not deleted. The payment request and invitation stay visible.

What still needs me?

Two messages can look almost the same and need different treatment. An invoice that has already been paid is information. An invoice I still need to pay is work.

My rule is simple: action wins. If I need to reply, decide, pay, schedule or check something, the message stays in the inbox.

A rule like “archive invoices” would miss that. And if it’s not sure, it stays in my inbox.

When a run doesn’t finish

memory.md only moves on once the checks pass. Two runs from June, on an earlier version of my setup:

  1. A change was only partly finished.

    The agent labelled and archived a new message, but could not save a related filter change. It reported the unfinished step and kept the previous progress point.

  2. The later run picked it up.

    There was no new mail. The agent completed the pending filter change, then recorded success.

Nothing got lost, and nothing got done twice.

In the inbox above, “Add new mail” brings in two more. Run it again: same rules, new mail. The payment confirmation gets filed, and the new request stays for me.

Make it your own

Start with something you already ask an agent for, and ask it once. If the result is useful, ask for it on a schedule:

every monday at 7am, look at what i saved last week and write me a one page brief: what kept coming up, what to try, what to read. put it on the same page each time, and tell me if it fails.

Notes

  • Each one is just a job on a schedule. Most are scripts. The agent ones are where something needs deciding.
  • It only runs if the computer’s awake. The always-on stuff lives on the Mac Mini.
  • The prompt is short. The detail is in the files: RULES.md says how to decide, memory.md says where the last run got to.
  • For my email, action wins. If I need to do something, it stays in my inbox. The rest gets a label and archived.
  • If a run doesn’t finish, memory.md doesn’t move on, and the next run picks it up.
  • Ask for it once. If it’s useful, put it on a schedule.