跳到主要内容

openltm

❖ Communityv2.15.1★ 26

Long-term memory for Hermes agents, stored in a local SQLite database. FTS5 full-text search with optional vector (sqlite-vec) recall, importance-weighted decay, a queryable memory graph, and automatic capture: a declarative rule engine classifies corrections, constraints, preferences, decisions, and agent-discovered facts from a conversation and stores each one as a distilled, self-contained fact. Runtime notifications and read-only OpenLTM tool requests are excluded by named guards so ops noise never becomes memory. No cloud, no telemetry, no API keys required; optional Gemini/OpenAI/Ollama providers for embeddings. MIT licensed.

Open in Hermes Desktop
hermes plugins install openltm

What it adds

Tools 8

openltm_recallopenltm_learnopenltm_forgetopenltm_contextopenltm_relateopenltm_graphopenltm_brain_statsopenltm_stale

Hooks 7

system_prompt_blockprefetchsync_turnon_turn_starton_session_switchon_session_endon_memory_write

README

From the reviewed commit 6105051 ↗; it updates when the author re-pins.

OpenLTM Memory Provider for Hermes Agent

Long-term memory with FTS5 full-text search, vector embeddings, graph relationships, and importance-weighted decay. Local SQLite — zero dependencies, zero Docker, zero API keys.

What is this?

A Hermes memory provider plugin that wraps OpenLTM (Rohi's own long-term memory system for Claude Code) and exposes it as a native Hermes memory provider.

Features

  • FTS5 full-text search — fast text recall, built into SQLite
  • Vector embeddings — semantic search via OpenAI/Ollama/Gemini (optional)
  • Memory categories — preference, architecture, gotcha, pattern, workflow, constraint
  • Importance-weighted decay — importance 5 = permanent; 1-4 fade over time
  • Deduplication — same insight reinforced, not duplicated
  • Project scoping — memories can be scoped to specific projects
  • Graph relationships — memories can link to each other (supports, contradicts, refines, etc.)
  • Context items — per-project goals, decisions, progress, gotchas

Tools

Tool Purpose
openltm_recall Search memories by text query
openltm_learn Store insights, patterns, decisions
openltm_forget Delete a memory by ID
openltm_context Get project context (goals, decisions, gotchas)

Setup

  1. Enable the provider:

    hermes config set memory.provider openltm
    
  2. Start a new session (/reset)

  3. The provider auto-creates ~/.hermes/openltm.db on first use

  4. Vector search uses local Ollama by default. To use Gemini or OpenAI embeddings instead (memory text is sent to that API), pick it explicitly with hermes memory setup openltm (embedder: gemini|openai|ollama|none in ~/.hermes/openltm.json).

How it works

  • On session start: injects memory count and instructions into system prompt
  • Before each turn: prefetches relevant memories via FTS5
  • After each turn: extracts and stores learnable patterns
  • On session end: full conversation extraction (corrections, gotchas)
  • On built-in memory writes: mirrors to OpenLTM

Database

Single SQLite file at ~/.hermes/openltm.db. WAL mode for concurrent access. Schema matches OpenLTM's standard format — compatible with the Claude Code plugin if you use both.

Architecture

__init__.py   — MemoryProvider implementation (Hermes ABC)
_db.py        — SQLite operations (schema, CRUD, FTS5 search)
plugin.yaml   — Plugin manifest

Direct SQLite access — no Bun, no MCP server, no subprocess. Python's sqlite3 reads/writes the same database format as OpenLTM.

← Back to the catalog · catalog built Oct 3, 2026