Semantic search
Weavekeep finds memory by its words. Semantic search adds a small embedding model that runs on your machine, so the recall tool and weavekeep search also find memory that means the same thing in other words. Keyword search always runs; semantic matches are merged into its results.
It is on by default. The first time your agent starts a session, Weavekeep downloads the model (about 24 MB, once) in the background and embeds your stored memory. Until the model is there, search uses keywords only. Your memory never leaves your machine. The only download is the local search model (about 24 MB), once; weavekeep embeddings off turns it off.
On LongMemEval, a public benchmark of long chat histories, the recall tool found a session holding the answer in its top 5 results for 95.1% of the 450 held-out questions with keyword search alone, and for 98.7% with semantic search.
What it uses
- The model: all-MiniLM-L6-v2, 8-bit (Apache-2.0), about 24 MB. The
weavekeep serveyour agent runs downloads it once from Hugging Face, in the background, at a fixed revision, and checks each file against a SHA-256 hash in the package. Hooks never download it, and nothing waits for it. It is stored in~/.weavekeep/models/all-MiniLM-L6-v2-q8/. - The runtime: onnxruntime-web on WebAssembly, shipped inside the npm package and inside the standalone executable, which unpacks it into
~/.weavekeep/runtime/the first time the model loads. No native code, and no code is downloaded. - Your memory never leaves your machine. The only download is the model, once. Your text is embedded locally.
How it starts
You do not need to do anything. The first weavekeep serve after you install (your agent starts one in each session) queues your stored prompts, replies, notes, summaries, decisions and facts for embedding. It downloads the model when it first needs it. Tool calls and their output are not embedded. New memory is queued as it is stored.
If the download fails, for example offline, search stays keyword-only and it is tried again in the background: 10 minutes after the first failure, then twice as long after each failure in a row, up to once a day. weavekeep embeddings status shows the next try. To download the model now, which also starts that count again:
weavekeep embeddings downloadThe queue is worked off in the background: by the weavekeep serve your agent runs, or by a short background run that the end of a turn or a session starts. In weavekeep serve it runs between requests, on one thread (at the lowest priority on Linux), and pauses at least as long as each batch took, so it uses at most half of one core. The short background run uses the lowest priority and one thread too, stops after 10 minutes, and does not start while the machine is busy. To do it now, with progress:
weavekeep embeddings index✓ Every waiting row is embedded: 812 rows embedded.Add --dry-run to only count what would be embedded, or --max <n> to stop after n rows; the next run resumes.
Check it
weavekeep embeddings status✓ Embeddings are on: 812 rows embedded.
model: all-MiniLM-L6-v2-q8 ~/.weavekeep/models/all-MiniLM-L6-v2-q8Before any session has started them:
✓ Embeddings are on by default. They start with the next weavekeep serve, which your agent runs in each session.
It downloads the model (23.7 MB, once) and embeds your stored memory in the background, on this machine only.
weavekeep embeddings off turns them off.
model: not downloaded yet; search uses keywords only until it is here
weavekeep embeddings download fetches it now (23.7 MB, once)While the model downloads, the model: line says downloading now. weavekeep status has an Embeddings row that says the same: on, downloading, not downloaded yet, or off. weavekeep doctor warns when embeddings are on and the model files are missing or fail their checksum, or when rows have waited for over a day.
Where it applies
- The
recalltool uses it in every agent. weavekeep searchuses it while an agent session is running. The CLI does not load the model itself; it asks theweavekeep servethat holds it, and with none running, search is keyword-only.- Memory added to prompts stays keyword-only.
weavekeep embeddings on --per-promptturns it on there too, as an experiment;weavekeep embeddings off --per-promptturns it off again. - Hooks never load the model. They wait at most 150 ms for an answer, then go on with keyword results.
If anything goes wrong (no model, a load error, a slow answer), search falls back to keywords without an error.
Memory and CPU
One process per machine holds the model: the first weavekeep serve that needs it. Other sessions ask that process. It unloads the model after 10 minutes without use (WEAVEKEEP_EMBED_IDLE_MINUTES, 0 for never).
In testing, the process holding the model used about 250 MB of memory, and about 640 MB with 100,000 stored rows embedded. WEAVEKEEP_EMBED_THREADS (1 to 4, default 1) sets the threads it embeds with.
Turn it off
weavekeep embeddings off✓ Embeddings are off: 812 vectors dropped. Search uses keywords only; your memory is unchanged.
This is kept for every session on this machine; weavekeep embeddings on turns them on again.This is the lasting switch: it is stored with your memory, so every session and every agent on this machine keeps it, and they stay off until you run weavekeep embeddings on. You can run it before your agent's first session, too; nothing is downloaded then. The vectors are derived data; dropping them changes none of your memory. The model files stay in ~/.weavekeep/models/; delete the folder to free the space. weavekeep embeddings status then says Embeddings are off (your choice; weavekeep embeddings on to turn on).
If you used Weavekeep before semantic search was on by default and never turned it on, it stays off: that counts as your choice. weavekeep embeddings on turns it on.
WEAVEKEEP_EMBEDDINGS=0 keeps embeddings off whatever the stored setting, but only in processes that inherit it: a shell where you set it, or an agent started from that shell. The weavekeep serve an agent starts from elsewhere (a desktop app, another terminal) does not see it and follows the stored setting. Where it is set, nothing is queued or downloaded.
Turn it back on
weavekeep embeddings on✓ Embeddings are on: 812 rows to embed, on this machine only.
They are embedded in the background as you work; weavekeep embeddings index does it now.This queues your stored memory again and downloads the model if it is not there.
Without network access
On a machine without network access, the download fails and search stays keyword-only; it is tried again later, up to once a day. Copy the model files into ~/.weavekeep/models/all-MiniLM-L6-v2-q8/, with the same layout as in the Hugging Face repository Xenova/all-MiniLM-L6-v2 (onnx/model_quantized.onnx, tokenizer.json, tokenizer_config.json, config.json); they are checked by size and hash, or point WEAVEKEEP_MODEL_DIR at a folder that has them. WEAVEKEEP_MODEL_URL replaces https://huggingface.co with a mirror. Then run weavekeep embeddings download or weavekeep embeddings index.
Behind a proxy
The download uses Node's built-in fetch, which goes through HTTPS_PROXY (with NO_PROXY for exceptions) only when Node's built-in proxy support is on. On Node 24.14 or later, Weavekeep turns it on itself when HTTPS_PROXY or HTTP_PROXY is set. On Node 22.21 to 24.13, also set NODE_USE_ENV_PROXY=1 (Node docs) where your agent starts weavekeep serve, or run NODE_USE_ENV_PROXY=1 weavekeep embeddings download once. Node 22.16 to 22.20 cannot use a proxy for it: upgrade Node, or copy the model files in as above. weavekeep embeddings status says so when a proxy variable is set and this Node cannot use it.
On Windows, no process can hold the model, so search stays keyword-only.