hermes-concepts
Skill4 starsChanged 7 months agoMITView on GitHub
Use when understanding Hermes architecture, concepts, or design. Covers: session system, context management, compression, bootstrap files, agent loop, lifecycle, profiles, checkpointing, context injection. Triggers on: concept, architecture, session, context, bootstrap, compression, lifecycle, how hermes works.
In this repository22 other files it gives its agents.
- hermes-channelsSkill
- hermes-cliSkill
- hermes-configSkill
- hermes-cronSkill
- hermes-delegationSkill
- hermes-gatewaySkill
- hermes-hooksSkill
- hermes-installSkill
- hermes-loggingSkill
- hermes-masterSkill
- hermes-mcpSkill
- hermes-memorySkill
- hermes-platformsSkill
- hermes-providersSkill
- hermes-securitySkill
- hermes-skill-authoringSkill
- hermes-skillsSkill
- hermes-soulSkill
- hermes-toolsSkill
- hermes-troubleshootingSkill
- hermes-voiceSkill
- hermitdoc-onboardingSkill
The file
We split this skill into the rules it gives an agent
2 rules. About 0 are common, 2 are distinctive, and 0 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈2
Distinctive · estimate
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 69
When a session starts, context is assembled in this order:
- Distinctive: line 95
When context reaches threshold, Hermes compresses:
≈ “Common” is an estimate: at least 1 in 5 of the 213,897 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Hermes Concepts Reference
Deep dive into Hermes Agent's core concepts and architecture.
Agent Loop
The core Hermes execution cycle:
- User Input → Message, voice, or platform event
- Context Assembly → Bootstrap files + session history + memory
- LLM Inference → Model generates response
- Tool Calls → Execute tools as needed
- Response → Send back to user/platform
- State Update → Update session, memory, compression if needed
- Loop → Continue until task complete or max_turns
Session System
Sessions track conversation context:
~/.hermes/sessions/
├── session-2026-05-18-abc123.json # Active session
├── session-2026-05-17-def456.json # Past sessions
└── ...Session Lifecycle
| Command | Action |
| Start | hermes chat → new session ID |
| Resume | hermes --resume <id> → reload session |
| Compress | /compress → summarize context |
| End | Session stored, new session on reset |
Session Metadata
{
"id": "session-2026-05-18-abc123",
"created": "2026-05-18T10:00:00Z",
"last_active": "2026-05-18T14:30:00Z",
"model": "anthropic/claude-sonnet-4",
"profile": "default",
"source": "cli",
"message_count": 47,
"compressed": false
}Context Management
Context Assembly Order
When a session starts, context is assembled in this order:
- System prompt (from Hermes core)
- SOUL.md (persona)
- USER.md (user profile)
- AGENTS.md (operating instructions)
- Bootstrap files (IDENTITY.md, HEARTBEAT.md, MEMORY.md, TOOLS.md)
- Memory entries (from
session_search) - Session history (conversation turns)
- Current input
Context Window
Context window is limited by model's context_length:
| Model | Context Window |
| Claude 3.5 Sonnet | 200K tokens |
| Gemini 2.0 Flash | 1M tokens |
| DeepSeek Chat V3 | 64K tokens |
| Llama 3.1 | 128K tokens |
Hermes manages context automatically via compression.
Compression
When context reaches threshold, Hermes compresses:
compression:
enabled: true
threshold: 0.50 # compress at 50% of context
target_ratio: 0.20 # compress to 20% of originalCompression Process
- Identify least-recent relevant messages
- Generate summary of those messages
- Replace message sequence with summary
- Preserve critical context (user prefs, active tasks)
- Continue session with compressed history
Manual Compression
/compress # Force immediate compression
/reset # Clear and start fresh (no compression)Bootstrap Files
Injected on first turn of each session:
| File | Purpose |
SOUL.md | Persona, tone, boundaries |
USER.md | User profile and preferences |
AGENTS.md | Operating instructions |
IDENTITY.md | Name, emoji, display info |
HEARTBEAT.md | Periodic background tasks |
MEMORY.md | Persistent memory entries |
TOOLS.md | Tool notes and usage patterns |
These files live in ~/.hermes/ and are loaded at session start.
Agent Loop Lifecycle
┌─────────────────────────────────────────────────┐
│ Session Start │
│ Load SOUL.md, USER.md, bootstrap files │
│ Load memory, session history │
└────────────────────┬────────────────────────────┘
│
┌───────────▼───────────┐
│ User Input │
└───────────┬───────────┘
│
┌───────────▼───────────┐
│ Context Assembly │◄── Session history
│ + Memory │◄── session_search
│ + Bootstrap files │
└───────────┬───────────┘
│
┌───────────▼───────────┐
│ LLM Inference │
│ (tool calls) │
└───────────┬───────────┘
│
┌───────────▼───────────┐
│ Tool Execution │
│ (terminal, file, │
│ web, etc.) │
└───────────┬───────────┘
│
┌──────┴──────┐
│ Compressed? │─── Yes ──► Compress and continue
└──────┬──────┘
│ No
┌───────────▼───────────┐
│ Response Output │
│ (text, voice, │
│ platform msg) │
└───────────┬───────────┘
│
┌───────────▼───────────┐
│ Max turns reached? │─── Yes ──► End session
└───────────┬───────────┘
│ No
└──► Back to User InputCheckpoints
Filesystem snapshots for rollback:
hermes config set checkpoints.enabled true
hermes config set checkpoints.max_snapshots 50# Create manual checkpoint
/rollback
# List checkpoints
ls ~/.hermes/checkpoints/
# Restore checkpoint
/rollback 2 # restore 2nd most recentProfiles
Isolated configurations and state:
~/.hermes/
├── config.yaml # Default config
├── profiles/
│ ├── dev/
│ │ ├── config.yaml
│ │ ├── SOUL.md
│ │ ├── skills/
│ │ └── sessions/
│ └── prod/
│ └── ...Profile Switching
hermes chat --profile dev
hermes profile use devAgent vs Subagent
| Aspect | Hermes Agent | Subagent (delegate_task) |
| Session | Full session with history | Fresh, isolated context |
| Tools | All enabled toolsets | Configurable subset |
| User interaction | Can ask questions | Cannot (self-contained) |
| Lifespan | Long-lived | Task-scoped |
| Memory | Cross-session | Session-only |
| Use case | Ongoing assistance | Parallel work, isolation |
References
Structured reference docs:
- Decision Flow — Agent loop visualization
- Session Lifecycle — Session management
- Context Assembly — Context priority order
Related skills:
hermes-master/— routing and overviewhermes-config/— config keyshermes-soul/— persona systemhermes-memory/— memory architecturehermes-delegation/— subagent patterns- Official concepts docs: https://hermes-agent.nousresearch.com/docs/architecture
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

