10 Things to Try After Getting Started with Hermes Agent

@LufzzLiz
SIMPLIFIED CHINESE3 months ago · Apr 09, 2026
365K
1.7K
350
74
3.6K

TL;DR

A comprehensive tutorial on optimizing Hermes Agent, detailing installation, memory management, sandboxing, and its unique ability to automatically turn tasks into permanent skills.

This article provides ten recommended functions to try after installing Hermes Agent through practical operation. The content is very rich, manually typed, and verified through source code review and experimental validation. Through these trials, eight major highlights of Hermes are also summarized and included in the text. Welcome to read and exchange ideas~

0. Installation and Deployment

As a prerequisite, let's briefly go over the installation and deployment to help friends start from scratch.

One command is enough for installation (supports macOS / WSL2 / Linux):

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

I added -x to make it easier for you to see the execution process. Windows users need to install WSL2 and run Hermes Agent from within WSL2.

After the command finishes, it should guide you through configuration, or you can execute it manually:

hermes setup

Complete the configuration of models, channels, etc., interactively.

Hermes' interactive configuration is not as good as OpenClaw, but it is simple enough. One small pitfall is related to model key configuration: if you paste it, it won't be displayed. In your haste, you might paste it multiple times, causing the key to fail.

The remedy is to edit ~/.hermes/.env using vim.

Check if the keys in the file are accurate; if not, modify them manually. After that, configuring channels is not much different from OpenClaw.

First: Configure Browser Anti-Scraping (Camofox or Browserbase)

If you want me to automatically read articles, fill out forms, grab tickets, or operate the backend, you must provide me with a "human-like" browser environment. Camofox is recommended here.

Ordinary backend browsers (Local Chromium) will be intercepted upon entry.

How to configure: Tell Hermes: Help me configure CAMOFOX and CAMOFOX_URL.

Effect - Before configuration:

岚叔 - inline image

After configuration:

岚叔 - inline image

Hermes Highlight 1:

One thing to praise Hermes for is that it judges which instructions are high-risk and then appropriately asks for your authorization. This is much better than OpenClaw, where you'd want to turn off authorization because it comes with a bunch of meaningless numbers, leaving you clueless about what it's doing.

岚叔 - inline image

Second: Soul Definition (SOUL.md)

By default, Hermes is a general AI assistant; you need to customize it to suit your preferences.

The SOUL.md file is a commented-out empty file by default and needs to be added manually.

How to configure: Let the Hermes agent edit and write to ~/.hermes/SOUL.md.

Here's a small tip: chat with Hermes for two days first, showing your style and requirements as much as possible during the conversation. Then ask it: "Does Hermes have a recommended configuration for the Soul Definition (SOUL.md)?"

As shown in the screenshot, it feels pretty good. I'll share the text for your reference.

岚叔 - inline image

Hermes Highlight 2:

You can see that Hermes summarized two days of content, thanks to its session reading mechanism, which we will discuss in detail later.

~/.hermes/SOUL.md reference text:

text
1---
2name: Rigorous Architect
3version: 2.0
4---
5
6# 🧠 Thinking Mode
7- **Verify before answering**: For any uncertain APIs, configurations, or paths, check tools first; do not rely on guessing.
8- **Plan before executing**: For tasks with more than 3 steps, list the plan and risks first, and proceed only after confirmation.
9- **Delivery is verification**: After finishing a task, proactively provide "how to check if it took effect."
10
11# 🛡️ Self-Restraint
12- When uncertain, say "I'm not sure" directly; it's better than making things up.
13- If conflicts in memory or skills are found, proactively point them out and request a decision.
14- When a task fails, analyze the cause and solidify it into a Skill to avoid repeating the same mistake.
15
16# 🗣️ Output Discipline
17- Conclusion first, focus on code/commands, less fluff.
18- High-risk operations (deleting data, restarting, overwriting) must be warned in advance.

Third: Auxiliary

The auxiliary module is Hermes' co-pilot LLM routing center. Its design purpose is to let the main model focus on thinking while letting cheaper/specialized auxiliary models handle the dirty work. Configuring this well can save you money and improve efficiency.

This is also one of Hermes' highlights: Hermes supports specifying independent models and providers for different tasks (search, compression, vision, etc.), thereby saving main model costs or improving performance. The configuration is user-friendly; just let Hermes help you configure it.

Supports custom auxiliary model configurations (8 in total):

  1. vision: Screenshot/CAPTCHA/image analysis
  2. web_extract: Web content scraping and extraction
  3. compression: Context compression summary
  4. session_search: Historical session search summary
  5. approval: Dangerous command approval decision
  6. skills_hub: Skill market search/installation assistance
  7. mcp: MCP service call assistance
  8. flush_memories: Memory system cleaning/reorganization

Configuration method, verbal example: "Help me configure the session compression auxiliary model to qwen3.5-plus."

岚叔 - inline image

Verification: We manually trigger compress:

岚叔 - inline image

Check the logs (~/.hermes/logs/agent.log):

Two key lines: flush_memories uses the default model qwen3.6, and compress can be seen using our custom model. Cool~

Auxiliary flush_memories: using auto (qwen3.6-plus)

Auxiliary compression: using auto (qwen3.5-plus) at https://dashscope.aliyuncs.com/compatible-mode/v1/

岚叔 - inline image

Compression threshold: Both too frequent and no compression are bad. The current default is 50%, which I suggest adjusting based on actual usage.

Hermes Highlight 3: The default compression threshold follows the model's context window. This means the trigger ratio is different for 1M and 200k models. Hermes has no round limit, so memory might be better.

Moreover, the summary budget scales accordingly: max_summary_tokens = min(context_length * 0.05, _SUMMARY_TOKENS_CEILING)

A 1M model can allocate up to 50K tokens for summaries, while a 200K model only gets 10K. In short, it's more reasonable.

Fourth: Memory System

The Hermes memory system can be divided into three layers, which can be configured layer by layer (Hermes can configure them itself):

Layer 1: Built-in Memory (Enabled by default, fine-tuning recommended)

text
1# ~/.hermes/config.yaml
2memory:
3 memory_enabled: true # MEMORY.md — agent notes
4 user_profile_enabled: true # USER.md — user profile
5 memory_char_limit: 2200 # Default is enough, can be adjusted to 4000 for heavy use
6 user_char_limit: 1375 # Default is enough
7 nudge_interval: 10 # Remind agent to save memory every 10 rounds, can be set to 5 for more active saving
8 flush_min_turns: 6 # Trigger memory refresh only after at least 6 rounds before exiting

Among them:

memory_char_limit: 2200 stores agent notes: environment facts, project conventions, and pitfalls encountered. The unit is characters. It writes to MEMORY.md. If you find this file often full, it's recommended to increase the limit. I've changed it to 4000.

user_char_limit: 1375 stores the user profile: preferences, communication style, and work habits. The unit is characters. It writes to USER.md.

nudge_interval: 10 reminds the agent to save memory every 10 rounds. If you feel Hermes' memory isn't good enough, you can adjust it to 5 to be more proactive.

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

No rush to configure this. Why? Because there's a local fallback in the third layer.

Hermes supports 8 major plugins:

岚叔 - inline image

Taking mem0 configuration as an example, it's recommended to execute the configuration in the terminal:

Run: hermes memory setup and then configure the key.

岚叔 - inline image

Hermes Highlight 4: Configuration is decoupled; keys and settings are separate. It uses YAML format, which I personally find friendlier than JSON. Google will like it 😊

岚叔 - inline image

However, it's not as good as OpenClaw in one aspect: there's no hot-reloading of configuration. You need to restart after modifying config.yaml.

After configuring mem0, the conversation flow involves at least 2 mem0 API calls per round (sync_turn write + queue_prefetch search). If the agent actively calls tools, additional calls might be needed.

Therefore, whether to enable external memory is for you to judge. I suggest not opening it first to see if layers one and three satisfy you. If not, then consider configuring it.

Here's a diagram to help you understand the full picture of a conversation round.

岚叔 - inline image

Layer 3: Session Search (Enabled by default, ensure auxiliary is available)

Session Search is not part of Memory but a complementary mechanism to the Memory system.

What it stores: All historical conversation originals.

Storage location: Local ~/.hermes/state.db.

Retrieval method: FTS5 keyword search + LLM summary.

Writing method: Automatic (each conversation round is automatically persisted to SQLite).

session_search distinguishes between two modes:

Mode 1: Query is empty → Directly returns the recent session list without calling LLM.

Mode 2: Query exists → FTS5 retrieval → LLM summary.

There is also a fallback: if the summary LLM call fails, it directly returns a raw preview of the first 500 characters of the original text, ensuring something is returned even if the LLM is down.

The presence of a query is decided by the Agent. After reading the user's intent, the Agent judges whether it needs to "flip through history" or "search for a specific topic" and then decides whether to pass a query. This is the standard mode of tool use—behavior is guided by the schema description, and the Agent autonomously chooses the calling method.

It would be great if session search supported vector retrieval. OpenClaw supports this (hybrid search engine: BM25 + vector retrieval), but the granularity is diary files, not session level, so each has its pros and cons.

Fifth: Configure web_search

The agent's web search capability must be configured. Hermes is very easy to configure; you just need to tell Hermes to help you.

Hermes natively supports: exa, Tavily, parallel, firecrawl.

Configuration and usage examples are as follows:

Tell Hermes: "Help me configure exa."

岚叔 - inline image
岚叔 - inline image

Hermes Highlight 5: Attentive friends can see that Hermes clearly prints its tool execution process in the IM by default, which is very user-friendly.

Sixth: Automated Audit (Hooks)

Hermes Agent has two complementary expansion systems:

  1. Gateway Hooks: Gateway event-driven hooks.
  2. Plugin System: Plugin lifecycle hooks.

Core concept: Hooks handle event notifications, and Plugins handle functional expansions—the two complement each other.

8 lifecycle hooks are available:

岚叔 - inline image

Execution flow example:

text
1Session Creation
2 → on_session_start
3
4Each Conversation Round:
5 → pre_llm_call ← Context can be injected
6 → Tool Loop:
7 → pre_api_request ← Before each API call
8 → API Call
9 → post_api_request ← After each API call
10 → pre_tool_call ← Before each tool execution
11 → Tool Execution
12 → post_tool_call ← After each tool execution
13 → post_llm_call ← Round ends
14 → on_session_end ← run_conversation returns

Practical experience: Let's do a gateway hook configuration experiment to audit tool calls.

Directly tell Hermes: "Create a Terminal Audit Hook: after each terminal tool execution, automatically append the command content, execution result, timestamp, and session ID to a log file."

岚叔 - inline image

After authorization, Hermes has written it:

岚叔 - inline image

Now our command audit hook is developed and configured. Isn't it more convenient than Lobster (OpenClaw)?

岚叔 - inline image

Seventh: Sandbox

The default execution command is local. If you want to improve security, you must use a sandbox. Hermes supports sandboxing, and we choose Docker here.

To practice, let's open a separate agent to configure the Docker sandbox.

Example as follows (of course, you can let your Hermes agent help you configure it with the prompt: "Refer to the following commands and help me configure an additional profile, using Docker for the sandbox, and the model follows the main profile"):

text
1# Bind the Worker to your secondary Bot (Token B)
2hermes -p worker config set gateway.telegram.bot_token "TOKEN_B"
3hermes -p worker config set gateway.telegram.enabled true
4
5# Set Worker to Docker sandbox mode
6hermes -p worker config set terminal.backend docker
7hermes -p worker config set terminal.docker_image python:3.11-slim
8
9# Worker can use a cheaper model
10hermes -p worker config set model.provider alibaba
11hermes -p worker config set model.model qwen3.5-plus

Hermes helps you configure everything; you don't need to do it yourself, just provide an extra bot key.

Testing: I told the work bot rm -rf /. Looking at the screenshot, it refused at first, haha.

岚叔 - inline image

I encouraged it, and it finally confirmed execution. As seen in the screenshot, it also said that system protection was triggered and only some directories were deleted.

岚叔 - inline image

Let's have the main agent troubleshoot. Confirmed, no problem.

岚叔 - inline image

We then check docker ps on the host machine. You can see that Docker was indeed started. Perfect~

岚叔 - inline image

Hermes Highlight 6: Multi-profile (agent instance) configuration is friendly. One sentence and Hermes gets it done. In Lobster, I basically still needed to log into the backend to adjust.

Eighth: Multi-agent

Multi-agent needs a separate article. Here's just a summary from our wiki. Different multi-agent capabilities can be triggered under the same session. Of course, there's also completely isolated multi-agent, which is the multi-profile mentioned above.

岚叔 - inline image

Triggering a subagent in a conversation is very simple; just say a word. Example:

"Please spawn three subagents to discuss the pros and cons of Hermes with each other."

岚叔 - inline image

Ninth: Backup

If you decide to switch to Hermes Agent, backup is essential.

Three layers of backup are recommended:

Layer 1: Enable local git. A bit further is pushing to GitHub. It's suggested to push to a private repository. .env should not be pushed (configure .gitignore), use local disk backup.

Layer 2: Backup to other directories on local (preferably other disks) + scheduled tasks.

Appendix, key script file:

text
1#!/bin/bash
2BACKUP_NAME="hermes_full_backup_$(date +%Y%m%d_%H%M%S)"
3BACKUP_DIR="/tmp/$BACKUP_NAME"
4DEST_DIR=~/hermes_backups
5
6mkdir -p $BACKUP_DIR/hermes
7mkdir -p $DEST_DIR
8
9echo "📦 Packaging core configuration..."
10cp ~/.hermes/config.yaml $BACKUP_DIR/hermes/
11cp ~/.hermes/.env $BACKUP_DIR/hermes/
12cp ~/.hermes/MEMORY.md $BACKUP_DIR/hermes/ 2>/dev/null
13
14echo "🧠 Packaging database and sessions..."
15cp ~/.hermes/state.db $BACKUP_DIR/hermes/
16# If sessions are large, you can back up only recent files; here we back up all
17cp -r ~/.hermes/sessions $BACKUP_DIR/hermes/ 2>/dev/null
18
19echo "🔧 Packaging extensions and audits..."
20cp -r ~/.hermes/plugins $BACKUP_DIR/hermes/ 2>/dev/null
21cp -r ~/.hermes/audit_logs $BACKUP_DIR/hermes/ 2>/dev/null
22cp -r ~/.hermes/skills $BACKUP_DIR/hermes/ 2>/dev/null
23cp -r ~/.hermes/cron $BACKUP_DIR/hermes/ 2>/dev/null
24
25echo "👥 Packaging all Profile data..."
26# Profile contains all configurations and databases for clones like worker
27cp -r ~/.hermes/profiles $BACKUP_DIR/hermes/ 2>/dev/null
28
29echo "📦 Compressing..."
30tar -czf $DEST_DIR/$BACKUP_NAME.tar.gz -C /tmp $BACKUP_NAME
31rm -rf $BACKUP_DIR
32
33echo ""
34echo "✅ Backup complete!"
35echo "📍 Path: $DEST_DIR/$BACKUP_NAME.tar.gz"
36echo "📊 Size: $(du -h $DEST_DIR/$BACKUP_NAME.tar.gz | cut -f1)"

Layer 3: Remote backup: such as disks; git push to remote; other servers; or third-party object storage, etc.

Tenth: Skill

Nothing much to say here, just install your commonly used skills.

Hermes is very intelligent; it reviews skills. It identifies our tasks and automatically summarizes and solidifies the process into a Skill.

Trigger condition: In config.yaml, we see creation_nudge_interval default is 15 (older versions might be 10).

岚叔 - inline image

This parameter means every 15 tool cycles, a background skill review is triggered.

Skill review process:

text
1Derive a background agent, take a full snapshot of the current conversation, and ask itself a question:
2
3> "In the previous conversation, was there any non-trivial experience involving trial and error, direction adjustment, or user expectations for different approaches?"
4
5Then three results:
61. **Existing skill can be updated** → Call `skill_manage` to update the existing skill with new experience.
72. **None but worth creating** → Call `skill_manage` to create a new skill and solidify reusable methodologies.
83. **Nothing worth saving** → Output "Nothing to save." and end.
9
10The whole process runs in a background thread, does not block user conversation, and does not modify the main conversation history. If there's an action, a line is printed in the terminal.

Hermes Highlight 7: Automatically converting valuable operations into permanent skills is a standout feature. Greatness needs no further words~

岚叔 - inline image

Hermes Highlight 8: No matter how you exit (normal/abnormal/interrupted), messages are not lost. 20 trigger points cover all exit paths, incremental writing, and session splitting also ensure each session record is complete and non-repetitive.

Due to space limitations, we will find an opportunity to discuss sessions in detail later.

Postscript

Through a few days of experiencing Hermes, I've felt many of its highlights. The overall experience is very smooth. Stability is better than OpenClaw, which can save us 30% of the time spent fixing Lobster.

Lobster generally requires overseas SOTA models; otherwise, it easily crashes itself.

With Hermes, we used qwen 3.6 plus throughout. Many operations like configuration and upgrades can be done just by chatting with Hermes without crashing, which is very rare.

Reference documents:

  1. Source code: https://github.com/NousResearch/hermes-agent
  2. Wiki written by Lan Shu: https://github.com/cclank/Hermes-Wiki
  3. Official documentation: https://hermes-agent.nousresearch.com/docs/

Official account version: https://mp.weixin.qq.com/s/0SYL-HKbWGj3eToQPqnpBw

This article is purely hand-typed based on practical experience. Creation is not easy; friends are welcome to support with a triple-tap~ 💗

One-click save

Use YouMind for AI deep reading of viral articles

Save the source, ask focused questions, summarize the argument, and turn a viral article into reusable notes in one AI workspace.

Explore YouMind
For creators

Turn your Markdown into a clean 𝕏 article

When you publish your own long-form writing, images, tables, and code blocks make 𝕏 formatting painful. YouMind turns a full Markdown draft into a clean, ready-to-post 𝕏 article.

Try Markdown to 𝕏

More patterns to decode

Recent viral articles

Explore more viral articles