一键导入
local-embedding
// Run embedding on-device with ONNX Runtime. Build from source, model selection, offline mode. Use when setting up local embedding without an API key.
// Run embedding on-device with ONNX Runtime. Build from source, model selection, offline mode. Use when setting up local embedding without an API key.
Use Memoria as OpenClaw's durable memory slot. Triggers: "remember this", "save to memory", "what do you remember", "continue from last time", "forget this", "correct memory", "take a snapshot", "rollback memory", "branch memory", "merge memory", "use long-term memory".
Install Memoria and configure MCP for AI tools (Kiro, Cursor, Claude Code, Codex, Gemini CLI). Decision tree for Cloud vs self-hosted mode, database, embedding provider. Use when helping users set up Memoria.
Deploy Memoria with Docker Compose or Kubernetes. Environment variables, multi-instance setup, security. Use when deploying or configuring Memoria.
Memoria REST API endpoints, request/response formats, auth, rate limits. Use when calling or implementing API endpoints.
Memoria codebase structure, workspace layout, key traits, database tables, config patterns, and testing conventions. Use when navigating or modifying Memoria code.
Create, test, sign, and publish Memoria governance plugins. Covers Rhai and gRPC runtimes, manifest format, lifecycle. Use when developing or managing plugins.
| name | local-embedding |
| description | Run embedding on-device with ONNX Runtime. Build from source, model selection, offline mode. Use when setting up local embedding without an API key. |
Pre-built binaries do NOT include local embedding.
cd Memoria
make build-local
sudo cp memoria/target/release/memoria /usr/local/bin/
Binary is ~50-80MB (bundles ONNX Runtime). Expected.
memoria init --tool kiro # No --embedding-* flags needed
Leave EMBEDDING_* env vars empty in mcp.json → local embedding is the default.
~/.cache/fastembed/ (~30MB default)| Model | Dim | Size | Notes |
|---|---|---|---|
all-MiniLM-L6-v2 | 384 | ~30MB | Default. Fast, English |
BAAI/bge-m3 | 1024 | ~1.2GB | Best quality, multilingual |
Change model in mcp.json env block:
{ "EMBEDDING_MODEL": "BAAI/bge-m3", "EMBEDDING_DIM": "1024" }
⚠️ Choose BEFORE first startup. Dimension is locked into schema.
| Local | Remote (OpenAI/SiliconFlow) | |
|---|---|---|
| Privacy | ✅ Offline | ⚠️ Text sent to API |
| Cost | Free | API key |
| First query | ~3-5s | Fast |
| Build | From source | Pre-built works |
| Offline | ✅ | ❌ |
Recommendation: Use remote unless you need offline/strict privacy.
| Problem | Fix |
|---|---|
| "compiled without local-embedding" | Build from source: make build-local |
| Model download fails | Set HF_ENDPOINT for mirror, or manually download to ~/.cache/fastembed/ |
| High memory | Default ~100MB. bge-m3 ~1-2GB. Choose based on available RAM |