No description
Find a file
teknium1 a706a349b5 refactor(gateway): extract authorization cluster into GatewayAuthorizationMixin (god-file Phase 3)
Lift the 4 inbound-message authorization methods out of GatewayRunner into
gateway/authz_mixin.py:GatewayAuthorizationMixin. Behavior-neutral; gateway/run.py
16200 -> 15812 LOC.

Methods moved (~389 LOC): _is_user_authorized, _get_unauthorized_dm_behavior,
_adapter_dm_policy, _adapter_enforces_own_access_policy. The two adapter-policy
helpers are private to _is_user_authorized, so the cluster is fully self-contained
(zero outside-cluster self.method calls after the lift). All self.* calls resolve
unchanged via the MRO (GatewayRunner(GatewayAuthorizationMixin, ...)).

Import split: 6 neutral deps (os, Optional, Platform, SessionSource, the two
whatsapp_identity helpers) at the mixin module top; the module-level logger is
imported lazily inside _is_user_authorized (from gateway.run import logger) so
the mixin never imports gateway.run at module scope -> no cycle. The lazy import
preserves the exact logger name (gateway.run) so log records are unchanged.
2026-06-08 09:42:02 -07:00
.github fix(nix): cold npm builds + fix-lockfiles real-build verification + auto-fix workflow (#41867) 2026-06-08 12:41:37 +05:30
.plans
acp_adapter feat(acp): emit session provenance metadata for compression rotation (#41724) 2026-06-07 22:22:21 -07:00
acp_registry chore: release v0.16.0 (2026.6.5) (#40206) 2026-06-05 17:55:43 -07:00
agent fix(anthropic): strip Responses-only kwargs before Messages SDK call (#31673) (#42155) 2026-06-08 09:36:38 -07:00
apps i18n(desktop): translate backend update apply status messages 2026-06-08 08:58:26 -07:00
assets
cron feat(cron): title cron sessions from the job, not the [IMPORTANT] hint 2026-06-06 12:51:12 -05:00
datagen-config-examples
docker fix(docker): chown gateway install tree on UID remap (salvage #37928) (#38655) 2026-06-04 13:34:23 +10:00
docs fix(middleware): preserve translated downstream failures 2026-06-06 09:26:18 -07:00
gateway refactor(gateway): extract authorization cluster into GatewayAuthorizationMixin (god-file Phase 3) 2026-06-08 09:42:02 -07:00
hermes_cli refactor(cli): extract agent-construction cluster into CLIAgentSetupMixin (god-file Phase 4) 2026-06-08 09:41:34 -07:00
infographic/kanban-db-corruption-defense infographic: kanban.db corruption defense (#30858 + #30862) (#30952) 2026-05-23 05:55:25 -07:00
locales feat(gateway): explain /voice usage when toggled bare (#39766) 2026-06-05 04:21:13 -07:00
nix revert(nix): drop the cp patchPhase workaround from #41867 (#42151) 2026-06-08 20:29:41 +05:30
optional-mcps feat(mcp): Nous-approved MCP catalog with interactive picker (#30870) 2026-05-26 12:48:14 -07:00
optional-skills refactor(skills): clean up bundled skill set + add environments: relevance gate (#39028) 2026-06-04 06:11:22 -07:00
packaging/homebrew chore: prepare Hermes for Homebrew packaging (#4099) 2026-03-30 17:34:43 -07:00
plans fix(gemini): tighten native routing and streaming replay 2026-04-19 12:40:08 -07:00
plugins fix(plugins): thread-safe lazy-singleton helpers; fix honcho TOCTOU (#24759) (#42150) 2026-06-08 09:35:22 -07:00
providers fix(vision): proactive downgrade for providers rejecting list-type tool content (#41072) 2026-06-07 21:50:57 -07:00
scripts chore: map paulb26 in AUTHOR_MAP for #24135 salvage 2026-06-08 07:03:12 -07:00
skills feat(skills): add simplify-code skill — parallel 3-agent code review and cleanup (#41691) 2026-06-07 22:02:41 -07:00
tests refactor(cli): extract agent-construction cluster into CLIAgentSetupMixin (god-file Phase 4) 2026-06-08 09:41:34 -07:00
tools fix(tui): handle Windows PTY stdin and detached WS frames (#41953) 2026-06-08 09:41:20 -07:00
tui_gateway fix(tui): handle Windows PTY stdin and detached WS frames (#41953) 2026-06-08 09:41:20 -07:00
ui-tui fix(tui): install the process.on('exit') terminal-mode backstop (#42165) 2026-06-08 08:21:19 -07:00
web feat(dashboard): change UI font from the theme picker, independent of theme (#41145) 2026-06-07 03:39:01 -07:00
website docs(tui): correct HERMES_TUI_GATEWAY_URL — dashboard-internal, not remote-attach (#42162) 2026-06-08 09:37:03 -07:00
.dockerignore chore: improve .dockerignore with Python and common patterns (#6092) 2026-06-05 09:53:42 +10:00
.env.example Add Hermes desktop app (#20059) 2026-05-31 17:46:56 -05:00
.envrc fix(node/nix): consolidate workspace lockfile + update all consumers 2026-06-02 20:28:18 -04:00
.gitattributes chore: enforce LF line endings for container entrypoints (#12181) 2026-06-05 09:54:01 +10:00
.gitignore fix(cli): gitignore Desktop bootstrap marker so hermes update stops autostashing it 2026-06-05 02:54:32 -07:00
.hadolint.yaml feat(docker): remove gosu from bundled image; s6-setuidgid handles privilege drop 2026-05-24 18:05:33 -07:00
.mailmap chore: add MestreY0d4-Uninter to AUTHOR_MAP and .mailmap 2026-04-15 15:03:28 -07:00
AGENTS.md fix(desktop): surface skill & quick-command slash commands in the palette (#38531) 2026-06-03 16:24:06 -07:00
batch_runner.py feat(azure-foundry): add Microsoft Entra ID auth 2026-05-18 10:14:38 -07:00
cli-config.yaml.example docs(update): document updates.* config keys (pre_update_backup, backup_keep, non_interactive_local_changes) (#40617) 2026-06-07 18:29:56 -07:00
cli.py refactor(cli): extract agent-construction cluster into CLIAgentSetupMixin (god-file Phase 4) 2026-06-08 09:41:34 -07:00
constraints-termux.txt feat: add tested Termux install path and EOF-aware gh auth 2026-04-09 16:24:53 -07:00
CONTRIBUTING.md fix(docs): remove remaining stale submodule references missed by #38089 (#38105) 2026-06-03 03:11:19 -07:00
docker-compose.windows.yml feat(docker): add Windows Docker Desktop compatible compose file 2026-05-23 21:52:34 +05:30
docker-compose.yml docs(compose): update entrypoint comment for s6-overlay 2026-05-24 18:05:33 -07:00
Dockerfile fix(docker): add libolm-dev so matrix lazy-install can build python-olm (#33685) 2026-06-04 14:07:27 +10:00
flake.lock fix nix build 2026-04-11 15:30:37 -04:00
flake.nix feat(nix): declarative plugin installation for NixOS module (#15953) 2026-04-28 00:18:32 +05:30
hermes
hermes-already-has-routines.md docs: automation templates gallery + comparison post (#9821) 2026-04-14 12:30:50 -07:00
hermes_bootstrap.py hermes_bootstrap: Windows-only UTF-8 stdio shim for all entry points 2026-05-08 14:27:40 -07:00
hermes_constants.py fix(constants): use windows native default hermes home 2026-06-03 19:37:29 -07:00
hermes_logging.py fix(gateway): tolerate Unicode in stderr log handlers on Windows 2026-06-06 19:57:44 -07:00
hermes_state.py fix(cron): bound the desktop run-history query to one job (#41088) 2026-06-07 02:41:01 -07:00
hermes_time.py fix(hermes_time): implement reset_cache() referenced in docstrings (#41728) 2026-06-07 22:08:01 -07:00
LICENSE
MANIFEST.in fix(packaging): ship locales/ i18n catalogs in wheel, sdist, and Nix (#38383) 2026-06-03 12:00:27 -07:00
mcp_serve.py chore: ruff auto-fix PLR6201 — tuple → set in membership tests (#23937) 2026-05-11 11:13:25 -07:00
mini_swe_runner.py chore: prune unused imports and duplicate import redefinitions 2026-05-28 22:26:25 -07:00
model_tools.py fix(gateway): close residual memory-leak sites under heavy scheduled workload 2026-06-08 06:32:42 -07:00
package-lock.json fix(deps): bump react-router-dom to 7.17.0 (GHSA-8x6r-g9mw-2r78) 2026-06-04 21:30:23 -07:00
package.json fix(install): scope npm installs/audits to avoid pulling in apps/desktop 2026-06-06 18:22:20 -07:00
pyproject.toml feat(deps): promote Pillow to a core dependency 2026-06-06 18:44:15 -07:00
README.md docs: add Urdu translation of README (#40578) 2026-06-08 06:15:27 +05:30
README.ur-pk.md docs: add Urdu translation of README (#40578) 2026-06-08 06:15:27 +05:30
README.zh-CN.md docs: add Urdu translation of README (#40578) 2026-06-08 06:15:27 +05:30
run_agent.py fix(anthropic): strip Responses-only kwargs before Messages SDK call (#31673) (#42155) 2026-06-08 09:36:38 -07:00
SECURITY.md changes from feedback 2026-05-05 22:45:12 -04:00
setup-hermes.sh remove Vercel AI Gateway and Vercel Sandbox (#33067) 2026-05-27 00:43:32 -07:00
setup.py fix(packaging): ship bundled skills in wheel 2026-05-18 20:52:35 -07:00
toolset_distributions.py
toolsets.py fix: expose context engine tools with saved toolsets 2026-05-28 00:28:42 -07:00
trajectory_compressor.py fix(research): keep tool_call/tool_response pairs intact when compressing trajectories 2026-06-07 05:01:27 -07:00
utils.py fix(utils): guard os.fchmod for Windows in atomic_json_write 2026-06-01 09:57:10 -07:00
uv.lock chore(deps): regenerate uv.lock for Pillow core promotion 2026-06-06 18:44:15 -07:00

Hermes Agent

Hermes Agent ☤

Documentation Discord License: MIT Built by Nous Research 中文 اردو

The self-improving AI agent built by Nous Research. It's the only agent with a built-in learning loop — it creates skills from experience, improves them during use, nudges itself to persist knowledge, searches its own past conversations, and builds a deepening model of who you are across sessions. Run it on a $5 VPS, a GPU cluster, or serverless infrastructure that costs nearly nothing when idle. It's not tied to your laptop — talk to it from Telegram while it works on a cloud VM.

Use any model you want — Nous Portal, OpenRouter (200+ models), NovitaAI (AI-native cloud for Model API, Agent Sandbox, and GPU Cloud), NVIDIA NIM (Nemotron), Xiaomi MiMo, z.ai/GLM, Kimi/Moonshot, MiniMax, Hugging Face, OpenAI, or your own endpoint. Switch with hermes model — no code changes, no lock-in.

A real terminal interfaceFull TUI with multiline editing, slash-command autocomplete, conversation history, interrupt-and-redirect, and streaming tool output.
Lives where you doTelegram, Discord, Slack, WhatsApp, Signal, and CLI — all from a single gateway process. Voice memo transcription, cross-platform conversation continuity.
A closed learning loopAgent-curated memory with periodic nudges. Autonomous skill creation after complex tasks. Skills self-improve during use. FTS5 session search with LLM summarization for cross-session recall. Honcho dialectic user modeling. Compatible with the agentskills.io open standard.
Scheduled automationsBuilt-in cron scheduler with delivery to any platform. Daily reports, nightly backups, weekly audits — all in natural language, running unattended.
Delegates and parallelizesSpawn isolated subagents for parallel workstreams. Write Python scripts that call tools via RPC, collapsing multi-step pipelines into zero-context-cost turns.
Runs anywhere, not just your laptopSix terminal backends — local, Docker, SSH, Singularity, Modal, and Daytona. Daytona and Modal offer serverless persistence — your agent's environment hibernates when idle and wakes on demand, costing nearly nothing between sessions. Run it on a $5 VPS or a GPU cluster.
Research-readyBatch trajectory generation, trajectory compression for training the next generation of tool-calling models.

Quick Install

Linux, macOS, WSL2, Termux

curl -fsSL https://hermes-agent.nousresearch.com/install.sh | bash

Windows (native, PowerShell)

Heads up: Native Windows runs Hermes without WSL — CLI, gateway, TUI, and tools all work natively. If you'd rather use WSL2, the Linux/macOS one-liner above works there too. Found a bug? Please file issues.

Run this in PowerShell:

iex (irm https://hermes-agent.nousresearch.com/install.ps1)

The installer handles everything: uv, Python 3.11, Node.js, ripgrep, ffmpeg, and a portable Git Bash (MinGit, unpacked to %LOCALAPPDATA%\hermes\git — no admin required, completely isolated from any system Git install). Hermes uses this bundled Git Bash to run shell commands.

If you already have Git installed, the installer detects it and uses that instead. Otherwise a ~45MB MinGit download is all you need — it won't touch or interfere with any system Git.

Android / Termux: The tested manual path is documented in the Termux guide. On Termux, Hermes installs a curated .[termux] extra because the full .[all] extra currently pulls Android-incompatible voice dependencies.

Windows: Native Windows is fully supported — the PowerShell one-liner above installs everything. If you'd rather use WSL2, the Linux command works there too. Native Windows install lives under %LOCALAPPDATA%\hermes; WSL2 installs under ~/.hermes as on Linux. The only Hermes feature that currently needs WSL2 specifically is the browser-based dashboard chat pane (it uses a POSIX PTY — classic CLI and gateway both run natively).

After installation:

source ~/.bashrc    # reload shell (or: source ~/.zshrc)
hermes              # start chatting!

Getting Started

hermes              # Interactive CLI — start a conversation
hermes model        # Choose your LLM provider and model
hermes tools        # Configure which tools are enabled
hermes config set   # Set individual config values
hermes gateway      # Start the messaging gateway (Telegram, Discord, etc.)
hermes setup        # Run the full setup wizard (configures everything at once)
hermes claw migrate # Migrate from OpenClaw (if coming from OpenClaw)
hermes update       # Update to the latest version
hermes doctor       # Diagnose any issues

📖 Full documentation →


Skip the API-key collection — Nous Portal

Hermes works with whatever provider you want — that's not changing. But if you'd rather not collect five separate API keys for the model, web search, image generation, TTS, and a cloud browser, Nous Portal covers all of them under one subscription:

  • 300+ models — pick any of them with /model <name>
  • Tool Gateway — web search (Firecrawl), image generation (FAL), text-to-speech (OpenAI), cloud browser (Browser Use), all routed through your sub. No extra accounts.

One command from a fresh install:

hermes setup --portal

That logs you in via OAuth, sets Nous as your provider, and turns on the Tool Gateway. Check what's wired up any time with hermes portal info. Full details on the Tool Gateway docs page.

You can still bring your own keys per-tool whenever you want — the gateway is per-backend, not all-or-nothing.


CLI vs Messaging Quick Reference

Hermes has two entry points: start the terminal UI with hermes, or run the gateway and talk to it from Telegram, Discord, Slack, WhatsApp, Signal, or Email. Once you're in a conversation, many slash commands are shared across both interfaces.

Action CLI Messaging platforms
Start chatting hermes Run hermes gateway setup + hermes gateway start, then send the bot a message
Start fresh conversation /new or /reset /new or /reset
Change model /model [provider:model] /model [provider:model]
Set a personality /personality [name] /personality [name]
Retry or undo the last turn /retry, /undo /retry, /undo
Compress context / check usage /compress, /usage, /insights [--days N] /compress, /usage, /insights [days]
Browse skills /skills or /<skill-name> /<skill-name>
Interrupt current work Ctrl+C or send a new message /stop or send a new message
Platform-specific status /platforms /status, /sethome

For the full command lists, see the CLI guide and the Messaging Gateway guide.


Documentation

All documentation lives at hermes-agent.nousresearch.com/docs:

Section What's Covered
Quickstart Install → setup → first conversation in 2 minutes
CLI Usage Commands, keybindings, personalities, sessions
Configuration Config file, providers, models, all options
Messaging Gateway Telegram, Discord, Slack, WhatsApp, Signal, Home Assistant
Security Command approval, DM pairing, container isolation
Tools & Toolsets 40+ tools, toolset system, terminal backends
Skills System Procedural memory, Skills Hub, creating skills
Memory Persistent memory, user profiles, best practices
MCP Integration Connect any MCP server for extended capabilities
Cron Scheduling Scheduled tasks with platform delivery
Context Files Project context that shapes every conversation
Architecture Project structure, agent loop, key classes
Contributing Development setup, PR process, code style
CLI Reference All commands and flags
Environment Variables Complete env var reference

Migrating from OpenClaw

If you're coming from OpenClaw, Hermes can automatically import your settings, memories, skills, and API keys.

During first-time setup: The setup wizard (hermes setup) automatically detects ~/.openclaw and offers to migrate before configuration begins.

Anytime after install:

hermes claw migrate              # Interactive migration (full preset)
hermes claw migrate --dry-run    # Preview what would be migrated
hermes claw migrate --preset user-data   # Migrate without secrets
hermes claw migrate --overwrite  # Overwrite existing conflicts

What gets imported:

  • SOUL.md — persona file
  • Memories — MEMORY.md and USER.md entries
  • Skills — user-created skills → ~/.hermes/skills/openclaw-imports/
  • Command allowlist — approval patterns
  • Messaging settings — platform configs, allowed users, working directory
  • API keys — allowlisted secrets (Telegram, OpenRouter, OpenAI, Anthropic, ElevenLabs)
  • TTS assets — workspace audio files
  • Workspace instructions — AGENTS.md (with --workspace-target)

See hermes claw migrate --help for all options, or use the openclaw-migration skill for an interactive agent-guided migration with dry-run previews.


Contributing

We welcome contributions! See the Contributing Guide for development setup, code style, and PR process.

Quick start for contributors — clone and go with setup-hermes.sh:

git clone https://github.com/NousResearch/hermes-agent.git
cd hermes-agent
./setup-hermes.sh     # installs uv, creates venv, installs .[all], symlinks ~/.local/bin/hermes
./hermes              # auto-detects the venv, no need to `source` first

Manual path (equivalent to the above):

curl -LsSf https://astral.sh/uv/install.sh | sh
uv venv .venv --python 3.11
source .venv/bin/activate
uv pip install -e ".[all,dev]"
scripts/run_tests.sh

Community

  • 💬 Discord
  • 📚 Skills Hub
  • 🐛 Issues
  • 🔌 computer-use-linux — Linux desktop-control MCP server for Hermes and other MCP hosts, with AT-SPI accessibility trees, Wayland/X11 input, screenshots, and compositor window targeting.
  • 🔌 HermesClaw — Community WeChat bridge: Run Hermes Agent and OpenClaw on the same WeChat account.

License

MIT — see LICENSE.

Built by Nous Research.