Hermes Context Manager (HMC)
HMC automatically optimizes your conversation context in the background.
You don't need to manage context yourself.
What HMC Does Automatically
- Short-circuits success patterns (test results, file writes, git
output) into one-liners
- Code-aware compression strips function and class bodies from tool
outputs containing source code, keeping signatures, imports, and
docstrings. Supports Python, Rust, Go, JavaScript, and TypeScript.
- Head/tail truncation keeps the first and last N lines of long
outputs with a gap marker
- Deduplicates repeated tool calls with identical or similar outputs
- Purges old error outputs after they're no longer relevant
- Background compression summarizes old completed work via an
auxiliary model when context pressure is high (never the main model)
Available Actions (via hmc_control tool)
| Action |
Description |
status |
Compact one-liner overview: mode, context %, savings, tool count |
context |
Detailed context window stats (tokens, window, percent, counts) |
stats |
Token savings breakdown by strategy (short_circuit, truncation, code_filter, dedup, error_purge, background_compression) |
index |
List indexed completed-work entries for the current session |
analytics |
Cumulative savings from the SQLite analytics store. Supports scope=global|project, period=all|day|month|recent|project, and limit |
dashboard |
Live web dashboard lifecycle. sub_action=start launches a localhost HTTP+SSE server and returns the URL; stop shuts it down; status (default) reports whether it's running |
sweep |
Manually prune tool outputs. Optional count limits how many; respects the protected list |
manual_set |
Toggle manual mode via enabled: bool. In manual mode, automatic strategies are gated by manual_mode.automatic_strategies |
manual_status |
Report whether the plugin is in manual mode |
Live Dashboard
For watching savings roll in as the model works:
/hmc dashboard action=start
→ {"running": true, "url": "http://127.0.0.1:48800/", ...}
Open the URL in a browser. The page streams turn, tool-call, and
session-end events via Server-Sent Events and shows:
- Current session: saved tokens, context %, turn count
- Lifetime totals from the SQLite analytics store
- Per-strategy bar breakdown
- Recent sessions ("workhorses") table with short ID, time,
context %, tool count, savings, and per-strategy breakdown
- Live event log with per-tool heartbeats during agent loops
The server binds to 127.0.0.1 only and has no auth — it is not
designed for remote exposure.
Historical Analytics
Token savings are persisted across sessions in a SQLite store at
~/.hermes/hmc_state/analytics.db. Query the cumulative totals at any
time:
/hmc analytics → global all-time summary
/hmc analytics scope=project → current project only
/hmc analytics period=day limit=30 → last 30 days daily breakdown
/hmc analytics period=month → last 12 calendar months
/hmc analytics period=recent limit=5 → most recent 5 sessions
/hmc analytics period=project → top projects by savings
Source: entrepeneur4lyf/hermes-context-manager — distributed by TomeVault.
1---2name: hmc3description: Hermes Context Manager — automatic context optimization Use when this capability is needed.4---56# Hermes Context Manager (HMC)78HMC automatically optimizes your conversation context in the background.9You don't need to manage context yourself.1011## What HMC Does Automatically1213- **Short-circuits** success patterns (test results, file writes, git14 output) into one-liners15- **Code-aware compression** strips function and class bodies from tool16 outputs containing source code, keeping signatures, imports, and17 docstrings. Supports Python, Rust, Go, JavaScript, and TypeScript.18- **Head/tail truncation** keeps the first and last N lines of long19 outputs with a gap marker20- **Deduplicates** repeated tool calls with identical or similar outputs21- **Purges** old error outputs after they're no longer relevant22- **Background compression** summarizes old completed work via an23 auxiliary model when context pressure is high (never the main model)2425## Available Actions (via `hmc_control` tool)2627| Action | Description |28|-----------------|-------------|29| `status` | Compact one-liner overview: mode, context %, savings, tool count |30| `context` | Detailed context window stats (tokens, window, percent, counts) |31| `stats` | Token savings breakdown by strategy (short_circuit, truncation, code_filter, dedup, error_purge, background_compression) |32| `index` | List indexed completed-work entries for the current session |33| `analytics` | Cumulative savings from the SQLite analytics store. Supports `scope=global\|project`, `period=all\|day\|month\|recent\|project`, and `limit` |34| `dashboard` | Live web dashboard lifecycle. `sub_action=start` launches a localhost HTTP+SSE server and returns the URL; `stop` shuts it down; `status` (default) reports whether it's running |35| `sweep` | Manually prune tool outputs. Optional `count` limits how many; respects the protected list |36| `manual_set` | Toggle manual mode via `enabled: bool`. In manual mode, automatic strategies are gated by `manual_mode.automatic_strategies` |37| `manual_status` | Report whether the plugin is in manual mode |3839## Live Dashboard4041For watching savings roll in as the model works:4243```44/hmc dashboard action=start45→ {"running": true, "url": "http://127.0.0.1:48800/", ...}46```4748Open the URL in a browser. The page streams turn, tool-call, and49session-end events via Server-Sent Events and shows:5051- Current session: saved tokens, context %, turn count52- Lifetime totals from the SQLite analytics store53- Per-strategy bar breakdown54- Recent sessions ("workhorses") table with short ID, time,55 context %, tool count, savings, and per-strategy breakdown56- Live event log with per-tool heartbeats during agent loops5758The server binds to `127.0.0.1` only and has no auth — it is not59designed for remote exposure.6061## Historical Analytics6263Token savings are persisted across sessions in a SQLite store at64`~/.hermes/hmc_state/analytics.db`. Query the cumulative totals at any65time:6667```68/hmc analytics → global all-time summary69/hmc analytics scope=project → current project only70/hmc analytics period=day limit=30 → last 30 days daily breakdown71/hmc analytics period=month → last 12 calendar months72/hmc analytics period=recent limit=5 → most recent 5 sessions73/hmc analytics period=project → top projects by savings74```7576---77> Source: [entrepeneur4lyf/hermes-context-manager](https://github.com/entrepeneur4lyf/hermes-context-manager) — distributed by [TomeVault](https://tomevault.io).78<!-- tomevault:4.0:skill_md:2026-06-20 -->