Vanguard Memory Node

io.github.ezumba由 GitHub 账号 ezumba 发布v2.0.1更新于 Oct 24, 2026

Local deterministic BM25 memory for AI agents. Offline-first, no API key, SHA-256 shards, stdio.

发布方自己的服务:Memory.fit

已验证STDIO仅桌面文件与存储知识与记忆

概览

AI 生成的概览

为 AI 助手提供本地、离线的 BM25 关键词记忆库:可写入文本或文件,并进行搜索、召回、列出与删除。

可以做什么
  • 将文本或持续增长的文件写入本地库,按 SHA-256 内容寻址,并支持命名空间与标签
  • 对整个库做关键词搜索并返回排序片段,或从单个对象中召回最匹配的证据窗口
  • 列出已存对象、查看其目录元数据,并永久删除对象及其索引条目
  • 查看库统计信息与 BM25 索引状态,并从权威对象文件重建索引
  • 在配置 API 密钥后,可将对象同步到 ExergyNet LNES-17 账本
适用场景
适合希望助手跨会话记住文本、又不想使用云端向量数据库、API 密钥或按次计费的场景,也适合要求同一查询与同一数据始终返回相同结果的用途。还可用于通过反复增量写入文件来持续采集日志或会话内容。
运行要求
以本地 stdio 进程运行,可全局安装或通过 npx 启动,因此需要 Node.js;README 给出了 Claude Desktop 的配置方式。数据保存在用户主目录下的 .vanguard 目录中。可选的 ExergyNet 同步需要 EXERGYNET_API_KEY,另有 EXERGYNET_NETWORK、EXERGYNET_VAULT_URL 与 AUTO_SYNC_VAULT 等设置。
安装前请注意
写入的文本与文件会保存到本地磁盘,vmn_delete 会永久删除对象及其索引条目。可选的同步会把库中对象上传到第三方账本,并需要 EXERGYNET_API_KEY;将 AUTO_SYNC_VAULT 设为 true 后,每次写入都会自动上传。README 中的钩子示例会在每次会话结束时运行该包,请先确认它会采集哪些内容。

安装

在 SourceWeft 中

  1. 打开 控制台中的 Vanguard Memory Node,将其添加到工作区。
  2. 为需要使用其工具的对话启用该服务。

Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。

其他 MCP 客户端

参照 仓库 中的启动说明。

README

Vanguard Memory Node (VMN)

[npm version] [npm downloads] [License: MIT] [MCP Badge]

Local deterministic memory for AI agents via the Model Context Protocol (MCP).

No cloud. No vector database. No semantic drift. Your data stays on your machine.


What it does

VMN gives any MCP-compatible AI agent a persistent, queryable memory vault stored entirely on local disk. Text is ingested once, content-addressed with SHA-256, segmented, and indexed with a sharded BM25 inverted index. Retrieval is deterministic: the same query always returns the same ranked result from the same data.

Optionally, vaults can be synced to the ExergyNet LNES-17 ledger for cross-device and cross-agent recall with cryptographic provenance.


Install

bash
npm install -g @lnes/vanguard-memory-node

Or run without installing:

bash
npx @lnes/vanguard-memory-node

Claude Desktop integration

Mac — ~/Library/Application Support/Claude/claude_desktop_config.json
Windows — %APPDATA%\Claude\claude_desktop_config.json

json
{  "mcpServers": {    "vanguard-memory": {      "command": "npx",      "args": ["-y", "@lnes/vanguard-memory-node"]    }  }}

With ExergyNet vault sync enabled:

json
{  "mcpServers": {    "vanguard-memory": {      "command": "npx",      "args": ["-y", "@lnes/vanguard-memory-node"],      "env": {        "EXERGYNET_API_KEY": "sk-exergy-your-key",        "EXERGYNET_NETWORK": "mainnet",        "AUTO_SYNC_VAULT": "true"      }    }  }}

WSL on Windows:

json
{  "mcpServers": {    "vanguard-memory": {      "command": "wsl",      "args": ["-d", "Ubuntu", "npx", "-y", "@lnes/vanguard-memory-node"]    }  }}

Tools (11 total)

vmn_ingest

Stores text as a SHA-256 content-addressed shard. Segments it, indexes it, and updates the local catalog.

ParameterTypeRequiredDescription
textstringyesContent to store
titlestringnoHuman-readable label
namespacestringnoLogical partition (default: default)
tagsstring[]noSearch tags
content_typestringnoMIME type hint (default: text/plain)
sourcestringnoSource label

Returns: SHA-256 root hash + vault path + vault_synced flag.

vmn_recall

Retrieves a 900-character evidence window from a specific shard using lexical BM25 scoring.

ParameterTypeRequiredDescription
hashstringyesRoot hash from vmn_ingest
querystringyesSearch query

Returns: best-matching evidence window, or a human-readable no-match message.

vmn_search

Full-vault keyword search across all ingested objects. Returns ranked results with snippets.

ParameterTypeRequiredDescription
querystringyesSearch query
limitnumbernoMax results (default: 10)
namespacestringnoRestrict search to this namespace only

vmn_ingest_file

Delta-ingests a growing file into the vault, tracking progress with a cursor so only new lines are ingested on each call. Designed for Stop hooks and continuous log pipelines — safe to call repeatedly with no duplicates.

ParameterTypeRequiredDescription
file_pathstringyesAbsolute path to the file
session_idstringnoCursor key (defaults to file path)
namespacestringnoNamespace for ingested content (default: file_ingest)
titlestringnoOptional title override
tagsstring[]noOptional tags

Returns: lines_ingested, cursor_line, and shard hash (null if no new content).

Stop hook example — ingest every Claude session automatically:

json
{  "hooks": {    "Stop": [{      "matcher": "",      "hooks": [{        "type": "command",        "command": "npx -y @lnes/vanguard-memory-node vmn_ingest_file --file_path \"$CLAUDE_SESSION_FILE\" --session_id \"$CLAUDE_SESSION_ID\""      }]    }]  }}

vmn_list

Lists all memory objects in the vault.

ParameterTypeRequiredDescription
namespacestringnoFilter by namespace

vmn_inspect

Returns full catalog metadata for a specific object.

ParameterTypeRequiredDescription
hashstringyesRoot hash

vmn_delete

Permanently removes an object and all its index entries.

ParameterTypeRequiredDescription
hashstringyesRoot hash

vmn_stats

Returns aggregate vault statistics: entry count, total bytes, namespaces, oldest/newest timestamps.

vmn_index_status

Returns current BM25 index state (READY, REBUILD_REQUIRED, REBUILDING, DEGRADED).

vmn_rebuild_index

Rebuilds the full BM25 index from authoritative object files. Safe at any time — objects are never modified.

vmn_sync_vault

Syncs a local memory object to the ExergyNet LNES-17 vault. Requires EXERGYNET_API_KEY. Use EXERGYNET_NETWORK to target mainnet or testnet.

ParameterTypeRequiredDescription
xlmp_rootstringyesRoot hash of the object to sync
intentstringnoSync intent label (default: manual-sync)

Returns: xlmp_root, bytes_committed, status, and the resolved vault URL.


Environment variables

VariableDefaultDescription
AUTO_SYNC_VAULTfalseSet to true to auto-sync every vmn_ingest to ExergyNet
EXERGYNET_API_KEY—API key for ExergyNet vault access (sk-exergy-*)
EXERGYNET_NETWORKtestnetTarget substrate: mainnet → portal.exergynet.org, testnet → dt.portal.exergynet.org
EXERGYNET_VAULT_URL(resolved from EXERGYNET_NETWORK)Override vault base URL entirely

Vault layout

~/.vanguard/├── local_vault/│   └── <sha256>.txt              # authoritative object files (never modified after write)├── catalog/│   └── <sha256>.json             # per-object metadata (O(1) reads)├── segments/│   └── <sha256>.json             # segment records with term frequencies├── cursors/│   └── <session_id>.json         # cursor state for vmn_ingest_file└── index/    └── v2/        ├── index_manifest.json   # version + state header        ├── corpus_stats.json     # BM25 corpus statistics        └── postings/            └── <2-hex>.json      # 256 sharded posting buckets

How retrieval works

  1. Normalization — Unicode NFC → phrase alias substitution → tokenize → suffix stem → stop-word filter → token alias expansion
  2. Stemmer — 13-rule suffix stripper: tions→ (5), ions→ (4), tion→ (4), ings→ (4), ing→ (3), ers→ (3), ies→ (3), ic→ (2), er→ (2), ed→ (2), es→ (2), s→ (1), y→ (1). Rules applied longest-first; medications and medication both reduce to the same root.
  3. Alias expansion — clinical, technical, and legal synonym clusters (smok↔tobacco↔cigarett, physician↔doctor, hypertens↔bp, etc.)
  4. BM25 scoring — sharded 256-bucket inverted index; top-150 postings per term to cap high-DF stall
  5. Fallback — stemmed-token set comparison when BM25 score is zero; prevents false positives on partial-word matches

Comparison

VMNChromaDB / Pinecone
Result determinismSame query → same result, alwaysVaries with model version
Data locationLocal disk onlyCloud upload required
Per-query cost$0API charges
Setup time60 secondsAccount + key + SDK
Semantic driftNoneBreaks on model updates
Offline capableYesNo

License

MIT — free forever, no telemetry, no usage limits.

Built by ExergyNet.

来源:README.md,提交 67721a8

工具

0
SourceWeft 尚未在沙箱中启动过该软件包,因此其工具未知。

版本历史

1
  1. v2.0.1最新Sep 16, 2026

评分

已满足适用检查项的 50%

该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。

  • 近 30 天内可连通25 分

    请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。

  • 已声明认证方式10 分

    请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。

  • 已列出工具15 分

    请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。

  • 描述必需15 分
  • 图标10 分
  • 文档15 分
  • 许可证10 分

其他 Memory 集成