Home / System

The system behind the work

A multi-agent system built on Claude Code that runs a retention agency's daily operations. I designed it, wrote it, and use it every day.

947commits since 14 Nov 2025
32agents, each with a budget and a failure policy
50scheduled jobs under launchd

How a request moves

1

Request

A message from my phone, a scheduled job, or a client's post in a shared channel.

2

Router

Pattern rules match the intent to an agent. Each client can override the routes.

3

Agent

One of 32, each with its own skills, spending limit and rule for what happens on failure.

4

Skill

A registered procedure that runs plan, dry run, then apply, with a way to roll back.

5

Platform

Klaviyo, Attentive, Figma, WordPress. Email and SMS sending rules (TCPA, CAN-SPAM) are enforced here.

Every run is logged with the agent, the skill, the model, the cost and the outcome, so I can see what the system did and what it spent.

Six parts, in detail

SMS

The drafting desk

Problem
A jewelry brand's SMS copy lands overnight, and each message used to be built by hand in Attentive.
How it works
A watcher sees the new copy. The system joins the copy doc to the planning sheet, maps each audience to the platform's exact segment names, adds the tracked link and the send time, and drives the Attentive composer with Playwright because the platform has no API for creating drafts. It reads every saved message back against a checklist.
Where it stops
At "save and close". It never schedules or sends, never touches a draft a person has edited, and holds the message when a link or a segment is missing.
Record
93 send days drafted since 20 July 2026. Read the case study →
Email

The email checker

Problem
Built emails drift from their design: a wrong font, a broken link, a discount code that does not exist, a layout that breaks on a phone.
How it works
Static rules check structure, type and mobile code. Links are verified. Playwright renders the email and compares it with the Figma frame, down to a pixel-similarity score. A builder generates the HTML from a section list, and a loop applies safe fixes and audits again until it passes or stops.
Where it stops
Risky fixes need a flag I set by hand. A regression ends the loop.
Record
62 Boka templates across nine flows were built through it. Read the case study →
Claims

The claim check

Problem
A results number that is slightly wrong in public costs more trust than it earns.
How it works
Our own results must match a local evidence file word for word. Public facts are checked by two other models, and any cited page must open. Client data never leaves for another vendor.
Where it stops
A serious finding blocks the post. Nothing publishes until I approve the exact words.
Memory

The memory

Problem
An agent that starts every job from nothing repeats old mistakes.
How it works
Decisions and lessons are captured with who made them, on which machine and in which session. The relevant ones are retrieved at the start of the next job. One store serves two operators over an authenticated API.
Where it stops
Private entries never cross machines. A decision becomes permanent only after I confirm it.
Cost

Model routing

Problem
Sending every job to the largest model is slow and expensive.
How it works
Three tiers are chosen in code. Client-facing, money or irreversible work gets the strongest model, routine tasks a mid-size one, and single-purpose helpers a small one. Every run records its model and token use.
Where it stops
Parallel work is capped at six agents per fan-out.
Control

The phone cockpit

Problem
A system that runs all day still needs its owner, without owning his day.
How it works
It reports to my phone and takes short replies as commands, including voice notes. A decision queue limits it to three questions a day.
Where it stops
Anything client-facing, about money or irreversible waits for a plain yes from me.

What broke, and what changed

July 2026

A research run used 11.1M tokens

109 top-tier agents ran in one workflow. Change: tiered models, a six-agent cap, and a usage table per run.

July 2026

A file sync overwrote newer code

Two machines synced the whole repository. Change: code moves only through git; the sync covers two named folders.

October 2026

A stash lost two captured notes

Background jobs write tracked files every minute. Change: stashing is banned in the repository; side work happens in a separate working copy.

Hard-to-reverse decisions are written up as short decision records in the repository, so the next change starts from the reason and not from a guess.

I still do

The strategy, the concept, the copy edit, the final look, and the approval on every send.

It never does

Send anything. Invent a discount code or a claim. Publish a number without its evidence.

Coming soonA send day on video, start to finish.

Want this for your brand or your agency?

Get in touch