Zero-cloud vector memory using Ollama embeddings + Qdrant local storage.
bash
# Ollama with embedding model
ollama pull qwen3-embedding:4b
# Install the package
pip install local-vector-memory
bash
lvm init # Initialize database
lvm add "text to remember" # Store a memory
lvm search "query" # Semantic search
lvm search "query" --limit 3 --json # Structured output
lvm stats # Show stats
lvm reindex --dir ~/notes # Reindex markdown files
lvm delete "source_name" # Delete by source
python
from local_vector_memory.core import LocalVectorMemory
lvm = LocalVectorMemory() # uses env defaults
lvm.add("OpenClaw baseUrl must not end with /v1")
results = lvm.search("how to configure ollama")
for r in results:
print(f"[{r['score']}] {r['source']}: {r['text'][:100]}")
Env VarDefaultDescriptionLVM_OLLAMA_URL``http://localhost:11434Must be localhost (SSRF protected)LVM_MODEL``qwen3-embedding:4bEmbedding modelLVM_DIMS``2560Vector dimensionsLVM_DB_PATH``~/.local-vector-memory/qdrantStorage pathLVM_CHUNK_SIZE``400Chunk size in charsLVM_CHUNK_OVERLAP``50Overlap between chunks
ModelDimsSizeChinese Hit RateBest Forqwen3-embedding:4b25602.5GB**100%**Chinese/English mixed570MB40%Multilingual, low RAMbge-m31024nomic-embed-text768274MB30%English-only, minimal RAM
Add to HEARTBEAT.md or cron for periodic reindexing:
bash
lvm reindex --dir ~/.openclaw/workspace/memory
When memory_search doesn't find what you need:
bash
lvm search "query" --json