Link
Local Markdown memory for AI agents
Link
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
Why It Exists
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. |
Quick Start
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 serve link-demo
Or from source:
git clone https://github.com/gowtham0992/link.git
cd link
python3 link.py demo
python3 link.py serve link-demo
Open:
http://127.0.0.1:3000
http://127.0.0.1:3000/graph
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.
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 status --validate link-demo
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 status --validate 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.
Three Ways To Use Link
Pick the surface that matches how you work. They all read and write the same local Markdown wiki.
Install For Your Agent
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.
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.
How Link Works
Link has one simple rule:
Sources become wiki knowledge.
Explicit "remember" becomes agent memory.
Queries use both.
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.
What Agents Get
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.
Agent Contract
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.
Privacy And Safety
Link is local-first:
- No telemetry.
- 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.py
More detail: Security guide.
Documentation
| 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 |
Contributing
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 unittest discover -s 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.
Related Servers
Kone.vc
sponsorMonetize your AI agent with contextual product recommendations
Business Central MCP
An MCP server for interacting with Microsoft Business Central, built with FastMCP and FastAPI.
Inked
A memory management server for Claude apps with optional AI-powered search, using local SQLite storage.
Agent Billy
MCP server that gives AI agents and teams secure, role-based access to Stripe billing operations — customer lookups, subscription management, refunds, invoice history — without exposing Stripe dashboard credentials. Sub-100ms reads via local Stripe sync engine. 4 permission levels with audit logging. $14.99/month.
remi
Apple Reminders CLI and MCP server with section support and iCloud sync - the only tool that can create, manage, and sync sections across devices
After Effects MCP
After Effects MCP is a full-featured automation bridge that connects AI clients (like VS Code, Claude Desktop, and Claude Code) to Adobe After Effects through MCP, enabling scripted control of compositions, layers, effects, keyframes/graph easing, presets, markers, audio levels, waveform analysis, and effect discovery via a live bridge panel.
AppleScript MCP
Execute AppleScript to gain full control of your Mac.
Google Docs & Drive
Interact with Google Docs and Google Drive for document creation, editing, and file management, with support for shared drives.
Wishfinity +W
Universal wishlist for AI shopping. Save any product URL from any store to a persistent wishlist directly from AI conversations.
Esa.io
Access the esa.io API to manage your team's knowledge base.
harvest-mcp-server
Harvest time tracking integration with 40+ tools for managing time entries, projects, clients, tasks, and generating time reports via the Harvest API v2


