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 stay

use 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 Ollama

Then "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.

  • search finds documents by their words and their meaning, best first, each with a snippet.
  • read gives a document, whole or some lines of it.
  • list gives the documents, the most recently changed first. With since it gives what changed, so an agent catches up at the start of a session.
  • links gives 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 others

The first prints the address your agent calls, and the second lists every call.

Troubleshooting

SymptomFix
"Your agent's memory isn't served" at a startlnk agent memory use again; it says what failed.
$LNK_MEMORY is empty in lnk agent <harness> runlnk agent memory says why: no memory, or no proxy.
A file isn't foundOver 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.