Community 📖 Guides & Tutorials
0
👁 185 views

Discussion Running Hermes Agent on Your Mac Mini M4

Nous Research · Hermes Agent v0.13

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.

🖥️ Mac Mini M4
🧠 28 GB Unified RAM
🍎 macOS Sequoia
🔒 100% Local Data
00

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:

  1. macOS Sequoia (15.x) — fully updated via System Settings → General → Software Update.

  2. Xcode Command Line Tools — needed for Git and build dependencies. Run xcode-select --install in Terminal if not already installed.

  3. Homebrew — macOS package manager. Install from brew.sh or run the one-liner on their site.

  4. Ollama (for local models) — download from ollama.com and open the app once to start the background service.

  5. Docker Desktop (optional, for the web dashboard) — download from docker.com/products/docker-desktop.

ℹ️
You can skip Ollama and use an API key from Anthropic, OpenAI, or OpenRouter instead. Local models keep everything offline; cloud models give you more capability at the cost of privacy and per-token fees.
01

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:

Terminal bash
curl -fsSL https://raw.githubusercontent.com/NousResearch/hermes-agent/main/scripts/install.sh | bash
⚠️
Do not use sudo. Hermes installs per-user under ~/.hermes/ and doesn't need root. Running it as root will misplace your config files.

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:

Terminal bash
# 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

Terminal bash
hermes doctor

This checks required paths, dependencies, shell integration, and (later) macOS permission status. Fix any red items before continuing.

02

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:

Terminal bash
# 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:

Terminal bash
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)

Terminal bash
hermes model

# When prompted, choose "Anthropic" and paste your API key
# Get a key at: console.anthropic.com

Test your setup

Terminal bash
hermes
# Type: "What files are in my home directory?" to confirm tool-use works
03

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.

🛡️
Create a restore point first. Before granting Accessibility or Screen Recording access to any AI agent, use Time Machine or a backup tool to snapshot your system. Desktop automation has broad access to your machine.

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

  1. Open System Settings → Privacy & Security → Accessibility.

  2. Click the + button at the bottom of the app list.

  3. Navigate to Applications → Utilities → Terminal (or your terminal app) and click Open.

  4. Toggle Terminal on in the list.

  5. 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

Terminal bash
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:

~/.hermes/config.yaml yaml
terminal:
allowed_commands:
- ls
- cat
- grep
- git
- python3
- npm
deny_commands:
- rm -rf
- sudo
Best practice: Start with no restrictions and observe what commands Hermes uses for your workflows. Then lock down to only what you actually need. Over-restricting upfront will break legitimate agent tasks.
04

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:

Terminal bash
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:

Browser url
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:

~/.hermes/.env env
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:

Terminal bash
hermes gateway stop && hermes gateway
🔒
Never forward port 8642 to the public internet. An agent that controls your desktop should only be reachable on your private network. For remote access outside your home, use Tailscale — a free, encrypted private network that takes about 5 minutes to set up.

Auto-start on boot (launchd)

Terminal bash
# 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.

05

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.

📄 ~/.hermes/skills/devops/weekly-git-summary/SKILL.md
---
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:

Terminal bash
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

Terminal bash
# 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
💡
Skill organization tip: Use subdirectories to keep your library manageable — ~/.hermes/skills/devops/, ~/.hermes/skills/research/, ~/.hermes/skills/writing/. The agent searches recursively and finds them regardless of depth.
06

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.

🗂️
1 — Local File Intelligence & Cleanup
Find, organize, rename, and summarize files without cloud uploads

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.

"Find all PDF files in ~/Downloads older than 30 days, group them by topic based on their filename, and move them to ~/Documents/Archive/[year]/"
"Scan ~/Desktop and rename any screenshot files to use the pattern YYYY-MM-DD-description.png, where the description comes from what's visible in the image"
"Find duplicate files across ~/Documents and ~/Downloads and show me a list of what's safe to delete"

Create a file-organizer skill to encode your preferred folder structure, naming conventions, and archive rules — Hermes will follow them automatically every time.

💻
2 — Local Coding Assistant & Code Review
Full terminal access, multi-file edits, automated testing

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.

"Read all TypeScript files in ./src, find any functions longer than 40 lines, and refactor them into smaller named functions with JSDoc comments"
"Run our test suite, find the failing tests, read the relevant source files, fix the failures, and re-run to confirm they pass"
"Generate a CHANGELOG.md from our git history between v1.2 and v1.3, grouped by feature, fix, and breaking change"

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.

📅
3 — Scheduled Background Workflows
Run recurring tasks on a cron schedule while the Mac Mini stays on

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 daily task at 8am: check the top 5 Hacker News stories, summarize them in 2 sentences each, and send them to my Telegram bot"
"Every Monday at 9am, generate a weekly git commit summary across all projects in ~/code and save it to ~/Documents/weekly-report.md"
"Monitor ~/Downloads every hour and automatically move any .zip or .dmg files older than 48 hours to ~/Trash"

Set up a cron job from the CLI:

cron add "0 8 * * *" "summarize Hacker News and send to Telegram"
🔬
4 — Research & Document Synthesis
Web research, local document reading, and structured report writing

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.

"Read all PDFs in ~/Documents/Research, identify the 3 most common themes across them, and write a 500-word synthesis to ~/Documents/synthesis.md"
"Research the current state of open-source LLM fine-tuning tools, compare the top 5 by ease of use and Apple Silicon support, and save a comparison table to comparison.md"
"Read my notes in ~/Obsidian/Projects/Q3 and write an executive summary I can paste into a Notion doc"

Create a research-report skill with your preferred citation style, output format, and section headers — Hermes will apply it consistently every time.

🖥️
5 — Desktop & App Automation
Control UI elements, fill forms, and automate repetitive app workflows

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.

"Open Mail, find all unread newsletters from the past week, summarize each one in a bullet point, and save the list to ~/summaries/newsletters-$(date +%Y%m%d).md"
"Take a screenshot of each open browser tab, name them by the page title, and save them to ~/Screenshots/tabs/"
"Open Finder, navigate to ~/Downloads, select all images older than 7 days, and move them to ~/Photos/Unsorted"

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.


07

Quick Troubleshooting Reference

Diagnostic commands bash
# 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.

💬 0 comments
0 Comments

Log in to join the discussion

Log In Sign Up
No comments yet — be the first to reply!