Agent skill · software engineering · sundial-org
lancedb-memory
lancedb-memory — an agent skill for coding agents.
Why this skill is useful
Adds a complete integration script for managing long-term memory with LanceDB, including vector search capabilities that aren't commonly found in public documentation.
What it needs
Requires lancedb installed locally. About 2k tokens when loaded. Last updated 2026-03-07. 639 stars on the source repository.
What this skill does
#!/usr/bin/env python3 """ LanceDB integration for long-term memory management. Provides vector search and semantic memory capabilities. """ import os import json import lancedb from datetime import datetime from typing import List, Dict, Any, Optional from pathlib import Path class LanceMemoryDB: """LanceDB wrapper for long-term memory storage and retrieval.""" def init(self, dbpath: str = "/Users/prerak/clawd/memory/lancedb"): self.dbpath = Path(dbpath) self.dbpath.mkdir(parents=True, existok=True) self.db = lancedb.connect(self.dbpath) # Ensure memory table exists if "memory" not in self.db.tablenames(): self.creatememorytable() def creatememorytable(self): """Create the memory table with appropriate schema.""" schema = [ {"name": "id", "type": "int", "nullable": False}, {"name": "timestamp", "type": "timestamp", "nullable": False}, {"name": "content", "type": "str", "nullable": False}, {"name": "category", "type": "str", "nullable": True}, {"name": "tags", "type": "str[]", "nullable": True}, {"name": "importance", "type": "int", "nullable": True}, {"name": "metadata", "type": "json", "nullable": True}, ] self.db.createtable("memory", schema=schema) def addmemory(self, content: str, category: str = "general", tags: List[str] = None, importance: int = 5, metadata: Dict[str, Any] = None) -> int: """Add a new memory entry.""" table = self.db.opentable("memory") # Get next ID maxid = table.topandas()["id"].max() if len(table) > 0 else 0 newid = maxid + 1 # Insert new memory memorydata = { "id": newid, "timestamp": datetime.now(), "content": content, "category": category, "tags": tags or [], "importance": importance, "metadata": metadata or {} } table.add([memorydata]) return newid def searchmemories(self, query: str, category: str = None, limit: int = 10) -> List[Dict]: """Search memories using vector similarity.""" table = self.db.opentable("memory") # Build filter whereclause = [] if category: whereclause.append(f"category = '{category}'") filterexpr = " AND ".join …
How to use it
Reference it in AdaL, Claude Code, Cursor or any coding agent — nothing to install:
@skills sundial-org/lancedb-memory