mirror of
https://github.com/mudler/LocalAI.git
synced 2026-11-06 20:43:27 -05:00
The add-on declares the three index files of the person's notes (capabilities.contextFiles, manifest API 2), so the host loads them into the prompt and serves their topics with context_read. It ships two skills: memory, whose description asks the model to read the matching topic before it answers almost anything and to save a note only as a proposal the person confirms, and memory-check-own-files, which says what the model can and cannot read. Its executable serves no tool, and its page explains the notes and opens the Memory tab of the account. The add-on joins the packaging matrix, the release workflow, the library index and the case inventory. The declared capabilities the host hands to an add-on now include the context files. Assisted-by: Claude:claude-sonnet-5-5 Signed-off-by: Ettore Di Giacinto <mudler@localai.io>
63 lines
2.8 KiB
Markdown
63 lines
2.8 KiB
Markdown
---
|
|
title: "Short memory"
|
|
weight: 36
|
|
---
|
|
|
|
Short memory is an add-on that gives your chats a few notes about you. The model reads
|
|
the note that matches a request before it answers, and it saves a new note only after you
|
|
confirm it. Install `memory` from the add-on library. Its visible name is **Short
|
|
memory**.
|
|
|
|
It is for the facts that change what a good answer is: where you live, what you eat, the
|
|
language and units you use, how you want answers. It is not a store for large documents.
|
|
Use [Collections](/features/collections/) to search many files.
|
|
|
|
## How it works
|
|
|
|
Each turn, the host puts an index of your notes in the prompt, under a fixed header that
|
|
asks the model to read the matching topic before it answers. The index is a list of lines
|
|
such as `- home: lives in Rome -> home.md`. The model opens a topic with the `context_read`
|
|
tool. The add-on ships two skills, `memory` and `memory-check-own-files`, that tell the
|
|
model to consult memory for almost every request and to say what it can and cannot read.
|
|
|
|
There are three kinds of notes, each in the Memory folder of your files:
|
|
|
|
| Kind | File | Applies to |
|
|
|---|---|---|
|
|
| Yours | `Memory/index.md` | every chat |
|
|
| One saved agent | `Memory/agents/<agent>/index.md` | the chats of that agent |
|
|
| One conversation | `Memory/channels/<binding>-<hash>/index.md` | one conversation that came from a messaging app |
|
|
|
|
An index has at most 40 lines and 2 KiB. All indexes of a turn together have at most 6 KiB.
|
|
The details of a topic sit in a file next to the index.
|
|
|
|
## Saving and forgetting
|
|
|
|
When you ask the model to remember something, it calls `propose_change`. Nothing is
|
|
written at once. You confirm the proposal on the card in the chat or in the inbox, and it
|
|
expires after 24 hours. A confirmed change is one change set in your files, so you can undo
|
|
it. To forget a note you just saved, the model calls `revert_change`. For an older note it
|
|
proposes a shorter file, and you confirm that too.
|
|
|
|
A file over its cap is refused, and the answer lists the current entries so the model
|
|
merges them.
|
|
|
|
## Saved agents and messaging apps
|
|
|
|
A saved agent reads notes only when you allow the Memory add-on for it in the agent
|
|
editor. A chat that came from a messaging app reads your notes and the notes of its own
|
|
conversation, and never the notes of another conversation. A saved agent can only
|
|
propose a change when the owner granted it the right.
|
|
|
|
## Your control
|
|
|
|
The notes are plain files. Read, edit and delete them on the **Memory** tab of your account
|
|
or on the Files page. Stopping or removing the add-on stops the model from reading them; it
|
|
does not delete them.
|
|
|
|
## For add-on authors
|
|
|
|
The add-on is a package like the others: a manifest, two skills and an executable that
|
|
serves no tool. It declares `capabilities.contextFiles`, so the host loads the index files.
|
|
See [Context files](/features/addons/#context-files). The manifest needs `api` 2.
|