Skip to content

Architecture Overview

源码版本v2026.7.20

Hermes Agent is an open-source (MIT) desktop AI agent by Nous Research, positioned as "a persistent agent that grows with you": a message arrives from Telegram/Discord/Slack/etc, the core loop calls the model + tools to complete the task, and the experience is distilled into memory and skills for reuse next time.

Layered View

Each layer in one sentence

  • UI Layer: TUI / CLI / Web / ACP (editor protocol) — just entry points, hold no business logic.
  • Gateway: gateway/run.py unifies access; platforms are adapters; session/delivery separated; streams and hooks pluggable.
  • Core Loop: run_conversation orchestrates "model call → tool call → result backfill → budget decrement", with fallback on failure.
  • Capabilities: Tools are atomic functions (tools/registry.py); Skills are higher-order evolvable flows (rewritten by the learning loop); Provider/MCP/Plugins supply models and external capabilities.
  • Scheduling: Cron drives timed tasks, Subagent delegates in isolation (zero context cost), 6 sandbox backends isolate execution.
  • Learning Loop: Distills conversation experience into skills and a user model — the flywheel behind "better the more you use it".

Suggested reading order

  1. Startup & Entry — how a command becomes a running agent
  2. Main Loop — what happens when a message arrives
  3. Capabilities — the difference between tools and skills
  4. Gateway — how multi-platform delivery works
  5. Scheduling — automation and isolation
  6. Learning Loop — the self-improvement mechanism

Unofficial community learning site. Content based on the MIT-licensed NousResearch/hermes-agent source.