Add semantic memory skill with LanceDB + Gemini embeddings#1013
Closed
5queezer wants to merge 3 commits intoqwibitai:mainfrom
Closed
Add semantic memory skill with LanceDB + Gemini embeddings#10135queezer wants to merge 3 commits intoqwibitai:mainfrom
5queezer wants to merge 3 commits intoqwibitai:mainfrom
Conversation
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
Author
|
Duplicate of #979 — review fixes merged into the original PR branch. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Type of Change
.claude/skills/Description
This PR adds the
add-lancedb-memoryskill, which enables container agents to store and retrieve semantic memories across sessions using LanceDB for vector storage and Gemini embeddings for semantic similarity search.What's included
Skill documentation (
.claude/skills/add-lancedb-memory/SKILL.md):Implementation:
container/agent-runner/src/memory.ts— LanceDB + Gemini embedding logic with functions for storing, searching, deleting, and counting memoriescontainer/agent-runner/src/ipc-mcp-stdio.ts:memory_store— persist facts/decisions with category and importancememory_search— semantic similarity search via natural languagememory_delete— remove memories by IDmemory_count— total memory countsrc/container-runner.tsforGEMINI_API_KEY,LANCEDB_URI,LANCEDB_API_KEY@lancedb/lancedbandapache-arrowincontainer/agent-runner/package.jsonscripts/migrate-memories.mjs) for importing OpenClaw JSONL backupsKey features
/workspace/group/memory/lancedbLANCEDB_URI+LANCEDB_API_KEYembedding-001modelInstallation flow
The skill guide walks users through:
For Skills
https://claude.ai/code/session_01SuTggdU3v9wdy5cjTn77Qw