Discussion Running Hermes Agent on Your Mac Mini M4
Running Hermes Agent
on Your Mac Mini M4
A complete walkthrough — from a fresh machine to a fully operational, self-improving AI agent running locally on Apple Silicon.
What Is Hermes Agent & Prerequisites
Hermes Agent is an open-source autonomous AI agent built by Nous Research — the lab behind the Hermes family of models. Unlike static chatbots, Hermes has a closed learning loop: it writes and refines its own skill files from experience, recalls past sessions via full-text search, and builds a persistent memory of your workflows. It crossed 100K GitHub stars faster than AutoGPT or LangChain.
Your Mac Mini M4 with 28 GB of unified RAM is an ideal host. The Neural Engine and high memory bandwidth can run capable local models (up to 14B+ parameters) while the machine stays quiet and energy-efficient around the clock.
100% Private
Data never leaves your machine unless you explicitly connect external services.
No Token Costs
Run local models via Ollama — no per-call API fees for everyday tasks.
Self-Improving
The agent writes skill files from real sessions and refines them over time.
Platform-Agnostic
Chat via CLI, Telegram, Discord, Slack, WhatsApp, or a web dashboard.
Before You Begin
Make sure the following are in place on your Mac Mini:
macOS Sequoia (15.x) — fully updated via System Settings → General → Software Update.
Xcode Command Line Tools — needed for Git and build dependencies. Run xcode-select --install in Terminal if not already installed.
Homebrew — macOS package manager. Install from brew.sh or run the one-liner on their site.
Ollama (for local models) — download from ollama.com and open the app once to start the background service.
Docker Desktop (optional, for the web dashboard) — download from docker.com/products/docker-desktop.
Installing Hermes Agent
Hermes ships a single installer script that handles everything automatically: Python 3.11, Node.js 22, ripgrep, ffmpeg, a virtualenv, and the global hermes command. You do not need to install Python or Node beforehand.
Step 1 — Run the installer
Open Terminal (or iTerm2) and run:
curl -fsSL https://raw.githubusercontent.com/NousResearch/hermes-agent/main/scripts/install.sh | bash
The installer will prompt you to configure an LLM provider (Anthropic API, OpenAI, OpenRouter, Ollama, or a custom endpoint). You can skip this and configure it later with hermes model.
Step 2 — Reload your shell
After installation completes, reload your shell profile so the hermes command is in your PATH:
# zsh is the default shell on macOS source ~/.zshrc # Verify the install hermes --version
Step 3 — What was installed?
Here's where everything lives after a standard per-user install:
~/.hermes/hermes-agent/
The cloned repository — source code and bundled skills.
~/.hermes/
Your personal data: config, memory, sessions, custom skills, and credentials.
~/.local/bin/hermes
Symlink to the hermes CLI binary — this is what runs when you type hermes.
Step 4 — Run the health check
hermes doctor
This checks required paths, dependencies, shell integration, and (later) macOS permission status. Fix any red items before continuing.
Connecting a Model
Hermes works with any OpenAI-compatible endpoint. You can use local Ollama models, Anthropic's API, OpenRouter, or the Nous Portal. This guide covers both paths.
Option A — Local model via Ollama (recommended for privacy)
With 28 GB of RAM, your Mac Mini can comfortably run 14B parameter models. Pull a tool-capable model first:
# Great all-round agent model for 28 GB RAM ollama pull qwen2.5-coder:14b # Lighter option if you want faster responses ollama pull qwen2.5-coder:7b # Verify Ollama is running curl http://127.0.0.1:11434/v1/models
Then configure Hermes to use it:
hermes model # When prompted, enter: # Endpoint URL : http://127.0.0.1:11434/v1 # API Key : ollama # Model Name : qwen2.5-coder:14b
7B model
Fast responses, ~5 GB RAM. Good for quick tasks, note-taking, and lightweight automation.
14B model
Best balance on 28 GB. Reliable tool-use, coding, and multi-step agent workflows.
Cloud model
Most capable. Use claude-sonnet-4 or gpt-4o with an API key for complex reasoning.
Option B — Cloud API (Anthropic)
hermes model # When prompted, choose "Anthropic" and paste your API key # Get a key at: console.anthropic.com
Test your setup
hermes # Type: "What files are in my home directory?" to confirm tool-use works
macOS Permissions Setup
macOS enforces strict privacy controls. For Hermes to automate your desktop, read/write files, and use the screen, you must explicitly grant permissions. You only do this once, but each permission unlocks a different category of tasks.
Opening Privacy & Security settings
Go to: Apple menu → System Settings → Privacy & Security
Grant each permission listed below by finding "Terminal" (or your terminal app) in the list and toggling it on:
| Permission | What It Unlocks | Required? |
|---|---|---|
| Accessibility | Allows Hermes to click buttons, type text, and control UI elements in other apps. Core for desktop automation. | Required |
| Screen Recording | Allows Hermes to read the screen layout, identify windows, and verify UI state during automation tasks. | Required |
| Full Disk Access | Allows Hermes to read and write files anywhere on your drive. Needed for file management skills. | Optional |
| Automation | Allows Hermes to control other apps via AppleScript/Accessibility APIs (e.g. Finder, Mail, Calendar). | Optional |
Step-by-step for Accessibility
Open System Settings → Privacy & Security → Accessibility.
Click the + button at the bottom of the app list.
Navigate to Applications → Utilities → Terminal (or your terminal app) and click Open.
Toggle Terminal on in the list.
Enter your Mac password when prompted and click Unlock.
Repeat these steps for Screen Recording. When Hermes first attempts to use screen capture, macOS may pop up an additional system prompt — click "Allow" when it appears.
Verify permissions are working
hermes doctor
Look for green checkmarks next to Accessibility and Screen Recording in the output. If you see warnings, re-check System Settings — macOS sometimes silently resets permissions after major updates.
Configuring shell access limits (optional security hardening)
For production or shared machines, you can restrict which shell commands Hermes is allowed to run by editing your config:
terminal: allowed_commands: - ls - cat - grep - git - python3 - npm deny_commands: - rm -rf - sudo
Web Dashboard (Optional)
Hermes ships a Docker-based web UI called Hermes WebUI that lets you manage sessions, browse memory, review agent logs, and chat from a browser — useful if you want to access your Mac Mini from a laptop or phone on your local network.
Launch the dashboard with Docker
Make sure Docker Desktop is running, then:
docker run -d --name hermes-webui \ -e WANTED_UID="$(id -u)" \ -e WANTED_GID="$(id -g)" \ -e HERMES_WEBUI_STATE_DIR=/home/hermeswebui/.hermes/webui \ -v ~/.hermes:/home/hermeswebui/.hermes \ -v ~/workspace:/workspace \ -p 127.0.0.1:8787:8787 \ ghcr.io/nesquena/hermes-webui:latest
Open it in your browser:
http://127.0.0.1:8787
Enable LAN access (other devices on your network)
To access Hermes from your laptop or phone on the same Wi-Fi:
API_SERVER_ENABLED=true API_SERVER_KEY=your-very-secure-password-here API_SERVER_HOST=0.0.0.0 API_SERVER_PORT=8642
Then restart the gateway:
hermes gateway stop && hermes gateway
Auto-start on boot (launchd)
# Install Hermes as a macOS background service hermes gateway install # Verify it's running hermes gateway status
The service restarts automatically if it crashes and starts at login.
Creating a Custom Skill
Skills are Markdown files with YAML frontmatter that teach Hermes how to handle specific recurring tasks. No code required. The agent reads the skill automatically when the task matches, follows your documented procedure, and can update the skill file itself as it learns edge cases.
Skills live in ~/.hermes/skills/. You can organize them in subdirectories: ~/.hermes/skills/devops/, ~/.hermes/skills/research/, etc.
Let the agent create a skill automatically
After completing a complex task involving 5+ tool calls, Hermes will often offer to save the workflow as a skill. Always say yes — these agent-authored skills capture pitfalls it encountered in real time.
Creating a skill manually
Here's a worked example: a skill that generates a weekly Markdown summary of your git activity across projects.
name: weekly-git-summary
description: Generate a Markdown summary of git commits across projects for the past 7 days
version: 1.0.0
tags: [git, devops, reporting, weekly]
---
# Weekly Git Summary Skill
## When to Use
Trigger this skill when asked to summarize, recap, or report on git activity, commits, or code changes. Also triggers on "what did I work on this week?"
## Quick Reference
- Scans all git repos under ~/projects/ (customize this path)
- Covers the past 7 calendar days
- Groups commits by repository and date
- Outputs a clean Markdown file to ~/Documents/weekly-summaries/
## Procedure
1. Find all git repositories: `find ~/projects -name ".git" -type d -maxdepth 3`
2. For each repo, run: `git log --oneline --since="7 days ago" --author="$(git config user.name)"`
3. Group results by repo name, then by date (YYYY-MM-DD)
4. Write output to `~/Documents/weekly-summaries/YYYY-WNN.md`
5. Confirm file was written and display the path
## Pitfalls
- Repos with detached HEADs will error on `git log` — skip them silently
- Some repos use a different author email — check `git config user.email` if commits seem missing
- Create the output directory if it doesn't exist before writing
## Verification
- Confirm the output file exists: `ls -la ~/Documents/weekly-summaries/`
- Show the first 30 lines to the user for a quick sanity check
Now test your skill:
hermes # Prompt: "What did I work on this week across all my projects?" # Hermes will detect the weekly-git-summary skill and follow the procedure
Installing community skill packs
# Browse available skills hermes skills search # Install a specific pack (example: productivity tools) hermes skills install wondelai/skills # List your installed skills hermes skills list
5 Real Use Cases on Mac Mini M4
Here are five practical, ready-to-run use cases that leverage your Mac Mini's always-on nature, Apple Silicon performance, and local privacy. Each includes example prompts you can paste directly into the Hermes CLI.
Your Mac Mini stays on all day — use Hermes as an always-available file assistant. It can scan directories, identify duplicates, rename files by content, generate summaries of documents, and reorganize folder structures. Because everything is local, no file ever leaves your machine.
Create a file-organizer skill to encode your preferred folder structure, naming conventions, and archive rules — Hermes will follow them automatically every time.
With Full Disk Access and terminal permissions, Hermes can act as a junior developer that never gets tired. It reads your codebase, writes and edits files, runs tests, reads error output, and fixes bugs — all in a loop without you having to copy-paste between windows. With a 14B local model, it handles real codebases competently.
This use case pairs well with the obra/superpowers community skill, which adds a subagent-driven review loop before the agent marks any task complete.
The Mac Mini's always-on nature is ideal for scheduled agent tasks. Hermes has a built-in cron scheduler — set it once and your agent runs research, generates reports, monitors logs, or sends digest messages to Telegram or Discord automatically.
Set up a cron job from the CLI:
Hermes can browse the web, read local PDFs and text files, synthesize across sources, and write structured Markdown reports — all in one uninterrupted workflow. Pair it with a cloud model (Claude Sonnet or GPT-4o) when accuracy matters most, or run it locally for sensitive research you want to keep private.
Create a research-report skill with your preferred citation style, output format, and section headers — Hermes will apply it consistently every time.
With Accessibility and Screen Recording permissions granted, Hermes can control any macOS application — clicking buttons, filling forms, copying content, navigating menus — using the same APIs as assistive technology. This is the most powerful and most sensitive use case; start with low-risk automations and expand carefully.
Desktop automation tasks should always be reviewed the first few times they run. Use hermes doctor to verify Accessibility permissions are current — macOS occasionally resets them after system updates.
Quick Troubleshooting Reference
# Full system check hermes doctor # Check Ollama is running and models are loaded ollama list curl http://127.0.0.1:11434/v1/models # Check Docker container is running docker ps # Check if dashboard port is available lsof -i :8787 # Check if API server port is available lsof -i :8642 # Reload shell if hermes command is not found source ~/.zshrc which hermes
hermes not found
Shell profile wasn't reloaded. Run source ~/.zshrc and try again.
Ollama endpoint error
Ollama isn't running. Open the Ollama app from /Applications or run ollama serve.
Desktop automation fails
Accessibility or Screen Recording permission is missing or was reset. Re-check System Settings.
Dashboard won't load
Docker Desktop isn't running, or port 8787 is occupied. Run docker ps to verify.
Log in to join the discussion
Log In Sign Up