{
  "markdown": "<p align=\"center\">\n  <img src=\"logo.svg\" alt=\"Link\" width=\"128\">\n</p>\n\n<h1 align=\"center\">Link</h1>\n\n<h2 align=\"center\">Local memory for AI agents.</h2>\n\n<p align=\"center\">\n  Link gives Codex, Claude, Cursor, Kiro, VS Code, Copilot, Antigravity, and\n  other local agents the same source-backed memory, stored locally as Markdown.\n</p>\n\n<p align=\"center\">\n  <a href=\"https://gowtham0992.github.io/link/\">Website</a> ·\n  <a href=\"https://gowtham0992.github.io/link/#how\">How it works</a> ·\n  <a href=\"https://gowtham0992.github.io/link/#memory\">Memory</a> ·\n  <a href=\"https://gowtham0992.github.io/link/#tools\">Tools &amp; CLI</a> ·\n  <a href=\"https://gowtham0992.github.io/link/#setup\">Setup</a> ·\n  <a href=\"https://gowtham0992.github.io/link/getting-started.html\">Docs</a> ·\n  <a href=\"https://registry.modelcontextprotocol.io/?q=io.github.gowtham0992%2Flink\">MCP Registry</a> ·\n  <a href=\"https://pypi.org/project/link-mcp/\">PyPI</a> ·\n  <a href=\"https://github.com/gowtham0992/homebrew-link\">Homebrew</a>\n</p>\n\n<p align=\"center\">\n  <a href=\"https://github.com/gowtham0992/link\"><img src=\"https://img.shields.io/github/stars/gowtham0992/link?style=flat\" alt=\"GitHub stars\"></a>\n  <a href=\"https://github.com/gowtham0992/link/actions/workflows/ci.yml\"><img src=\"https://github.com/gowtham0992/link/actions/workflows/ci.yml/badge.svg\" alt=\"CI\"></a>\n  <a href=\"https://registry.modelcontextprotocol.io/?q=io.github.gowtham0992%2Flink\"><img src=\"https://img.shields.io/badge/MCP_Registry-io.github.gowtham0992%2Flink-blue\" alt=\"MCP Registry\"></a>\n  <a href=\"https://pypi.org/project/link-mcp/\"><img src=\"https://img.shields.io/pypi/v/link-mcp\" alt=\"PyPI\"></a>\n  <a href=\"https://pepy.tech/projects/link-mcp\"><img src=\"https://static.pepy.tech/personalized-badge/link-mcp?period=total&units=INTERNATIONAL_SYSTEM&left_color=BLACK&right_color=GREEN&left_text=downloads\" alt=\"PyPI Downloads\"></a>\n  <a href=\"https://mcptoplist.com/server/io.github.gowtham0992%2Flink\"><img src=\"https://mcptoplist.com/badge/io.github.gowtham0992%2Flink.svg\" alt=\"MCP Toplist rank\"></a>\n</p>\n\n<p align=\"center\">\n  <a href=\"https://gowtham0992.github.io/link/\">\n    <img src=\"docs/assets/link-remembers.svg\" alt=\"Link demo: a preference said once in an agent session is captured automatically, approved by you, and recalled in a brand-new terminal the next day — from a plain Markdown file\" width=\"840\">\n  </a>\n</p>\n\n## What Is Link?\n\nLink is an open-source memory layer for local AI agents. Raw sources become an\ninspectable Markdown wiki. Explicit \"remember this\" requests become reviewable\nmemories. Agents retrieve compact, source-backed context through the CLI, MCP,\nofficial skills, or the local viewer without dumping the whole wiki into a chat\nwindow.\n\nThe wiki is the storage layer. The product is durable memory that stays on your\nmachine, remains readable in plain files, and can be shared across multiple\nagents instead of locked inside one vendor profile.\n\n<p align=\"center\">\n  <img src=\"docs/assets/link-aha.gif\" alt=\"lnk recall finds a memory saved in completely different words — matched by meaning, not keywords\" width=\"760\">\n</p>\n<p align=\"center\"><em>Ask in your own words; Link matches by meaning, not keywords. All local, all plain files.</em></p>\n\n## How It Works\n\nLink gives agents four simple moves:\n\n1. **Capture** notes, transcripts, docs, screenshots, and project context in `raw/`.\n2. **Structure** source-backed pages under `wiki/`.\n3. **Remember** explicit preferences, decisions, facts, and project context as reviewable memory.\n4. **Retrieve** compact query packets through the CLI, MCP, official skills, or the local web viewer.\n\nMost agent sessions start from zero. You re-explain preferences, repo decisions,\nproject constraints, and why something matters. Link turns that repeated context\ninto local memory agents can query.\n\n| Pain | Link's answer |\n|------|---------------|\n| Agents forget you between sessions. | Save reviewed preferences, decisions, facts, and project context. |\n| Notes are private or messy. | Keep raw sources local, then turn them into source-backed Markdown. |\n| Context windows are expensive. | Return compact query packets with provenance and follow-up actions. |\n| Memory needs trust. | Every page and memory can be inspected, reviewed, archived, or forgotten. |\n\nLink follows Andrej Karpathy's\n[LLM Wiki pattern](https://gist.github.com/karpathy/442a6bf555914893e9891c11519de94f):\nkeep knowledge outside the chat window, make claims inspectable, and let context\ncompound over time.\n\n## Why Link Is Different\n\nEvery other agent-memory system stores memory as embeddings in a vector\ndatabase or as an LLM-extracted graph. Link made four architectural\ncommitments those designs cannot bolt on:\n\n1. **Memory you can read.** Every memory is a plain Markdown file — open it,\n   grep it, git-diff it. If Link disappeared tomorrow, your memory is still yours.\n2. **Review-gated writes.** Agents propose; you approve. Even the automatic\n   session hooks capture proposals, never facts.\n3. **No LLM in the memory layer.** Ingestion and recall are deterministic —\n   nothing can hallucinate a fact into your memory, because there is no model\n   in the write path.\n4. **Provably local.** CI blocks outbound network code in the runtime, and the\n   optional semantic models load offline-only after one explicit setup.\n\nAnd the claims are measured, not asserted — see the benchmarks below. Named\ncomparisons against Mem0/OpenMemory, Zep/Graphiti, and Letta:\n[Why Link?](https://gowtham0992.github.io/link/why-link.html)\n\n## Benchmarks\n\nPlain files with no LLM in the memory layer, measured against the systems\nthat have one everywhere:\n\n| What | Link | For comparison |\n|---|---|---|\n| **LoCoMo end-to-end QA** — full 1,540 questions under [mem0's own open harness](https://github.com/mem0ai/memory-benchmarks) | **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%** |\n| **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 |\n| **Memory hygiene** — junk stored over a simulated multi-month session stream | **0%** (by construction, CI-enforced) | the same pipeline with governance off: 36.5% |\n| **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 |\n| **Token economics** — real recall packets, measured through the query path | **1,951–4,835 tokens** per recall (micro→large budget); a **64× larger store grows the packet 1.58×**, 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 (~360 tokens of overhead, measured) — see RESULTS.md |\n| **Bundled 1,176-case recall benchmark** — deterministic, no network, no LLM | pip default (lexical) hit@1 **0.589**; `lnk setup` provisions the fast local tier by default: **0.703**; optional quality tier **0.749**, plus rerank **0.839** | reproducible with one command; CI runs the suite and gates dataset integrity, not the score |\n\nEvery number ships with its config, judge model, caveats, and the\nexperiments that *lost* — including LongMemEval end-to-end, where we\nre-judged both sides under the neutral Hunyuan 3 referee: mem0's GPT-5\nanswers score 91.0%, Link's budget-model answers 80.6%. Their published\nnumber holds up, and the gap tracks the answering model, not the memory\nlayer — that's what the 99.4% evidence-retrieval row above isolates.\nFull methodology and reproduction steps:\n[benchmarks/RESULTS.md](benchmarks/RESULTS.md).\n\n## Memory You Can Take Anywhere — And Prove Is Working\n\nThree questions every memory system should answer, and how Link answers\nthem with mechanisms instead of promises:\n\n**\"Is it on all my machines?\"** `lnk sync` moves reviewed memory through\na git remote *you* control — a private GitHub repo, a homelab bare repo —\nwith no server and no account. Secrets are scanned before anything\nleaves, conflicts become review items instead of git markers, and private\ncaptures never sync. `lnk team-sync` runs a shared team brain on the same\nrails.\n\n**\"What did I believe back then?\"** Ask in plain language: `lnk recall\n\"where does local data live in March\"` returns what was true *then*,\nreconstructed from the dated files and their supersede lineage — while\nthe same question without the date returns today's truth. Deterministic:\na regex and a calendar, no model. Point-in-time accuracy from plain\nlanguage: 0.917, identical to asking with an ISO date.\n\n**\"Is my agent actually using this?\"** The question most memory systems\ncannot answer about themselves. Link records retrievals locally — session\nbriefs pushed to agents, recalls they chose to make — and `lnk wins`\nanswers with counts, while `lnk digest` reports the weekly story\nincluding memories that have *never* been retrieved. The ledger stores\nwhich memory was read and when, never what you asked; it never syncs, and\n`LINK_USAGE=off` disables it. And memory reaches every agent, not just\nthe hooked ones: the first MCP tool response of a session carries the\nbrief, whatever tool was called.\n\n## Quick Start\n\nTwo commands: see it work, then make it yours.\n\n```bash\nbrew install gowtham0992/link/link\nlnk proof     # see the promise (~1 second, no setup)\nlnk setup     # wire every agent you have — workspace, MCP, session hooks, one command\n```\n\nAlready have memory scattered across tools? Bring it home as reviewable\nproposals — nothing is auto-accepted:\n\n```bash\nlnk import claude-code   # or: cursor, codex, file --file chatgpt.txt\n```\n\n`lnk setup` detects the agents installed on your machine — Claude Code,\nCodex, Cursor, Windsurf, Zed, Kiro, Gemini CLI — and wires them all at\nonce; Link is agent-agnostic by design (one MCP server, one workspace,\nevery agent reads the same memory). It is\nidempotent: after any `brew upgrade`, run it again and everything —\nworkspace runtime, MCP provisioning, hooks — is refreshed. Prefer to wire\none agent explicitly? `lnk onboard --agent claude-code --write --hooks`\nstill does exactly that.\n\n`lnk proof` creates a throwaway workspace, writes one reviewed memory, and\nrecalls it through the same path the CLI, skills, and MCP use — the core\npromise (one local memory, reusable by different agents, no cloud profile) in\none second:\n\n```text\nCross-agent memory continuity works\nMemory: created and reviewed: Cross-agent Link proof\nRecall: found through the same bounded recall path used by CLI, skills, and MCP.\nResult: proof passed\n```\n\n`lnk onboard --agent claude-code --write` then creates `~/link`, provisions the\nMCP runtime, and wires the agent — including the session hooks that capture\nmemory automatically as you work (swap `claude-code` for `codex`, `cursor`,\n`kiro`, `copilot`, `antigravity`, or others). Drop `--write` to preview the\nconfig without touching anything, or drop `--agent` to just create the\nworkspace.\n\nThe installed command is `lnk` because `link` is already a POSIX/macOS system\nutility. From a source checkout, use `python3 link.py ...` instead.\n\nWant the UI, graph, and source pages first? `lnk try && lnk serve link-demo`.\nWindows, source checkout, MCP-only, and skill-first paths are in the\n[First 10 Minutes guide](https://gowtham0992.github.io/link/getting-started.html).\n\nOr seed your current repo as a separate step so the first real recall is not empty:\n\n```bash\ncd /path/to/your/project\nlnk seed . ~/link\nlnk query \"what is this project about?\" ~/link --budget small\n```\n\n`lnk seed` reads allowlisted project files such as `README.md`, `AGENTS.md`,\n`CLAUDE.md`, `.cursorrules`, and editor rule files, blocks secret-looking\nvalues, writes a source-backed project page, and rebuilds the graph. It does\nnot create durable memories; agents should still use reviewed memory proposals\nfor preferences and decisions.\n\nThe Homebrew formula is maintained in the public\n[`gowtham0992/homebrew-link`](https://github.com/gowtham0992/homebrew-link) tap.\n\nOpen:\n\n```text\nhttp://127.0.0.1:3000\nhttp://127.0.0.1:3000/onboard\nhttp://127.0.0.1:3000/graph\nhttp://127.0.0.1:3000/health\n```\n\nUse `/onboard` when you want the same first-run checklist in the local UI:\nreadiness, project context seeding, first memory, agent wiring, and starter\nprompts. The web viewer is for local use only. It binds to `127.0.0.1`, has no user\naccounts or authentication, and should not be exposed to the internet unless you\nadd your own auth layer.\n\nTry the value loop:\n\n```bash\nlnk start link-demo --task \"working on agent memory\"\nlnk query \"why does Link help agents?\" link-demo --budget small\nlnk brief \"working on agent memory\" link-demo\nlnk benchmark \"agent memory\" link-demo\nlnk health link-demo\n```\n\n`lnk benchmark` reports both performance and value evidence: cache/search/query\ntimings, graph payload shape, and an estimate of how much broad wiki context the\nbounded Link packet avoided sending to an agent.\n\nThe `/health` page mirrors the readiness loop in the browser: validation state,\ninterrupted writes, memory review status, and copyable repair commands. The\nviewer stays document-first — common paths in the top nav, deeper tools under\n`more`, and a contents outline plus graph-related links on structured pages.\n\nThe generated demo is the public proof wiki. Generated content inside `wiki/`,\n`raw/`, and `link-demo/` is ignored by git so personal memory is not published\nby accident.\n\n## LinkBar — the menu bar app (macOS)\n\nLink's memory, ambient. LinkBar puts the review gate in your menu bar: a\nglobal palette (⌥⌘M) to recall or remember from any app, native\nnotifications with one-tap Accept when a session capture lands, a live\npulse while agents are writing, and a browser over every memory file —\nall running on the same reviewed `lnk` commands as the CLI.\n\n<p align=\"center\">\n  <img src=\"docs/assets/linkbar-tour.gif\" alt=\"LinkBar cycling through its tabs: review inbox with live agent pulse and capture previews, memory browser, status dashboard, and settings\" width=\"424\">\n</p>\n\n```bash\nbrew install --cask gowtham0992/link/linkbar\n```\n\nUnsigned on purpose (no Apple fee inflating anything): the cask strips\nthe quarantine flag on install, so it opens like any app. Building from\nsource instead: `cd apps/LinkBar && bash Scripts/bundle.sh --install`.\n\n## Killer Demo: One Memory, Two Agents\n\nThis is the moment Link is built for:\n\n1. In one agent, say:\n\n   ```text\n   remember that I prefer local, source-backed memory for AI agents\n   ```\n\n2. In another agent connected to the same `~/link` workspace, say:\n\n   ```text\n   start with Link before we continue\n   what does Link remember about local agent memory?\n   ```\n\n3. The second agent should recall the reviewed memory from local Markdown\n   instead of asking you to repeat yourself.\n\nFor a clean automated version of the same idea, run:\n\n```bash\nlnk proof\n```\n\n## Ways To Use Link\n\nPick the surface that matches how you work. They all read and write the same\nlocal Markdown wiki.\n\nThese surfaces are independent. `lnk serve` / `serve.py` is only the local web\nviewer. CLI commands, official skills, and MCP tools read the same `wiki/` files\ndirectly, so Claude, Codex, Kiro, Cursor, or another agent can use Link even\nwhen the web viewer is not running.\n\n<table>\n  <tr>\n    <td width=\"33%\">\n      <strong><a href=\"https://gowtham0992.github.io/link/ui.html\">Web UI</a></strong><br>\n      Read the local wiki, then review memory, ingest, graph, audits, captures, and explanations.\n    </td>\n    <td width=\"33%\">\n      <strong><a href=\"https://gowtham0992.github.io/link/cli.html\">CLI</a></strong><br>\n      Script readiness, query packets, briefs, validation, backup, context-savings benchmark, and repair.\n    </td>\n    <td width=\"33%\">\n      <strong><a href=\"https://gowtham0992.github.io/link/mcp.html\">MCP</a></strong><br>\n      Let Codex, Claude, Cursor, Kiro, VS Code, Copilot, and other agents recall memory.\n    </td>\n  </tr>\n</table>\n\n<p align=\"center\">\n  <img src=\"docs/assets/link-ui-tour.gif\" alt=\"Link local console tour: home, memory dashboard, health, and graph\" width=\"840\">\n</p>\n<p align=\"center\"><em>The local web viewer: browse source-backed memory and explore the knowledge graph — all on <code>127.0.0.1</code>, no accounts, no backend.</em></p>\n\nPrefer skills instead of MCP? Link ships small, lazy-loadable CLI skills under\n`skills/`. They let an agent use `lnk health`, `lnk query`, `lnk ingest-status`,\n`lnk session-end`, and `lnk remember` directly, without MCP setup or a running\nweb viewer.\n\n```text\nskills/link-health/SKILL.md\nskills/link-retrieve/SKILL.md\nskills/link-ingest/SKILL.md\nskills/link-memory/SKILL.md\n```\n\nFull guide: [Link Skills](https://gowtham0992.github.io/link/skills.html).\n\n## Install For Your Agent\n\nRun one installer from the cloned checkout:\n\n```bash\nbash integrations/codex/install.sh\nbash integrations/kiro/install.sh\nbash integrations/claude-code/install.sh\nbash integrations/cursor/install.sh\nbash integrations/copilot/install.sh\nbash integrations/vscode/install.sh\nbash integrations/antigravity/install.sh\n```\n\nInstallers create or update `~/link`, install or upgrade `link-mcp`, write\nlightweight agent instructions, and preserve existing wiki data on reinstall.\nUse `--project` when a repo needs separate project memory.\n\nOn Windows, use the matching PowerShell installer:\n\n```powershell\n.\\integrations\\codex\\install.ps1\n.\\integrations\\kiro\\install.ps1\n.\\integrations\\claude-code\\install.ps1\n.\\integrations\\cursor\\install.ps1\n.\\integrations\\copilot\\install.ps1\n.\\integrations\\vscode\\install.ps1\n.\\integrations\\antigravity\\install.ps1\n```\n\nThen ask your agent:\n\n```text\nis Link ready?\nstart with Link before we continue\nseed this project into Link\ningest raw/notes.md into Link\nremember that I prefer short release notes\nquery Link for the release process\nwhat does Link remember about local personal memory?\nend this session with Link memory proposals\n```\n\nFor CLI-first agents or Link skills, use the same startup loop directly:\n\n```bash\nlnk seed . ~/link\nlnk start ~/link --task \"working on Link release\"\nlnk session-end session-notes.md ~/link --limit 3\n```\n\nIf you want one guided setup for a real workspace and an agent, use\n`lnk onboard --agent AGENT`. If your agent already has instructions and you only\nneed MCP wiring, use the lower-level connection helper. Both preview the exact\nconfig first; add `--write` when you want Link to update the agent config file.\n\n```bash\nlnk onboard --agent codex\nlnk onboard --agent codex --write\nlnk connect codex ~/link\nlnk connect codex ~/link --write\nlnk connect kiro ~/link --write\nlnk verify-mcp ~/link\n```\n\nFor agents with session-hook support — Claude Code, Codex, and Cursor — add\n`--hooks` (works with `lnk onboard` too) to make the memory loop automatic:\nthe brief is injected at session start and proposal-only notes are captured at\nsession end, so memory no longer depends on the agent remembering to call\nLink. Empty sessions and duplicate end events are skipped, and when the\nbacklog builds up the brief nudges the agent to offer a read-only\n`lnk consolidate` pass. Durable memory still requires your approval. Codex and\nCursor hook support is new (wired to their documented schemas — report\nissues).\n\n```bash\nlnk connect claude-code ~/link --hooks --write\nlnk connect codex ~/link --hooks --write    # session-start brief (Codex has no session-end event)\nlnk connect cursor ~/link --hooks --write\nlnk consolidate ~/link                      # read-only backlog plan, apply only with approval\n```\n\n### Optional: hybrid semantic recall (still fully local)\n\nLexical recall is always the default and the fallback. Paraphrase matching is\nopt-in: after the two setup commands below, \"how should I structure my pull\nrequests\" finds a memory saved about commit style. Until then, recall matches\non shared words, and a miss tells you how to turn paraphrase matching on.\nInstalling the optional semantic extra adds a small local static-embedding\nmodel. Recall never touches the\nnetwork: the model loads offline-only after a one-time explicit setup,\nembeddings live in plain JSON under `.link-cache/`, similarity runs in-process\nwith no vector database, and semantic-only matches carry capped confidence\nlabels so agents verify before trusting them.\n\n```bash\npip install \"link-mcp[semantic]\"          # fast tier: tiny static model, instant load\npip install \"link-mcp[semantic-quality]\"  # quality tier: contextual model, best recall\nlnk semantic ~/link --setup   # one-time model fetch, with your approval\nlnk semantic ~/link           # status: lexical only vs hybrid, active tier\npython3 -m link_mcp --semantic-setup --wiki ~/link/wiki   # MCP-only installs\n```\n\nMeasured, not asserted: on the bundled 1,176-case benchmark, the quality\ntier lifts token-overlap hit@1 from 0.589 to 0.749 and pure-paraphrase\n(zero token overlap) hit@3/hit@5 by ~4×, at ~10 ms per recall with no\nservice or vector database. On the third-party LoCoMo retrieval track\n(1,536 evidence-annotated questions over 5,882 conversation turns), hybrid\nrecall lifts any-evidence hit@10 from 0.628 to 0.737 (0.794 with the\nopt-in rerank tier). Full methodology, honest limitations, and\nreproduction steps: [benchmarks/RESULTS.md](benchmarks/RESULTS.md).\n\n<details>\n<summary>MCP-only install</summary>\n\n```bash\npython3 -m pip install --upgrade link-mcp\npython3 -m link_mcp --version\n```\n\n```json\n{\n  \"mcpServers\": {\n    \"link\": {\n      \"command\": \"python3\",\n      \"args\": [\"-m\", \"link_mcp\", \"--wiki\", \"~/link/wiki\", \"--surface\", \"slim\"]\n    }\n  }\n}\n```\n\n`--surface slim` is the recommended MCP surface for agents: six obvious tools\nfor recall, remember, ingest, review, status, and admin escape hatches. The full\ncompatibility surface is still available with `--surface full`.\n\nOn macOS/Homebrew Python, if pip reports `externally-managed-environment`, use a\ndedicated venv:\n\n```bash\npython3 -m venv ~/.link-mcp-venv\n~/.link-mcp-venv/bin/python -m pip install --upgrade pip link-mcp\n```\n\nFull setup: [MCP guide](https://gowtham0992.github.io/link/mcp.html).\n</details>\n\nObsidian users can import an existing vault into `raw/` for agent ingest, or\nopen `~/link/wiki` directly as a vault for editing Link pages:\n\n```bash\nlnk init ~/link\nlnk import-obsidian ~/Documents/ObsidianVault ~/link\n```\n\nSee the [Obsidian guide](https://gowtham0992.github.io/link/obsidian.html) for\nthe import, edit, and validation loop.\n\n## Storage Model\n\nUnder the hood, Link separates source-backed knowledge from durable agent memory:\n\n1. Drop raw notes, transcripts, articles, and project context into `raw/`.\n2. Agents compile those sources into inspectable pages under `wiki/`.\n3. Explicit \"remember\" requests become reviewable memory pages.\n4. Queries retrieve compact agent context from both the wiki and memory layer.\n\n<p align=\"center\">\n  <img src=\"docs/assets/link-memory-flow.svg\" alt=\"Link architecture: raw sources become wiki knowledge, explicit remembers become reviewed memory, and agents retrieve compact context\" width=\"820\">\n</p>\n\nThe storage model is plain and inspectable:\n\n| Layer | What lives there |\n|-------|------------------|\n| `raw/` | Original notes, transcripts, articles, PDFs, screenshots, and project files. |\n| `wiki/` | Source-backed pages, concepts, entities, explorations, comparisons, and memories. |\n| Agent interfaces | CLI, skills, MCP, and local viewer paths that avoid dumping the whole wiki into context. |\n\nIf a raw file was already ingested and later edited, `lnk ingest-status` marks it\nas stale and tells your agent to refresh the existing source page instead of\ncreating a duplicate.\n\n## What Agents Get\n\nWhen an agent uses Link through the recommended MCP surface, it gets six\nmodel-facing tools. CLI and skill workflows call the same core behavior through\n`lnk`.\n\n- `status`: readiness, schema state, validation, interrupted writes, and safe\n  next actions.\n- `recall`: the one read path for startup briefs, answer-ready query packets,\n  wiki search, graph context, token budgets, and follow-up actions. Every\n  recalled memory carries a `confidence` label (`strong`, `moderate`, `weak`)\n  and a `match` field (`lexical`, `semantic`, `hybrid` when the optional local\n  semantic tier is installed), so agents verify weak or paraphrase matches with\n  the user instead of trusting them.\n- `remember`: durable local memory only after explicit user approval, with\n  duplicate/conflict checks, provenance, review state, visibility, optional\n  `review_after`, and optional `expires_at`.\n- `ingest`: exact next steps for raw files, source safety, stale ingest\n  detection, validation, and rebuild checks.\n- `review`: memory inbox, profile, audit, log, explain, archive, restore,\n  forget, and lifecycle review workflows — plus `review(action=\"consolidate\")`,\n  a read-only backlog plan applied only with per-action user approval.\n- `admin`: the escape hatch for backup, migrate, validate, graph export, pages,\n  captures, rebuilds, compatibility actions, and advanced updates.\n\nThe stable agent-facing loop is documented at\n[Link Memory Contract](https://gowtham0992.github.io/link/memory-contract.html):\nreadiness first, bounded recall, explicit memory writes, audit tools, and\nsharing semantics.\n\nUse `review_after` for time-sensitive preferences or decisions. When that date\narrives, the memory reappears in Link's review inbox so an agent can ask the\nuser to confirm, update, archive, or forget it instead of trusting stale context.\nUse `expires_at` for temporary context that should automatically leave default\nrecall after a date; Link keeps the Markdown page inspectable and asks the user\nto update, archive, or delete it.\nUse `visibility` to separate where a memory applies from who should see it:\n`private` stays personal, `project` is intended for a project workspace, and\n`team` means the user explicitly approved sharing it with a team.\n\nFor team handoff or security review, `lnk compliance-export --output audit.json`\nwrites a redacted JSON packet with readiness, validation, memory review status,\noperation markers, and recent audit log entries. Raw source contents and memory\nbodies are not included.\n\nFor day-to-day auditability, `lnk memory-log ~/link` shows what Link recently\nremembered, updated, reviewed, archived, restored, forgot, or accepted from raw\ncaptures.\n\nFor recovery, `lnk backup ~/link` creates a local archive and `lnk\nrestore-backup <archive> ~/link` previews what would be restored. Passing\n`--confirm` replaces local files after creating a safety backup when possible;\n`raw/` is still excluded unless `--include-raw` is explicit. If a multi-file\nwrite is interrupted, `lnk operations ~/link` shows the marker and any rollback\nsnapshot; `lnk operations ~/link --recover <marker> --confirm` restores the\nsnapshot after you review it.\n\nFor local proof of value, `lnk wins ~/link` shows reusable memories, reviewed\nmemory, provenance, project continuity, freshness guardrails, and copyable\nprompts without tracking user behavior.\n\nFor Git-backed team memory, `lnk team-sync ~/link` checks whether the workspace\nis ready to share reviewed `wiki/` pages while keeping `raw/`, caches, backups,\nlocal MCP Python markers, and `wiki/log.md` private by default. The audit log is\nlocal because it has a single-machine hash chain; merging multiple users' logs\nwould create false tamper alarms. Team sync also blocks \"ready\" status when the\nmemory inbox is not clear or active `visibility: private` memories would be\nincluded by a broad `git add wiki`.\n\n```bash\nlnk team-sync ~/link --remote git@example.com:team/link-memory.git\n```\n\nFor a teammate, reviewer, or another agent, `lnk share` resolves a page,\nmemory, title, alias, or search phrase into a local viewer URL:\n\n```bash\nlnk share \"Prefer local memory\" ~/link\n```\n\nFor a static, read-only review packet, `lnk snapshot` exports rendered wiki\nHTML without `raw/`, captures, operation markers, live MCP state, or memory pages\nby default. `--include-memories` exports only non-private memories; use\n`--include-private-memories` only for a personal archive or an explicitly\napproved review. It blocks export if wiki pages contain secret-looking values\nunless you explicitly override it.\n\n```bash\nlnk snapshot ~/link --output link-snapshot\nlnk snapshot ~/link --output link-snapshot --include-memories --force\nlnk snapshot ~/link --output personal-snapshot --include-memories --include-private-memories --force\n```\n\n## Agent Contract\n\nFor MCP clients, agents should use Link in this order:\n\n1. `status` to check readiness and safe next actions.\n2. `recall` with an empty query once at the first substantive turn of a session.\n3. `recall(query, budget=\"micro\"|\"small\")` before broad file reads or asking the user to repeat durable context.\n4. `ingest` before touching raw sources and after source edits for validation/rebuild checks.\n5. `remember` only when the user explicitly asks Link to remember something or approves a proposed memory.\n6. `review` for memory inbox, profile, audit, log, explain, archive, restore, and forget workflows.\n7. `admin` for backup, migration, graph export, captures, rebuilds, compatibility actions, and advanced maintenance.\n\nFull MCP tool list: [MCP setup](https://gowtham0992.github.io/link/mcp.html).\n\n## Privacy And Safety\n\nLink itself is local-first:\n\n- No telemetry in the installed CLI, MCP server, local web UI, or wiki runtime.\n- No hosted backend.\n- No external API calls from `serve.py` or `link-mcp`.\n- Raw sources and generated wiki pages are ignored by git by default.\n- `lnk backup` excludes `raw/` unless you explicitly pass `--include-raw`.\n- Secret-looking API keys, provider tokens, JWTs, registry credentials, and\n  private key blocks are detected in raw sources, captures, and release hygiene\n  checks. `lnk validate` and `lnk doctor` also fail if secret-looking values\n  are found inside wiki pages before they can be served through the local UI or\n  returned through agent context.\n- Optional semantic recall stays local: models load offline-only at recall\n  time (only the explicit `lnk semantic --setup` may fetch a model, once), and\n  embeddings live in plain JSON under `.link-cache/`.\n- Automatic session hooks store proposal-only notes; transcript extraction\n  skips tool calls and outputs, and no durable memory is written without review.\n- The local web server binds to `127.0.0.1` and is not meant to be exposed to\n  the internet without additional auth.\n\nBefore sharing a repo, demo, or wiki:\n\n```bash\npython3 link.py doctor\npython3 link.py validate\npython3 scripts/check_release_hygiene.py\n```\n\nMore detail: [Security guide](https://gowtham0992.github.io/link/security.html).\n\n## Documentation\n\n| Need | Go here |\n|------|---------|\n| Run Link for the first time | [First 10 minutes](https://gowtham0992.github.io/link/getting-started.html) |\n| \"Does Link read my conversations?\" | [The three questions everyone asks](https://gowtham0992.github.io/link/getting-started.html#faq) |\n| Decide whether Link fits | [Why Link?](https://gowtham0992.github.io/link/why-link.html) |\n| Use the local viewer | [Web UI](https://gowtham0992.github.io/link/ui.html) |\n| Understand raw/wiki/memory | [Concepts](https://gowtham0992.github.io/link/concepts.html) |\n| Configure MCP | [MCP setup](https://gowtham0992.github.io/link/mcp.html) |\n| Find a command | [CLI reference](https://gowtham0992.github.io/link/cli.html) |\n| Use Link without MCP setup | [Official skills](https://gowtham0992.github.io/link/skills.html) |\n| Use local HTTP endpoints | [HTTP API](https://gowtham0992.github.io/link/api.html) |\n| Review security boundaries | [Security model](https://gowtham0992.github.io/link/security.html) |\n| Check scale limits and measure your wiki | [Link Scale](https://gowtham0992.github.io/link/scale.html) |\n| Evaluate Link for a small team | [Team security review](https://gowtham0992.github.io/link/team-security.html) |\n| Fix setup issues | [Troubleshooting](https://gowtham0992.github.io/link/troubleshooting.html) |\n\n## Contributing\n\nContributions should come through pull requests targeting `main`. The `develop`\nbranch is a maintainer integration branch for larger release work before it is\nproposed to `main`.\n\nBefore opening a PR:\n\n```bash\npython3 -m ruff check .\npython3 -m pytest tests\npython3 scripts/check_release_hygiene.py\npython3 scripts/check_runtime_duplication.py\npython3 scripts/check_tool_contract.py\ngit diff --check\n```\n\nFull contributor guide: [Contributing](https://gowtham0992.github.io/link/contributing.html).\n\nDo not include personal wiki data, raw sources, registry tokens, `.env` files, or\nlocal MCP credentials in a PR.\n\nIf Link helps your agents remember better, [star it on GitHub](https://github.com/gowtham0992/link)\nso more people can find it.\n",
  "bytes": 33315,
  "sha": "16df3de9f71118f5da56c95a78c584c96ee2226141c34b0fd09be27955d8eb9a",
  "repo_slug": "gowtham0992/link",
  "fonte": "repo",
  "truncated": false,
  "api": "https://agentalog.com/api/listings/mcp_io_github_gowtham0992_link_c24cdd44/readme"
}