Persistent semantic memory plugin for Claude Code
npx claudepluginhub linehaul-ai/libsql-memoryPersistent semantic memory for Claude Code with vector search
Persistent semantic memory for Claude Code sessions using LibSQL with vector search.
# Clone the repo
git clone https://github.com/linehaul-ai/libsql-memory.git
cd libsql-memory
# Run Claude Code with the plugin
claude --plugin-dir .
That's it! The plugin will automatically:
/memory-status and /memory-clear commandsNomic embedding server (text-embedding-qwen3-embedding-8b) running at http://192.168.128.10:1234 (default)
Or use local embeddings (no external dependencies):
export LIBSQL_MEMORY_EMBEDDING_PROVIDER=local
claude --plugin-dir /path/to/libsql-memory
Or use OpenAI:
export LIBSQL_MEMORY_EMBEDDING_PROVIDER=openai
export OPENAI_API_KEY=your-key
claude --plugin-dir /path/to/libsql-memory
Copy to your project as a local plugin:
# Copy entire plugin directory
cp -r /path/to/libsql-memory /your/project/libsql-memory
# Then run Claude with the plugin directory
cd /your/project && claude --plugin-dir ./libsql-memory
Or install globally:
claude plugins add https://github.com/linehaul-ai/libsql-memory.git
Provides memory tools:
memory_store - Store a memory with content and namespacememory_retrieve - Get a specific memory by IDmemory_search - Semantic search across memoriesmemory_list - List memories in a namespacememory_delete - Delete a memorymemory_stats - Get storage statistics| Hook | Purpose |
|---|---|
| SessionStart | Loads project context and preferences at session start |
| UserPromptSubmit | Searches memory for context relevant to user queries |
| PreToolUse (Write/Edit) | Retrieves file-specific patterns before code changes |
| PostToolUse (Write/Edit) | Stores architectural decisions and patterns after changes |
| Stop | Saves session summaries and important learnings |
/memory-status - View memory statistics and recent entries/memory-clear [namespace] - Clear memories from a namespace| Variable | Default | Description |
|---|---|---|
LIBSQL_MEMORY_EMBEDDING_PROVIDER | nomic | Embedding provider: nomic, openai, local |
LIBSQL_MEMORY_EMBEDDING_ENDPOINT | http://192.168.128.10:1234/v1/embeddings | Nomic server endpoint |
OPENAI_API_KEY | - | Required if using OpenAI provider |
Stored at .claude/memory.db relative to where Claude Code runs.
Pre-built binaries are included for:
For other platforms, build from source:
cd src/plugin
make build
cd src/plugin
make build # Build for current platform
make test # Run tests
make verify # Run all checks
bin/ directorylocal provider.claude/ directory exists and is writablemake buildMIT