A context management plugin for OpenClaw that keeps every message in SQLite and replaces truncation with DAG-based summaries.
stephenschoettler/hermes-lcm
A lossless context management plugin for Hermes Agent that stores every message in SQLite and builds a summary DAG so agents can recall compacted history.
- Stars
- 1,316
- Forks
- 189
- Open issues
- 237
- Last commit
- 21 days ago
What is it?
hermes-lcm is a context engine plugin for Hermes Agent that replaces one-shot prompt compression with a persistent, DAG-based approach. Raw messages are saved to a plugin-local SQLite store before compaction, older context is summarized into depth-aware nodes, and those summaries are condensed hierarchically as they accumulate. The live prompt stays bounded while the original messages remain recoverable.
The agent gets a set of tools to search, inspect, and expand compacted material: keyword search over messages and summaries, paged recovery of source messages, cross-session recall, time-bounded summary retrieval, and diagnostics. Large tool outputs and media payloads can be externalized to referenced files, and optional redaction of API keys, tokens, and passwords applies before storage.
The plugin is configured through environment variables and Hermes config, with a compaction threshold, fresh-tail size, session ignore and read-only patterns, and optional semantic retrieval using embeddings. It also includes a script for importing OpenClaw / lossless-claw histories.
Key features
- 01Saves raw messages to a local SQLite store before compaction, so originals stay recoverable.
- 02Builds hierarchical summary nodes that link back to their source messages.
- 03Provides tools for keyword search, paged message recovery, and summary expansion.
- 04Externalizes oversized tool outputs and media payloads to referenced files.
- 05Supports optional redaction of API keys, bearer tokens, passwords, and private keys.
- 06Includes diagnostics and backup-first repair commands.
Use cases
- Long-running Hermes Agent sessions where important early details must remain retrievable after compaction.
- Keeping the active prompt small on large-context models without losing access to older conversation history.
- Migrating conversation archives from OpenClaw or lossless-claw into a Hermes setup.
- Excluding noisy cron or automated sessions from storage while keeping the main conversation recoverable.
Quick start
- 1
Clone the plugin into your Hermes plugins directory
git clone https://github.com/stephenschoettler/hermes-lcm ~/.hermes/plugins/hermes-lcm - 2
Enable the hermes-lcm plugin and set the context engine to lcm in your Hermes config, then restart Hermes
- 3
Check that the plugin and context engine loaded
hermes plugins
Things to know
- It is a plugin for Hermes Agent and does not work on its own.
- The v1.0.0-rc.1 release candidate adds new features that stay off until you opt in.
In collections
Topics
FAQ
- What is hermes-lcm?
- A lossless context management plugin for Hermes Agent that stores every message in SQLite and builds a summary DAG so agents can recall compacted history. hermes-lcm is a context engine plugin for Hermes Agent that replaces one-shot prompt compression with a persistent, DAG-based approach. Raw messages are saved to a plugin-local SQLite store before compaction, older context is summarized into depth-aware nodes, and those summaries are condensed hierarchically as they accumulate. The live prompt stays bounded while the original messages remain recoverable.
- Is hermes-lcm free to use? What license does it have?
- hermes-lcm is open source under the MIT license. Check the license terms before using it in commercial products.
- Is hermes-lcm still maintained?
- Actively maintained. The last commit to hermes-lcm was on Oct 17, 2026.
- What can I use hermes-lcm for?
- Long-running Hermes Agent sessions where important early details must remain retrievable after compaction. Keeping the active prompt small on large-context models without losing access to older conversation history. Migrating conversation archives from OpenClaw or lossless-claw into a Hermes setup. Excluding noisy cron or automated sessions from storage while keeping the main conversation recoverable.
- How do I install hermes-lcm?
- Clone the plugin into your Hermes plugins directory: git clone https://github.com/stephenschoettler/hermes-lcm ~/.hermes/plugins/hermes-lcm Enable the hermes-lcm plugin and set the context engine to lcm in your Hermes config, then restart Hermes Check that the plugin and context engine loaded: hermes plugins
- Where can I get hermes-lcm?
- The source code and installation instructions are on GitHub: https://github.com/stephenschoettler/hermes-lcm
Summary generated by AI from the project's README. GitHub stats refresh daily.
Related projects
A knowledge-graph memory plugin for DeepSeek Harness and OpenClaw that bounds recent context and recalls exact past Q/A across sessions.
Memory and context layer for the DeepSeek Harness agent, with layered runtime memory, searchable project documents, pluggable memory providers and self-evolving skills.
A local-first AI companion daemon for Windows and macOS that keeps long-term memory of you, turns chats into office files, and can extend itself.
An always-on memory and messaging gateway for the DeepSeek Harness agent, reachable from Slack, Discord, Telegram and the terminal.
Self-hosted personal AI assistant with bio-inspired memory that is fused, linked and forgotten over time, exposed over MCP and compatible with OpenClaw skills.