engrm

中文文档
0.6.6发布于 2026/11/03FSL-1.1-ALv2ES Module

Local vector memory for projects and repos — MCP for agents, Markdown vault for humans

原始使用文档
文档目录13 节
  1. Just works
  2. This laptop (all agents share memory)
  3. Agent machines (zero-touch, fleet token)
  4. Other devices
  5. How it works
  6. What gets remembered
  7. Point Engrm at a model server
  8. MCP tools
  9. CLI
  10. Non-goals
  11. Development
  12. License
  13. Documentation

Engrm

License: FSL-1.1-ALv2 Node.js TypeScript MCP Compatible

Local vector memory for projects and repos — wiki-shaped for humans, MCP-shaped for agents, synced across devices.

See SCOPE.md and HARNESS.md.


Just works

This laptop (all agents share memory)

bun run src/cli.ts setup
# or: npx engrm setup

That initializes local memory (if needed) and registers Cursor, Claude Code, OpenCode, and Codex. Restart agent sessions once. After that, agents share one DB + vault automatically — no per-chat setup.

Agent machines (zero-touch, fleet token)

For machines that run agents with no person to sign in. An admin makes a token once on the hub: Team → Agent fleet tokens → Create token. It is shown once; keep it in your secrets store (1Password, the CI or MDM secret store), not in a repo.

On each machine (Node 22 or later):

ENGRM_FLEET_TOKEN="$TOKEN_FROM_YOUR_SECRET_STORE" npx --yes engrm@latest setup

That installs Engrm, registers Claude Code, Codex, Cursor and OpenCode, signs the machine in to the team hub and pulls the company topics, with no prompts. --yes stops npx asking to install. The token is read from the environment, so it stays out of the process list; --token=… also works. A machine already set up can join with ENGRM_FLEET_TOKEN=… engrm login.

  • Keep it syncing. On macOS, setup installs a launchd agent that syncs in the background. On Linux, run engrm mesh daemon under your service manager, for example a systemd user unit with ExecStart=engrm mesh daemon and Restart=always.
  • Codex needs one approval. Codex runs Engrm's hooks only after they are trusted: run codex once and approve them in /hooks. Until then Codex gets the MCP tools but records nothing. Claude Code needs nothing.
  • Restart agents that were open before setup, so they load Engrm.
  • What the hub shows. Each machine appears on its own on the Devices page, under the token's name ("Fleet: Codex runners"), and every memory records the machine and agent that wrote it.
  • Revoke. Revoking the token on the Team page signs every machine that joined with it out at once. Make a new token to bring machines back.

Check a machine with engrm status: Team hub shows the hub as reachable, and Agents shows each agent as registered.

Other devices

Option A — LAN mesh (local SQLite per Mac, no cloud)

# Machine 1
engrm mesh init --cluster=optaro
# note the printed mesh_key

# Machine 2
engrm mesh join --key=<mesh_key> --cluster=optaro --peer=<machine1-ip>:7432
engrm mesh sync

Peers discover via UDP multicast and optional static --peer list. Each machine keeps its own SQLite; observations replicate over HTTP (shared+personal, never secret). Optional always-on: engrm mesh install-service.

Option B — Shared folder (no Engrm account)

Point both machines at the same vault directory (iCloud Drive, Syncthing, etc.):

// ~/.engrm/settings.json
{ "vault": { "root": "~/Library/Mobile Documents/com~apple~CloudDocs/EngrmVault" } }

Run engrm setup on each machine. Newer vault pages are imported automatically on MCP/session start (no manual reindex required).


How it works

LayerJob
VaultHuman-readable wiki pages per project, plus one rolling HANDOFF.md per repo
IndexLocal SQLite + FTS + vectors
AgentsMCP: save_observation, search, brief, … and lifecycle hooks on Claude Code, Codex, Cursor and OpenCode
SyncLAN mesh today; team hub next (see SCOPE.md)

What gets remembered

Capture during a session is deterministic: failed commands, failing tests, dependency changes, explicit saves, and the prompts you type. No model watches your tool calls and no "Modified foo.ts" records are stored.

At session end, one small-model call on your gateway reads the transcript and writes a session record: what you were doing, decisions with status, plans, open questions, next steps, and self-contained facts and lessons. The record folds into the repo's handoff page, which is the first thing the next session sees, on any machine and any agent. A second bounded call extracts retro findings (repeated errors, missed known fixes, missing checks) so recurring friction becomes visible instead of being re-lived.

If the end hook never fired (killed terminal, crashed agent), the next session start finds the transcript and writes the record then.

Point Engrm at a model server

engrm ai probe 10.20.0.10        # finds LiteLLM / Ollama / vLLM / LM Studio and lists models
engrm ai use 10.20.0.10:4000     # OpenAI-compatible /v1; add --key=… if it asks
engrm ai roles session_note=extract retro=agent
engrm ai status

Without a gateway, Engrm still captures deterministically and skips the session record.


MCP tools

ToolPurpose
searchHybrid FTS5 + vector recall
save_observationPersist a decision, lesson, fact, etc.
get_observationsFetch full details by ID
timelineChronological context around an observation
briefRepo-scoped startup brief (preferred)
session_contextAlias of brief
recent_activityWhat Engrm captured most recently
memory_statsCapture and index health
pin_observationKeep an observation from aging out

engrm setup / engrm register also installs a personal Claude Code engrm-memory skill. Natural continuity prompts such as “where are we up to with X?” trigger memory search before repo inspection; users do not need to name Engrm or tell the agent where to look.


CLI

engrm setup                 Local memory + register Claude Code, Codex, Cursor, OpenCode
engrm ai probe|use|roles|status|off
engrm session finalize --session=<id> [--cwd=<dir>] [--agent=<name>] [--force]
engrm status | doctor | register | reindex | dedupe
engrm mesh …                LAN peer sync
engrm dogfood miss|hit|note|report   Retrieval quality ledger

ENGRM_HOME overrides the data directory (~/.engrm); test harnesses use it so they can never touch a live store.

Frozen (not memory-only): Sentinel, packs. Set ENGRM_LEGACY=1 only if needed.


Non-goals

  • Sentinel / real-time code audit
  • Delivery Review
  • Knowledge-pack marketplace
  • Team billing as a launch pillar
  • Cloud required for core memory (local-first; network is sync only)

Development

bun test
bun run test:acceptance
bun run test:fresh
bun run test:dogfood
bun run test:live    # optional
bun run test:lan     # optional

License

FSL-1.1-ALv2 — see LICENSE.

Documentation

Maintainers: node scripts/check-public-docs.mjs

版本与发布记录

engrm 共发布 62 个版本,首次发布于 2026/03/12;过去 12 个月发布了 62 个版本。

版本发布日期距今
0.6.6latest2026/11/03今天
0.6.52026/11/021 天前
0.6.42026/10/287 天前
0.6.32026/10/287 天前
0.6.22026/10/277 天前
0.6.12026/10/277 天前

关于 engrm 的常见问题

engrm 是什么?

本地矢量存储器的项目和repos - MCP为代理,Markdown vault为人类

如何安装 engrm?

在项目目录运行 npm install engrm,或使用 pnpm add / yarn add / bun add。它还提供命令行工具 engrm,可以用 npx engrm 直接运行。

engrm 支持 TypeScript 吗?

该包的 package.json 没有声明类型入口。需要类型提示时,可以在 npm 上查找社区维护的 @types/engrm 是否存在。

engrm 支持 ESM 还是 CommonJS?

以 ES Module 形式发布,推荐使用 import 引入。在 CommonJS 项目中,Node.js 20.19+ / 22.12+ 可以直接 require() 不含顶层 await 的 ES Module,更早的版本需要改用动态 import()。

engrm 需要什么版本的 Node.js?

package.json 的 engines 字段要求 Node.js >=22.0.0。版本不符时 npm 默认只给出警告,开启 engine-strict 后会拒绝安装。

engrm 可以商用吗?

engrm 使用 FSL-1.1-ALv2 许可。声明的许可为 FSL-1.1-ALv2,请阅读许可原文确认使用条件。以上为概括,不构成法律意见,请以许可原文为准。

engrm 还在维护吗?

最新版本 0.6.6 发布于 2026/11/03(今天);至今共发布 62 个版本,其中过去 12 个月发布了 62 个;首次发布于 2026/03/12。发布频率只是参考信号:功能稳定的工具可能很少需要更新,建议结合源码仓库的 issue 和提交记录判断。