Site icon Efficient Coder

How to Master Hermes Agent: 10 Essential Post-Installation Steps

Getting Started with Hermes Agent: 10 Things to Try After Installation

If you have just discovered Hermes Agent, or you are thinking about switching from another AI assistant, this guide is for you. The following content is based on hands‑on experience and source code analysis. It walks you through the ten most valuable things to do right after installing Hermes. Each item includes concrete configuration steps, usage scenarios, and ways to verify that everything works as expected.

Before You Begin: Installation and Setup

Hermes Agent supports macOS, WSL2, and Linux. A single command installs the agent:

curl -fsSL https://raw.githubusercontent.com/NousResearch/hermes-agent/main/scripts/install.sh | bash -x

The -x flag lets you watch the execution process. If you are on Windows, install WSL2 first, then run Hermes Agent from within WSL2.

After the installation finishes, run the setup command:

hermes setup

This interactive command guides you through basic configuration: which model to use, which communication channel (Telegram, Discord, etc.) to enable, and other essential settings.

One small but important detail: when you paste your model API key, nothing appears on the screen. You might think the paste failed and paste again, which can corrupt the key. If that happens, edit the configuration file manually:

vim ~/.hermes/.env

Check that the key is correct and fix it if needed. After that, configuring the communication channel is very similar to what you would do with OpenClaw.


1. Set Up a Browser Anti‑Detection Environment (Camofox or Browserbase)

If you want Hermes to read articles for you, fill out forms automatically, grab limited‑time tickets, or operate a backend dashboard, it needs a browser environment that looks exactly like a real human user. The default backend browser (Local Chromium) is easily blocked by most anti‑bot systems.

The solution is to configure Camofox or Browserbase. Simply tell Hermes:

“Help me configure COMOFOX and CAMOFOX_URL.”

The difference before and after configuration is obvious. Once set up, Hermes can smoothly access pages that would otherwise be blocked.

Image

Why this matters: Hermes can determine which instructions are high‑risk and ask for your permission before executing them. This is much better than some other tools, which keep asking for authorisation with a bunch of meaningless numbers – you never really know what they are about to do.

Image

2. Define Your “Soul” (SOUL.md)

The default Hermes is a generic AI assistant, but everyone has their own habits and preferences. By customising the SOUL.md file, you can make Hermes behave exactly the way you like.

The file is initially empty (commented out). A simple way to create it is to chat with Hermes for a couple of days, showing your natural style and requirements. Then ask:

“What recommended configuration do you have for SOUL.md?”

Hermes will summarise a configuration based on your conversation history. Here is a reference you can use:

---
name: Rigorous Architect
version: 2.0
---

# 🧠 Thinking Mode
- **Verify before answering**: For any uncertain API, configuration, or path, check with tools first. No guessing.
- **Plan before executing**: For tasks with more than three steps, list the approach and risks, then proceed only after confirmation.
- **Deliver with verification**: After finishing a task, proactively explain how to check that it actually works.

# 🛡️ Self‑Restrictions
- Say “I’m not sure” directly when uncertain – that is better than making things up.
- If you detect a conflict between memory or skills, point it out and ask for a decision.
- When a task fails, analyse the cause and turn it into a Skill so the same mistake is not repeated.

# 🗣️ Output Discipline
- Put conclusions first, use code and commands, minimise unnecessary words.
- Warn before any high‑risk operation (deleting data, restarting services, overwriting files).

Why this matters: Hermes can read your session history, so it can suggest a configuration that truly matches your style. This session mechanism will also appear in other useful places.


3. Configure Auxiliary Models (Auxiliary)

The auxiliary module is Hermes’ “co‑pilot LLM routing centre”. Its goal is to let the main model focus on core reasoning, while cheaper or specialised auxiliary models handle repetitive, low‑cost, or domain‑specific tasks. Configuring this module saves you money and improves overall efficiency.

Hermes supports assigning independent models and providers to the following eight task types:

Task Type Purpose
vision Screenshot, CAPTCHA, and image analysis
web_extract Web content extraction and summarisation
compression Context compression and summarisation
session_search Historical session search and summarisation
approval Decision‑making for dangerous command approvals
skills_hub Skill marketplace search and installation assistance
mcp MCP service call assistance
flush_memories Memory system cleanup and reorganisation

Configuration is straightforward. Just say:

“Help me set the compression auxiliary model to qwen3.5-plus.”

After configuration, you can manually trigger compression to verify. Check the log file ~/.hermes/logs/agent.log. You should see lines similar to:

  • flush_memories uses the default model (qwen3.6-plus)
  • compression uses your custom model (qwen3.5-plus)
Image

Why this matters: The compression threshold automatically adapts to the model’s context window. Different models (for example, a 1M context model versus a 200K context model) trigger compression at different ratios. The summary budget also scales accordingly:

max_summary_tokens = min(context_length * 0.05, _SUMMARY_TOKENS_CEILING)

A 1M model can allocate up to 50K tokens to the summary, while a 200K model only gets 10K. This design is much more sensible.

Image

4. Understand and Use the Memory System

Hermes has a three‑layer memory system. You can configure each layer according to your needs.

Layer 1: Built‑in Memory (enabled by default)

The configuration is in ~/.hermes/config.yaml:

memory:
  memory_enabled: true           # MEMORY.md — agent notes
  user_profile_enabled: true     # USER.md — user profile
  memory_char_limit: 2200        # enough for most, increase to 4000 for heavy use
  user_char_limit: 1375          # enough for most
  nudge_interval: 10             # remind agent to save memory every 10 turns, set to 5 for more active saving
  flush_min_turns: 6             # trigger memory flush only after at least 6 turns before exit
  • MEMORY.md stores the agent’s notes: environment facts, project conventions, and lessons learned. Character limit is 2200; if you often fill it up, increase to 4000.
  • USER.md stores your user profile: preferences, communication style, work habits. Character limit is 1375.
  • nudge_interval: every 10 turns, Hermes is reminded to save memory. If you find memory insufficient, set this to 5.

Layer 2: External Memory Provider (choose one as needed)

Hermes supports eight external memory plugins. To configure mem0 as an example, run in the terminal:

hermes memory setup

Then enter your API key when prompted.

Why this matters: Hermes uses YAML for configuration and separates secrets (keys) from the rest of the configuration. This is more friendly than JSON. However, note that after modifying config.yaml, you must restart Hermes – there is no hot‑reload yet.

Once mem0 is enabled, each conversation turn triggers at least two mem0 API calls (sync_turn write + queue_prefetch search). If the agent actively calls tools, there will be additional calls. I recommend trying layers 1 and 3 first, and only enabling external memory if they do not meet your needs.

Layer 3: Session Search (enabled by default)

Session Search is not traditional memory but a complementary mechanism. It stores all raw conversation history in ~/.hermes/state.db and uses FTS5 keyword search plus LLM summarisation.

There are two retrieval modes:

  • Empty query: returns the most recent session list without calling an LLM.
  • Query provided: FTS5 search → LLM summarisation.

If the LLM summarisation fails, the system falls back to returning the first 500 characters of raw text as a preview. You never get an empty response just because the summariser failed.

Image

5. Configure Web Search

Giving Hermes the ability to search the web is very simple. It natively supports exa, Tavily, parallel, and firecrawl. Just say:

“Help me configure exa.”

Hermes will handle the rest.

Why this matters: Hermes clearly prints the tool execution process in your IM interface. This is extremely helpful for debugging and for understanding what the agent is doing.

Image

6. Use Automated Auditing (Hooks)

Hermes Agent has two complementary extension systems:

  1. Gateway Hooks – event‑driven hooks on gateway events.
  2. Plugin System – lifecycle hooks for plugins.

The core idea: Hooks handle event notifications, while Plugins handle functional extensions. They work together.

The Eight Lifecycle Hooks

Hook Name Trigger
on_session_start When a session is created
pre_llm_call Before each LLM call in a turn
pre_api_request Before each API call
post_api_request After each API call
pre_tool_call Before each tool execution
post_tool_call After each tool execution
post_llm_call After each LLM call (end of turn)
on_session_end When a session ends

Example: Terminal Command Audit Hook

You can ask Hermes to develop an audit plugin for you. For example:

“Create a terminal command audit hook that, after every terminal tool execution, automatically appends the command content, execution result, timestamp, and session ID to a log file.”

Hermes will write and configure the hook for you. The whole process is much easier than in some competing tools.

Image

7. Use a Sandbox for Safety (Docker)

By default, Hermes executes commands on your local machine. If you need higher security, you can configure a Docker sandbox.

You can create a separate agent instance (a different profile) dedicated to sandboxed operations. Here are the reference commands:

# Bind the worker to your secondary bot token (Token B)
hermes -p worker config set gateway.telegram.bot_token "TOKEN_B"
hermes -p worker config set gateway.telegram.enabled true

# Set the worker to use Docker sandbox mode
hermes -p worker config set terminal.backend docker
hermes -p worker config set terminal.docker_image python:3.11-slim

# The worker can use a cheaper model
hermes -p worker config set model.provider alibaba
hermes -p worker config set model.model qwen3.5-plus

After configuration, try executing rm -rf / in the worker bot. At first, the agent will refuse. When you insist and confirm, the command will run inside the Docker container. Due to system protections, only some directories inside the container are removed – your host machine remains untouched.

You can run docker ps on your host to confirm that the container was indeed started.

Why this matters: Hermes makes multi‑profile configuration extremely easy – just a few spoken instructions. In other tools, you usually have to log into a web dashboard and adjust settings manually.

Image

8. Multi‑Agent Collaboration

Multi‑agent functionality deserves its own detailed article, but here is a quick demonstration.

Within the same session, you can trigger multiple sub‑agents to work together. The trigger is as simple as saying:

“Spawn three sub‑agents to discuss the pros and cons of Hermes among themselves.”

Hermes will create three sub‑agents, and they will have a discussion and return their conclusions.

The other form of multi‑agent operation is using different profiles (like the worker profile mentioned above), which are completely isolated from each other.

Image

9. Back Up Your Configuration and Data

If you plan to use Hermes for the long term, backups are essential. I recommend three layers of backup.

Layer 1: Local Git Backup

Initialise the ~/.hermes/ directory as a Git repository and push it to a private GitHub repository. Remember to exclude .env in .gitignore.

Layer 2: Local Backup to Another Disk + Scheduled Task

Here is a complete backup script:

#!/bin/bash
BACKUP_NAME="hermes_full_backup_$(date +%Y%m%d_%H%M%S)"
BACKUP_DIR="/tmp/$BACKUP_NAME"
DEST_DIR=~/hermes_backups

mkdir -p $BACKUP_DIR/hermes
mkdir -p $DEST_DIR

echo "📦 Packaging core configuration..."
cp ~/.hermes/config.yaml $BACKUP_DIR/hermes/
cp ~/.hermes/.env $BACKUP_DIR/hermes/
cp ~/.hermes/MEMORY.md $BACKUP_DIR/hermes/ 2>/dev/null

echo "🧠 Packaging database and sessions..."
cp ~/.hermes/state.db $BACKUP_DIR/hermes/
cp -r ~/.hermes/sessions $BACKUP_DIR/hermes/ 2>/dev/null

echo "🔧 Packaging extensions and audit logs..."
cp -r ~/.hermes/plugins $BACKUP_DIR/hermes/ 2>/dev/null
cp -r ~/.hermes/audit_logs $BACKUP_DIR/hermes/ 2>/dev/null
cp -r ~/.hermes/skills $BACKUP_DIR/hermes/ 2>/dev/null
cp -r ~/.hermes/cron $BACKUP_DIR/hermes/ 2>/dev/null

echo "👥 Packaging all profile data..."
cp -r ~/.hermes/profiles $BACKUP_DIR/hermes/ 2>/dev/null

echo "📦 Compressing..."
tar -czf $DEST_DIR/$BACKUP_NAME.tar.gz -C /tmp $BACKUP_NAME
rm -rf $BACKUP_DIR

echo ""
echo "✅ Backup completed!"
echo "📍 Location: $DEST_DIR/$BACKUP_NAME.tar.gz"
echo "📊 Size: $(du -h $DEST_DIR/$BACKUP_NAME.tar.gz | cut -f1)"

Layer 3: Remote Backup

You can back up to a remote server, an object storage service (such as S3 or OSS), or simply push the Git repository to a remote host.


10. Use the Skill System to Capture Experience

The Skill system is one of Hermes’ smartest features. It automatically reviews your actions and turns repetitive, valuable workflows into reusable skills.

In config.yaml there is a parameter:

creation_nudge_interval: 15

This means: every 15 tool‑use cycles, Hermes triggers a background skill review. The review process works like this:

  1. A background agent is spawned, taking a complete snapshot of the current conversation.
  2. It asks itself: “In this conversation, were there any non‑trivial experiences involving trial and error, course corrections, or the user expecting a different approach?”
  3. Based on the answer:
    • If an existing skill can be updated → calls skill_manage to update it with the new experience.
    • If nothing exists but the experience is worth saving → calls skill_manage to create a new skill.
    • If nothing worth saving → outputs “Nothing to save.”

The whole process runs in a background thread. It does not block the user conversation and does not modify the main conversation history.

Why this matters: This is a standout feature – automatically turning valuable operations into permanent skills. Another noteworthy feature: no matter how you exit (normally, by error, or by interruption), messages are never lost. There are 20 trigger points covering every possible exit path, and session splitting ensures that each session record is complete and has no duplicates.

Image

Frequently Asked Questions (FAQ)

Q: What are the main differences between Hermes Agent and OpenClaw?

From hands‑on experience, Hermes is much more stable. We used qwen 3.6 plus for everything and never experienced a crash. OpenClaw usually requires a top‑tier overseas model, otherwise it tends to break. Also, Hermes’ high‑risk command authorisation mechanism is much clearer – OpenClaw’s authorisation requests show only a bunch of meaningless numbers, so you never really know what permission it is asking for.

Q: What if I paste the wrong API key during setup?

Manually edit ~/.hermes/.env and correct the key. You do not need to run hermes setup again.

Q: Do I need to restart Hermes after changing configuration?

Yes. Hermes does not support hot‑reload yet. After modifying config.yaml, you must restart Hermes for the changes to take effect.

Q: Is external memory (like mem0) worth enabling?

It depends on your use case. After enabling external memory, each conversation turn adds at least two API calls. I recommend trying the built‑in memory and Session Search first. If they are not enough, then consider enabling external memory.

Q: Will running rm -rf / in sandbox mode damage my system?

No. When running inside a Docker sandbox, the command only affects the container. Your host machine is completely safe. Moreover, Hermes will refuse to execute such a high‑risk command unless you explicitly confirm.

Q: How can I make Hermes behave more like my personal style?

The easiest way is to chat with Hermes normally for two days, then ask it to generate a SOUL.md configuration based on your conversation history. This requires almost no manual effort.

Q: Does the backup script need to include the profiles directory?

Yes. The profiles directory contains all the configuration and data for your separate agent instances (like the worker). You should back it up completely.

Q: Does Session Search support vector retrieval?

Currently, Session Search uses FTS5 keyword search plus LLM summarisation. It does not support vector retrieval. OpenClaw supports hybrid search (BM25 + vector retrieval), but its granularity is at the diary file level, not the session level. Each approach has its own trade‑offs.


Final Thoughts

By working through these ten practical items, you should have a solid understanding of Hermes Agent’s core capabilities. The overall experience is smooth, and stability is impressive. Many operations – configuration, upgrades, and even creating audit hooks – can be done simply by talking to Hermes. You rarely need to edit configuration files manually.

I hope this guide helps you get started with Hermes Agent quickly. If you discover new tips or run into interesting problems during your own practice, feel free to share your experiences.

Exit mobile version