By Oliver · AI Architect, BuildAClaw · Nov 30, 2026 · 10 min read
How to Build an AI Agent That Runs a 24/7 Hermes-Style Assistant on a Mac Mini Without Leaking Customer Data
An always-on assistant with memory, skills, and chat access is the most useful agent you can build. It is also the easiest one to leak data from. Here is the exact architecture we use to keep customer data on the box.
We audited an "all-local" assistant a client had set up on their own Mac Mini. It turned out to have 7 separate exit paths for customer data. The model ran locally, so the owner assumed everything was private. But fallback calls went to a cloud LLM, chat history was synced through a messaging bot's servers, debug logs held full email bodies, and a nightly backup went to a consumer cloud drive with no encryption. Running the model locally didn't keep the data local.
That's the trap with the Hermes-style assistant, the always-on agent pattern popularized by open-source projects like Nous Research's Hermes Agent. It keeps persistent memory, writes its own reusable skills, runs scheduled jobs, and answers you on Telegram or Slack at 2 a.m. Each of those features is a new place for data to end up. This guide shows how to build one on a Mac Mini M4 with OpenClaw so the convenience doesn't cost you your customers' trust.
By the numbers: In our lead research, 10 of 138 OpenClaw users raised security as their main pain point, and many more of the 88 setup complaints came down to "I don't know what this thing can touch." One Redditor put it bluntly: "It is so dangerous and people just take it too easy." They're right, unless you design the data boundary before you design the features.
1. Map Every Exit Path Before You Write a Single Skill
A 24/7 assistant has many ways to leak data besides the model call. Before installing anything, list every place a customer's name, email, phone number, or invoice could end up. Here are the seven we check on every build:
- Cloud model calls: any prompt sent to GPT-5.5, Claude Sonnet 4.6, or Gemini 2.5 Pro leaves your building.
- Chat transport: Telegram, WhatsApp, and Slack bots route messages through third-party servers. What you ask the agent and what it answers both pass through them.
- Persistent memory: Hermes-style agents write summaries of past conversations to disk. Unencrypted memory files collect PII indefinitely.
- Self-written skills: an agent that writes its own scripts can hardcode a customer email into a reusable file.
- Logs: debug logging often captures full prompts and tool outputs.
- Backups: Time Machine to an unencrypted drive, or a sync folder pointed at iCloud or Dropbox.
- Third-party tools: web search APIs, scraping services, and MCP servers you didn't write.
Our rule: if you can't name the exit path, you can't close it. Write the list down, put it in the agent's repo, and review it every time you add a skill.
2. The Architecture: Local by Default, Cloud by Exception
The design that works is a three-layer setup. Everything runs on one Mac Mini, and nothing reaches the internet unless it passes a gate.
Layer 1: The Local Brain
A local model served by Ollama or LM Studio, bound to 127.0.0.1 only. It handles triage, classification, PII redaction, drafting replies, and summarizing memory. In practice it handles about 80% of daily work.
Layer 2: The Redaction Gateway
A small proxy that every outbound model request has to pass through. It replaces names, emails, phone numbers, addresses, account numbers, and dollar amounts with tokens like [CUSTOMER_1] and [EMAIL_2]. It keeps the mapping in local memory and swaps the real values back in when the response returns. The cloud model only ever sees the tokenized version.
Layer 3: The Cloud Escalation Lane
Hard reasoning tasks like complex contract summaries, multi-step planning, or tricky code can go to Claude Sonnet 4.6 or GPT-5.5, but only after redaction, and only for task types on an explicit allowlist. Anything tagged sensitive in OpenClaw's routing config never takes this lane.
| Task Type | Routed To | Customer Data Leaves Mac? | Typical Latency |
|---|---|---|---|
| Inbox triage & labeling | Gemma 4 (local) | No | 1–2 sec |
| PII redaction | Gemma 4 (local) + regex | No | <1 sec |
| Drafting customer replies | Gemma 4 / Llama 4 Scout (local) | No | 4–9 sec |
| Memory summarization (nightly) | Local model | No | Batch |
| Complex planning / research | Claude Sonnet 4.6 (redacted) | Tokens only, no PII | 5–15 sec |
| Payment, health, legal records | Local only, hard block | Never | Varies |
If you want to stay flexible as model vendors change, we wrote a separate breakdown on keeping your Mac Mini AI worker vendor-neutral. The same routing layer that protects data also lets you swap cloud providers without rewriting skills.
3. Hardware and macOS Setup for True 24/7 Uptime
The Mac Mini M4 is a good fit for always-on agents. It's quiet and small, and it idles at about 4–7 watts. In our Austin test unit, running 24/7 added under $3/month to the power bill, including inference spikes.
Pick the Right RAM Tier
- 16GB: works for a cloud-heavy setup, but too tight for a capable local brain. We don't recommend it for privacy-first builds.
- 24–32GB: the sweet spot. Runs a mid-size Gemma 4 model alongside the OpenClaw runtime, redaction gateway, and a vector store for memory.
- 64GB (M4 Pro): fits a 4-bit Llama 4 Scout for heavier local reasoning, so you escalate to the cloud far less often.
Keep It Awake and Self-Healing
Run these once in Terminal:
sudo pmset -a sleep 0 disksleep 0: never sleepsudo pmset -a autorestart 1: boot back up after a power outagesudo pmset -a womp 1: wake on network access
Then run OpenClaw as a launchd service with KeepAlive set to true, so the agent restarts on its own after a crash or reboot. Over a 30-day test, our unit logged 99.7% agent uptime. The only downtime came from two macOS security updates we installed on purpose.
Lock Down the Box
- FileVault on. Check with
fdesetup status. If the Mini gets stolen, the memory files stay unreadable. - Dedicated standard user for the agent, not your admin account. The agent shouldn't be able to
sudo. - Firewall plus stealth mode:
socketfilterfw --setglobalstate onand--setstealthmode on. - No open inbound ports. Use Tailscale for remote admin instead of port forwarding.
Key insight: An always-on agent is a server, whether you think of it that way or not. Treat the Mac Mini like production infrastructure: encrypted disk, least-privilege user, no inbound exposure, and automatic restarts. Most of the "AI agent got hacked" stories we see started with an agent running as an admin user with a port open to the internet.
4. Build the Data Boundary Into Memory, Skills, and Chat
Persistent memory and self-written skills are what make Hermes-style assistants feel smart. Without rules, they're also where PII piles up.
Memory: Summarize, Don't Hoard
Set up the nightly memory job so it stores facts about preferences and processes, not raw customer records. "Customer prefers invoices on the 1st" is fine to keep. A raw email thread with a home address is not. Have the local model rewrite memory entries through the redaction gateway before they're written to disk. Keep the vector store inside the FileVault-encrypted user directory. We cap raw conversation retention at 14 days; after that, only the redacted summary survives.
Skills: Lint Before You Trust
When the agent writes a new skill, OpenClaw saves it to a staging folder rather than the live skills directory. A pre-commit check scans it for hardcoded emails, phone numbers, API keys, and outbound URLs that aren't on your allowlist. We caught 11 skills with hardcoded customer emails in the first month of one client build. Every one would have kept working, and every one was a leak waiting to happen.
Chat Transport: Choose Your Channel Deliberately
- Slack or Teams on your own workspace: fine for internal ops, covered by your existing business agreement.
- Telegram bots: convenient, but messages pass through Telegram's servers. Send summaries and alerts, not customer records.
- Self-hosted Matrix or a local web UI over Tailscale: the most private option. Nothing leaves your network.
A good rule: the chat channel gets pointers, not payloads. The agent replies "Drafted reply to [CUSTOMER_14] about overdue invoice, approve?" and the full draft stays on the Mac until you open it through the local UI.
If you're considering a less restricted local model for the brain layer, read our guide on using an uncensored local model safely for small business first. The guardrails there stack on top of this boundary.
5. Watch the Wire: Egress Monitoring and Daily Audits
You can't prove the agent isn't leaking data unless you watch its outbound traffic. This step separates "we think it's private" from "we know it's private."
- Install an outbound firewall like LuLu (free) or Little Snitch. Default-deny for the agent user, then allow only your redaction gateway's cloud endpoints, your chat provider, and the APIs your skills actually use.
- Log every cloud call at the gateway: timestamp, model, token count, and a hash of the redacted prompt. Never log the unredacted version.
- Run a daily canary test. A scheduled job feeds a fake customer record ("Jane Canary, jane.canary@example.com, 555-0199") through a normal workflow, then searches gateway logs and outbound payloads for those strings. If one shows up, the agent pages you and pauses cloud escalation.
- Get a weekly digest from the agent itself: number of cloud calls, percent handled locally, blocked connection attempts, and new skills awaiting review.
What we measured over 30 days on a 32GB Mac Mini M4: 2,140 tasks handled, 83% fully local, 17% escalated to cloud models after redaction, 0 canary leaks, 46 blocked outbound attempts (mostly telemetry from a third-party skill we then removed), and about $9/month in cloud tokens. Compare that with the $40–$60/month we usually see when every request goes to the cloud.
Those blocked attempts matter most. Without egress monitoring, all 46 would have succeeded quietly. Most leaks in a 24/7 assistant don't come from someone breaking in. They come from your own tools phoning home.
6. A 7-Day Rollout Plan You Can Actually Follow
Don't turn on every feature on day one. This is the order we use with clients:
- Day 1: Hardware setup, FileVault, dedicated agent user, pmset, firewall, Tailscale.
- Day 2: Install the local model and OpenClaw, bind everything to localhost, set up the launchd service.
- Day 3: Deploy the redaction gateway. Test it on 50 real (internal) emails and check every token swap.
- Day 4: Connect one data source, usually the inbox, read-only. Local triage only.
- Day 5: Add the chat channel with pointer-only replies. Turn on the outbound firewall in default-deny mode.
- Day 6: Enable cloud escalation for a small allowlist of task types. Start the daily canary test.
- Day 7: Enable persistent memory with redacted summaries and skill staging. Review the first weekly digest.
By the end of week one you have an assistant that answers around the clock, remembers your processes, and can show you, with logs, that no customer data left the building unredacted.
FAQ
What is a Hermes-style AI assistant?
It's an always-on agent that keeps persistent memory, learns reusable skills, runs scheduled jobs, and is reachable through chat apps. The pattern was popularized by open-source projects like Nous Research's Hermes Agent. OpenClaw supports the same always-on design on local hardware.
Can a Mac Mini M4 really run an AI assistant 24/7?
Yes. It idles at about 4–7 watts, which works out to roughly $1–$3/month in electricity. With pmset set to never sleep and auto-restart after power loss, plus a launchd KeepAlive service, it behaves like a small dedicated server.
Does running locally guarantee my customer data stays private?
No. Local hardware only helps if you also close every exit path: cloud model calls, chat transport, logs, memory, backups, and third-party tools. A local agent that forwards raw emails to a cloud LLM still leaks data.
Which local model should I use?
On a 24–32GB Mac Mini M4, a mid-size Gemma 4 model handles triage, redaction, and drafting well. On a 64GB M4 Pro, a 4-bit Llama 4 Scout handles more reasoning locally. Use Claude Sonnet 4.6 or GPT-5.5 only for redacted, allowlisted tasks.
Is this compliant with HIPAA, GDPR, or similar rules?
This architecture covers the technical side of data minimization and access control, but compliance also involves contracts, policies, and documentation. Have your compliance advisor review the setup, and keep regulated data on the local-only hard-block lane.
Want a 24/7 Assistant That Never Leaks Customer Data?
BuildAClaw sets up OpenClaw-powered agents on your own Mac Mini M4, including the hardened OS, the local model, the redaction gateway, egress monitoring, and canary testing, so your assistant runs around the clock and your customer data stays on your hardware. No cloud dependency, no monthly SaaS lock-in, fully autonomous.
Schedule a Free Strategy Call →