docs/concepts/memory-builtin.md
The builtin engine is the default memory backend. It stores your memory index in a per-agent SQLite database and needs no extra dependencies to get started.
By default, the builtin engine uses OpenAI embeddings. If OPENAI_API_KEY or
models.providers.openai.apiKey is already configured, vector search works
with no extra memory config.
To set a provider explicitly:
{
agents: {
defaults: {
memorySearch: {
provider: "openai",
},
},
},
}
Without an embedding provider, only keyword search is available.
To force local GGUF embeddings, install the official llama.cpp provider
plugin, then point local.modelPath at a GGUF file:
openclaw plugins install @openclaw/llama-cpp-provider
{
agents: {
defaults: {
memorySearch: {
provider: "local",
fallback: "none",
local: {
modelPath: "~/.node-llama-cpp/models/embeddinggemma-300m-qat-Q8_0.gguf",
},
},
},
},
}
| Provider | ID | Notes |
|---|---|---|
| Bedrock | bedrock | Uses the AWS credential chain |
| DeepInfra | deepinfra | Default: BAAI/bge-m3 |
| Gemini | gemini | Supports multimodal (image + audio) |
| GitHub Copilot | github-copilot | Uses your Copilot subscription |
| LM Studio | lmstudio | Local/self-hosted |
| Local | local | @openclaw/llama-cpp-provider |
| Mistral | mistral | |
| Ollama | ollama | Local/self-hosted |
| OpenAI | openai | Default: text-embedding-3-small |
| OpenAI-compatible | openai-compatible | Generic /v1/embeddings endpoint |
| Voyage | voyage |
Set memorySearch.provider to switch away from OpenAI.
OpenClaw indexes MEMORY.md and memory/*.md into chunks (400 tokens with
80-token overlap by default) and stores them in a per-agent SQLite database.
~/.openclaw/agents/<agentId>/agent/openclaw-agent.sqliteopenclaw memory index --forceThe builtin engine is the right choice for most users:
Consider switching to QMD if you need reranking, query expansion, or want to index directories outside the workspace.
Consider Honcho if you want cross-session memory with automatic user modeling.
Memory search disabled? Check openclaw memory status. If no provider is
detected, set one explicitly or add an API key.
Local provider not detected? Confirm the local path exists and run:
openclaw memory status --deep --agent main
openclaw memory index --force --agent main
Both standalone CLI commands and the Gateway use the same local provider id.
Set memorySearch.provider: "local" when you want local embeddings.
Stale results? Run openclaw memory index --force to rebuild. The watcher
may miss changes in rare edge cases.
sqlite-vec not loading? OpenClaw falls back to in-process cosine
similarity automatically. openclaw memory status --deep reports the local
vector store separately from the embedding provider, so Vector store: unavailable points at sqlite-vec loading while Embeddings: unavailable
points at provider/auth or model readiness. Check logs for the specific load
error.
For embedding provider setup, hybrid search tuning (weights, MMR, temporal decay), batch indexing, multimodal memory, sqlite-vec, extra paths, and all other config knobs, see the Memory configuration reference.