Skip to main content

The loop

Linksee Memory has one loop: decide → remember (and enforce) → hand over → the next agent acts on it, or is stopped before it doesn’t.

Step 0: Set up (once)

Registers the MCP server, installs the skill, wires the session-capture hook and the re-injection guard for every repo on the machine. Restart your agent.

Step 1: Record a decision — and enforce it

In any conversation:
“We’re going with Postgres for the primary store. MongoDB is rejected — it doesn’t meet the strong-consistency requirement. Remember that, and hold me to it.”
The agent calls remember once:
content is the only required field — the entity defaults to the project you are in, the layer to learning. Because anchor is set, the memory is also declared as a drift anchor. The response says what that bought you:

Step 2: Add a caveat

Caveats are the layer that must never be forgotten — pain lessons:
“Linksee caveat: never use pgbouncer in session mode with Supabase — it causes prepared statement conflicts. Always use transaction mode.”
Stored in the caveat layer with protected = true. It will not be auto-forgotten, and it is re-surfaced when the same ground is touched.

Step 3: Hand over — start a new session

Open a fresh session (or Cursor, or Codex — same file). The agent’s first call is recall() with no arguments:
Nothing to re-explain. Then search for what the task needs:
“I’m about to set up the new data layer. Check linksee.”

Step 4: Watch the guard catch the contradiction

Two weeks later, a session that never saw Step 1 starts writing import mongoose from "mongoose". Before the edit runs:
Harden it — resolve_drift({ anchor_id: 12, action: "harden" }) — and the same edit is denied instead of warned.

Step 5: Change your mind on the record

“We’re switching to MongoDB after all — the consistency requirement was dropped.”
then
#12 stops firing; #19 starts. The next agent inherits the change and the reason — that is what “with the reasons attached” means.

Step 6: Read files cheaply

“Read src/db/connection.ts using linksee read_smart”
First read returns full content. Unchanged re-reads return ~50 tokens; modified files return only the changed chunks.

What to remember

The session-capture hook records raw decisions and caveats automatically. Rules archive the acknowledgements and stale ones; recall({ dream: true }) shows the rest for you to rewrite into clean what/why.

Next steps

Tools

The six tools, with every parameter

Product map & drift

How drift is measured, and recall({ where })

Memory Layers

goal / context / emotion / implementation / caveat / learning

Token Saving

How read_smart saves 50–99% on re-reads