Closed
Conversation
4 tasks
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>
c83e06e to
deef13f
Compare
6 tasks
Author
|
Closing in favour of #1043 ( |
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.
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 tagsmemory_search— find relevant memories via vector similarity (not just keyword match)memory_delete/memory_count— manage stored memoriesEmbeddings use Gemini
embedding-001(3072-dim). Storage is LanceDB — local by default, or cloud viaLANCEDB_URI.Security
crypto.randomUUID()for IDs, 30s fetch timeout on Gemini callsTest plan
/add-lancedb-memoryon a fresh cloneLANCEDB_URI) modes🤖 Generated with Claude Code