Hermes Agent Deep Deployment and Usage Tutorial
The AI Agent landscape has evolved rapidly. Among the most talked-about open-source frameworks in 2026, Hermes Agent — developed by Nous Research — has emerged as a standout project, gaining over 50,000 GitHub stars within weeks of its launch. Unlike traditional chatbot wrappers or simple CLI tools, Hermes Agent is a self-improving AI Agent runtime designed to learn from every interaction, build skills autonomously, and maintain long-term memory across sessions.
This tutorial covers everything from initial installation to advanced production deployment. Whether you are a solo developer experimenting locally or a team deploying Hermes Agent at scale with Docker, messaging platform integrations, and API endpoints, this guide will walk you through every step — with real commands, configuration files, and expert recommendations.
What Makes Hermes Agent Different
Before diving into installation, it is important to understand what sets Hermes Agent apart from other frameworks like OpenClaw.
Core Design Philosophy
Most AI Agent frameworks are stateless — they forget everything after each session, require manual skill installation, and cannot improve over time. Hermes Agent flips this paradigm with three core mechanisms:
- Automatic Memory Writing: Every interaction is analyzed and stored. The agent remembers your preferences, past decisions, and context across sessions.
- Autonomous Skill Extraction: When the agent successfully completes a complex task, it automatically distills the workflow into a reusable
SKILL.mdfile. - Self-Optimizing Workflows: Through an internal learning loop, the agent refines its approaches over time — no manual prompt engineering or fine-tuning required.
Quick Comparison: Hermes Agent vs. OpenClaw
- Technology Stack: Hermes Agent uses Python 3.11 with the
uvpackage manager. OpenClaw uses Node.js (≥22). - Deployment Philosophy: Hermes Agent is designed as a server-resident, self-evolving system with serverless support. OpenClaw follows a local-first, single-user approach.
- Memory System: Hermes Agent uses SQLite with FTS5 full-text search plus 8 external memory plugins (Hindsight, Mem0, etc.). OpenClaw relies on flat-file storage.
- Skill System: Hermes Agent auto-creates skills from experience. OpenClaw requires manual installation from ClawHub marketplace.
- Cost Model: Hermes Agent supports serverless backends (Daytona, Modal) for near-zero idle cost. OpenClaw typically runs on always-on local machines.
Bottom line: If you want a plug-and-play local assistant, OpenClaw is fine. If you want an agent that grows smarter with every interaction and can scale to production, Hermes Agent is the stronger choice.
System Requirements
Before installing Hermes Agent, ensure your environment meets these prerequisites:
- Operating System: Linux (Ubuntu/Debian recommended), macOS, Windows via WSL2, or Android Termux
- Python: 3.10 or higher (3.11 recommended)
- RAM: Minimum 4 GB for API-based usage; 16 GB+ for running local models
- Network: Must be able to access GitHub and your chosen LLM provider's API endpoint
- Disk Space: At least 2 GB for the agent itself; more for Docker images if using containerized deployment
Critical Warning: Do not run the installation script with
sudo. Use a normal user account. Running with elevated privileges causes permission conflicts that are difficult to resolve later.
Installation Methods
Hermes Agent supports multiple installation approaches. Choose the one that best fits your use case.
Method 1: One-Line Install Script (Recommended for Local Testing)
This is the fastest way to get started:
| 1 | |
| 2 | |
| 3 | |
| 4 | |
| 5 | |
| 6 | |
| 7 | |
| 8 | |
| 9 | |
| 10 | |
The script automatically handles Python dependency installation, path configuration, and triggers the initial setup wizard.
If the hermes command is not found after installation:
| 1 | |
| 2 | |
| 3 | |
| 4 | |
| 5 | |
| 6 | |
Method 2: Docker Deployment (Recommended for Servers)
Docker provides environment consistency and isolation, making it ideal for server deployments.
Step 1: Create the persistent data directory
| 1 | |
Step 2: Initialize configuration interactively
| 1 | |
| 2 | |
| 3 | |
Step 3: Run the gateway in the background
| 1 | |
| 2 | |
| 3 | |
| 4 | |
| 5 | |
| 6 | |
Step 4: Verify the service is running
| 1 | |
| 2 | |
| 3 | |
| 4 | |
| 5 | |
| 6 | |
| 7 | |
| 8 | |
| 9 | |
| 10 | |
Method 3: Docker Compose (Recommended for Production)
For long-running production deployments, Docker Compose offers better maintainability:
Create docker-compose.yml:
| 1 | |
| 2 | |
| 3 | |
| 4 | |
| 5 | |
| 6 | |
| 7 | |
| 8 | |
| 9 | |
| 10 | |
| 11 | |
| 12 | |
| 13 | |
| 14 | |
| 15 | |
| 16 | |
| 17 | |
| 18 | |
| 19 | |
| 20 | |
| 21 | |
| 22 | |
Operational commands:
| 1 | |
| 2 | |
| 3 | |
| 4 | |
| 5 | |
| 6 | |
| 7 | |
| 8 | |
| 9 | |
| 10 | |
| 11 | |
| 12 | |
| 13 | |
Important: The
~/.hermes/directory contains all configuration, memory, skills, sessions, and logs. Always mount it as a volume — otherwise, everything is lost when the container is recreated.
Method 4: Manual Installation (For Network-Restricted Environments)
If your server cannot access GitHub directly:
| 1 | |
| 2 | |
| 3 | |
| 4 | |
| 5 | |
| 6 | |
| 7 | |
| 8 | |
| 9 | |
Method 5: Cloud Marketplace (Fastest for Non-Technical Users)
Several cloud providers now offer pre-built Hermes Agent images. For example, Tencent Cloud Lighthouse offers a Hermes Agent template:
- Purchase a 2-core 4 GB lightweight application server
- Select the Hermes Agent image template
- Log in via the web terminal as the
lighthouseuser - Run
hermes setupto configure your model and API key
This eliminates all manual installation steps and is ideal for beginners.
Initial Configuration
After installation, Hermes Agent needs to be configured with a language model provider, tools, and optionally a messaging gateway.
Step 1: Run the Setup Wizard
For first-time users, the complete wizard is recommended:
| 1 | |
The wizard will walk you through:
- Model provider selection
- API key configuration
- Tool enablement
- Messaging gateway setup (optional, can be skipped)
Use the up/down arrow keys to navigate and Enter to confirm selections.
Step 2: Configure Your LLM Provider
Hermes Agent supports 200+ models through multiple providers. You can configure this separately:
| 1 | |
Supported providers include:
- Nous Portal: Official Hermes-series models with native function calling support
- OpenRouter: Access to 200+ models including Claude, GPT, Gemini
- OpenAI: GPT-4o, GPT-4o-mini, and others
- Kimi: Long-context model, accessible from China
- MiniMax: Multimodal Chinese model
- Z.AI (GLM): Zhipu AI's GLM series
- DeepSeek, Qwen, Doubao: Other popular Chinese providers
Example: Configuring with an OpenAI-compatible provider
If you are using a third-party OpenAI-compatible aggregation platform, configure it via environment variables:
| 1 | |
| 2 | |
Add these lines:
| 1 | |
| 2 | |
Then set the model in config:
| 1 | |
| 2 | |
Common Mistake: When setting
OPENAI_BASE_URL, include only the base path up to/v1. Do not append/chat/completions— the SDK concatenates this automatically.Correct:
https://api.provider.com/v1Incorrect:https://api.provider.com/v1/chat/completions
Step 3: Configure Tools
| 1 | |
This lets you enable or disable built-in tool modules:
- File operations (read, write, search)
- Shell command execution
- Network requests
- Browser automation
- And more
For production use, be selective about which tools to enable. Only activate what your use case requires to minimize security exposure.
Step 4: Verify Your Setup
| 1 | |
| 2 | |
| 3 | |
| 4 | |
| 5 | |
Send a test message. If the agent responds correctly, your setup is working.
Understanding the Configuration Files
Hermes Agent stores all its data in ~/.hermes/. Understanding this directory structure is essential for troubleshooting and production management:
| 1 | |
| 2 | |
| 3 | |
| 4 | |
| 5 | |
| 6 | |
| 7 | |
| 8 | |
| 9 | |
| 10 | |
| 11 | |
The config.yaml File
This is the primary configuration file. Configuration priority follows this order:
CLI parameters > config.yaml > .env > defaults
Here is a well-documented example:
| 1 | |
| 2 | |
| 3 | |
| 4 | |
| 5 | |
| 6 | |
| 7 | |
| 8 | |
| 9 | |
| 10 | |
| 11 | |
| 12 | |
| 13 | |
| 14 | |
| 15 | |
| 16 | |
| 17 | |
| 18 | |
| 19 | |
| 20 | |
| 21 | |
| 22 | |
| 23 | |
| 24 | |
| 25 | |
Key recommendations for production:
- Set
terminal.backendtodocker— never let the agent execute directly on the host in production - Keep
approvals.modeonsmart— do not disable the approval mechanism - Set
allow_private_urlstofalseto prevent SSRF attacks - Enable memory for the best self-improvement experience
The .env File
Store all sensitive credentials here:
| 1 | |
| 2 | |
| 3 | |
| 4 | |
| 5 | |
| 6 | |
| 7 | |
| 8 | |
| 9 | |
| 10 | |
| 11 | |
| 12 | |
| 13 | |
| 14 | |
| 15 | |
| 16 | |
| 17 | |
| 18 | |
| 19 | |
| 20 | |
Critical distinction:
OPENAI_API_KEYis what Hermes uses to call the LLM.API_SERVER_KEYis what external applications use to call Hermes. Do not confuse them.
Execution Backends Explained
One of Hermes Agent's most powerful features is its flexible execution backend system. Each backend determines where and how the agent executes tasks:
- local: Direct execution on the host machine. Good for development and testing. Not recommended for production because the agent has full host access.
- docker: Tasks run inside isolated containers. This is the recommended production backend because it limits the agent's blast radius.
- ssh: Execute tasks on a remote server via SSH. Useful for managing remote infrastructure.
- daytona: Serverless persistent environments. Cost-effective at roughly $5/month for a basic VPS. Ideal for intermittent workloads.
- modal: Cloud function execution with pay-per-use billing. Best for bursty, compute-intensive tasks.
- singularity: Designed for HPC (High-Performance Computing) clusters and research environments.
To switch backends:
| 1 | |
Messaging Platform Integrations
Hermes Agent can connect to 15+ messaging platforms through its gateway system, making it accessible from tools your team already uses.
Setting Up the Gateway
| 1 | |
| 2 | |
| 3 | |
| 4 | |
| 5 | |
Telegram Integration
- Create a bot via @BotFather on Telegram and obtain the bot token
- Configure the token:
| 1 | |
- Start the gateway:
| 1 | |
- Send a message to your bot on Telegram to verify connectivity
Tip: If you plan to use Telegram, deploy your server in an overseas region (e.g., Singapore) to avoid connectivity issues with Telegram's API.
Feishu (Lark) Integration
- Go to the Feishu Open Platform and create an application
- Enable Bot capability for the application
- Copy the App ID and App Secret
- Edit
~/.hermes/.env:
| 1 | |
| 2 | |
| 3 | |
| 4 | |
| 5 | |
| 6 | |
- Ensure
~/.hermes/config.yamlincludes:
| 1 | |
| 2 | |
| 3 | |
| 4 | |
| 5 | |
| 6 | |
| 7 | |
The group_sessions_per_user: true setting ensures different users in the same group maintain separate conversation contexts.
- Start the gateway and verify:
| 1 | |
| 2 | |
| 3 | |
| 4 | |
A successful connection shows:
| 1 | |
| 2 | |
| 3 | |
| 4 | |
| 5 | |
| 6 | |
| 7 | |
| 8 | |
Other Supported Platforms
The same gateway system supports Discord, Slack, WhatsApp, Signal, WeChat, Enterprise WeChat (WeCom), DingTalk, and QQ. The configuration pattern is similar for each — obtain the platform's bot credentials and add them to your .env file.
The API Server
Hermes Agent can expose an OpenAI-compatible API server, allowing any application that speaks the OpenAI protocol to use your agent as a backend.
Enabling the API Server
Add these settings to your .env:
| 1 | |
| 2 | |
| 3 | |
| 4 | |
| 5 | |
Calling the API
Example: Direct call to Hermes Agent's API server
| 1 | |
| 2 | |
| 3 | |
| 4 | |
| 5 | |
| 6 | |
| 7 | |
| 8 | |
| 9 | |
This means you can point tools like ChatGPT-next-web, LobeChat, or any OpenAI-compatible client directly at your Hermes Agent instance.
Scheduled Tasks with Built-In Cron
Hermes Agent includes a natural language task scheduler — one of its most practical features for automation.
Creating Scheduled Tasks
| 1 | |
| 2 | |
| 3 | |
| 4 | |
| 5 | |
Managing Tasks
| 1 | |
| 2 | |
| 3 | |
| 4 | |
| 5 | |
The agent interprets your natural language description and converts it into a cron schedule. This eliminates the need to write raw cron expressions for most use cases.
Self-Improvement: Memory and Skills Deep Dive
The most distinctive aspect of Hermes Agent is its closed-loop learning system. Understanding how it works helps you get the most out of the platform.
How Memory Works
Hermes Agent uses SQLite with FTS5 full-text search as its primary memory engine, supplemented by 8 external memory plugins. Every conversation contributes to three types of memory:
- User Profile (
USER.md): Preferences, communication style, frequently used tools — capped at a reasonable character limit to prevent bloat - Session Memory: Context from recent conversations, retrievable via semantic search
- Episodic Memory: Significant events and decisions stored with timestamps
The memory system operates on a retrieval-augmented basis. When you start a new conversation, the agent automatically searches its memory for relevant context before responding. This is why it feels like talking to someone who remembers you, rather than starting from scratch each time.
How Skills Work
When the agent successfully completes a complex multi-step task, it can automatically extract the workflow into a SKILL.md file. Skills are loaded progressively to save tokens:
- List view: A summary of all available skills
- Full content view: The complete skill definition when selected
- Specific file view: Individual files within a skill when needed
This three-tier loading mechanism is a clever optimization. Instead of stuffing all skills into every prompt (which would waste tokens and degrade performance), the agent loads only what it needs, when it needs it.
Customizing the Agent Identity
The SOUL.md file defines your agent's personality, values, and behavioral guidelines:
| 1 | |
| 2 | |
| 3 | |
| 4 | |
| 5 | |
| 6 | |
| 7 | |
| 8 | |
| 9 | |
| 10 | |
| 11 | |
| 12 | |
| 13 | |
| 14 | |
| 15 | |
| 16 | |
You can edit this file directly:
| 1 | |
Migrating from OpenClaw
If you are currently using OpenClaw, Hermes Agent provides a built-in migration tool:
| 1 | |
This automatically transfers:
- SOUL.md: Your agent's identity configuration
- Memory: All stored memories and user profiles
- Skills: Installed skill definitions
- API Keys: Provider credentials
The migration is designed to be seamless — your new Hermes Agent will pick up right where your OpenClaw instance left off, but with the added benefit of self-improvement capabilities.
Production Deployment Best Practices
Security Hardening
- Always use the Docker backend in production. Never allow the agent to execute commands directly on the host.
- Keep
allow_private_urls: falseto prevent SSRF attacks. - Use
approvals.mode: smartat minimum. Thenonemode disables all safety confirmations. - Restrict API server access with a strong
API_SERVER_KEYand proper CORS origins. - Limit messaging platform access using allowlists (
FEISHU_ALLOWED_USERS, etc.).
Data Persistence and Backup
The ~/.hermes/ directory is everything. Implement a regular backup schedule:
| 1 | |
| 2 | |
| 3 | |
| 4 | |
| 5 | |
Resource Management
In Docker Compose, set explicit resource limits:
| 1 | |
| 2 | |
| 3 | |
| 4 | |
| 5 | |
Monitor actual usage with docker stats hermes and adjust as needed. The 4 GB memory limit is a good starting point for most workloads.
Monitoring
- Use the built-in health endpoint:
curl http://localhost:8642/health - Check the dashboard at
http://localhost:9119for token usage analytics, session history, and logs - Set up external monitoring (e.g., UptimeRobot) to alert you if the health endpoint goes down
Reverse Proxy Setup
For production, place Hermes Agent behind a reverse proxy (Nginx, Caddy, or Traefik) with TLS:
| 1 | |
| 2 | |
| 3 | |
| 4 | |
| 5 | |
| 6 | |
| 7 | |
| 8 | |
| 9 | |
| 10 | |
| 11 | |
| 12 | |
| 13 | |
| 14 | |
| 15 | |
Common Issues and Troubleshooting
Problem: hermes command not found after installation
The installer adds the binary path to ~/.bashrc. Run source ~/.bashrc or open a new terminal. If the problem persists, verify that ~/.local/bin is in your $PATH.
Problem: Agent not responding to messages on Telegram/Feishu
Check the gateway state file at ~/.hermes/gateway_state.json. If the platform shows "disconnected", verify your bot token or app credentials. For Telegram, ensure your server is in a region that can reach Telegram's API.
Problem: Docker container keeps restarting
Check logs with docker logs hermes. The most common cause is a misconfigured .env file — particularly an invalid OPENAI_API_KEY or OPENAI_BASE_URL.
Problem: High memory usage
If the agent's memory database grows too large, you can prune old entries:
| 1 | |
Problem: Permission errors during installation
This almost always means the install script was run with sudo. Remove the ~/.hermes directory, then reinstall as a normal user:
| 1 | |
| 2 | |
Key Takeaways
Hermes Agent represents a meaningful shift in how we think about AI Agents — from static tools that forget everything to dynamic systems that grow more useful over time. Here are the core recommendations:
- For local experimentation, use the one-line install script. It takes under 5 minutes.
- For server deployment, use Docker Compose with persistent volumes, resource limits, and a reverse proxy.
- For production security, always use the Docker execution backend, keep approvals enabled, and restrict API and messaging platform access.
- For maximum value, lean into the self-improvement features. The more you use Hermes Agent, the better it gets — give it time to accumulate memory and skills before judging its performance.
- For OpenClaw users, the migration tool makes switching painless. Your existing configuration, memory, and skills transfer automatically.
The agent landscape will continue to evolve, but the principles Hermes Agent embodies — persistent memory, autonomous skill acquisition, and continuous self-improvement — are likely to define the next generation of AI Agent systems.
Further Resources
- Official GitHub: github.com/NousResearch/hermes-agent
- Official Documentation: hermes-agent.nousresearch.com/docs
- Community Wiki: github.com/cclank/Hermes-Wiki
- Function Calling SDK: github.com/NousResearch/hermes-function-calling