amem

io.github.sslugic由 GitHub 账号 sslugic 发布v0.7.5更新于 Oct 31, 2026

Local, private memory for coding agents: facts, skills and tasks that persist across sessions.

概览

AI 生成的概览

面向编程助手的本地私有记忆:把事实、技能和任务保存在本机,让助手跨会话记住。

可以做什么
  • 按查询检索排序后的记忆上下文包,并提供何时读取或写入记忆的说明
  • 保存持久事实、淘汰过时结论,并查看某个仓库或工作区已存的事实、组件与流程
  • 以索引和完整正文的形式列出、查看并保存可复用的多步骤技能
  • 管理延后任务看板:列出、新增、更新和完成任务
  • 查看被监控的仓库与工作区、状态、用量与节省统计,并回报实际打开了哪些锚点
适用场景
适合编程助手在会话之间反复重读文件、重新摸索同样的约束、决策或坑点的场景,并希望这些知识留在本地而不是每次粘贴进提示词。也适合希望后续工作和可复用流程不随聊天结束而丢失的团队。
运行要求
以本地进程方式运行 npm 包 @iamem/amem(需要 Node.js/npx);setup 会在受支持的客户端(如 Claude Code、Cursor、Codex、Copilot)中注册 MCP 服务器并安装钩子。记忆保存在 ~/.amem 下的 SQLite 文件中。未声明任何 API 密钥或环境变量。
安装前请注意
该服务器会写入持久的本地记忆、技能和任务,钩子会在会话开始和每次提示时自动向助手提供上下文。可选的匿名遥测(版本、操作系统、运行了哪些部分)仅在主动开启后发送,可随时关闭。凭据和令牌会被阻止保存;卸载时除非显式清除,记忆会保留在本机。

安装

在 SourceWeft 中

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

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

其他 MCP 客户端

参照 仓库 中的启动说明。

README

amem

[npm version] [npm downloads] [CI] [License: MIT] [Node 20+] [MCP server] [Local only]

[amem MCP server] [amem on Glama]

Personal agent memory that stays on your machine. Works with Claude Code, Cursor, Claude Desktop, Copilot, Codex, Gemini CLI, Windsurf, Continue, Aider and Zed, on macOS, Linux and Windows.

bash
npx @iamem/amem setup --platform claude   # or cursor, codex, copilot …

[amem dashboard: Home, Memory and Tasks]

Website · Features · Why amem · How it works Coding agents forget between sessions. They re-read the same files, re-learn the same constraints and spend tokens rediscovering decisions you already made.

amem gives them a private memory that lives on your machine. The next session starts with what the last one learned.

What you get

  • Memory: short facts (constraints, gotchas, decisions, owners) tied to the files they describe. Facts are flagged stale when those files change.
  • Context on autopilot: hooks hand your agent a small, ranked packet at session start and with each prompt. No pasting a project brief.
  • Skills: repeatable procedures (release steps, deploy order, test setup), loaded only when they apply.
  • Tasks: a Backlog → Next → Doing → Done board your agents update, so follow-ups survive the chat.
  • A dashboard: amem ui shows what your agents remember, what needs review and open tasks. Retire or delete a fact in one click.
  • Private by design: one SQLite file in ~/.amem, a localhost-only UI, optional encryption and local backups.

Works with Claude Code, Cursor, Claude Desktop, Copilot, Codex, Gemini CLI, Windsurf, Continue, Aider, Zed and any other MCP client.

Quick start

bash
cd ~/code/your-projectnpx @iamem/amem setup --platform claude   # or: cursor, codex, copilot, windsurf … (amem platforms)amem ui                                   # open the dashboard at http://127.0.0.1:7843

Setup installs the amem CLI, adds the hooks, registers the amem MCP server (restart your client once) and seeds the repo with build, test and CI facts from its manifests, so the first question already has an answer. From then on your agent checks memory before exploring and saves what it learns. You can also do it by hand:

bash
amem remember "Stripe webhooks must be verified with the raw body" --kind gotcha --anchor src/webhooks/stripe.tsamem context "stripe webhook signature"
markdown
### claim.remember_2f41c0c9e1ffKind: `gotcha`Why: `keyword+12`, `fts+4.2`, `embed+5.4`, `kind:gotcha`, `fresh`
Stripe webhooks must be verified with the raw body.Anchors: `src/webhooks/stripe.ts`

Any MCP client can use the same memory: amem mcp --print-config prints a ready-to-paste config.

Something off? amem doctor --fix rewires the current repo's client. To remove amem, run amem uninstall to see what it added, then amem uninstall --yes. Your memory stays unless you add --purge.

How well it finds things

npm run bench loads 36 memories from a sample web shop and asks 32 questions phrased the way people ask, often without the memory's words. It also sends 8 vague prompts ("ok sounds good, go ahead") that name no topic. CI fails if these numbers drop.

PathRight memory firstRight memory in top 3Vague prompts given memory
Prompt hook (automatic)88%97%0%
amem_context (agent asks)81%94%n/a

The data is in bench/retrieval.json. Add your own cases and run npm run bench -- --misses to see what it gets wrong.

Privacy (non-negotiable)

  • Memory never leaves your machine: no sync, no cloud embeddings, no "share with org" mode.
  • The UI and HTTP MCP endpoint bind to 127.0.0.1 only, and ~/.amem is created with mode 0700.
  • Credentials and tokens are blocked from being saved. Personal notes stay out of work projects unless you ask about them.
  • Optional AES-256-GCM lock (amem lock) and encrypted local backups (amem backup schedule).
  • No network calls by default. If you opt in (amem setup asks once, or amem telemetry on), amem sends an anonymous ping at install and first run, then at most one a day with the version, OS and which parts ran (MCP, hooks, UI, CLI). No memory, repos, paths or names. amem telemetry off stops it; managed (IT policy) installs never send it.

Learn more

License

MIT, see LICENSE.

来源:README.md,提交 72c30df

工具

16

amem_context

Retrieve compact local amem memory for a query. Use before exploring files or calling a remote LLM with a large prompt. Pass workspace for named app memory, not only git repos.

输入参数query必填platformsessionIdworkspace

amem_recipe

Return the generic amem remember contract: when to call amem_context vs amem_remember. Use if you are unsure whether to read or write memory. Same recipe for every MCP host. Takes no arguments.

无需输入参数。

amem_remember

Store a durable local fact in amem (stays on this machine). Use kind `private` (or anchor `private`) for personal, non-work facts so they never appear in work repositories' context. When the fact replaces an older one (a newer status, a fixed bug, a changed decision), pass the old claim ids in `supersedes` so the outdated memory stops being served. The response lists `possiblySupersedes`: older look-alikes to retire with amem_supersede if they are now wrong.

输入参数kindtext必填anchorsworkspacesupersedes

amem_supersede

Retire outdated claims so they stop appearing in context: marks them superseded (kept for history, not served). Pass `by` with the claim id that replaces them, if any.

输入参数byids必填workspace

amem_repos

List what amem is monitoring. Each item has kind git or workspace. Workspaces also have a stable slug (MCP id); the display name can differ. Use when asked which projects, workspaces, or repos amem knows about. All arguments are optional.

输入参数kind

amem_stats

Usage and savings stats (local lookup time, estimated tokens/ms saved, hit rate) for one workspace/repo or everything. Use when asked how much amem helped, how often it hit, or usage over time. All arguments are optional.

输入参数daysscopeworkspace

amem_graph

Dump stored facts for a workspace or git repo: claims, components, flows, and recent activity. Use when asked what amem remembers about a project. Prefer amem_context for a ranked packet for the current question. All arguments are optional.

输入参数daysworkspace

amem_status

Binding, policy, and counts for one workspace/repo, plus the full monitored inventory. Omit workspace for a machine-wide overview. All arguments are optional.

输入参数workspace

amem_skill_list

List stored skills (procedures the agent learned) as an index of names and descriptions only. Cheap — call this first, then amem_skill_view to load the one you need. Skills are longer procedures; use amem_context for small durable facts. All arguments are optional.

输入参数query

amem_skill_view

Load the full body of one skill by name, or a supporting file inside it. Call this only after amem_skill_list (or the 'Relevant skills' section of an amem context packet) shows a skill worth following.

输入参数filename必填sessionId

amem_skill_save

Save a non-trivial multi-step procedure you just worked out as a reusable skill. Use after solving something worth repeating — a workflow, a dead end you found the way past, or a correction the user gave you. Provide a full SKILL.md in `content`, or a description plus body.

输入参数name必填contentsessionIddescription

amem_task_list

List deferred agent tasks (Kanban) for a workspace/repo. Use for work to do later — not durable facts (use amem_remember for those). Default excludes done tasks. All arguments are optional.

输入参数statusworkspaceinclude_done

amem_task_add

Create a deferred agent task on the project Kanban (default backlog). Use for work that should not get lost in chat. Durable facts still go through amem_remember.

输入参数bodytitle必填statusanchorsworkspace

amem_task_update

Change an existing Kanban task: move it between columns (set status to doing when you start it, blocked when it waits on someone), rename it, or replace its notes or file anchors. Only the fields you pass change. Use amem_task_complete to finish a task and amem_task_add for new work. Returns the updated task as JSON; an unknown id returns an error.

输入参数id必填bodytitlestatusanchorsworkspace

amem_task_complete

Mark a Kanban task done as soon as its work is finished and verified, so the next session does not pick it up again. Records the completion time and keeps the task in history (amem_task_list with include_done shows it). Same as amem_task_update with status done. Returns the completed task as JSON; an unknown id returns an error.

输入参数id必填workspace

amem_usage_report

Report what you actually did with the last amem context packet, so its savings estimate becomes a measurement instead of a guess. Call this once after you have finished acting on a packet. Do NOT estimate tokens — just list which of the anchors amem gave you you ended up opening anyway (anchors_opened), and whether the packet answered the question without further exploration (answered). amem computes the saving from the real size of the files you did not have to open. Reporting that you opened everything is a useful and expected answer.

输入参数answered必填event_idworkspaceanchors_opened必填

版本历史

6
  1. v0.7.5最新Oct 31, 2026
  2. v0.7.4Oct 31, 2026
  3. v0.7.3Oct 31, 2026
  4. v0.7.0Oct 30, 2026
  5. v0.4.4Oct 30, 2026
  6. v0.4.3Oct 29, 2026

评分

已满足适用检查项的 90%

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

  • 近 30 天内可连通25 分
  • 已声明认证方式10 分

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

  • 已列出工具必需15 分
  • 描述必需15 分
  • 图标10 分
  • 文档15 分
  • 许可证10 分