Hermes Agent Tutorial

June 22, 2026 · View on GitHub

NousResearch's self-hosted personal AI agent with persistent memory, autonomous skill creation, 20+ platform gateway, and a closed reinforcement-learning loop that turns every conversation into fine-tuning data.


What Is Hermes Agent?

Hermes Agent is the successor to OpenClaw — NousResearch's production-grade, self-hosted personal AI agent designed to run 24/7 on your own hardware or cloud infrastructure. With 65,972 GitHub stars and an MIT license, it represents the current state of the art in open-source agent frameworks that combine a richly layered memory system, a multi-platform messaging gateway, and a reinforcement-learning pipeline that continuously improves the underlying models through real usage.

Unlike ephemeral chatbot wrappers, Hermes is built around three design principles:

  1. Continuity — sessions persist, memories accumulate, skills compound. The agent you run today is smarter than the one you ran last week.
  2. Reach — one agent, 20+ platforms. Whether you message through Telegram, Discord, Slack, WhatsApp, Signal, Email, Matrix, Feishu, DingTalk, or a raw webhook, the same memory and skill set is available.
  3. Closed learning — every real interaction is a potential training example. trajectory.py records tool calls and outcomes in Atropos RL format; those trajectories can be fed directly into NousResearch's fine-tuning pipeline to improve future model behavior.

Current Snapshot (auto-updated)

Who Should Read This Tutorial

AudienceWhat You Will Get
Individual developersA self-hosted AI assistant with memory that actually persists across sessions
Platform buildersA messaging gateway you can point at any of 20+ chat platforms with a single config
ML researchersA live data-generation pipeline producing Atropos-format RL trajectories from real agent interactions
DevOps / infra engineersSix swappable terminal backends (local, Docker, SSH, Daytona, Singularity, Modal) for isolated task execution
OpenClaw usersA clear migration path: hermes claw migrate imports your memories, skills, and config

Why This Track Matters

Hermes Agent is a useful study target because it combines several hard agent problems in one repo: memory, platform routing, scheduling, tool execution, and training-data capture. That makes it a strong map for readers who want to move from a local assistant to an always-on agent system.

What You Will Learn

By the end of this tutorial, you will understand how Hermes structures persistent memory, how the messaging gateway routes conversations across platforms, how scheduled jobs and subagents run, and how interaction traces become reinforcement-learning data.

Mental Model

Think of Hermes as a personal AI operating system. The agent core decides what to do, the memory layers preserve context, the gateway lets users reach it from many channels, and the training loop converts real usage into improvement data.


Architecture at a Glance

cli.py
└── hermes_cli/
    ├── agent/               # LLM core
    │   ├── prompt_builder.py
    │   ├── context_engine.py
    │   ├── memory_manager.py
    │   ├── skill_utils.py
    │   ├── trajectory.py
    │   └── smart_routing.py
    ├── gateway/             # 20+ platform messaging
    │   ├── telegram.py
    │   ├── discord.py
    │   ├── slack.py
    │   ├── whatsapp.py
    │   ├── signal.py
    │   ├── email.py
    │   ├── matrix.py
    │   ├── api_server.py
    │   └── ...
    ├── cron/                # Scheduler + jobs
    │   ├── scheduler.py
    │   └── jobs/
    ├── environments/        # RL training, benchmarks, subagents
    │   ├── hermes_swe_env/
    │   ├── tblite/
    │   └── batch_runner.py
    └── acp_adapter/         # Agent Communication Protocol server

Three Memory Layers

┌─────────────────────────────────────────────────────────┐
│                    Memory Architecture                   │
├──────────────┬──────────────────┬───────────────────────┤
│   Episodic   │    Semantic      │     Procedural        │
│              │                  │                       │
│ FTS5 SQLite  │  MEMORY.md       │  SKILL.md files       │
│ session      │  USER.md         │  (auto-created and    │
│ search +     │  Honcho user     │   self-improved by    │
│ LLM summary  │  modeling        │   the agent)          │
│ injection    │  (dialectic)     │                       │
└──────────────┴──────────────────┴───────────────────────┘

Chapter Guide

ChapterTitleKey Topics
1Getting StartedInstall, hermes setup, ~/.hermes/ layout, first conversation, OpenClaw migration
2The TUI and Conversation Interfacecurses UI, slash commands, SOUL.md persona, context files, skin system
3Agent Core: Prompt Building, Context Engine, Model Routingprompt_builder.py, context_engine.py, smart_model_routing.py, credential_pool.py
4Memory, Skills, and the Learning LoopThree memory layers, memory_manager.py, FTS5, Honcho, SKILL.md, agentskills.io
5The Messaging Gateway20+ platform drivers, session routing, delivery pipeline, API server mode
6Cron Scheduling, Subagents, and Automationscheduler.py, cron commands, subagent spawning, terminal backends
7RL Training and Trajectory Generationtrajectory.py, Atropos, benchmark envs, tool-call parsers, data pipeline
8ACP, MCP, Migration, and EcosystemACP server, MCP integration, agentskills.io, OpenClaw migration, Nix/Docker deploy

Quick-Start (TL;DR)

# Install
curl -fsSL https://raw.githubusercontent.com/nousresearch/hermes-agent/main/install.sh | bash

# Run setup wizard
hermes setup

# Start the TUI
hermes

Key Differentiators vs Other Agent Frameworks

FeatureHermes AgentLangChainAutoGPTCrewAI
Persistent episodic memory (FTS5)YesPlugin-dependentPartialNo
Autonomous skill creationYesNoNoNo
20+ platform gatewayYesNoNoNo
RL trajectory generationYesNoNoNo
Closed fine-tuning loopYesNoNoNo
Self-hosted, MIT licenseYesYesAGPLMIT
Six terminal backendsYesNoNoNo
ACP multi-agent protocolYesNoNoNo

License and Attribution

Hermes Agent is released under the MIT License by NousResearch. This tutorial is an independent educational resource; it is not officially affiliated with NousResearch.

Source References