Local, source-backed memory for LLM agents.
Link gives Codex, Claude, Cursor, Kiro, VS Code, Copilot, and other MCP clients the same durable memory about you and your work. It stays on your machine as plain Markdown, with sources, backlinks, graph context, review state, and an audit trail you can inspect.
It follows Andrej Karpathy's LLM Wiki pattern: keep knowledge outside the chat window, make claims inspectable, and let context compound over time.
Product site · First 10 minutes · Why Link? · Web UI · MCP setup · CLI · Security · Changelog
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. |
Run the demo first. It creates a complete local wiki with raw sources, wiki pages, one starter memory, graph data, and query packets ready to inspect.
macOS with Homebrew:
brew install gowtham0992/link/link
link demo
link next link-demo
link serve link-demoWindows or source checkout:
git clone https://github.com/gowtham0992/link.git
cd link
py link.py demo
py link.py next link-demo
py link.py serve link-demoOr from source:
git clone https://github.com/gowtham0992/link.git
cd link
python3 link.py demo
python3 link.py next link-demo
python3 link.py serve link-demoOpen:
http://127.0.0.1:3000
http://127.0.0.1:3000/graph
http://127.0.0.1:3000/health
The web viewer is for local use only. It binds to 127.0.0.1, has no user
accounts or authentication, and should not be exposed to the internet unless you
add your own auth layer.
For the shortest guided proof path, run link welcome link-demo.
Try the value loop:
link query "why does Link help agents?" link-demo --budget small
link brief "working on agent memory" link-demo
link benchmark "agent memory" link-demo
link health link-demoThe /health page mirrors the readiness loop in the browser: validation state,
interrupted writes, memory review status, and copyable repair commands.
The viewer itself stays document-first: common paths are in the top nav, deeper
tools live under more, and structured wiki pages get a local contents outline
plus related-page links from the graph.
Home shows recently updated pages, while /all and search group results by page
type with chips for narrowing larger wikis.
From a source checkout, use python3 link.py ...:
python3 link.py query "why does Link help agents?" link-demo --budget small
python3 link.py brief "working on agent memory" link-demo
python3 link.py benchmark "agent memory" link-demo
python3 link.py health link-demoThe generated demo is the public proof wiki. The repo's root wiki/ directory
is only a scaffold for local development and personal testing. Generated content
inside wiki/, raw/, and link-demo/ is ignored by git so personal memory is
not published by accident.
For local scale checks from a source checkout, run:
python3 scripts/smoke_large_wiki.py --pages 10000This generates a temporary synthetic wiki, verifies bounded graph/query payloads, and reports cache timing, persistent-cache reuse, search, query, graph, and health signals without touching your real Link wiki.
Pick the surface that matches how you work. They all read and write the same local Markdown wiki.
Run one installer from the cloned checkout:
bash integrations/codex/install.sh
bash integrations/kiro/install.sh
bash integrations/claude-code/install.sh
bash integrations/cursor/install.sh
bash integrations/copilot/install.sh
bash integrations/vscode/install.sh
bash integrations/antigravity/install.shInstallers create or update ~/link, install or upgrade link-mcp, write
lightweight agent instructions, and preserve existing wiki data on reinstall.
Use --project when a repo needs separate project memory.
The shell installers are intended for macOS/Linux-style agent config paths. On Windows, use the source commands above plus the MCP-only config below until your agent has a Windows-specific installer.
Then ask your agent:
is Link ready?
brief me from Link before we continue
ingest raw/notes.md into Link
remember that I prefer short release notes
query Link for the release process
what does Link remember about local personal memory?
MCP-only install
python3 -m pip install --upgrade link-mcp{
"mcpServers": {
"link": {
"command": "python3",
"args": ["-m", "link_mcp", "--wiki", "~/link/wiki"]
}
}
}On macOS/Homebrew Python, if pip reports externally-managed-environment, use a
dedicated venv:
python3 -m venv ~/.link-mcp-venv
~/.link-mcp-venv/bin/python -m pip install --upgrade pip link-mcpFull setup: MCP guide.
Link separates source-backed knowledge from durable agent memory:
- Drop raw notes, transcripts, articles, and project context into
raw/. - Agents compile those sources into inspectable pages under
wiki/. - Explicit "remember" requests become reviewable memory pages.
- Queries retrieve compact MCP context from both the wiki and memory layer.
The storage model is plain and inspectable:
| Layer | What lives there |
|---|---|
raw/ |
Original notes, transcripts, articles, PDFs, screenshots, and project files. |
wiki/ |
Source-backed pages, concepts, entities, explorations, comparisons, and memories. |
| MCP tools | Compact packets agents can use without dumping the whole wiki into context. |
If a raw file was already ingested and later edited, link ingest-status marks it
as stale and tells your agent to refresh the existing source page instead of
creating a duplicate.
query_link: an answer-ready packet with relevant memories, pages, graph neighborhood, reasons for selection, budget limits, and follow-up actions.memory_brief: a compact pre-work brief with user/project preferences, active context, review warnings, and safe memory-use rules.ingest_status: exact next steps for raw files, including source safety, stale ingest detection, validation, and memory proposal guidance.remember_memory: durable local memory with duplicate/conflict checks, review state, provenance, and audit logging.explain_memory: why a memory exists, what it links to, whether it is ready for recall, and what needs review.
Agents should use Link in this order:
link_statusto check readiness and safe next actions.starter_promptswhen the user asks what to try first.ingest_statusbefore touching raw sources.query_linkfor compact answer-ready context.memory_briefbefore longer work.get_graph_summarywhen graph context is useful but the full graph would be noisy.backup_wikibefore broad repair or migration work.validate_wikiafter ingest or broad wiki edits.
Full MCP tool list: MCP setup.
Link itself is local-first:
- No telemetry in the installed CLI, MCP server, local web UI, or wiki runtime.
- No hosted backend.
- No external API calls from
serve.pyorlink-mcp. - Raw sources and generated wiki pages are ignored by git by default.
link backupexcludesraw/unless you explicitly pass--include-raw.- Secret-looking values are detected in raw sources, captures, and release hygiene checks.
- The local web server binds to
127.0.0.1and is not meant to be exposed to the internet without additional auth.
Before sharing a repo, demo, or wiki:
python3 link.py doctor
python3 link.py validate
python3 scripts/check_release_hygiene.pyMore detail: Security guide.
| Need | Go here |
|---|---|
| Run Link for the first time | First 10 minutes |
| Decide whether Link fits | Why Link? |
| Use the local viewer | Web UI |
| Understand raw/wiki/memory | Concepts |
| Configure MCP | MCP setup |
| Find a command | CLI reference |
| Use local HTTP endpoints | HTTP API |
| Review security boundaries | Security model |
| Fix setup issues | Troubleshooting |
Contributions should come through pull requests targeting main. The develop
branch is a maintainer integration branch for larger release work before it is
proposed to main.
Before opening a PR:
python3 -m ruff check .
python3 -m pytest tests
python3 scripts/check_release_hygiene.py
python3 scripts/check_runtime_duplication.py
python3 scripts/check_tool_contract.py
git diff --checkFull contributor guide: Contributing.
Do not include personal wiki data, raw sources, registry tokens, .env files, or
local MCP credentials in a PR.
If Link helps your agents remember better, star it on GitHub so more people can find it.


