feat: semantic memory with LanceDB + Gemini embeddings#1
feat: semantic memory with LanceDB + Gemini embeddings#1
Conversation
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
9980b52 to
a112592
Compare
|
Issues by priority: 🔴 High 🟡 Medium 🟢 Low Overall the architecture is solid. The main things I'd fix before merging: the hardcoded path, the error suppression, the LanceDB version mismatch, and the Float32Array inconsistency. The rest are nice-to-haves. 👍 |
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>
Each subagent in an agent team gets a dedicated pool bot identity in Telegram groups. Bots are assigned round-robin and renamed via setMyName to match agent roles. IPC messages with a sender field route through the pool instead of the main bot. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Use MEMORY_LANCEDB_DIR env var instead of hardcoded path - Include Gemini error body in thrown error message for debugging - Align agent-runner LanceDB to ^0.26.2 (matches root package.json) - Pass Float32Array to LanceDB add/search (matches schema + migration) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
666f724 to
a07aa08
Compare
The Telegram agent swarm (bot pool) is already available as an installable skill at nanoclaw.dev/skills/telegram-swarm. Removes the bundled implementation to keep the PR focused on semantic memory. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Restore .env.example, repo-tokens/badge.svg, src/channels/index.ts to upstream main state. Remove .github/workflows/fork-sync-skills.yml and telegram channel files that don't exist on upstream. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…y-and-swarm # Conflicts: # package-lock.json # repo-tokens/badge.svg
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- package.json: removed duplicate apache-arrow entry - index.ts: kept mcp__gmail__* in allowedTools from main - ipc-mcp-stdio.ts: removed duplicate memory import - memory.ts: used x-goog-api-key header (main) and single-quote SQL (main) - migrate-memories.mjs: kept retry logic and header auth from main - container-runner.ts: used .gmail-mcp mount (main) over himalaya Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- migrate-memories.mjs: pass apiKey for LanceDB Cloud URIs (medium #1) - Throw on old schema without scope column instead of silent warn (medium #2) - Log hint when rerank API key is present but RERANK_PROVIDER unset (medium qwibitai#3) - Validate vectorDim early for custom providers (low qwibitai#4) Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Summary
memory_store,memory_search,memory_delete,memory_count). Uses Geminiembedding-001(3072-dim) for embeddings. Supports local embedded LanceDB or cloud viaLANCEDB_URIenv var.scripts/migrate-memories.mjsimports memories from OpenClaw JSONL backups with re-embedding.GEMINI_API_KEY,LANCEDB_URI,LANCEDB_API_KEYenv vars to containers for MCP tool access.Security fixes applied
crypto.randomUUID()for memory IDs instead ofMath.random()Review fixes applied
MEMORY_LANCEDB_DIRenv var (no more hardcoded path)^0.26.2(matches root)Float32Arrayused consistently for vectors (matches schema + migration)Removed from PR
Test plan
memory_countreturns correct totalLANCEDB_URIset (cloud) and unset (local)🤖 Generated with Claude Code