amem

How amem works

Coding agents forget between sessions. They re-grep the same tree, re-learn the same constraints, and burn tokens rediscovering decisions you already paid for. amem is a private local sidecar so the next session starts oriented.

The problems

Without itWith it
Agent explores broadly every sessionIt queries memory first, then verifies the right files
Decisions die in chat scrollbackThey become claims with file anchors and a Why line
The same deploy dance is rediscoveredA skill loads only when that work comes up again
“Do this later” vanishes when the tab closesA Kanban the agent can add, move, and complete
Pressure to dump context into a shared wikiExplicitly personal — prompts and learnings stay on the laptop
A flat AGENTS.md that goes staleA small graph: components → flows → claims, updated as drafts

How a day goes

  1. You (or the hook) run a context lookup. Matching claims, open tasks, and skill names land in the prompt.
  2. The agent prefers those file anchors over a broad explore, then verifies the current code — memory can be stale.
  3. When something durable is learned, it remembers a fact or saves a skill. Follow-ups go on the board.
  4. At session end, amem may queue a compact memory draft, a miss→learn draft, or one skill suggestion. You approve in the UI.

Privacy, on purpose

Security & Architecture FAQ

Anti-poisoning & injection defenses

How does amem prevent poisoned chat or malicious prompt injections from corrupting memory? Ingestion runs through syntactic fact filters (isFactLike), secret deny patterns, quality scoring, and a default staged review queue (ProposalDraft) before anything is applied.

Scope isolation & anti-bleed

Every claim, task, and note is strictly partitioned by repository (repo_id). Context packets are tightly ranked via hybrid BM25 + vector search and hard-capped at 2.4KB to avoid prompt stuffing and cross-project leaks.

Staleness & code drift

Claims are tied to file anchors. If anchored files are edited or deleted, amem automatically marks claims stale, applies a ranking penalty, and warns the model to verify before trusting.

Localhost & zero egress

The daemon strictly binds to 127.0.0.1, telemetry is forced off, and local databases use 0700 permissions with optional AES-256-GCM encryption at rest.

Not this

One command. Then the UI.

npx @iamem/amem setup
npm i -g @iamem/amem && amem setup

Node 20+. Then run amem ui. Source on GitHub.