RecipesWithout an embedding API

Without an embedding API

There are two different situations: no cloud API but a local embedder, and no embedder at all. They behave very differently.

No cloud API: run the embedder locally

The local stack already works this way. Started from the repository’s docker/ folder, it runs Ollama next to the server and uses it for both embeddings and the LLM, so it needs no API key:

git clone https://github.com/lucasmailland/mnemosyne
cd mnemosyne/docker
cp .env.example .env
echo "MNEMO_DASHBOARD_SECRET=$(openssl rand -hex 32)" >> .env
docker compose up -d
docker exec mnemosyne-ollama ollama pull bge-m3
docker exec mnemosyne-ollama ollama pull qwen2.5:3b

bge-m3 is the embedding model and qwen2.5:3b is the LLM. Both run on your machine, and semantic recall, remember and session collapse all work.

No embedder at all

If the server starts with no usable embedding provider, this is what the code does.

CallResult
recall, default mode (auto)200. Falls back to full-text search
recall with mode: "lexical"200. Full-text search, as asked
recall with mode: "semantic"503, code semantic_search_unavailable. No silent fallback
recall with your own vectorRuns the vector path with that vector
remember without vector501, code not_implemented. Nothing is stored
remember with your own vectorStored with that vector. The write skips its own embedding step

So recall degrades, and writes do not. Without an embedder you can only write through remember if you send the embedding yourself:

await memory.remember({
  statement: "Larkspur Robotics ships firmware every two weeks.",
  vector: myEmbedding, // number[], computed by you
});

The vector must come from the same model the workspace uses for recall.

How to tell which search ran

Read debug.searchMode in the response:

const result = await memory.recall({ query: "firmware release cadence" });
 
console.log(result.debug?.searchMode); // "fts" when it fell back
console.log(result.debug?.embedded);   // false when the server did not embed the query

fts means the search fell back to full-text because there was no embedder. lexical means you asked for full-text yourself.

What you lose with full-text only

Full-text search matches words. A query for “morning beverage” does not find a fact about “coffee” unless the words overlap. Hits found this way carry no similarity value.

Session collapse also needs an LLM provider, which is a separate setting from the embedder.

An embedder that is configured but down

This is a different case from having none. If the provider is configured and does not answer:

  • recall falls back to full-text search, except in semantic mode, which answers 503.
  • remember stores the memory and returns embeddingDeferred: true. It is searchable by full-text at once, and the embedding is queued.

Adding an embedder later

Set the provider variables and restart the server:

MNEMO_EMBED_PROVIDER=openai
MNEMO_EMBED_API_KEY=...
MNEMO_EMBED_MODEL=text-embedding-3-small

Without MNEMO_EMBED_PROVIDER, the embedder uses MNEMO_LLM_PROVIDER and MNEMO_LLM_API_KEY. The server knows eight providers: openai, anthropic, google, cohere, mistral, voyage, bedrock and ollama. Anthropic has no embeddings API, so pair it with a separate embedding provider.

⚠️

The embedding model’s dimension matters. The schema has vector tables for 1024, 1536, 2048 and 4096 dimensions. Pick a model with one of those widths.