All plugins

long-conversations

Persistent long-term conversations across session boundaries via structured handoff briefs and token monitoring. Disclosure — stores handoff briefs (topic, work in progress, decisions, open questions, next step; in aggressive mode auto-built from the first 200 characters of recent user messages) as plain JSON under HERMES_HOME/long-conversations/ and injects the pending brief into the first turn of the next session for the same chat or user (CLI briefs stay in one local scope and are not shown to messaging users); the model can change the plugin's settings with long_conv_config_set; an opt-in HERMES_LONG_CONV_BETA_LOG writes a local event log; no network calls.

cspears32Toolsv0.1.0Updated 1 month ago

About

Persistent long-term conversations across session boundaries via structured handoff briefs and token monitoring. Disclosure — stores handoff briefs (topic, work in progress, decisions, open questions, next step; in aggressive mode auto-built from the first 200 characters of recent user messages) as plain JSON under HERMES_HOME/long-conversations/ and injects the pending brief into the first turn of the next session for the same chat or user (CLI briefs stay in one local scope and are not shown to messaging users); the model can change the plugin's settings with long_conv_config_set; an opt-in HERMES_LONG_CONV_BETA_LOG writes a local event log; no network calls.

Hermes Long Conversations

Preserve conversation state across session boundaries without degradation from lossy compression.

Monitors token usage, extracts structured handoff briefs before context limits hit, and injects state into fresh continuation sessions with lineage tracking.


Why Use This: Standard Compaction vs. Long Conversations

DimensionStandard CompactionLong Conversations Plugin
Trigger TimingReactive: Triggers after context is exhausted or hitting provider hard limits.Proactive: pre_llm_call hook intercepts at a configurable watermark (e.g. 80%) before degradation.
What is SavedConversation Dialogue: Compresses chat transcripts (user/assistant banter, tool output logs).Execution State: Extracts only operational facts (active files, key decisions, negative constraints, next step).
Context OverheadHigh Bloat (3k–6k+ tokens): Multi-paragraph summaries + residual baggage linger in active memory.Zero Bloat (~250 tokens): Fresh session starts with 99% context headroom available for execution.
Attention & DriftHigh Degradation: Outdated tool logs and discarded paths distract attention heads.Zero Context Poisoning: Clean slate eliminates transcript drift and prompt-length penalties.
Failure TrapsRepeats Mistakes: Free-form summaries rarely record what failed, leading to looped errors.Explicit Dead-Ends: Dedicated dead_ends field prevents re-trying invalidated approaches.
Session ProvenanceFragmented: Starting /new breaks session continuity and loses history.Lineage DAG: Auto-links parent $\rightarrow$ child sessions in lineage.json with inspectable history.
Local Model FitPoor: 3B–8B local LLMs struggle with bloated summaries and long attention spans.Optimized: Tiny ~250-token payload fits effortlessly into 4k–16k local context windows.

Features

  • Token Monitoring: Triggers alerts or auto-handoffs at context threshold (default 80%).
  • Structured Briefs: Captures goals, active files, decisions, dead ends, and next steps.
  • Clean Rollovers: Fresh continuation sessions start with ~200 tokens of focused context.
  • Lineage DAG: Traces session parentage in lineage.json.

Installation

git clone https://github.com/cspears32/hermes-long-conversations.git ~/.hermes/plugins/long-conversations
hermes plugins enable long-conversations

Tools

  • long_conv_handoff: Generate brief and stage continuation.
  • long_conv_list: List saved session briefs.
  • long_conv_load: Load brief by session ID.
  • long_conv_config_get: View active configuration.
  • long_conv_config_set: Update configuration.

Configuration

~/.hermes/long-conversations/config.yaml:

threshold_ratio: 0.80     # Context utilization threshold (0.0–1.0)
aggressive_mode: false    # Auto-generate handoff on threshold
prune_days: 14            # Stale brief retention window

Acknowledgments & Prior Art

Inspired by and adapted from the auto-handoff architecture pioneered by claude-auto-handoff by Alex MacCaw, re-engineered for the Hermes Agent plugin ecosystem and local model constraints.

README from the reviewed commit 1a8dc52; it updates when the author re-pins.

Developer Mode

Explore built-in Hermes toolsets and actions.

HermesAgent

Developer?

Create a Hermes extension for Desktop or agent workflows.

Developer Section