L Loach Docs
Ctrl K

Memory

Loach can remember lasting facts about you - your role, the projects you work on, how you like answers - and bring them into later chats. There are two kinds: Space memory, kept separately for each Space, and global memories, which follow you into every chat. Facts stay in Loach’s local database, and you can review, edit or undo every one of them.

Space memory and global memories

Space memoryGlobal memories
Switched on withThe Memory switch on the Space’s Settings tab - on for every new SpaceSettings → Features → Global memories, or the Pick your defaults step of setup - off by default
Learns fromChats inside that SpaceChats outside any Space
Sent withChats inside that SpaceEvery chat, inside or outside a Space
Edited inThe Space’s Memory tabSettings → Features → Manage global memories
Switched offStops learning; facts already saved are still sentStops learning and stops sending

A chat in a Space gets both lists when global memories are on: the global facts, then the Space’s, with a note to the model that the Space facts win when the two disagree. Space chats never write to the global list - their extractor sees the global facts as read-only, so it doesn’t copy them into the Space.

How facts are captured

After each finished reply, Loach makes a second, hidden call to the same provider and model you’re chatting with and asks it to pick out durable facts about you - things that would still be true, and worth knowing, in an unrelated chat a month from now. It runs in the background once the model is free: while another message is queued or about to be sent, the turn waits. Whenever a reply finishes with the model free - in any chat - the extractor works through every chat with turns waiting, the one that has waited longest first, reading the latest three turns of each. If you send another message while it’s still working, it stops so your reply isn’t slowed down, and the turns it was reading wait for the next run.

Facts that change

The extractor sees the facts it saved before, so when a turn shows one has changed - you moved city, reversed a preference, renamed a project - it rewrites that fact instead of adding a second one that contradicts it, and it removes a fact that no longer holds and has no replacement.

Facts you added yourself, in the editor or with /remember, are read-only to it: it avoids repeating them but never rewrites or removes them. Only you can change those.

One run saves at most five new facts and rewrites or removes at most three existing ones. A fact the extractor saves or rewrites is rejected if it’s longer than 280 characters; facts you type yourself have no length limit.

Undo on every change

Every change the extractor makes shows a toast with the fact and an Undo button, for about seven seconds:

Rewrites and removals are shown last, so their Undo stays on screen even when the same run also saved new facts.

The memory editor

A Space’s Memory tab and the Global memories dialog (Settings → Features → Manage global memories, which shows the count in brackets) use the same editor:

Deleting a chat doesn’t delete the facts learned from it; the row just loses its link.

Saving a fact yourself: /remember

Type /remember <fact> in the composer to save a fact directly. In a chat inside a Space it goes to that Space’s memory, and so it does while a Space is active - one you’re viewing or picked with /space; anywhere else it goes to global memories. It follows the same switches: if that Space’s memory is off, or global memories are off, Loach tells you so - and where to turn it on - and saves nothing.

Two related commands work on the same scope: /list memories shows the facts with a short id each, and /forget <id|query> removes one by its id or by matching text - when several facts match, it lists them so you can re-run it with an id. See Slash commands.

What the model sees

Facts go into the system prompt of each message as short bulleted lists: a --- Global memory --- block and, in a Space, a --- Space memory --- block, after your instructions. Each list sends the newest facts that fit within 60 facts and about 6,000 characters (roughly 1,500 tokens), so a long list can’t crowd a small context window. Older facts stay in the editor, marked not sent, until newer ones are removed. The extractor is shown the same facts, so anything the model is told can still be corrected.

The context-usage bar counts the facts in its Memories row.

Privacy

Pick a capable model

The extractor is the model you’re chatting with. Very small models often return nothing, or save the wrong things - keep an eye on the toasts while you get a feel for it. If memory isn’t behaving, see Troubleshooting: Spaces & memory.