Lossless Hermes Py banner
mssteuer mssteuer

Lossless Hermes Py

Development community

Description

Lossless Context Management (LCM) for Hermes Agent — DAG-based conversation summarization that never forgets. Python port of lossless-claw.

Installation

This entry records only its repository, not the path inside it, so there is no exact command to give. Open the source below and copy the folder into ~/.claude/skills/, or the file into ~/.claude/agents/.

README

lossless-hermes-py

[![PyPI version](https://img.shields.io/pypi/v/lossless-hermes-py.svg)](https://pypi.org/project/lossless-hermes-py/) [![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](https://opensource.org/licenses/MIT)

**DAG-based lossless context management for LLM conversations. Never lose a message — summarize them into a directed acyclic graph.**

A Python port of [lossless-claw](https://github.com/Martian-Engineering/lossless-claw) for use with [Hermes Agent](https://hermes.nousresearch.com) or as a standalone library.


What It Does

Long conversations with LLMs hit context window limits. The typical solution is to truncate or naively summarize, losing information permanently. Lossless Context Management (LCM) takes a different approach: it builds a **directed acyclic graph of summaries** that compresses older messages while preserving the ability to drill back into any detail.

Your conversation never loses information. It just gets more compact.

See the animated visualization at [losslesscontext.ai](https://losslesscontext.ai).

How It Works

LCM operates in two compaction passes that build a summary DAG:

**Leaf pass** — When the context window fills up, raw messages (excluding a protected "fresh tail" of recent messages) are chunked and summarized into **leaf nodes** at depth 0. Each leaf summary covers a group of messages and links back to the originals.

**Condensed pass** — When enough leaf summaries accumulate, they are themselves summarized into **condensed nodes** at depth 1. This process repeats upward: depth-1 summaries get condensed into depth-2, and so on. The result is a tree-like DAG where the root captures the entire conversation at high compression, and any branch can be expanded to recover full detail.

**Context assembly** reconstructs the optimal prompt by combining:

  • The highest-level summaries (covering the full history compactly)
  • The fresh tail (recent messages kept verbatim for continuity)

**C