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
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.
給程式開發代理的本地私有記憶:把事實、技能與任務存在本機,讓助理跨工作階段記得。
Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。
參照 儲存庫 中的啟動說明。
[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.
[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.
amem ui shows what your agents remember, what needs review and open tasks. Retire or delete a fact in one click.~/.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.
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:
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.
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.
The data is in bench/retrieval.json. Add your own cases and run npm run bench -- --misses to see what it gets wrong.
127.0.0.1 only, and ~/.amem is created with mode 0700.amem lock) and encrypted local backups (amem backup schedule).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.MIT, see LICENSE.
來源:README.md,提交 72c30df
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必填platformsessionIdworkspaceReturn 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.
無需輸入參數。
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必填anchorsworkspacesupersedesRetire 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必填workspaceList 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.
kindUsage 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.
daysscopeworkspaceDump 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.
daysworkspaceBinding, policy, and counts for one workspace/repo, plus the full monitored inventory. Omit workspace for a machine-wide overview. All arguments are optional.
workspaceList 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.
queryLoad 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必填sessionIdSave 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必填contentsessionIddescriptionList 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_doneCreate 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必填statusanchorsworkspaceChange 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必填bodytitlestatusanchorsworkspaceMark 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必填workspaceReport 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必填已滿足適用檢查項的 90%
該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。
請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。
npx @iamem/amem setup --platform claude # or cursor, codex, copilot …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:7843amem remember "Stripe webhooks must be verified with the raw body" --kind gotcha --anchor src/webhooks/stripe.tsamem context "stripe webhook signature"### 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`