amem

Mémoire locale d'agent sans Docker : amem + MCP (les faits restent dans ~/.amem)

Documentation

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.

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

cd ~/code/your-project
npx @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:

amem remember "Stripe webhooks must be verified with the raw body" --kind gotcha --anchor src/webhooks/stripe.ts
amem context "stripe webhook signature"
### claim.remember_2f41c0c9e1ff
Kind: `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.