The H_AI app icon: a graphite vault door with AI at its centre
WORK IN PROGRESS

How My AI Engine Works Now

Part 3 of my personal AI engine. The whole system on one Mac Studio, drawn out, and small demos of the newest tools: a buddy I can talk to hands-free, an image studio, a simulated customer panel, and a finance app the cloud never sees.

Illustration: a small brushed-aluminium computer on a low table in a dark living room, with fine glowing threads running to a phone on the sofa; a television and a small smart device wait nearby

Part 1 was a chat window on my Mac Studio. Part 2 turned it into a hub for the house: receipts, the calendar, the smart home, my coding sessions. Three weeks later it has grown again, and I can no longer explain it in one paragraph. So this time I drew it.

This part is about how it works now: the whole system in one picture, the path one message takes, and small demos of the tools added this month. The demos run in your browser with made-up data. The tools behind them are real.

The Whole System

Everything runs on one Mac Studio at home: an M4 Max with 64 GB of memory. Phones reach it through a private network, and the AI engine is the hub that everything else hangs off.

My devices
Element Xchat with the bot, voice notes
Web appphone Home Screen and Mac
TV Pithe calendar wall display
Mac Studio, M4 Max, 64 GB

The AI engine, the hub

Chat and tool looptools, approval cards
Plug-in hostside apps as tools
One sign-inone password
Thinking Buddytext or hands-free voice
Image Studiostyles, edits, gallery
Vaultnotes, memory, files
DocumentsPDF, Office, photos
Claude sessionswatch coding agents
Task launcherto-do list to agent jobs

Side apps, each with its own database

Calendarsharing, the wall display
Smart homethe TV, plugs, devices
Shoppingreceipts, prices, spend
Financelocal only, encrypted
crowd-checkan idea test panel
RAM gate: one heavy model at a time, never below a quarter of the memory free
OllamaQwen, Gemma, OCR models
VoiceboxWhisper and my cloned voice
Draw Thingsimage models
SearXNGprivate search
Cloud
Claudetext only
Search enginesasked by SearXNG
Device cloudsfor the smart home
Requests come in at the top and fan out from the engine. The highlighted boxes are new since Part 2.

Three ideas hold it together. The side apps are separate programs, each with its own database, and the chat uses them as tools. Anything that needs a local model waits at the RAM gate, the rule from Part 2 that keeps the Mac from drowning in its own models. And the cloud gets text only: speech, voice, images and the fallback chat model all run on the Mac.

What One Message Can Touch

The model never touches an app directly. It asks for a tool. The engine decides whether that tool runs by itself or needs my tap, and the app’s reply comes back marked as data, not as instructions.

I ask“what’s on Friday?”
The modelwrites a tool request
Read-only toolruns by itself
Change somethingapproval card first
Side appits own database
Answerfrom the result only

After the model has read a web page or a document, even the “safe” tools ask first.

Here is that path in the Hub. Reading the calendar runs at once; adding to it waits for a tap.

The Hubdemo, made-up data
Calendar2 today
Homeall online
Shoppingthis week
Financelocked
crowd-check1 idea
What’s on Friday?

calendar_list · read only · ran by itself

Friday has two things: a team call at 10 and the dentist at 3.
Move the dentist to Saturday at 11.

calendar_update · changes something · asks first

Change an event?

Event
Dentist
From
Friday 3:00 PM
To
Saturday 11:00 AM
Done. The dentist is now on Saturday at 11.
Okay, nothing changed.

Two more rules sit on top. A voice note can never approve a card. And each person at home has their own conversations: my wife’s chats are hers, mine are mine, and one sign-in opens the calendar, the smart home and the shopping app for both of us.

Thinking Buddy: Talking, Hands-Free

The newest part, and the one I use most, is a buddy I can talk to. I open a page on my phone, put it down, and think out loud. It answers in my own cloned voice. My voice never leaves the Mac; only text goes to Claude.

  1. PhoneI stop talking. A tiny speech detector in the browser notices the silence.
  2. PhoneThe audio goes to the Mac after one quiet second. If I start again before that, it waits.
  3. MacWhisper writes down what I said and in which language, in about a quarter of a second. If it is unsure of a word, a clean-up step may fix the caption.
  4. CloudClaude gets my words as text, plus “be brief” rules, and every chat tool works here. If Claude is down, the local Qwen answers instead.
  5. MacEach finished sentence is spoken in my cloned voice and cleaned of hiss. Arabic sentences are shown on screen, not spoken.
  6. PhoneThe phone plays them one by one. If I talk over it, it stops and listens.
Sentence one is already playing while Claude is still writing sentence two, so I hear the answer before it is finished.
Thinking Buddydemo, made-up data
Tap Play Listening… Thinking… Speaking
Should the weekly shopping note come on Sunday or Monday?
One sec.
Sunday evening.
You plan the week then, and the receipts from Saturday are in.

The voice is mine, cloned and rendered on my Mac, the same one the buddy answers with.

The hardest part was not speed. It was turn-taking: a buddy that jumps in while I am still thinking is worse than a slow one. So it waits one full second of silence before it starts, and if the answer isn’t ready after two seconds it says “One sec.” in my voice, so I know it heard me. Both times can be changed on the Talk screen.

WhenWho answersWhere
TalkingClaude HaikuCloud, text only
Typing on the Buddy pageClaude SonnetCloud, text only
Claude down or over the monthly capLocal Qwen, 27BMy Mac
A chat that touched FinanceLocal only, alwaysMy Mac
Hearing me and speaking backWhisper and my cloned voiceMy Mac

Image Studio

The engine could already draw. Image Studio gives it a proper home: a page on the phone where I pick a style, the quality, the shape and how many, and watch the jobs render. One job at a time, each through the RAM gate, and nothing resumes by itself after a restart.

Behind it, every request goes through three steps. A model writes up to three style variants of the prompt. Each one is rendered. Then a vision check reads every image for garbled text, odd hands, artifacts or a missing subject. A flagged image is kept, with a fix offered, and the fix always asks first. The original is never thrown away.

Image Studiodemo, made-up data

A lighthouse at dusk · pick up to three styles, or none and it chooses for you.

queue: one job at a time · RAM gate: ok

Fix the poster?

Issue
garbled text
How
edit model, up to two rounds, re-checked each time
Original
always kept
Fixing the poster. The original stays in the gallery.
Kept as is.

Each person has their own gallery, with daily limits for everyone but me. The same studio also answers in the chat: “draw me a lighthouse” in Element X files the images in my gallery too.

crowd-check: Asking a Thousand Made-Up People

This one is an experiment. Before I build something, I want to hear the objections early. crowd-check builds a panel of more than a thousand simulated people, of different ages, backgrounds and habits, and asks them what they think of an idea.

Claude Opus writes the people and the final report, with a hard spending cap on every run and on every month. The local models do the heavy part, the survey and the interviews, through the RAM gate. Every step is a numbered script that writes its results to a file, so any number in a report can be traced back to the people who gave it.

crowd-checkdemo, made-up data
Idea: a weekly note from my AI with what we spent on groceries, and what got more expensive.

step 5 · a local model rewrites the idea in neutral words · I approve it

step 6 · survey: 50 people from a panel of 1,000 · local, free

step 7 · results

Would use it58%
Not sure26%
Wouldn’t16%
  • “Only if I don’t have to type the receipts in.”
  • “Monthly is enough for me.”

Simulated people are not customers. The results tell me which objections to test with real people, not whether anyone will buy.

It runs on the Mac only, not over the private network yet. The survey and the results page work; the reviewers and the final report are next.

Finance: The App the Cloud Never Sees

Card statements are the most private thing in the house, so Finance follows stricter rules than anything else. Its database is encrypted and unlocked by a passphrase that lives only in memory. It starts locked after every restart, and locks itself after half an hour of nobody using it. Statement files are read in memory and never saved; only the rows I confirm are kept, with card numbers cut down to the last four digits.

On top of the statements it finds subscriptions and unusual charges, matches shop receipts to card lines, and builds a simple cash-flow view. New alerts and due dates arrive as a message in my own chat, not anyone else’s.

The second rule is in the engine. Finance is a local-only plug-in: on a Claude turn it simply doesn’t exist. And a conversation that has touched it stays on the local model for good.

Financedemo, made-up data

Locked. Type any passphrase to unlock this demo.

October overviewauto-locks after 30 idle minutes
Groceries card ending 0000$612.40
Fuel card ending 0000$148.75
Subscriptions 3 found$41.97
Eating out$96.20
Groceries were your biggest category in October, about a fifth higher than September.
Finance stays on this Mac. Start a local chat to ask about it.

A few more locks, because a mistake here would be expensive. Five wrong passphrases stop unlocking for fifteen minutes. If the Mac’s disk encryption is off, Finance refuses to store anything. The token the chat uses can read totals and add pending imports, but it can never unlock, confirm or edit. And the logs carry no amounts, no shops and no file names.

Tidying the Engine

All of this grew fast, and the code showed it. The chat file had become one very long file that did everything. This week it was split into small modules, one step at a time: streaming, the tool loop, grounding, the Thinking Buddy’s turns. The same happened to the file that runs the tools. Each step was planned, built, reviewed and security-checked, and every test had to give the same result before and after.

It isn’t a feature anyone can see. It is the reason the next feature takes a day and not a week.

Part 1 was a chat window. Part 2 was a hub. Now it is a small system of its own, and the diagram is how I keep it in my head.

What’s Next

The reviewers and the final report for crowd-check, and letting my wife use it with her own spending cap. More Finance: PDF statements, and card due dates on the calendar. Health records, the next local-only plug-in. And the usual work: finding the places where it fails quietly, and making them loud.

Still no subscription for the local models, still nothing leaves the house unless I choose the cloud, and Finance never leaves at all.

The engine, its side apps, these demos and this article were built with Claude Code.