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.pyunifies access; platforms are adapters; session/delivery separated; streams and hooks pluggable. - Core Loop:
run_conversationorchestrates "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
- Startup & Entry — how a command becomes a running agent
- Main Loop — what happens when a message arrives
- Capabilities — the difference between tools and skills
- Gateway — how multi-platform delivery works
- Scheduling — automation and isolation
- Learning Loop — the self-improvement mechanism