rarf GitHub avatar

optmem-hermes-plugin

rarf

OptMem 是一个零依赖的独立再实现,基于 Victor Taelin 的 OptMem 设计,打包为 Hermes Agent 的内存提供器,提供廉价、始终可用的本地内存,支持 BM25 搜索、口音归一化和原生 Windows 支持。

Stars

5

7 天增长

暂无数据

Fork 数

0

开放 Issue

0

开源协议

MIT

最近更新

2026-07-27

AI 仓库情报摘要
FR-AI / ANALYSIS

为什么值得关注

它为 AI 代理提供免费、本地、持久的内存层——无网络、无代币消耗——同时与上游设计字节兼容,并增加了排名搜索、口音归一化和原版缺少的原生 Windows 锁定功能。

适合谁使用

  • 需要本地后备内存的 Hermes Agent 用户
  • 构建具有持久内存的代理系统的 AI 开发者
  • 在 Windows 上寻求可用本地内存解决方案的开发者
  • 希望数据留在本机的隐私意识用户

典型使用场景

  • 存储 AI 代理的永久可搜索内存,无需依赖云服务
  • 即使没有互联网也能为 AI 助手提供离线可用的召回
  • 用廉价、始终可用的本地存储补充云内存提供器
  • 作为 Hermes Agent 的独立内存存储,自动暴露工具

项目优势

  • 零依赖——纯 Python 标准库,无外部 SDK
  • 亚毫秒级本地 BM25 召回,每次调用零代币消耗
  • 口音归一化 BM25 搜索(例如 'cacula' 能找到 'caçula')
  • 18 个端到端测试覆盖真实引擎和提供器,测试充分

使用前须知

  • Hermes 一次只支持一个外部内存提供器,因此 OptMem 要么是唯一提供器,要么与云提供器互补(不能同时使用两个)
  • 仅追加设计意味着内存永不缩小;旧数据通过 'nap' 压缩但从不删除
  • 固定宽度记录格式(320/288 字节)可能限制超长或多样化的内存条目

README 快速开始

OptMem — local memory provider for Hermes Agent

A portable, dependency-free independent reimplementation of Victor Taelin's OptMem design, wired into Hermes Agent as a standalone MemoryProvider.

License note. The upstream VictorTaelin/OptMem repo currently ships without an explicit license (all rights reserved by default). This repository is an independent reimplementation of the published design and memory format — it does not copy the upstream source. It is released here under MIT (see LICENSE). If/once upstream adopts a license, this plugin will align with it.

  • Append-only LOG.txt + decay TREE/ — uses the same on-disk format as the original memo tool (fixed-width 320/288-byte records, identical cover/decay math), so logs produced here are byte-compatible and interchangeable with Taelin's implementation.
  • Accent-normalized BM25 recallrecall("cacula") finds the caçula memory.
  • Zero dependencies — pure Python standard library.
  • Native Windows — uses msvcrt advisory locks (with spin/backoff), no WSL.
  • Cheap, always-on — local BM25, no network round-trip, no per-call LLM cost.

Published as a standalone plugin repo per Hermes CONTRIBUTING.md: third-party memory providers no longer land under plugins/memory/ in the core tree. Install via ~/.hermes/plugins/ or pip.


Why OptMem

Hermes ships cloud-backed memory providers (Honcho, Mem0, Hindsight). They are powerful for cross-session user modeling, but they impose a network round-trip and — on reasoning tiers — an LLM call on every recall.

OptMem is the cheap, always-available local layer: permanent, searchable memory that survives restarts, costs zero tokens, and never leaves your machine. Hermes allows one external provider at a time, so the two are complementary — OptMem is the durable default; a cloud provider is selected when richer modeling is wanted.

DimensionOptMem (local)Cloud providers (e.g. Honcho)
Startup dependencyNone — is_available() is always TrueNeeds API key / base URL
Per-call latencyLocal BM25 (sub-ms to ms)Network, sometimes an LLM
Per-call co

项目描述

OptMem memory provider plugin for Hermes Agent (append-only, decay-compressed, BM25 search)

相关仓库与替代方案

根据分类、Topic 和编程语言匹配的相似项目。

lopopolo
精选
lopopolo GitHub avatar

harness-engineering

Harness Engineering is a methodology for improving coding agent outputs by carefully crafting the environment around them—providing curated context, tools, and executable constraints that encode an organization’s nonfunctional requirements and cumulative lessons.

AI 与机器学习AI 智能体
2,390
slvDev
精选
slvDev GitHub avatar

esp32-ai

A 28.9 million parameter language model runs on an $8 ESP32-S3 microcontroller entirely on-device, generating simple stories at about 9.5 tokens per second.

AI 与机器学习大语言模型
1,960
littledivy
精选
littledivy GitHub avatar

mimic

mimic captures traffic from any iOS or web app and automatically generates a Python client library that lets you call the app's API like a regular library.

AI 与机器学习
1,482