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-demo
Windows 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-demo
Or 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-demo
Open:
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-demo
The /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-demo
The 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 10000
This 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.sh
Installers 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-mcp
Full setup: MCP guide.
Link separates source-backed knowledge from durable agent memory:
raw/.wiki/.
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, graphmemory_brief: a compact pre-work brief with user/project preferences,ingest_status: exact next steps for raw files, including source safety,remember_memory: durable local memory with duplicate/conflict checks,explain_memory: why a memory exists, what it links to, whether it is readyAgents should use Link in this order:
link_status to check readiness and safe next actions.starter_prompts when the user asks what to try first.ingest_status before touching raw sources.query_link for compact answer-ready context.memory_brief before longer work.get_graph_summary when graph context is useful but the full graph would be noisy.backup_wiki before broad repair or migration work.validate_wiki after ingest or broad wiki edits.Full MCP tool list: MCP setup.
Link itself is local-first:
serve.py or link-mcp.link backup excludes raw/ unless you explicitly pass --include-raw.127.0.0.1 and is not meant to be exposed toBefore sharing a repo, demo, or wiki:
python3 link.py doctor
python3 link.py validate
python3 scripts/check_release_hygiene.py
More 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 --check
Full 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.