claude-mem
Captures what your agent does during sessions, compresses it with AI, and injects relevant context back into future sessions so work carries over. Works with Claude Code and several other coding agents.
Local personal memory for LLM agents.
Claude Code
$ npx -y skills add gowtham0992/link --agent claude-code
Codex
$ npx skills add gowtham0992/link -a codex
Cursor
$ npx skills add gowtham0992/link -a cursor
Gemini CLI
$ npx skills add gowtham0992/link -a gemini-cli
GitHub Copilot
$ npx skills add gowtham0992/link -a github-copilot
OpenCode
$ npx skills add gowtham0992/link -a opencode
Windsurf
$ npx skills add gowtham0992/link -a windsurf

Link gives Codex, Claude, Cursor, Kiro, VS Code, Copilot, Antigravity, and other local agents the same source-backed memory, stored locally as Markdown.
Website · How it works · Memory · Tools & CLI · Setup · Docs · MCP Registry · PyPI · Homebrew
brew install gowtham0992/link/link # or: pip install link-mcp
lnk setup # wires every agent you have
Then work normally. Tell an agent "remember that we deploy on Tuesdays", approve it once, and every other agent recalls it in a new session tomorrow.
lnk status # is it wired up and being used?
lnk import claude-code # bring existing memory in
brew install --cask gowtham0992/link/linkbar # macOS menu bar app
Memory lives in plain Markdown you can open, and nothing becomes durable without your approval.
Link is an open-source memory layer for local AI agents. Raw sources become an inspectable Markdown wiki. Explicit "remember this" requests become reviewable memories. Agents retrieve compact, source-backed context through the CLI, MCP, official skills, or the local viewer without dumping the whole wiki into a chat window.
The wiki is the storage layer. The product is durable memory that stays on your machine, remains readable in plain files, and can be shared across multiple agents instead of locked inside one vendor profile.
Link gives agents five simple moves:
raw/.wiki/.Most agent sessions start from zero. You re-explain preferences, repo decisions, project constraints, and why something matters. Link turns that repeated context into local memory agents can query.
| Pain | Link's answer |
|---|---|
| Agents forget you between sessions. | Save reviewed preferences, decisions, facts, and project context. |
| Notes are private or messy. | Keep raw sources local, then turn them into source-backed Markdown. |
| Context windows are expensive. | Return compact query packets with provenance and follow-up actions. |
| Memory needs trust. | Every page and memory can be inspected, reviewed, archived, or forgotten. |
| Agents read a rule and break it anyway. | A reviewed memory can carry a rule that asks for your OK, or blocks the call, before it runs. |
| Memory goes stale as the code moves on. | Memories that name files, scripts, dependencies or functions are checked against the repository and flagged, not believed. |
| You cannot tell what the agent was given. | lnk receipt lists every memory that reached a session and whether it arrived whole. |
Link follows Andrej Karpathy's LLM Wiki pattern: keep knowledge outside the chat window, make claims inspectable, and let context compound over time.
Every other agent-memory system stores memory as embeddings in a vector database or as an LLM-extracted graph. Link made five architectural commitments those designs cannot bolt on:
ask command: git push --force, deny write: migrations/**) that is
checked before the agent's tool call, with no model and under a
millisecond. Memories about code are re-read against your repository and
flagged when the code moved on. Memories surface when the agent opens the
file they describe, lnk compile writes reviewed memory into the files
every agent already reads, and a receipt proves what reached each session.And the claims are measured, not asserted — see the benchmarks below. Named comparisons against Mem0/OpenMemory, Zep/Graphiti, and Letta: Why Link?
Plain files with no LLM in the memory layer, measured against the systems that have one everywhere:
| What | Link | For comparison |
|---|---|---|
| LoCoMo end-to-end QA — full 1,540 questions under mem0's own open harness | 84.8% | mem0's cloud platform: 83.2% under the same judge — with GPT-5 writing their answers and a budget model (claude-haiku-4-5) writing Link's. Confirmed by a second, independent judge (Tencent Hunyuan 3): 85.5% vs 83.6% |
| LongMemEval evidence retrieval — did the memory layer put the gold evidence in context? (deterministic, no LLM judge) | 99.4% of 500 questions | of 102 answer failures, only 3 were retrieval misses — the rest happened with the evidence already retrieved |
| Memory hygiene — junk stored over a simulated multi-month session stream | 0% (by construction, CI-enforced) | the same pipeline with governance off: 35.7% |
| Memory poisoning — 18 authored prompt-injection attacks on the capture pipeline (guardrail bypass, exfil conventions, credential planting, spoofed approvals, MemGhost-class untrusted-channel writes) | 0 reach the inbox unlabeled; 0 false positives on benign directives (CI-enforced) | to our knowledge the only published adversarial benchmark on an agent-memory write path |
| Token economics — real recall packets, measured through the query path | 1,697–3,752 tokens per recall (micro→large budget); a 64× larger store grows the packet 1.56×, and the last quadrupling moves it 0.3% | bounded by the budget you ask for, not by how much you have remembered; CI-enforced. Over MCP, the first response of a session also carries a one-time memory brief, bounded to a hard 4,000-character budget (~365 tokens of overhead, measured) — see RESULTS.md |
Enforced rules — 17 forbidden tool calls, including shell disguises (cd x && sudo …, quoting, bash -c), against 34 ordinary coding-agent calls | 17 of 17 caught, 0 of 34 stopped, under 0.2 ms per decision | a rule acts only after you review it; the agent cannot approve, clear or bypass one |
| Staleness checks — memories and instruction files (AGENTS.md, CLAUDE.md, Cursor rules…) checked against the repository | 0 false flags: 345 memory references in Link's own docs and 604 instruction-file references across eight public repositories; every planted deletion caught | a reference is reported only when git history shows the thing existed |
| Bundled 1,176-case recall benchmark — deterministic, no network, no LLM | pip default (lexical) hit@1 0.671; lnk setup provisions the fast local tier by default: 0.740; optional quality tier 0.789, plus rerank 0.798 | reproducible with one command; CI runs the suite and gates dataset integrity, not the score |
Every number ships with its config, judge model, caveats, and the experiments that lost — including LongMemEval end-to-end, where we re-judged both sides under the neutral Hunyuan 3 referee: mem0's GPT-5 answers score 91.0%, Link's budget-model answers 80.6%. Their published number holds up, and the gap tracks the answering model, not the memory layer — that's what the 99.4% evidence-retrieval row above isolates. Full methodology and reproduction steps: benchmarks/RESULTS.md.
Three questions every memory system should answer, and how Link answers them with mechanisms instead of promises:
"Is it on all my machines?" lnk sync moves reviewed memory through
a git remote you control — a private GitHub repo, a homelab bare repo —
with no server and no account. Secrets are scanned before anything
leaves, conflicts become review items instead of git markers, and private
captures never sync. lnk team-sync runs a shared team brain on the same
rails.
"What did I believe back then?" Ask in plain language: lnk recall "where does local data live in March" returns what was true then,
reconstructed from the dated files and their supersede lineage — while
the same question without the date returns today's truth. Deterministic:
a regex and a calendar, no model. Point-in-time accuracy from plain
language: 1.00 on the hygiene benchmark's revised facts, identical to
asking with an ISO date.
"Is my agent actually using this?" The question most memory systems
cannot answer about themselves. Link records retrievals locally — session
briefs pushed to agents, recalls they chose to make — and lnk wins
answers with counts, while lnk digest reports the weekly story
Captures what your agent does during sessions, compresses it with AI, and injects relevant context back into future sessions so work carries over. Works with Claude Code and several other coding agents.
Gives Claude Code long-term memory through Hindsight. It recalls relevant past context before answering, retains durable facts as the agent learns them, and reflects over stored memory.
Local-first memory for Claude Code. It stores conversations verbatim in a private palace you can search before answering about past work, people, projects, or decisions, with optional shared-brain hub setup.
Gives Claude Code a private memory that stays on your machine. It stores past conversations word for word, so you can ask what was decided, what happened before, or who was involved and get the original context back. It can also hand tasks to other agents.
Local personal memory for LLM agents. Install it with the command on its page. It includes link-health, link-ingest, link-memory. Its skills do not fire on their own yet. Free and open source.
Is this plugin yours?
Claim it with GitHubSubmit a pluginPromote it