The phone on our desk buzzed with a Telegram notification at 3 AM. It was a voice note from Stride, our local AI assistant, notifying us that the overnight data scrape had finished and the summaries were ready for review. We did not have to wake up a cloud server or check a subscription dashboard. The entire process happened on our test stack. For a small business, the same setup can be a shared assistant that answers staff and runs jobs overnight without a subscription.
Why build a private AI assistant on a Mac?
Most AI interactions happen behind a corporate firewall. When we send a prompt to a cloud provider, we surrender the data to a third party. We also accept the risk of “model drift,” where a provider updates a model and changes how it follows instructions. A local assistant removes these variables. We own the weights and the system prompt. This setup gives a level of predictability that cloud APIs cannot match. We also eliminate the latency of round-trip network calls. The response time is limited only by the speed of the silicon on our desk.
What hardware is the baseline for a local agent?
A local assistant requires a machine that can hold a large model in its memory without swapping to the disk. Our test machine is an Apple M4 Pro with 48 GB of unified memory. This unified memory architecture is the key. Unlike a PC where the CPU and GPU have separate pools of RAM, the M4 Pro allows the GPU to access the entire 48 GB. In Hermes Agent’s own settings page, this machine reports “48.0 GB GPU memory”, “48.0 GB RAM” and “Unified memory”.
The 48 GB limit is a hard ceiling. In our testing, we found that we can run one large model hot at a time. For example, the Gemma-4-31B model loaded at a 64K context window takes up roughly 19 GB of memory. While this leaves room for the OS and other apps, trying to load a second large model causes the system to slow down. We frame this as a work and test stack because it is tuned for a specific workflow: one powerful brain that handles all requests.
Later measurements put the full footprint higher once the window is in use. Measured on 10 September, LM Studio’s load of Gemma 4 31B at 65,536 tokens used about 10 GB of process memory on top of the 17.6 GB of weights, which LM Studio maps from disk, about 27.6 GB in all (17.6 plus 10). In our context window RAM test the same model held 26.33 GB with a 64K window in active use, and the 64K window alone cost about 4.4 GB beyond the weights.
How does LM Studio power the local server?
The brain of our assistant is a model served by LM Studio. We chose LM Studio because it provides an OpenAI-compatible endpoint at http://localhost:1234/v1. This allows any tool that speaks the OpenAI protocol to connect to a local model. No one needs to change the underlying code.
We load the gemma-4-31b-qat model for the main assistant. This model is a balance of reasoning power and memory efficiency. By using a quantised version, we keep the memory footprint manageable while retaining most of the intelligence of the full-weight model. LM Studio handles the GPU offloading automatically. We can see the memory usage in real time, which keeps the load inside the 48 GB limit. This setup allows us to maintain a 64K context window. This window is necessary for the assistant to remember long conversations or read large documents. You can find more about this on the LM Studio homepage.
LM Studio has one trap on context length. A model loaded on demand through its API starts at 8,192 tokens unless told otherwise, which we covered in why a local model stops at exactly 8,192 tokens. Load the model explicitly with a context length before Hermes connects. LM Studio scans ~/.lmstudio/models for its files, which matters once a second app starts downloading models of its own.
How does Hermes Agent turn a model into an assistant?
A model by itself is just a text completion engine. To make it an assistant, this setup uses the Nous Hermes Agent runtime. This is the layer that gives the model “hands.” Hermes Agent allows the model to use tools and access the filesystem.
Our assistant, Stride, uses a set of tools to manage our workflow. It can draft articles on stridenote.net via a custom Python helper script. It can search our local files using ripgrep. It can even schedule tasks using cron. The runtime manages the “loop” of the agent. The model decides to use a tool, the runtime executes the tool, and the result is fed back to the model.
We made Stride always-on by using a launchd gateway service. The agent starts automatically when the Mac boots. We also integrated it with Telegram. We send a voice note to a bot, and the gateway routes that audio to a speech-to-text engine. That text goes to the Hermes Agent, and the final response returns to us as a voice note. This turns the M4 Pro into a physical presence in the room. You can explore the full capabilities of the runtime in the Hermes Agent documentation. Since version 0.21.0, released on August 31, the Hermes Agent desktop app turns each agent profile into a named bot by default, with its own model, memory, skills and chat history.
The scheduler is where this setup earns its keep. Our Hermes Agent morning briefing runs from a cron job at 6:00 AM, reads a saved Morning Profile from persistent memory and delivers the result to Telegram.
How do you connect Hermes Agent to LM Studio?
If LM Studio already serves your models, Hermes does not need its own engine at all. Its documentation calls the managed runtime “a default, not a requirement”, and its Local Models documentation supports the route directly: “Point a custom endpoint at any OpenAI-compatible server for full manual control”. Our assistant runs this way. The model block in ~/.hermes/config.yaml reads:
model:
base_url: http://127.0.0.1:1234/v1/
default: google/gemma-4-31b-qat
provider: lmstudio
local_runtime:
enabled: falseWith local_runtime.enabled set to false, Hermes starts no llama-server of its own, LM Studio stays the only process holding the model, and the context is whatever LM Studio loaded. Hermes reads this file when its gateway starts, so restart the gateway after editing it.
What does Hermes Agent’s own Local Models page do?
Hermes also ships its own engine. Everything in this section comes from Hermes desktop v0.21.1 on 11 September 2026, with timings from the file system rather than from the app. Open Settings, then Providers, then Local Models. On a machine with no local engine the page opens on a one-click card for Qwen3.6 35B-A3B, with two buttons under it. “Set up for me” installs a llama.cpp engine, downloads a 21.9 GB model and makes that model the default for every new chat, a fact the card states only in small grey text under the model name. Configure opens the full page and changes nothing, which makes it the safe starting point.
The full page has three sections: Local runtime at the top with an Install runtime button, the machine’s memory, and Models, the catalog Hermes ships. The Download buttons stay grey until the engine is installed; clicking one first does nothing, and nothing appears in Hermes’s logs either. Install runtime fetched llama.cpp build b10679 for macOS on Apple silicon and verified it in under ten seconds. The panel then read “llama.cpp runtime installed. Build b10679, metal backend” with a Ready badge and a Turn on button. Installing and turning on are separate steps: at this point nothing in ~/.hermes/config.yaml had changed.
Hermes’s page and its documentation describe the download as a few hundred MB. On our machine the build took 26 MB, plus 11 MB for the archive Hermes keeps, so 37 MB in total. The binary lives at ~/.hermes/runtimes/llamacpp/b10679/metal/llama-b10679/llama-server. The catalog on this 48 GB Mac listed four models:
| Model | Download | Label on our machine |
|---|---|---|
| Qwen3.8 27B | 16.2 GB | Fits your GPU, full 256K context, sees images |
| Qwen3.6 35B-A3B | 21.9 GB | Recommended, fits your GPU, full 256K context, sees images |
| Qwen3.8 Flash Next | 104.5 GB | Too big for this machine |
| DeepSeek V4 Flash | 154.6 GB | Too big for this machine |
The Recommended badge is a speed prediction rather than a quality ranking, which we tested in Qwen3.6 35B-A3B vs Gemma 4 31B on a Mac.
Models go straight into ~/.hermes/models. A download starts as a .part file that shows its full size immediately, so Finder is no use for progress; du shows the real figure. The vision projector arrives afterwards in ~/.hermes/models/assets. Qwen3.8 27B came from the unsloth/Qwen3.8-27B-GGUF repository on Hugging Face: the weights file was 16,464,440,224 bytes and took about four and a half minutes, roughly 61 MB a second, followed by a 931 MB projector. Qwen3.6 35B-A3B came from the unsloth MTP build of that model: 22.66 GB of weights plus a 0.90 GB projector in about six minutes. The two models together took 41 GB of disk.
The page runs one download at a time; the second Download button stayed grey until the first file was complete. When a download finishes, its row swaps the Download button for a Use button and a delete icon. Hermes’s own logs record the runtime download and nothing about the models, so if a download stalls, the file size in ~/.hermes/models is the only evidence.
LM Studio does not see any of this. After both downloads its model list still showed only the Gemma 4 31B file we already had. The two apps keep separate folders, so a model downloaded in one is a second copy of anything held in the other. Sharing works in the other direction: the Add model file button registers a GGUF that is already on the Mac. Hermes’s code makes a hard link where it can, so the model appears in Hermes with no extra disk used, and it falls back to a symbolic link or a copy only when a hard link fails. We added LM Studio’s Gemma 4 31B this way, a single 17.6 GB file on disk shared by both apps.
Two actions change what your chats run on. Set up for me is one. Use, on a downloaded model, is the other; Hermes’s documentation says that after you click it, “New chats now run on the local model.” Behind the button, Hermes sets model.provider to llamacpp and points model.default at the file. Download on its own changes nothing. To try a model without moving your assistant off whatever it runs today, download it and test it outside the chat first.
Once a model is in use, Hermes runs a single llama-server process on 127.0.0.1 port 18434 and routes requests to it. The server can hold several models, loads them on demand and unloads one after 15 minutes idle. For each catalog model Hermes writes its own launch settings: an 8-bit KV cache, flash attention and, for both Qwen models, multi-token prediction. Loading an MLX build instead starts with the steps in MLX model in LM Studio on a Mac.
Why did Hermes load Gemma 4 31B at 193,280 tokens of context?
Gemma 4 31B is not in Hermes’s catalog. For the models it ships, Hermes writes launch settings into a file called presets.ini: a context window, KV cache type and batch sizes. On our machine that file was 0 bytes. With no entry for Gemma, Hermes’s router started the model on 12 September with this command line, copied from ~/.hermes/logs/llama-server.log:
llama-server --host ... --jinja --metrics --port ... --slots --no-webui
--alias gemma-4-31B-it-QAT-Q4_0 --direct-io
--model ~/.hermes/models/gemma-4-31B-it-QAT-Q4_0.ggufThree flags are missing, and llama.cpp fills each gap with a default. Its server documentation lists --ctx-size as “default: 0, 0 = loaded from model”, so with no context set, the server takes the size from the model file. --parallel defaults to “-1 = auto”, and a unified KV buffer is “enabled if number of slots is auto”. The log line that followed shows the result:
initializing, n_slots = 4, n_ctx_slot = 193280, kv_unified = 'true'The same line appears for three separate loads in the log. Google’s Gemma 4 31B model card gives the model a 256K context window, so 193,280 is below the maximum. We have not traced why llama.cpp settled on that exact figure. No part of Hermes chose it.
The third missing flag is --mmproj, the path to the multimodal projector that lets a model take images. Hermes passed none for Gemma, so this load had no projector to read an image with, although the Gemma 4 model card lists image input.
The empty settings file has a cause. Before writing launch settings, Hermes estimates how much memory each model needs at its minimum 64K window. Its preset generator logged a refusal for Gemma 4: the model “needs ~72.2 GiB at the 64K floor but only ~38.4 GiB of VRAM+RAM exist”, followed by advice to try a smaller quant. The number comes from one line in hermes_cli/local_runtime/estimator.py. It holds a table of how many layers use sliding-window attention in each Gemma generation, and it lists gemma3 and gemma2 only. A sliding-window layer keeps a short, fixed stretch of context in memory, so it costs far less KV cache. The Gemma 4 model card describes “a hybrid attention mechanism that interleaves local sliding window attention with full global attention”. Without a table entry, Hermes prices all 60 layers as full attention.
The estimate is wrong by a wide margin. On 11 September we started Hermes’s own llama-server build with Hermes’s settings for dense models and the context pinned to 65,536. Gemma loaded in 11.3 seconds, reported n_ctx_slot = 65536, and answered 11 of 12 ARC-AGI-3 board prompts. So the refusal did not stop Gemma from loading. It stopped Hermes from writing the one setting that would have capped the window. Meanwhile the Local Models page listed the file as “Added by you” with a blue Use button and no warning.
Hermes’s documentation says every recommended model gets at least a 64K window and grows toward its native maximum as a conversation needs more room. For a model you add yourself, the window comes from the file and the slot count comes from llama.cpp, and nothing in the Hermes window shows either number. If you keep Hermes’s engine, check the log after the first load, since the n_ctx_slot line is the only place the chosen window is recorded.
Can a small business build a private AI assistant on Mac for several staff?
The business question is whether one Mac running this stack can be an assistant for a team rather than for one person. The answer turns on what happens when two people ask at once, and we have measured that on our test machine.
With Gemma 4 31B served by LM Studio’s llama.cpp engine, the model this guide uses, one request ran at 11.7 tokens a second and two at once ran at 5.7 each, so a second person halved the speed for both, in our LM Studio parallel requests test. A separate run found about 11.3 tokens a second for one caller, and when two callers shared the endpoint each got half. With the model’s MLX build on LM Studio’s MLX engine, two requests ran at 11.5 each, and combined output went from 11.4 to 23.0 tokens a second. That is a change of engine on the same Mac with the same model. The MLX build also wrote no reasoning text before its answers in our Gemma 4 31B MLX vs GGUF test, and a short agent turn fell from 13.7 to 14.5 seconds to 7.4 to 9.6.
A faster model is not automatically a better assistant. Qwen3.6 35B-A3B ran at a median 50.8 tokens a second in Hermes’s engine, but gave an answer in 4 of 12 runs on our board test against Gemma’s 11.
Those are two requests at once, not a working day. We have not run Hermes on real office work, such as an inbox or a shared calendar, with several users, and we have not counted how many requests a team would send in a day or how long each would wait in the queue. So we make no claim about headcount or about which jobs suit the machine. A logged week of real staff requests to one Mac assistant, counting tasks handled, failures, wait times and memory held, is the test that would size it, and it is on our list.
What are the performance limits of a 48 GB Mac?
The primary constraint is the memory-to-model ratio. On a 48 GB machine, we cannot run a 70B model with a large context window. We have to choose between model size and context length. We chose the 31B model because it fits comfortably while allowing for a 64K context.
Hermes’s estimator disagrees: it said Gemma 4 31B needs about 72.2 GiB at a 64K window against about 38.4 GiB available. Our measurements do not support that. LM Studio has held the same model at 65,536 tokens on this 48 GB Mac inside the roughly 27.6 GB budget above, and Hermes pointed at LM Studio ran inside it. The estimator’s warning is not a reason to buy more memory.
Running both engines on one model is where a 48 GB Mac goes wrong. When Hermes’s engine loaded Gemma 4 31B at 193,280 tokens per slot while LM Studio held it at 65,536, the Mac held two servers for one model. The KV cache grows with the window, so a cache sized for 193,280 tokens per slot is several times the one LM Studio already held. We did not keep a memory reading from that load, so we give no figure for it; a process memory reading while Hermes’s engine holds Gemma 4 31B at that window across four slots is on our list. Hermes’s config backup is timestamped 12:19 on 12 September, the moment we switched Hermes back to LM Studio.
The --direct-io flag makes this harder on memory. The llama.cpp documentation describes the default load mode as memory-mapping the model file, and dio as “use DirectIO if available”. A memory-mapped model can be dropped and re-read from disk when the system needs room. Weights read in with direct I/O sit in the server’s own memory instead. The llama.cpp build Hermes ships also prints a warning that --direct-io is deprecated in favour of --load-mode dio. We ran into the same pattern when we ran two models at once on 48 GB: each one fits on its own, and the failure comes from what the second one assumes about the memory the first one already holds. On this machine we keep one engine per model, and that engine is LM Studio.
Token speed is another factor. On the M4 Pro, we see respectable tokens per second. It is not as fast as a H100 cluster, but for an always-on assistant, this is acceptable. We do not need instant responses for background tasks. We care more about the quality of the reasoning and the privacy of the data.
The 48 GB limit also affects coding agents. OpenCode has a large system prompt, so a smaller 12B model suits it better. Both the main assistant and the coding agent can then sit on the disk, with only one “hot” in the GPU at a time. That trade-off keeps the setup lean.
Our setup is a practical example of how to run a local LLM on a Mac. By combining a unified memory machine with an OpenAI-compatible server and a tool-using runtime, we build a system that is private and autonomous. It is a different approach than the one described in our how we built our local AI stack. We focus on the agentic loop rather than just the chat interface. This is similar to how we evaluate other tools in our choosing between Ollama, LM Studio, and MLX, but with a focus on the runtime.
The hardware specifications for the M4 Pro are detailed on Apple’s official page. The unified memory is the single most important spec for anyone looking to build a similar stack.
We no longer have to hope that a cloud provider keeps our data safe or maintains a specific model version. We can build a tool that knows our files and our preferences. The M4 Pro and Hermes Agent show that the barrier to entry for a private assistant is now a matter of configuration.
A different route to the same idea, with its own onboarding and memory, is OpenClaw with a local model.



