Chief of staffCase study 01 / 20
Butler
An AI chief of staff that starts the conversation. It watches email, calendar, money, sales and the office across several businesses, and only pings me when something needs me.
Role
Sole designer and engineer
Status
● Running in production
Models
Claude (headless) · Opus for self-edits · local Whisper
Stack
Node + Fastify · Claude (headless) · Discord · SQLite · Local Whisper · 25 connectors
The short version
- Proactive, not reactive: about 17 managed jobs plus event triggers, rationed by an attention budget of roughly two normal pings a day.
- One owner-locked agent over 25 connectors. Anything that reaches another person waits for my tap on an approval card.
- It extends itself: “build me a new ability” becomes a plan, Opus edits Butler's own code, and it rolls back automatically if it won't boot.
01Why I built it
My working week spans an agency, a coworking space and a product startup. The information I need is spread over a dozen apps, and every assistant I tried waited to be asked. Answering questions was never the problem. Knowing which question to ask before something slipped was.
So I built the opposite of a chatbot: an agent that reads across everything I operate, sees the numbers behind its own advice, and comes to me. My day is built around the five prayers, so the schedule is too.
02How it works
- Connect25 connectors: email, Mac calendar, contacts and reminders, Notion CRM, my WhatsApp CRM, the time tracker, Content Factory, invoices, Sentry, office presence and cameras, prayer times, weather, web search, and my own logged-in social feeds.
- SchedulePrayer-anchored jobs. The morning brief fires at Fajr + 60 minutes, and any job can be pinned to a prayer plus or minus an offset, or to a clock time.
- ReasonHeadless Claude turns connector output into a brief, a nudge or an answer, with the figures it used attached.
- ActChat becomes action cards: “spent 2h on X” becomes a time-log entry, “invoice Acme £1,200” becomes a drafted invoice with a public link, “make it monthly” becomes a recurring automation.
- ApproveAnything outbound (CRM sends, invoices, emails, time logs) sits on a Discord card until I tap it.
- ReflectEach evening it reads my goals, open to-dos and the hours I actually logged, coaches me honestly, and proposes a reshaped TODO.md with Apply and Undo.
03The agent fleet
Butler isn't one prompt — it's around thirty small agents, each a scheduled job on its own clock. The ones that matter most feed each other: a cluster watches the feeds I actually scroll, works out why things go viral, and pipes that straight into Content Factory so the generator makes content engineered to travel.
Trends → content
- TikTok FYP. Reads my own liked and reposted TikToks plus the public Trending feed, then breaks down why each one blew up — the hook, the format, the pacing.
- X / Twitter feed. Learns my taste from what I engage with, then digests my For You feed down to the few things worth acting on.
- Viral Islamic sounds. Scans Reels and TikTok for trending nasheeds and recitation edits and saves each new one straight into Content Factory, with a note on the mood it suits.
- Competitor & viral scan. Each week it pulls the top-performing posts in my niche, explains what made them travel, and drops the patterns into Content Factory as ready-to-approve pipeline ideas.
- Weekly rundowns. Turns my real week, per venture, into a content rundown the generator can build from — the week becomes the content.
Money & pipeline
- Chases overdue invoices, syncs the CRM, and raises an alert the moment a lead or opportunity looks worth a reply.
Inbox & comms
- Sweeps my inbox every 15 minutes into a to-do digest, follows up on emails I sent and never heard back on, and digests LinkedIn so I'm not living in it.
The ventures
- Watches the Taqwa office for occupancy and membership-plan breaches, sends teaching lesson reminders and watches the class chats, and runs a weekly agency review for Vision Reality.
Keeping itself honest
- Watches Sentry for alerts and the second brain for changes, checks its own logins before they expire, and reviews the hours I actually tracked so it can coach me straight.
04Model choices, and why
Briefs, answers, evening reflection
Claude via headless Claude Code
These jobs need judgement across messy, mixed sources. Running on a flat subscription rather than per-token billing is what makes an always-on, proactive agent affordable for one person.
Editing its own code
Opus
Rewriting a running system is the highest-stakes job in the fleet, so it gets the strongest model, and the output is still wrapped in a syntax check, a commit, a restart, a health check and automatic rollback.
Voice notes
Whisper, on the server
Transcription is a solved problem. Running it locally costs nothing per note and keeps my voice off third-party servers. Only the transcript goes to the language model.
05Context: what the model sees
- Live numbers, not memory. Advice is built from what the source systems say at the time of the call: logged hours from the tracker, invoices from the invoice store, alerts from Sentry.
- Scoped jobs. The evening Reflect reads goals, active to-dos and the day's logged hours. It doesn't need my inbox, so it doesn't get it.
- A governed vault. The second brain is read through its init rules, and in code Butler can only append to
MEMORY/andTODO.md. Everything else is read-only. - Feeds become digests. Social timelines are ranked and summarised into one digest, so I read the signal instead of scrolling for an hour.
06Token and cost discipline
- Proactive doesn't mean chatty. The attention budget (about two normal pings a day, quiet hours around prayer) stops the agent generating messages nobody asked for. Only one-time codes and office-empty alerts skip quiet hours.
- Audio never touches the model. Local Whisper converts it to text first.
- Social reads use my own sessions instead of paid platform APIs.
- Every app's model and token usage shows up per project in Sentry's LLM router, so I can see whether Butler is the one using the budget.
07Performance
- Steady at about 137 MB of RAM, with zero unstable restarts in the latest weekly audit. Its 20 lifetime restarts are all deploys.
- Supervised by pm2 under systemd, so it comes back after a reboot without me.
- The self-edit loop checks syntax, commits, restarts and health-checks, and rolls back on its own if the new build won't boot.
08Trade-offs I made
Chose
Discord as the interface
Over
A custom app
Chose
Proactive pings
Over
On-demand only
Chose
Reminders for anything with a date
Over
Writing straight to the calendar
Chose
Append-only memory
Over
Full write access to the vault
Chose
My own logged-in sessions for socials
Over
Paid platform APIs
09Guardrails
- Bound to one Discord user. Nobody else can drive it.
- Append-only rule enforced in code, not in the prompt.
- Approval cards for every outbound action. Service restarts are limited to a whitelist.
- Prayer- and quiet-hours-aware scheduling.
10What I'd do next
- Spoken replies. Voice is input-only today; answers come back as Discord text and buttons.
- Calendar writes behind an approval card, so a date in a message can become a real event safely.
11What this shows
Applied AI engineering
Tool orchestration across 25 connectors, model routing by job, and guarded self-modification with automatic rollback.
Product
Treats my attention as the scarce resource and rations it, instead of shipping more features.
Solutions
An integration hub across email, Notion, Discord, Apple apps and IoT: the same shape as most enterprise agent rollouts.
Across the fleet: every build runs on one self-hosted Linux server, binds to localhost and is reached only over a private Tailscale network. AI inference runs on a Claude subscription through one in-house router (part of Sentry) rather than per-token API keys, with open-weight models on Ollama as the local layer: on the server, and on a 64 GB MacBook Pro shared over Tailscale for heavier local work. Everything is backed up to GitHub and a separate cold disk, and nothing reaches another person without a human tap.
Hiring for applied AI, product or solutions work? I'd like to hear about it.