Skip to content
Back to search

hermes-lcm

Lossless Context Management plugin for Hermes Agent — DAG-based context engine that never loses a message

Safety scan

A static text scan, not a guarantee. Select the badge to see what was scanned and every finding.

Checked today
Badge for your README
findsafeskills safety rating

Markdown

[![findsafeskills safety rating](/api/listings/stephenschoettler--hermes-lcm/badge.svg)](/listings/stephenschoettler--hermes-lcm)

HTML

<a href="/listings/stephenschoettler--hermes-lcm"><img src="/api/listings/stephenschoettler--hermes-lcm/badge.svg" alt="findsafeskills safety rating" /></a>

Install

i

Install instructions from the README

As written by the repo's author. findsafeskills has not verified these steps.

Prerequisites

- Hermes Agent - Python 3.11+ - No required third-party runtime dependencies

`tiktoken` is used if available; otherwise LCM falls back to character-based token estimates. `regex` 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.

The versioned [host-owned dependency contract](docs/dependency-assurance.md) lists every shipped runtime import, supported host/Python versions, ownership, and the mechanical validation command. It is an assurance boundary, not a claim that the host's resolved environment is free of known vulnerabilities.

Install the plugin

Canonical install path: clone `hermes-lcm` as a general user plugin.

git clone https://github.com/stephenschoettler/hermes-lcm \
  ~/.hermes/plugins/hermes-lcm

For a profile-specific install:

git clone https://github.com/stephenschoettler/hermes-lcm \
  ~/.hermes/profiles/myprofile/plugins/hermes-lcm

From an existing checkout, install a symlink:

./scripts/install.sh

# Optional profile-aware install:
HERMES_PROFILE=myprofile ./scripts/install.sh

Run `scripts/install.sh` even when the checkout already lives at the canonical plugin path. It leaves that checkout in place and exposes the bundled `hermes-lcm` skill in the matching global/profile `skills/` directory. The installer preflights both paths and refuses conflicts before creating links.

Activate it

The plugin has two names:

- plugin manifest name: `hermes-lcm` - runtime context engine name: `lcm`

Both must be configured:

plugins:
  enabled:
    - hermes-lcm

context:
  engine: lcm

Restart Hermes after changing plugin or context-engine config.

Verify it loaded

Run:

hermes plugins

Expected signals:

- plugin list includes `hermes-lcm` - selected context engine is `lcm` - tool list includes `lcm_grep`, `lcm_recall`, `lcm_recent`, `lcm_load_session`, `lcm_describe`, `lcm_expand`, `lcm_expand_query`, `lcm_status`, `lcm_inspect`, and `lcm_doctor` - the normal available-skills index includes `hermes-lcm`; current hosts can also resolve the explicit plugin-qualified skill `hermes-lcm:hermes-lcm`

Typical output:

Plugins (1):
  ✓ hermes-lcm v1.0.0-rc.1 (15 tools)

Provider Plugins:
  Context Engine: lcm

For source checkouts, `lcm_status`, `/lcm status`, `lcm_inspect`, `lcm_doctor`, and `/lcm doctor` also report the loaded plugin path and best-effort git identity: `plugin_git_commit`, `plugin_git_branch`, and `plugin_git_dirty`.

If startup logs say LCM tools are available through `context-engine schemas` or mention the `Path B fallback`, that is expected on older Hermes hosts such as Hermes Agent v0.16. All 15 `lcm_*` tools remain available through the context-engine path; standalone plugin-registry registration is not required there.

Update it

If you cloned directly into the plugin directory:

cd ~/.hermes/plugins/hermes-lcm && git pull --ff-only

For a profile-specific install:

cd ~/.hermes/profiles/myprofile/plugins/hermes-lcm && git pull --ff-only

If you installed a symlink from a separate checkout:

./scripts/update.sh

Restart Hermes after updating.

For the `v1.0.0-rc.1` line, take a normal backup of `lcm.db` before updating, then update the checkout and restart Hermes. No manual core migration or backfill is required: the core schema remains version 5. New assertion, query-view, and adaptive-retrieval state is additive, created only after the corresponding opt-in is enabled, and stored in the same profile database under named feature markers. The five new query/evidence tool schemas are visible in the tool list on stock installs, but automatic extraction, pre-answer evidence, assertion storage, query-view storage, and adaptive retrieval remain off. See

What was scanned

The files the safety scan read, as written by the repository's author and shown as plain text. Lines with a finding are marked.

README.md · README · 873 lines

View this file on GitHub (read at the repository's current version: the scan did not record which commit it read)

  1. <p align="center">
  2. <img src="docs/banner.png" alt="HERMES-LCM" width="800">
  3. </p>
  4. [![CI](https://github.com/stephenschoettler/hermes-lcm/actions/workflows/ci.yml/badge.svg)](https://github.com/stephenschoettler/hermes-lcm/actions/workflows/ci.yml)
  5. [![Release](https://img.shields.io/github/v/release/stephenschoettler/hermes-lcm)](https://github.com/stephenschoettler/hermes-lcm/releases)
  6. [![Python 3.11-3.14](https://img.shields.io/badge/Python-3.11--3.14-3776AB?logo=python&logoColor=white)](https://github.com/stephenschoettler/hermes-lcm/actions/workflows/ci.yml)
  7. [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](LICENSE)
  8. **Lossless Context Management plugin for [Hermes Agent](https://github.com/NousResearch/hermes-agent).**
  9. > Bounded context, unbounded memory. Nothing is ever lost.
  10. `hermes-lcm` replaces one-shot active-context compression with a SQLite-backed,
  11. DAG-based context engine. It keeps the live prompt bounded, preserves raw
  12. messages, and gives the agent tools to recover exact detail after compaction.
  13. Based on the [LCM paper](https://papers.voltropy.com/LCM) by Ehrlich & Blackman
  14. (Voltropy PBC, Feb 2026). Inspired by
  15. [lossless-claw](https://github.com/martian-engineering/lossless-claw) for
  16. OpenClaw. For an interactive visualization of the LCM idea, see
  17. [losslesscontext.ai](https://losslesscontext.ai/).
  18. ## Table of contents
  19. - [What it does](#what-it-does)
  20. - [LCM vs built-in compression](#lcm-vs-built-in-compression)
  21. - [Quick start](#quick-start)
  22. - [Commands and tools](#commands-and-tools)
  23. - [Recall skill and policy](#recall-skill-and-policy)
  24. - [Configuration](#configuration)
  25. - [Retrieval contract](#retrieval-contract)
  26. - [OpenClaw/lossless-claw import](#openclawlossless-claw-import)
  27. - [Troubleshooting](#troubleshooting)
  28. - [Architecture](#architecture)
  29. - [How it works](#how-it-works)
  30. - [Documentation](#documentation)
  31. - [Development](#development)
  32. - [Contributing](#contributing)
  33. - [License](#license)
  34. ## What it does
  35. Hermes Agent's built-in compressor is a practical continuity layer: when the
  36. prompt crosses its configured threshold, it prunes older tool results, asks an
  37. auxiliary model to summarize the middle/older conversation, and rebuilds the
  38. active prompt from that summary plus a protected recent tail. The original
  39. session rows can still live in Hermes `state.db` and remain searchable through
  40. host tools such as `session_search`, but the model's active context no longer
  41. contains the compacted turns verbatim or a structured drill-down path back to
  42. them.
  43. `hermes-lcm` instead:
  44. 1. **Persists messages** in a plugin-local SQLite store with FTS metadata.
  45. 2. **Compacts older context** into depth-aware summary nodes.
  46. 3. **Condenses summaries** into a hierarchical DAG as they accumulate.
  47. 4. **Assembles active context** from system prompt, highest-value summaries, and
  48. the protected fresh tail.
  49. 5. **Provides recall tools** so agents can search, inspect, and expand compacted
  50. material without flooding the main prompt.
  51. Nothing is lost in normal operation. Raw messages stay recoverable in bounded
  52. pages, summaries retain source lineage, and oversized externalized payloads keep
  53. stable refs for later expansion.
  54. <p align="center">
  55. <img src="docs/standard_compression.png" alt="Standard compression" width="700">
  56. </p>
  57. <p align="center">
  58. <img src="docs/lcm_compression.png" alt="LCM compression" width="700">
  59. </p>
  60. Core capabilities:
  61. - **SQLite message store** - preserves raw messages before compaction
  62. - **Summary DAG** - builds depth-aware summary nodes over compacted history
  63. - **Bounded recovery** - pages raw messages, child summaries, and externalized
  64. payloads instead of dumping everything into the prompt
  65. - **Agent tools** - `lcm_grep`, `lcm_recall`, `lcm_query_state`, `lcm_compute`, `lcm_compile_evidence`, `lcm_evidence_pack`, `lcm_retrieve`, `lcm_recent`, `lcm_load_session`,
  66. `lcm_describe`, `lcm_expand`, `lcm_expand_query`, `lcm_status`, `lcm_inspect`,
  67. and `lcm_doctor`
  68. - **Source-aware retrieval** - filters raw rows and summaries by descendant
  69. source lineage
  70. - **Session controls** - ignore noisy sessions or keep sessions read-only with
  71. glob patterns
  72. - **Large payload controls** - externalize oversized tool/media/raw payloads and
  73. protect SQLite from inline media-ish base64 blobs
  74. - **Sensitive-pattern controls** - optional named redaction of API keys, bearer
  75. tokens, passwords, and private keys before LCM stores or summarizes them
  76. - **Diagnostics** - runtime health, database checks, optional `/lcm` slash
  77. commands, backup-first repair/rotate paths
  78. Beyond the core loop, three opt-in (default-off) feature families extend LCM
  79. from a compression layer into a memory system: **large-output externalization
  80. and context-budget controls** (giant tool results move to recoverable refs
  81. instead of crowding the prompt), **temporal memory** (day/week/month rollups
  82. plus natural-time recall through `lcm_recent`), and **semantic retrieval**
  83. (embedding-backed `lcm_grep` semantic/hybrid modes with free-tier cloud or
  84. fully-local providers). See the
  85. [Feature overview](docs/features-overview.md) for what each family does and
  86. why, and [Agent configuration profiles](docs/agent-config-profiles.md) for
  87. copy-paste setups per agent type.
  88. ## LCM vs built-in compression
  89. Hermes core may persist original conversation history in `state.db` before
  90. built-in compression rewrites the active prompt. Built-in compression can still
  91. be lossy in the active context, but previous content may be recoverable later
  92. through host-level history tools such as `session_search`.
  93. `hermes-lcm` is different because recall is part of the active context engine:
  94. - plugin-local store and DAG built specifically for drill-down
  95. - current-session retrieval through LCM tools, not an auxiliary cross-session
  96. search step
  97. - explicit source-lineage and session-boundary rules
  98. Position LCM around retrieval quality, autonomy, and drill-down behavior. Do not
  99. claim that Hermes core has no persisted record of pre-compression history.
  100. ## Quick start
  101. ### Prerequisites
  102. - Hermes Agent
  103. - Python 3.11+
  104. - No required third-party runtime dependencies
  105. `tiktoken` is used if available; otherwise LCM falls back to character-based
  106. token estimates. `regex` is used if available to apply timeouts to message ignore
  107. patterns; without it, message-level regex filtering is disabled with a warning
  108. rather than running unbounded stdlib `re` matches.
  109. The versioned [host-owned dependency contract](docs/dependency-assurance.md)
  110. lists every shipped runtime import, supported host/Python versions, ownership,
  111. and the mechanical validation command. It is an assurance boundary, not a claim
  112. that the host's resolved environment is free of known vulnerabilities.
  113. ### Install the plugin
  114. Canonical install path: clone `hermes-lcm` as a general user plugin.
  115. ```bash
  116. git clone https://github.com/stephenschoettler/hermes-lcm \
  117. ~/.hermes/plugins/hermes-lcm
  118. ```
  119. For a profile-specific install:
  120. ```bash
  121. git clone https://github.com/stephenschoettler/hermes-lcm \
  122. ~/.hermes/profiles/myprofile/plugins/hermes-lcm
  123. ```
  124. From an existing checkout, install a symlink:
  125. ```bash
  126. ./scripts/install.sh
  127. # Optional profile-aware install:
  128. HERMES_PROFILE=myprofile ./scripts/install.sh
  129. ```
  130. Run `scripts/install.sh` even when the checkout already lives at the canonical
  131. plugin path. It leaves that checkout in place and exposes the bundled
  132. `hermes-lcm` skill in the matching global/profile `skills/` directory. The
  133. installer preflights both paths and refuses conflicts before creating links.
  134. ### Activate it
  135. The plugin has two names:
  136. - plugin manifest name: `hermes-lcm`
  137. - runtime context engine name: `lcm`
  138. Both must be configured:
  139. ```yaml
  140. plugins:
  141. enabled:
  142. - hermes-lcm
  143. context:
  144. engine: lcm
  145. ```
  146. Restart Hermes after changing plugin or context-engine config.
  147. ### Verify it loaded
  148. Run:
  149. ```bash
  150. hermes plugins
  151. ```
  152. Expected signals:
  153. - plugin list includes `hermes-lcm`
  154. - selected context engine is `lcm`
  155. - tool list includes `lcm_grep`, `lcm_recall`, `lcm_recent`,
  156. `lcm_load_session`, `lcm_describe`, `lcm_expand`, `lcm_expand_query`,
  157. `lcm_status`, `lcm_inspect`, and `lcm_doctor`
  158. - the normal available-skills index includes `hermes-lcm`; current hosts can
  159. also resolve the explicit plugin-qualified skill `hermes-lcm:hermes-lcm`
  160. Typical output:
  161. ```text
  162. Plugins (1):
  163. ✓ hermes-lcm v1.0.0-rc.1 (15 tools)
  164. Provider Plugins:
  165. Context Engine: lcm
  166. ```
  167. For source checkouts, `lcm_status`, `/lcm status`, `lcm_inspect`,
  168. `lcm_doctor`, and `/lcm doctor` also report the loaded plugin path and
  169. best-effort git identity:
  170. `plugin_git_commit`, `plugin_git_branch`, and `plugin_git_dirty`.
  171. If startup logs say LCM tools are available through `context-engine schemas` or
  172. mention the `Path B fallback`, that is expected on older Hermes hosts such as
  173. Hermes Agent v0.16. All 15 `lcm_*` tools remain available through the
  174. context-engine path; standalone plugin-registry registration is not required
  175. there.
  176. ### Update it
  177. If you cloned directly into the plugin directory:
  178. ```bash
  179. cd ~/.hermes/plugins/hermes-lcm && git pull --ff-only
  180. ```
  181. For a profile-specific install:
  182. ```bash
  183. cd ~/.hermes/profiles/myprofile/plugins/hermes-lcm && git pull --ff-only
  184. ```
  185. If you installed a symlink from a separate checkout:
  186. ```bash
  187. ./scripts/update.sh
  188. ```
  189. Restart Hermes after updating.
  190. For the `v1.0.0-rc.1` line, take a normal backup of `lcm.db` before updating,
  191. then update the checkout and restart Hermes. No manual core migration or
  192. backfill is required: the core schema remains version 5. New assertion,
  193. query-view, and adaptive-retrieval state is additive, created only after the
  194. corresponding opt-in is enabled, and stored in the same profile database under
  195. named feature markers. The five new query/evidence tool schemas are visible in
  196. the tool list on stock installs, but automatic extraction, pre-answer evidence,
  197. assertion storage, query-view storage, and adaptive retrieval remain off. See
  198. [the operator upgrade and opt-in notes](docs/operator-guide.md#upgrade-from-v0200-or-v0210-rc2-to-v100-rc1)
  199. before enabling them.
  200. ## Commands and tools
  201. ### Agent tools
  202. Use these tools for current-session recall after compaction. Use Hermes
  203. `session_search` for earlier separate sessions or broad cross-session history
  204. outside the LCM database.
  205. | Tool | Use |
  206. |------|-----|
  207. | `lcm_grep` | Search current-session raw messages and summaries. Opt into `content_scope='externalized'|'both'` for bounded active-session payload search, or `session_scope='all'|'session'` for bounded raw-message archive recovery; broader scopes return raw-message hits only. |
  208. | `lcm_recall` | Search the entire memory across ALL conversations and all time by meaning. Fuses full-text, summary-vector, and chunk-vector arms with RRF, then applies a soft current-conversation (`scope_bias`) and recency prior. Returns bounded summary and verbatim-excerpt hits with `lcm_expand` handles; works FTS-only when embeddings are disabled. |
  209. | `lcm_query_state` | Query the opt-in V4 assertion sidecar for bounded current or historical facts, preferences, recommendations, commitments, actions, and status. Every result carries an exact message ref/span/quote; conflicts stay visible. |
  210. | `lcm_compute` | Execute supported dates, distinct counts, compatible-unit sums, directed/absolute differences, ordering, and latest-state operations over exact cited evidence. Planning, arithmetic, and trace verification are dependency-free and provider-neutral; ambiguous or incomplete inputs fail closed. |
  211. | `lcm_compile_evidence` | Validate one bounded provider-neutral semantic proposal against exact stored refs and return a compact evidence brief with explicit sufficiency state and an optional canonical computation. It never returns final prose or treats model claims as finite-coverage proof. |
  212. | `lcm_evidence_pack` | Hydrate and validate bounded baseline exact refs in the same `lcm.db`, repair only unique in-window quote spans, preserve occurrence/observation time separation, and optionally emit an immutable canonical computation trace without prose. |
  213. | `lcm_retrieve` | Opt-in bounded controller for one continuous answerer tool turn. It tracks typed evidence slots, permits at most three targeted calls to existing retrieval tools, accepts only exact observed refs, caps the evidence context, and can finish through `lcm_compute`. It persists evidence views and traces, never final prose. |
  214. | `lcm_recent` | Retrieve recent summaries by natural UTC period, preferring ready rollups and transparently falling back to time-bounded leaf summaries. |
  215. | `lcm_load_session` | Load one ordered raw-message transcript page for an explicit `session_id`. Continues with `after_store_id` from `next_cursor`; opt into exact slice refs with `include_exact_ref=true`. |
  216. | `lcm_describe` | Inspect the current-session DAG or preview an `externalized_ref` without loading full content. |
  217. | `lcm_expand` | Recover source messages, child summaries, or externalized payloads with pagination. Use `store_id` to fetch a single raw message from a cross-session `lcm_grep` result and `include_exact_ref=true` when its returned slice must be cited or computed. |
  218. | `lcm_expand_query` | Answer a question using expanded current-session LCM context while returning a bounded answer. |
  219. | `lcm_status` | Show runtime health, context pressure, config, source lineage, and lifecycle stats. |
  220. | `lcm_inspect` | Read-only operator inventory for current-session lineage, frontier/fresh-tail metadata, externalized refs/readability, compaction skip/no-op reasons, and matched ignore/stateless patterns. Returns metadata only; use retrieval tools for content. |
  221. | `lcm_doctor` | Run database, FTS, lifecycle, config, and context-pressure diagnostics. |
  222. ## Recall skill and policy
  223. Hermes-LCM ships `skills/hermes-lcm/SKILL.md` plus progressive-disclosure
  224. references for configuration, architecture, diagnostics, recall routing, and
  225. session lifecycle. The installer links that directory into the active Hermes
  226. profile so it appears in ordinary skill discovery. On hosts with plugin skill
  227. registration, it is also available explicitly as `hermes-lcm:hermes-lcm`.
  228. When LCM is the active context engine for a bound session, the plugin registers
  229. one deterministic `pre_llm_call` hook. Hermes injects the canonical policy into
  230. the current user-message context, not the system prompt, preserving the stable
  231. system-prompt cache prefix. The policy:
  232. - treats summaries as recall cues rather than exact proof;
  233. - prefers newer source-backed evidence and verifies contradictions;
  234. - teaches narrow FTS query construction and bounded scope selection;
  235. - routes current compacted, cross-conversation, and recent/time-bounded recall
  236. through the appropriate existing tools;
  237. - does not force a tool call when the current context is already sufficient.
  238. The canonical bytes live in
  239. `skills/hermes-lcm/references/recall-policy.md`. Merely loading the plugin does
  240. not inject them when another context engine is serving the session. Older hosts
  241. without skill or hook registration keep their existing schema-driven behavior.
  242. ### Slash commands
  243. Slash commands are disabled by default. Enable them only in trusted operator
  244. contexts:
  245. ```bash
  246. export LCM_ENABLE_SLASH_COMMAND=1
  247. ```
  248. Available commands:
  249. - `/lcm` or `/lcm status` - current runtime/session status
  250. - `/lcm doctor` - read-only health checks
  251. - `/lcm doctor clean` - read-only scan for obvious junk/noise session candidates
  252. - `/lcm doctor clean apply` - backup-first cleanup for safe pattern-matched
  253. candidates; requires `LCM_DOCTOR_CLEAN_APPLY_ENABLED=true`
  254. - `/lcm doctor repair` - read-only SQLite/FTS repair diagnostics
  255. - `/lcm doctor repair apply` - backup-first SQLite/FTS repair
  256. - `/lcm doctor source` - read-only scan for legacy blank-source rows
  257. - `/lcm doctor source apply` - backup-first normalization of legacy blank-source
  258. rows to `unknown`
  259. - `/lcm doctor retention` - read-only retention analysis
  260. - `/lcm backup` - timestamped SQLite backup
  261. - `/lcm rotate` - read-only preview of an in-place tail-preserving compact of
  262. the active session
  263. - `/lcm rotate apply` - backup-first rotate that advances the lifecycle frontier
  264. past pre-tail raw messages
  265. - `/lcm help` - command help
  266. Apply paths are intentionally narrow and backup-first. Start with diagnostics
  267. before cleanup or repair.
  268. ### Rotate: compact in place without changing session identity
  269. `/lcm rotate` compacts a long-running session in place without changing
  270. `session_id` or `conversation_id`. It is the in-session counterpart to
  271. Hermes-level `/new` and to `/lcm doctor clean`.
  272. What rotate does:
  273. - preserves the live tail (`LCM_FRESH_TAIL_COUNT` most-recent messages)
  274. - advances the lifecycle frontier marker past every raw message before the tail,
  275. so subsequent bootstrap stops replaying them into the active prompt
  276. - writes a rolling `*-rotate-latest.sqlite3` backup under the same backup
  277. directory as `/lcm backup`, overwriting the previous rotate slot atomically so
  278. disk usage stays bounded across repeated rotates
  279. What rotate does not do:
  280. - it does not delete raw messages; pre-tail rows remain recoverable through
  281. `lcm_load_session` and `lcm_expand`
  282. - it does not invoke the summarization model; trigger normal compaction first if
  283. you want pre-tail content covered by summary nodes before rotating
  284. - it does not change session or conversation identity, and it refuses ignored or
  285. stateless sessions with a clear reason
  286. `lcm_status` and `/lcm status` surface `last_rotate_at` and the rolling backup
  287. path. Re-running `/lcm rotate apply` after the frontier is already at or ahead of
  288. the target boundary reports `status: noop` and does not overwrite the previous
  289. known-good rolling backup.
  290. ## Configuration
  291. Most installs only need `plugins.enabled` and `context.engine: lcm`.
  292. ### Common settings
  293. | Variable | Default | Use |
  294. |----------|---------|-----|
  295. | `LCM_CONTEXT_THRESHOLD` | `0.35` | Fraction of the context window that triggers LCM compaction |
  296. | `LCM_FRESH_TAIL_COUNT` | `32` | Recent messages protected from compaction |
  297. | `LCM_FRESH_TAIL_MAX_TOKENS` | `0` | Optional token cap for the protected fresh tail (`0` disables it); always retains the newest message and complete assistant/tool-result groups |
  298. | `LCM_INCREMENTAL_MAX_DEPTH` | `3` | Max DAG condensation depth (`-1` = unlimited, `0` = leaf only); enables hierarchical summarization |
  299. | `LCM_LEAF_CHUNK_TOKENS` | `20000` | Raw-backlog floor before leaf compaction; with dynamic chunking enabled, the base chunk target |
  300. | `LCM_DYNAMIC_LEAF_CHUNK_ENABLED` | `false` | Enable chunk-sized leaf compaction passes instead of compacting the whole non-tail raw backlog per pass |
  301. | `LCM_DYNAMIC_LEAF_CHUNK_MAX` | `40000` | Upper bound for dynamic leaf chunk targets |
  302. | `LCM_THRESHOLD_FULL_SWEEP_ENABLED` | `false` | At threshold, opt into one synchronous bounded sweep that drains chunked raw history before publishing one new active context |
  303. | `LCM_SUMMARY_PREFIX_TARGET_TOKENS` | `0` | Sweep-only summary-frontier target; `0` derives one `LCM_LEAF_CHUNK_TOKENS` budget |
  304. | `LCM_NEW_SESSION_RETAIN_DEPTH` | `2` | DAG depth retained after manual `/new` (`-1` all, `0` none) |
  305. | `LCM_DATABASE_PATH` | auto | SQLite database path. Empty config resolves to `HERMES_HOME/lcm.db`; plugin installs or operators may set this env var to another profile-scoped path such as `~/.hermes/hermes-lcm.db`. |
  306. | `LCM_FTS_INTEGRITY_CHECK_INTERVAL_HOURS` | `24` | Minimum hours between startup FTS5 deep integrity-checks (O(index size)). `0` checks every startup; a negative value never checks on startup. Structural checks always run regardless. |
  307. | `LCM_ENABLE_SLASH_COMMAND` | `false` | Enable the optional `/lcm` operator command surface |
  308. When `LCM_FRESH_TAIL_MAX_TOKENS` is enabled, the protected suffix must satisfy
  309. both the message-count and token bounds. The newest message is never dropped,
  310. and a boundary that would begin inside an assistant tool-call/result group is
  311. moved back to that assistant even when doing so exceeds a configured bound.
  312. ### Filtering and storage settings
  313. | Variable | Default | Use |
  314. |----------|---------|-----|
  315. | `LCM_IGNORE_SESSION_PATTERNS` | empty | Comma-separated session globs excluded from LCM storage |
  316. | `LCM_STATELESS_SESSION_PATTERNS` | empty | Comma-separated session globs kept read-only |
  317. | `LCM_IGNORE_MESSAGE_PATTERNS` | empty | Comma-separated regex patterns; matching message content is excluded from LCM storage |
  318. | `LCM_SENSITIVE_PATTERNS_ENABLED` | `false` | Opt in to deterministic redaction before LCM storage, FTS indexing, summarization, active replay, and externalized ingest payloads |
  319. | `LCM_SENSITIVE_PATTERNS` | `api_key,bearer_token,password_assignment,private_key` | Comma-separated named sensitive pattern catalog entries to apply when redaction is enabled |
  320. | `LCM_LARGE_OUTPUT_EXTERNALIZATION_ENABLED` | `false` | Store oversized ingest payloads, including tool results, media blocks, and generic raw content, in plugin-managed JSON files |
  321. | `LCM_LARGE_OUTPUT_EXTERNALIZATION_THRESHOLD_CHARS` | `12000` | Externalization threshold for normalized payload text |
  322. | `LCM_LARGE_OUTPUT_ACTIVE_REPLAY_STUBBING_ENABLED` | `false` | Replace token-heavy textual tool results with recoverable externalized refs in active replay; current-turn ingest is immediate and historical assembly respects the protected fresh tail; requires large-output externalization |
  323. | `LCM_LARGE_OUTPUT_ACTIVE_REPLAY_STUB_THRESHOLD_TOKENS` | `25000` | Token-aware threshold for active-replay tool-result stubbing |
  324. | `LCM_LARGE_OUTPUT_TRANSCRIPT_GC_ENABLED` | `false` | Rewrite already-externalized summarized tool rows to compact placeholders |
  325. | `LCM_DOCTOR_CLEAN_APPLY_ENABLED` | `false` | Permit destructive `/lcm doctor clean apply` in trusted operator contexts |
  326. | `LCM_EMPTY_LIFECYCLE_GC_ENABLED` | `true` | Master toggle for automatic pruning of lifecycle rows for sessions that never ingested any messages or summary nodes |
  327. | `LCM_EMPTY_LIFECYCLE_GC_THRESHOLD` | `200` | Number of lifecycle rows at which the GC pass fires |
  328. | `LCM_EMPTY_LIFECYCLE_GC_MAX_AGE_HOURS` | `24` | Automatic GC only deletes empty lifecycle rows at least this old; set `0` only in trusted/test environments that intentionally want immediate empty-row pruning |
  329. ### Model and timeout settings
  330. | Variable | Default | Use |
  331. |----------|---------|-----|
  332. | `LCM_SUMMARY_MODEL` | auxiliary | Override summarization model |
  333. | `LCM_SUMMARY_FALLBACK_MODELS` | empty | Comma-separated summarization models tried after `LCM_SUMMARY_MODEL` or the auxiliary task default fails |
  334. | `LCM_SUMMARY_CIRCUIT_BREAKER_FAILURE_THRESHOLD` | `2` | Consecutive failed summarization calls before a route is skipped temporarily |
  335. | `LCM_SUMMARY_CIRCUIT_BREAKER_COOLDOWN_SECONDS` | `300` | Seconds to skip an open summary route before retrying it |
  336. | `LCM_EXPANSION_MODEL` | summary model / auxiliary | Override `lcm_expand_query` synthesis model |
  337. | `LCM_EXPANSION_CONTEXT_TOKENS` | `32000` | Context budget used by the auxiliary LLM for `lcm_expand_query` |
  338. | `LCM_SUMMARY_TIMEOUT_MS` | `60000` | Timeout for one summarization call |
  339. | `LCM_EXPANSION_TIMEOUT_MS` | `120000` | Timeout for one `lcm_expand_query` synthesis call |
  340. | `LCM_CRITICAL_BUDGET_PRESSURE_RATIO` | `0.0` | Disabled at `0.0`; when set, permits critical-pressure bypasses for bounded deferred catch-up and cache-friendly follow-on condensation only |
  341. Advanced compaction, assembly, and extraction knobs are defined in `config.py`.
  342. ### Sensitive-pattern redaction
  343. Sensitive-pattern handling is disabled by default so ordinary LCM storage and
  344. `lcm_expand` remain lossless. When `LCM_SENSITIVE_PATTERNS_ENABLED=true`, matched
  345. secret values are replaced with metadata-only placeholders before SQLite, FTS,
  346. summaries, active replay, and externalized payload JSON receive the content. This
  347. is intentionally not lossless for matching values: the raw matched secret is
  348. unrecoverable after redaction.
  349. Supported named catalog entries are:
  350. - `api_key`: `api_key`, `api_token`, `access_token`, `secret_key`, and
  351. `client_secret` assignments or JSON keys.
  352. - `bearer_token`: `Bearer ...` strings and token-like JSON keys.
  353. - `password_assignment`: `password`, `passwd`, `pwd`, and `passphrase`
  354. assignments or JSON keys, including quoted values with spaces.
  355. - `private_key`: PEM private-key blocks.
  356. Redaction is forward-only. Enabling it does not rewrite existing SQLite rows,
  357. FTS shadow tables, DAG summaries, or externalized payload JSON that were written
  358. before the setting was enabled. Non-password placeholders include a short
  359. truncated SHA-256 digest for correlation. `password_assignment` placeholders omit
  360. the digest to avoid making password-like values easier to dictionary-check.
  361. `lcm_status`, `lcm_inspect`, and `lcm_doctor` expose the enabled state, configured pattern names,
  362. unknown names, source, and placeholder format without exposing raw secret values.
  363. ### Threshold ownership
  364. When `context.engine: lcm` is active, `LCM_CONTEXT_THRESHOLD` is the compaction
  365. threshold LCM uses. Hermes core `compression.threshold` belongs to the built-in
  366. compressor. Hermes core `compression.enabled` is still the global gate that
  367. allows compaction, so leave it enabled when using LCM.
  368. If startup/status output shows a host-side compression percentage that disagrees
  369. with LCM, trust live LCM status after a normal message has initialized the
  370. session.
  371. ### Tuning for large context windows
  372. Long-context models change the tuning problem. A 1M-token model does not mean
  373. you always want to spend 750k prompt tokens before LCM starts compacting. Start
  374. with the active prompt budget you are willing to pay for, then tune the threshold
  375. around that budget.
  376. ```text
  377. compaction trigger = effective context window * LCM_CONTEXT_THRESHOLD
  378. LCM_CONTEXT_THRESHOLD = desired compaction trigger / effective context window
  379. ```
  380. Examples, as math rather than universal recommendations:
  381. | Effective context window | Desired trigger | Threshold |
  382. |--------------------------|-----------------|-----------|
  383. | `128000` | `96000` | `0.75` |
  384. | `200000` | `140000` | `0.70` |
  385. | `400000` | `240000` | `0.60` |
  386. | `1000000` | `250000` | `0.25` |
  387. | `1000000` | `400000` | `0.40` |
  388. | `1000000` | `600000` | `0.60` |
  389. A reasonable first pass for a true 1M effective window is:
  390. | Goal | Desired trigger | Threshold | Notes |
  391. |------|-----------------|-----------|-------|
  392. | Lower spend / earlier DAG building | `200000` to `300000` | `0.20` to `0.30` | Good when cost and latency matter more than maximum live context |
  393. | Balanced large-context use | `350000` to `500000` | `0.35` to `0.50` | Good starting point for many long-running agents |
  394. | Keep more raw context active | `600000+` | `0.60+` | Higher token burn, later compaction |
  395. Tune against your effective `context_length` if Hermes caps the provider's
  396. advertised window.
  397. Start with `LCM_CONTEXT_THRESHOLD`, `LCM_FRESH_TAIL_COUNT`, and large output
  398. externalization. Only tune leaf chunking after checking `lcm_status` and
  399. understanding whether your workload is dominated by huge raw backlog passes.
  400. `LCM_THRESHOLD_FULL_SWEEP_ENABLED=true` is an opt-in cache-shape policy. Once
  401. threshold pressure triggers compaction, the invocation keeps summarizing the
  402. oldest raw chunks outside the protected fresh tail even after pressure falls
  403. below the trigger. It then condenses the provider-visible summary frontier only
  404. when that frontier exceeds `LCM_SUMMARY_PREFIX_TARGET_TOKENS` (or one leaf
  405. budget when the target is `0`). One invocation is bounded to 12 total leaf plus
  406. condensation calls and 120 seconds between calls, persists each completed DAG
  407. pass, and publishes one newly assembled active context at the end. It is
  408. synchronous and independent of deferred/background maintenance.
  409. ### Cache policy boundary
  410. LCM is **cache-friendly**, not fully cache-aware. It may avoid some follow-on
  411. condensation churn, but current cache usage counters are retrospective status
  412. data only; they do not tell the plugin whether the next prompt mutation will
  413. break a hot provider cache.
  414. `LCM_CRITICAL_BUDGET_PRESSURE_RATIO` is a narrow escape hatch. It is disabled by
  415. default (`0.0`). When set, LCM compares prompt pressure against the context
  416. window and only at or above that ratio may bypass existing polite gates for
  417. bounded deferred maintenance catch-up and cache-friendly follow-on condensation.
  418. Revisit full cache-aware deferred compaction only after Hermes core exposes
  419. reliable cache state / cache-break signals.
  420. ### Session pattern syntax
  421. Pattern matching checks multiple keys: raw `session_id`, `platform`, and
  422. `platform:session_id`.
  423. - `*` matches within one colon-delimited segment
  424. - `**` can span across colons
  425. Example: `cron:*` can match Hermes cron sessions, while exact raw session IDs
  426. still work.
  427. ### Noise suppression
  428. LCM offers two layers of noise filtering:
  429. - **Session-level filters** (`LCM_IGNORE_SESSION_PATTERNS`,
  430. `LCM_STATELESS_SESSION_PATTERNS`) catch noisy traffic that arrives as its own
  431. session or platform.
  432. - **Message-level patterns** (`LCM_IGNORE_MESSAGE_PATTERNS`) catch cron alerts or
  433. other noise injected into a normal Telegram or WhatsApp conversation as
  434. ordinary visible messages.
  435. Message-level patterns are comma-separated Python regex strings compiled once at
  436. engine start. They run against plain text first; structured multimodal payloads
  437. use concatenated text parts first, then normalized JSON fallback when there are
  438. no text parts. Matching messages are skipped before storage.
  439. Example operator config:
  440. ```bash
  441. LCM_IGNORE_MESSAGE_PATTERNS=^Cronjob Response:,^>>>Cronjob Response<<<:
  442. ```
  443. Invalid regex entries are logged at warning level and dropped. Pattern matching
  444. uses a 50 ms per-pattern timeout when the optional `regex` package is installed.
  445. If `regex` is not installed, LCM logs a warning and disables message-level regex
  446. filtering rather than running unbounded stdlib `re` matches in the ingest path.
  447. Known limitation: the filter runs at ingest time. When a matching message is part
  448. of the chunk summarized in the same turn it arrived, the text may appear inside
  449. the resulting summary node. The filtered message is still not written to the
  450. message store, so DAG lineage stays clean; only serialized summary text can carry
  451. it.
  452. `lcm_status` surfaces the full filter contract under `session_filters`, including
  453. pattern sources, whether the current session is ignored/stateless, and a
  454. process-lifetime `ignored_message_count`.
  455. Ignored/stateless sessions are a storage ownership boundary, not a context-window
  456. opt-out. LCM does not ingest raw messages or create DAG nodes for sessions that
  457. match `LCM_IGNORE_SESSION_PATTERNS`, `LCM_STATELESS_SESSION_PATTERNS`, or the
  458. in-process auxiliary/thread stateless marker. If those sessions cross the normal
  459. context threshold, LCM delegates the compaction call to Hermes' native
  460. `ContextCompressor` so the active request is still bounded before model overflow.
  461. If the native compressor is unavailable, LCM falls back to a deterministic
  462. head/tail trim as a last-resort safety net, still without writing the bypassed
  463. session to `lcm.db`.
  464. ### Large tool-output handling
  465. Storage-boundary payload guard contract: LCM prevents media-ish inline payloads from being written into plugin-local SQLite rows at the storage boundary.
  466. Externalization for ordinary large tool output is opt-in. When enabled,
  467. oversized tool results are written to plugin-managed JSON files and referenced
  468. from summaries. They remain inspectable through
  469. `lcm_describe(externalized_ref=...)` and `lcm_expand(externalized_ref=...)`.
  470. Active-replay stubbing is a second, independently opt-in replay policy. When
  471. both externalization and active-replay stubbing are enabled, newly ingested
  472. textual tool results above the token threshold are durably externalized and
  473. replaced immediately in provider-visible replay, including results in the
  474. protected fresh tail. This lets a stub-only replay change converge even when no
  475. leaf is eligible for compaction. A historical assembly pass applies the same
  476. policy to older tool results before budgeting, while respecting the protected
  477. fresh tail. Tool-call ids and compatible structured text block types/keys are
  478. retained; raw SQLite rows and DAG lineage are not rewritten by the historical
  479. pass. Structured image/media results remain inline, preserving the provider
  480. replay contract established by Hermes-LCM PR #226. If durable externalization
  481. cannot be confirmed, replay keeps the original payload inline. Results from
  482. `lcm_describe` and `lcm_expand` also remain inline so recovery does not
  483. recursively produce another ref.
  484. The storage-boundary payload guard is separate from that opt-in. LCM always
  485. scans messages at the store boundary before writing `messages.content` or
  486. `messages.tool_calls` to SQLite. Inline `data:*;base64,...` payloads and
  487. conservative long base64-looking runs are replaced with compact placeholders and
  488. written to the same plugin-managed externalized-payload directory.
  489. This avoids duplicating media-ish payload bytes into `lcm.db`, FTS shadow tables,
  490. WAL files, or ordinary SQLite backups while preserving lossless recovery via the
  491. placeholder `ref` and `lcm_expand(externalized_ref=...)`. If externalization
  492. fails, LCM logs a warning and leaves the original text inline rather than
  493. dropping data.
  494. `lcm_doctor` reports SQLite `journal_mode`, `quick_check`, database/WAL sizes,
  495. largest content/tool-call rows, suspicious inline payload rows, and aggregate
  496. externalized-payload stats. Doctor output is metadata-only for these scans.
  497. This guard is scoped to LCM's own `lcm.db` write boundary. It does not prevent
  498. Hermes core, or any other host layer, from writing inline payloads to Hermes
  499. `state.db`, and it does not rewrite historical rows already present in `lcm.db`.
  500. If bytes already landed in Hermes `state.db`, that is upstream/outside LCM scope;
  501. use backup-first cleanup or migration procedures before mutating historical host
  502. rows.
  503. Transcript GC is separate and opt-in. It only rewrites already-externalized,
  504. already-summarized tool-role rows to compact placeholders. It keeps the same
  505. `store_id`, keeps payload files, skips pinned messages, and preserves lossless
  506. recovery through `externalized_ref`.
  507. ## Retrieval contract
  508. LCM retrieval tools default to current-session scope. `lcm_grep` accepts
  509. `session_scope='all'` or `session_scope='session'` as an explicit opt-in for
  510. bounded archive search over rows already present in `lcm.db` (raw-message hits
  511. only). Once a session id is known, `lcm_load_session` can enumerate that
  512. session's raw transcript in chronological `store_id` pages without a search
  513. query. Use Hermes `session_search` for broad cross-session history outside the
  514. LCM database.
  515. Within the current session, `source` filters raw rows directly and filters
  516. summary nodes by descendant raw-message source lineage. `unknown` is a real
  517. source value, not a wildcard. Legacy blank-source rows are treated as `unknown`.
  518. `role`, `time_from`, and `time_to` are raw-message filters applied in the message
  519. search query before result limiting. When a raw-message filter is active,
  520. `lcm_grep` returns raw rows only and reports `summary_results_omitted`.
  521. Tool responses are bounded so one retrieval call cannot flood the main context.
  522. ### Lossless raw recovery contract
  523. Lossless recovery means raw content is stored with stable source lineage and can
  524. be recovered in deterministic pages:
  525. - `lcm_expand(node_id=...)` pages immediate sources with `source_offset` and
  526. `source_limit`
  527. - `lcm_load_session(session_id=...)` pages ordered raw session rows with
  528. `after_store_id` and `next_cursor`
  529. - oversized raw messages continue with `content_offset`
  530. - `lcm_expand(externalized_ref=...)` pages payload content with `content_offset`
  531. - `lcm_expand_query` uses `context_max_tokens` for auxiliary context and reports
  532. truncation/pagination hints when needed
  533. Carried-over summary nodes can become current-session content after `/new`, but
  534. their source eligibility still comes from descendant raw messages. Expanding a
  535. carried-over current-session node recovers the original raw message sources even
  536. when those sources still belong to a previous session.
  537. ## OpenClaw/lossless-claw import
  538. `hermes-lcm` includes an opt-in operator script for backfilling OpenClaw history
  539. into the local hermes-lcm SQLite store. It supports two source shapes:
  540. 1. **SQLite LCM database** (`--source-db`) for migrations from an existing
  541. lossless-claw/OpenClaw `lcm.db`.
  542. 2. **JSONL session exports** (`--source-jsonl` / `--source-jsonl-dir`) for fresh
  543. installs, plugin-off catch-up, or migrations where no source SQLite database
  544. is available.
  545. SQLite source example:
  546. ```bash
  547. python scripts/import_lossless_claw.py \
  548. --source-db ~/.openclaw/path/to/lcm.db \
  549. --target-db ~/.hermes/lcm.db \
  550. --agent sammy
  551. ```
  552. JSONL source example:
  553. ```bash
  554. python scripts/import_lossless_claw.py \
  555. --source-jsonl ~/.openclaw/agents/sammy/sessions/session-a.jsonl \
  556. --target-db ~/.hermes/lcm.db \
  557. --agent sammy \
  558. --json
  559. ```
  560. For a directory of session exports:
  561. ```bash
  562. python scripts/import_lossless_claw.py \
  563. --source-jsonl-dir ~/.openclaw/agents/sammy/sessions \
  564. --target-db ~/.hermes/lcm.db \
  565. --agent sammy
  566. ```
  567. The script is intentionally conservative:
  568. - dry-run is the default; pass `--apply` to write
  569. - run it against an explicit target DB path, preferably while Hermes is stopped
  570. for that profile
  571. - writes create a timestamped target DB backup first when the target already
  572. exists
  573. - SQLite imports can include OpenClaw summaries with `--include-summaries`; this
  574. migrates compatible summary rows into Hermes `summary_nodes`
  575. - JSONL imports migrate raw message rows only; JSONL does not carry a summary DAG
  576. - imported rows keep explicit provenance in `session_id` and `source`, for
  577. example `openclaw-lcm:agent:sammy:<source-session>` or
  578. `openclaw-jsonl:agent:sammy:<source-session>`
  579. - the SQLite default provenance identity is the source `conversations.session_id`,
  580. preserving source session boundaries even when many conversations share one
  581. `session_key`
  582. - pass `--session-identity session_key` only for SQLite imports when you
  583. intentionally want conversations with the same source session key grouped into
  584. one imported LCM session
  585. - reruns are idempotent for the same `--import-id`; the default `import_id` is
  586. source-path-derived, so pass a stable `--import-id` if you may import the same
  587. copied DB or JSONL export set from different paths
  588. - `--json` prints a reconciliation report with `scanned`, `eligible`,
  589. `would_import`, `imported`, `skipped_existing`, `skipped_empty`,
  590. `invalid_rows`, `warnings`, and summary counters
  591. - changing `--agent`, `--namespace`, or `--session-identity` under the same
  592. `--import-id` is treated as the same import and will skip already-tracked
  593. source messages; use a new `--import-id` for a different mapping
  594. - no OpenClaw config or separate secret tables are imported, but raw transcripts,
  595. summaries, and tool payloads may contain sensitive user data
  596. This is a local archive migration path. It does not make LCM a general memory
  597. provider, and it does not change the current-session retrieval contract for
  598. agent tools.
  599. For databases that already contain large historical tool rows,
  600. `scripts/backfill_externalized_tool_outputs.py` can pre-create native recovery
  601. sidecars without rewriting SQLite. It is dry-run by default, writes a scrubbed
  602. digest/count manifest, is idempotent on repeat apply, and supports guarded
  603. manifest-based rollback. See the [operator guide](docs/operator-guide.md#historical-tool-output-sidecars).
  604. ## Troubleshooting
  605. ### `hermes plugins` shows `lcm (not found)` but LCM tools exist
  606. If `plugins.enabled` contains `hermes-lcm`, `context.engine: lcm` is set, and
  607. the runtime exposes LCM tools, LCM is loaded. The `lcm (not found)` line is a
  608. Hermes host discovery/status mismatch, not an LCM storage or compaction failure.
  609. ### `/lcm status` looks unbound after restart
  610. Compatible Hermes gateway hosts expose task-local lane metadata while
  611. dispatching `/lcm`. Once that lane has constructed an agent, `/lcm status`
  612. resolves the same active LCM runtime as `lcm_status`, including its foreground
  613. view while an ignored or stateless side channel is bound. Before the first
  614. normal message constructs an agent, or in a genuinely sessionless process,
  615. `session_id: (unbound)` and `threshold_tokens: (uninitialized)` remain expected.
  616. ## Architecture
  617. The engine sits between Hermes context assembly and the backing conversation
  618. store. It records raw messages, compacts old material into a summary DAG, and
  619. exposes retrieval tools that can drill back into exact stored sources.
  620. <p align="center">
  621. <img src="docs/architecture.png" alt="hermes-lcm architecture" width="700">
  622. </p>
  623. ## How it works
  624. 1. **Ingest** - persist each message in SQLite with FTS metadata
  625. 2. **Compact** - summarize older messages outside the fresh tail into D0 leaf
  626. nodes
  627. 3. **Condense** - merge same-depth nodes into higher-depth summaries
  628. 4. **Escalate** - shrink oversize summaries from detailed to bullets to
  629. deterministic truncate
  630. 5. **Assemble** - combine system prompt, highest-depth summaries, and fresh tail
  631. 6. **Retrieve** - use LCM tools to drill into compacted history or synthesize
  632. from expanded context
  633. ## Documentation
  634. - [Feature overview](docs/features-overview.md) — every feature family, what
  635. it does, why it exists, and the switch that enables it
  636. - [Agent configuration profiles](docs/agent-config-profiles.md) — copy-paste
  637. env profiles: coding agent, long-horizon assistant, fully-local, cost-guarded
  638. - [Operator guide](docs/operator-guide.md) — install, activation, full
  639. configuration reference, diagnostics
  640. - [Retrieval tools reference](docs/retrieval-tools.md) — exact tool contracts
  641. - [Embeddings setup](docs/embeddings-setup.md) — free-tier and local embedding
  642. providers, warmup, backfill
  643. - [LCM paper](https://papers.voltropy.com/LCM)
  644. - [Architecture diagram](docs/architecture.png)
  645. - [Standard compression diagram](docs/standard_compression.png)
  646. - [LCM compression diagram](docs/lcm_compression.png)
  647. - [Contributing guide](CONTRIBUTING.md)
  648. - [Code of conduct](CODE_OF_CONDUCT.md)
  649. - [Security policy](SECURITY.md)
  650. - [Releases](https://github.com/stephenschoettler/hermes-lcm/releases)
  651. ## Development
  652. Important files:
  653. ```text
  654. plugin.yaml manifest
  655. __init__.py plugin registration and optional slash-command registration
  656. engine.py LCMEngine main orchestrator
  657. store.py SQLite message store and FTS
  658. dag.py summary DAG and FTS
  659. config.py env var defaults and overrides
  660. command.py /lcm command handlers
  661. tools.py lcm_grep, lcm_load_session, lcm_describe, lcm_expand, lcm_expand_query
  662. schemas.py tool schemas shown to the model
  663. tests/ standalone pytest coverage
  664. ```
  665. Run tests:
  666. ```bash
  667. pip install pytest
  668. python -m pytest tests/ -v
  669. ```
  670. No Hermes Agent checkout is required for the test suite; tests include a
  671. lightweight ABC stub.
  672. ## Contributing
  673. Issues and PRs welcome. Bug fixes and correctness improvements are highest
  674. priority. New features should be scoped, backwards-compatible, and tested.
  675. See [CONTRIBUTING.md](CONTRIBUTING.md) for branch, validation, and PR guidance.
  676. See [CODE_OF_CONDUCT.md](CODE_OF_CONDUCT.md) for project conduct expectations
  677. and [SECURITY.md](SECURITY.md) for vulnerability reporting.
  678. See the [releases page](https://github.com/stephenschoettler/hermes-lcm/releases)
  679. for changelogs.
  680. ## License
  681. [MIT](LICENSE)
  682. ## Star history
  683. <a href="https://www.star-history.com/?repos=stephenschoettler%2Fhermes-lcm&type=timeline&legend=top-left">
  684. <picture>
  685. <source media="(prefers-color-scheme: dark)" srcset="https://api.star-history.com/chart?repos=stephenschoettler/hermes-lcm&type=timeline&theme=dark&legend=top-left" />
  686. <source media="(prefers-color-scheme: light)" srcset="https://api.star-history.com/chart?repos=stephenschoettler/hermes-lcm&type=timeline&legend=top-left" />
  687. <img alt="Star History Chart" src="https://api.star-history.com/chart?repos=stephenschoettler/hermes-lcm&type=timeline&legend=top-left" />
  688. </picture>
  689. </a>

Ratings and comments

Sign in to rate this skill.

Sign in

Free to use. If it’s helped, pass it on.