Get Started
Your agent's memory is a search over its own files. It finds the notes you drop in and its past conversations by their words, and by their meaning too with a model that runs on your computer.
You need the memory plugins, which lnk up memory installs with the
agents' own, and lnk agent memory use adds Link Memory if it's missing.
Searching by meaning also takes an embedding model, a download of a few
hundred megabytes. Nothing costs anything, because it all runs on your
computer.
Quickstart
lnk agent memory use # Link Memory over your agent's files
lnk agent memory # which engine, and where your agent reaches it
lnk agent memory off # stop serving it; your files stayuse restarts your agent if it's running, and -a <name> picks another
agent.
Search by meaning
An embedding model lets a question find a note that shares none of its words.
lnk model install qwen3-embedding # the embedding model, through OllamaThen "what did I plant last spring" finds "tomatoes, April, the back
bed". Nothing needs a restart, because each session your agent starts
finds the model. Without it, a search is by words only, and says so and
how to add the model. To search by words only on purpose, set
[tool.memory] model = "none" in the agent's
spec.
The first time, Link Memory embeds your files in the background, newest first. Meanwhile a search is by meaning over what's done and by words over the rest, and says how far it got. After that it embeds only what's new or changed, on your computer's CPU or GPU, at no cost.
What it finds
Your agent can search the text files in its files folder and its past conversations.
# a file your agent can find now
cp ~/Notes/garden.md ~/Link/Agents/main/Home/That means markdown, text, JSON, CSV, YAML, HTML and the like, up to 1
MiB each, and in conversations/ each conversation's conversation.md.
Each result says whether it's a file or a conversation. What you add,
change or delete is found at the next call, with nothing to rebuild.
A conversation's copy holds what was said up to the agent's last answer, without the tools' calls and answers. So a search finds what was said earlier in the chat you're in, and never the question it's searching for.
How your agent calls it
Your agent searches, reads and lists its memory through four calls, and none of them changes a file.
searchfinds documents by their words and their meaning, best first, each with a snippet.readgives a document, whole or some lines of it.listgives the documents, the most recently changed first. Withsinceit gives what changed, so an agent catches up at the start of a session.linksgives what a document links to and what links to it, from markdown links and wiki links ([[Other note]]).
Each call gives at most about 6,000 tokens and says where it stopped, so the next call can carry on from there.
Link Harness calls memory by itself, as memory__search and the rest
(Link Harness).
A harness from outside Link finds it in its own MCP settings, as the
server memory, added at each start. Your agent reaches it only through
its proxy, so not with lan or without network. To try it as your
agent would:
lnk agent link run -- sh -c 'echo $LNK_MEMORY'
lnk sandbox log # every call, with your agent's othersThe first prints the address your agent calls, and the second lists every call.
Troubleshooting
| Symptom | Fix |
|---|---|
| "Your agent's memory isn't served" at a start | lnk agent memory use again; it says what failed. |
$LNK_MEMORY is empty in lnk agent <harness> run | lnk agent memory says why: no memory, or no proxy. |
| A file isn't found | Over 1 MiB, hidden, a link, or not a text file it reads. |
| "Search is by words only" | lnk model install qwen3-embedding, or start Ollama (lnk model list --start). |
Agents Security has the guarantees and gaps, and Agents Decisions why it works this way. To work on its code, see Developing Link Memory.
