hermes-lcm
stephenschoettler/hermes-lcm
Lossless context management plugin that stores every message in SQLite and compacts into a summary DAG
hermes-lcm is a plugin for Hermes Agent that replaces one-shot context compression with a SQLite-backed, DAG-based context engine. It keeps the live prompt bounded while preserving raw messages and giving the agent tools to recover exact detail after compaction.
What hermes-lcm does
Hermes Agent's built-in compressor prunes older tool results and asks an auxiliary model to summarize the older conversation once the prompt crosses a threshold, so the compacted turns are no longer verbatim in the model's context. hermes-lcm replaces that step. It persists raw messages in a plugin-local SQLite store, compacts older context into depth-aware summary nodes, and condenses those into a hierarchical DAG as they accumulate.
The active prompt is assembled from the system prompt, the highest-value summaries and a protected fresh tail. The agent gets recall tools such as lcm_grep, lcm_expand and lcm_describe to search and page back through compacted material. Optional controls cover ignored or read-only sessions, externalized large payloads and redaction of API keys and passwords. The design follows the LCM paper by Ehrlich and Blackman and is inspired by lossless-claw for OpenClaw.
Key features
- SQLite message store that preserves raw messages before compaction
- Depth-aware summary DAG that keeps source lineage
- Recall tools including lcm_grep, lcm_recall, lcm_expand and lcm_status
- Session controls to ignore noisy sessions or keep them read-only using glob patterns
- Optional named redaction of API keys, bearer tokens, passwords and private keys
- Diagnostics through lcm_doctor and optional /lcm slash commands
When to use it
- Long Hermes Agent sessions where compaction would otherwise drop exact earlier details
- Finding a specific earlier message or tool output after the context was compacted
- Importing history from OpenClaw's lossless-claw, which the README covers in an import section
Who it is for: Hermes Agent users who run long sessions and need exact detail to survive context compaction.
How it fits with Hermes Agent
Built for Hermes Agent as a plugin that replaces the built-in context compressor with its own context engine.
FAQ
What is hermes-lcm?
hermes-lcm is a Lossless Context Management plugin for Hermes Agent. It stores raw messages in SQLite, builds a DAG of summaries, and gives the agent tools to expand compacted material.
Does hermes-lcm work with Hermes Agent?
Yes, it is written as a plugin for Hermes Agent and replaces the built-in compression step with its own context engine. The agent keeps a bounded live prompt and can recover raw messages through the lcm tools.
Is hermes-lcm free and open source?
Yes, the repository is released under the MIT license.
Similar plugins for Hermes Agent
All pluginsPlugin for Hermes Agent that adds workflow gates, model setup and project memory around native skills
42-evey Evey's Hermes Plugins23 plugins for hermes-agent covering autonomy, observability, cost control, safety and memory
robbyczgw-cla Web Search PlusHermes plugin for multi-provider web search and clean page extraction with automatic fallback
stainlu Hermes LabyrinthRead-only observability dashboard plugin for Hermes Agent that maps journeys, tool calls and failures
ogallotti rtk-hermesHermes Agent plugin that rewrites shell commands through RTK to cut tokens in tool output
Humalike Humalike PluginHermes Agent plugin that adds turn-taking, persona and social learning for group chats
Related guides: How to install Hermes Agent · How to run Hermes Agent securely