Skip to content

feat: add lancedb-memory skill#979

Closed
5queezer wants to merge 4 commits intoqwibitai:mainfrom
5queezer:skill/add-lancedb-memory
Closed

feat: add lancedb-memory skill#979
5queezer wants to merge 4 commits intoqwibitai:mainfrom
5queezer:skill/add-lancedb-memory

Conversation

@5queezer
Copy link
Copy Markdown

@5queezer 5queezer commented Mar 12, 2026

Why

Container agents currently have no long-term memory across sessions — every conversation starts from scratch. This makes agents forget user preferences, past decisions, and context that was expensive to build up.

What this adds

A skill (/add-lancedb-memory) that gives agents 4 MCP tools for persistent semantic memory:

  • memory_store — save a memory with optional category tags
  • memory_search — find relevant memories via vector similarity (not just keyword match)
  • memory_delete / memory_count — manage stored memories

Embeddings use Gemini embedding-001 (3072-dim). Storage is LanceDB — local by default, or cloud via LANCEDB_URI.

Security

  • Sanitized filter inputs to prevent LanceDB injection
  • crypto.randomUUID() for IDs, 30s fetch timeout on Gemini calls
  • Race-safe singleton for table initialization

Test plan

  • Run /add-lancedb-memory on a fresh clone
  • Store and search memories from the agent
  • Verify local and cloud (LANCEDB_URI) modes
  • Run migration script against OpenClaw JSONL backup

🤖 Generated with Claude Code

Christian Pojoni and others added 4 commits March 13, 2026 23:04
Adds persistent semantic memory to container agents via 4 MCP tools
(memory_store, memory_search, memory_delete, memory_count). Uses
LanceDB for vector storage (local or cloud via LANCEDB_URI) and
Gemini embedding-001 for 3072-dim embeddings. Includes migration
script for importing memories from OpenClaw JSONL backups.

Security: sanitized filter inputs, crypto.randomUUID for IDs,
30s fetch timeout, race-safe singleton initialization.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
SKILL.md for adding semantic memory (LanceDB + Gemini embeddings)
to container agents. Provides 4 MCP tools: memory_store,
memory_search, memory_delete, memory_count.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Move Gemini API key from URL query param to x-goog-api-key header
- Sort package.json dependencies alphabetically
- Use consistent single-quote SQL in memoryDelete filter
- Move memory import to top of ipc-mcp-stdio.ts with other imports
- Require explicit args in migrate script (remove hardcoded defaults)
- Add exponential backoff retry on 429/5xx in migrate script

https://claude.ai/code/session_01SuTggdU3v9wdy5cjTn77Qw
Float32Array gets flattened to vector.0, vector.1... keys by LanceDB
Cloud's REST serialization, causing "Found field not in schema: vector.0"
errors on memory_store. Plain number[] arrays serialize correctly.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@5queezer
Copy link
Copy Markdown
Author

Closing in favour of #1043 (feat/memory-lancedb-pro), which supersedes this PR with a complete implementation: hybrid BM25+vector search, multi-key rotation, LanceDB Cloud support, Jina reranking, schema migration, and a clean squashed commit history rebased on upstream/main.

@5queezer 5queezer closed this Mar 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

PR: Skill Skill package or skill-related changes Status: Needs Review Ready for maintainer review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants