Hermes-LCM: A SQLite-Backed DAG Context Engine That Keeps Every Message
Lossless Context Management plugin for Hermes Agent, DAG-based context engine that never loses a message.
At a glance
- What is it?
- Hermes-LCM replaces Hermes Agent's lossy prompt compression with a plugin-local SQLite store and summary DAG. It gives agents recall tools to recover exact detail after compaction, but the trade-off is operational complexity and a dependency on a specific agent framework.
- Who is it for?
- Adopt hermes-lcm if you run Hermes Agent and need bounded prompts without losing access to raw conversation detail, especially for long-running autonomous tasks where drill-down recall matters. Do not adopt it if you rely on Hermes core's built-in compression and have no need for structured recovery, or if you cannot accept the operational overhead of a plugin-local SQLite store, DAG maintenance, and opt-in feature families that are off by default.
- Can I use it commercially?
- Yes. MIT is a permissive licence: you can use, modify and sell software built on it, as long as you keep its copyright and licence notices.
- Is it still maintained?
- Yes. The repository last received commits 5 days ago.
- What is it written in?
- Mainly Python, according to GitHub's language statistics.
Answers come from the project's GitHub data, last synced on September 14, 2026, and from our analysis. They are not legal advice.
DEEP OPEN-SOURCE ANALYSIS
The Problem: Built-In Compression Is Lossy in the Active Context
The plugin does not claim that Hermes core has no persisted record. The README is explicit: do not claim that Hermes core lacks pre-compression history. Instead, the difference is that recall is part of the active context engine, not an auxiliary cross-session search step.
The Mechanism: SQLite Store, Summary DAG, and Bounded Recovery
The README lists 15 agent tools: lcm_grep, lcm_recall, lcm_query_state, lcm_compute, lcm_compile_evidence, lcm_evidence_pack, lcm_retrieve, lcm_recent, lcm_load_session, lcm_describe, lcm_expand, lcm_expand_query, lcm_status, lcm_inspect, and lcm_doctor. These tools give the agent a way to search, page through, and expand compacted material. The architecture is plugin-local, meaning it is separate from Hermes state.db. This isolation is a double-edged sword: it preserves raw messages even if Hermes core rewrites its own state, but it also means the plugin must manage its own storage lifecycle.
Getting It Running: Install, Activate, and Verify
Prerequisites are Hermes Agent, Python 3.11+, and no required third-party runtime dependencies. tiktoken is used if available; otherwise LCM falls back to character-based token estimates. The regex package is used if available to apply timeouts to message ignore patterns. Without it, message-level regex filtering is disabled with a warning rather than running unbounded stdlib re matches. This is a pragmatic fallback, but it means token estimates may be imprecise without tiktoken, and regex filtering is off without regex. The README does not specify how to verify the plugin loaded beyond the truncated section. The verification step is cut off in the material, so you should check the plugin's own logs or run lcm_status after restart.
Opt-In Feature Families: Externalization, Temporal Memory, Semantic Retrieval
Beyond the core compression loop, three feature families are opt-in and default-off. The first is large-output externalization and context-budget controls. Giant tool results move to recoverable refs instead of crowding the prompt. This is useful for agents that call tools returning megabytes of data. The second is temporal memory: day, week, and month rollups plus natural-time recall through lcm_recent. This turns LCM from a compression layer into a memory system that can answer questions like 'what did we do last Tuesday?' without scanning the entire history. The third is semantic retrieval: embedding-backed lcm_grep semantic and hybrid modes with free-tier cloud or fully-local providers. This adds a vector search layer on top of the DAG. The README points to docs/features-overview.md for details and docs/agent-config-profiles.md for copy-paste setups per agent type. These features are not enabled by default, which is a deliberate choice to keep the core loop simple. But it also means that to get the full memory-system benefit, you must configure each family yourself. The README does not give the exact config keys for these features in the provided material, so you would need to read those docs to enable them.
Limitations and Failure Modes
The most obvious limitation is that this plugin is tied to Hermes Agent. It is not a standalone context manager. If you are not using Hermes, this is the wrong tool. Even within Hermes, the plugin has a real failure mode: it depends on being the active context engine. If you configure the plugin but forget to set context.engine to lcm, the plugin may load but the built-in compressor still runs, and you get no benefit. The README explicitly requires both the plugin manifest name and the runtime engine name. Another limitation is the reliance on tiktoken and regex as optional dependencies. Without tiktoken, token estimates are character-based, which can lead to inaccurate prompt-budget calculations. Without regex, message-level regex filtering is disabled entirely. This is a silent degradation: the plugin still runs, but with reduced capability. The README also mentions 'protect SQLite from inline media-ish base64 blobs' and 'externalize oversized tool/media/raw payloads.' This suggests that without externalization, large base64 blobs could bloat the SQLite store. The README does not specify a default size threshold, so you must configure it. Finally, the plugin is under active development with release candidates like v0.21.0-rc2. That implies API instability. A plugin that changes its internal schema or tool signatures between releases could break your agent's workflows.
Alternatives: Built-In Compression and lossless-claw
The direct alternative is Hermes Agent's built-in compressor. It is simpler: no plugin install, no separate SQLite store, no DAG. It prunes and summarizes, and the original rows stay in state.db, searchable via host tools like session_search. The difference is that built-in compression does not give the active model a structured drill-down path. Hermes-LCM's README is careful to say that Hermes core may persist history, so the alternative is not 'lossy storage' but 'lossy active context.' If you only need occasional recovery, built-in compression plus session_search may be enough. Another alternative is lossless-claw for OpenClaw, which inspired this plugin. It is a similar idea but for a different agent framework. If you are on OpenClaw, lossless-claw is the direct analogue. The difference is that lossless-claw is not a plugin for Hermes; it is a separate project with its own integration. For a user on Hermes, lossless-claw is not a drop-in replacement. The choice comes down to your agent framework and how much you value the DAG-based drill-down over a simple summary.
Maintenance, Upgrade Cost, and License
The project is MIT-licensed, which is permissive and allows commercial use with attribution. There are no obvious copyleft obligations. The release cadence is active: v0.19.0 in July 2026, v0.20.0 in late July, and v0.21.0-rc2 in August 2026. That is roughly a release per month. This is a sign of active development, but it also means you should expect breaking changes. The README mentions a backup-first repair and rotate path in the diagnostics section, which suggests that upgrading may involve database migrations or schema changes. The plugin has an lcm_doctor tool for runtime health and database checks. That is a good sign for maintenance, but it does not eliminate the need to test upgrades in a staging profile before applying to production. The installer script refuses conflicts and preflights paths, which reduces install-time errors, but it does not handle version upgrades automatically. You will need to re-run the installer after pulling new commits. The README does not describe a migration path from v0.19 to v0.21, so you should check the release notes for each version before upgrading. The plugin also has an OpenClaw/lossless-claw import feature, which could help migrate from that project, but the details are truncated in the provided material.
Editorial conclusion
Adopt hermes-lcm if you run Hermes Agent and need bounded prompts without losing access to raw conversation detail, especially for long-running autonomous tasks where drill-down recall matters. Do not adopt it if you rely on Hermes core's built-in compression and have no need for structured recovery, or if you cannot accept the operational overhead of a plugin-local SQLite store, DAG maintenance, and opt-in feature families that are off by default. Before adopting, verify that your Hermes version supports the context engine interface, confirm Python 3.11+ is available, and test the plugin in a non-production profile with a realistic workload to measure storage growth and recall latency. The project is MIT-licensed and under active release cadence, so check the latest release notes for breaking changes before upgrading.
Community notes