mem0-memory-integration
Intelligent memory layer for Clawdbot using Mem0. Provides semantic search and automatic storage of user preferences, patterns, and context across…
от rondoflow★ 37 звёзд на GitHub
Установить mem0-memory-integration в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Об этом скилле
Mem0 Memory Integration
Mem0 adds an intelligent, adaptive memory layer to Clawdbot that automatically learns and recalls user preferences, patterns, and context across all interactions.
Core Workflow
1. Search Before Responding
Before answering user questions, search mem0 for relevant context:
node scripts/mem0-search.js "user preferences" --limit=3
Use retrieved memories to:
- Personalize responses
- Remember preferences
- Recall past patterns
- Adapt communication style
2. Store After Interactions
Explicit Storage (when user says "remember this"):
node scripts/mem0-add.js "Abhay prefers concise updates"
Conversation Storage (for context learning):
# Pass messages as JSON
node scripts/mem0-add.js --messages='[{"role":"user","content":"I like brief updates"},{"role":"assistant","content":"Got it!"}]'
Available Commands
Search Memories
node scripts/mem0-search.js "query text" [--limit=3] [--user=abhay]
Searches semantically across stored memories. Returns relevant memories ranked by relevance.
Add Memory
# Simple text
node scripts/mem0-add.js "memory text" [--user=abhay]
# Conversation messages (auto-extracts memories)
node scripts/mem0-add.js --messages='[{...}]' [--user=abhay]
Mem0's LLM automatically extracts, deduplicates, and merges related memories.
List All Memories
node scripts/mem0-list.js [--user=abhay]
Shows all stored memories for the user with IDs and creation dates.
Delete Memories
# Delete specific memory
node scripts/mem0-delete.js <memory_id>
# Delete all memories for user
node scripts/mem0-delete.js --all --user=abhay
What to Store vs Not Store
✅ Store These:
- Explicit requests: "Remember that I..."
- Preferences: Communication style, format choices
- Personal context: Work info, interests, family (non-sensitive)
- Usage patterns: Frequent requests, timing preferences
- Corrections: When user corrects your mistakes
- Adaptive facts: Current projects, recent interests
❌ Don't Store:
- Secrets, passwords, API keys
- Temporary context (unless explicitly requested)
- System errors or debug info
- Information already in MEMORY.md (avoid duplication)
Complementing Clawdbot Memory
Clawdbot MEMORY.md (Structured, Deliberate):
- Permanent facts: Name = Abhay, Location = Singapore
- Reference data: Email, blog URL, Twitter handle
- Structured knowledge: Project details, credentials
Mem0 (Dynamic, Learned):
- Preferences: "Abhay prefers concise updates"
- Patterns: "Usually asks for bus info at 8:30am"
- Adaptive context: "Currently interested in AI news"
- Behavioral: "Likes direct answers, minimal fluff"
Use both together: Check MEMORY.md for facts, check mem0 for preferences/patterns.
Performance Benefits
- +26% accuracy over OpenAI Memory (LOCOMO benchmark)
- 91% faster than full-context retrieval
- 90% fewer tokens than including all conversation history
- Sub-50ms semantic search retrieval
Configuration
Located in scripts/mem0-config.js:
{
embedder: "openai/text-embedding-3-small",
llm: "openai/gpt-4o-mini",
vectorStore: "memory" (local),
historyDb: "~/.mem0/history.db",
userId: "abhay"
}
Uses Clawdbot's OpenAI API key from environment (OPENAI_API_KEY).
Integration Patterns
For detailed workflow patterns, error handling, and best practices, see:
references/integration-patterns.md
Programmatic Use
All scripts support JSON_OUTPUT environment variable for programmatic access:
JSON_OUTPUT=1 node scripts/mem0-search.js "query"
Returns JSON after human-readable output (look for ---JSON--- marker).
Resources
scripts/
mem0-config.js- Configuration and instance initializationmem0-search.js- Search memories semanticallymem0-add.js- Add new memoriesmem0-list.js- List all memoriesmem0-delete.js- Delete memories
references/
integration-patterns.md- Detailed best practices and patterns
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
- manifest.json
FAQ
Что делает скилл mem0-memory-integration?
Intelligent memory layer for Clawdbot using Mem0. Provides semantic search and automatic storage of user preferences, patterns, and context across conversations. Use when (1) User explicitly says "remember this", (2) Learning user preferences or patterns during conversation, (3)…
Как установить скилл mem0-memory-integration?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл mem0-memory-integration запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
doc-coauthoring
AnthropicGuide users through a structured workflow for co-authoring documentation. Use when user wants to write documentation, proposals, technical specs, decision…
academy-guide
AnthropicStop and check this skill before finishing any reply to a question about how to use Claude or a Claude product — it recommends matching courses, tutorials…
internal-comms
AnthropicA set of resources to help me write all kinds of internal communications, using the formats that my company likes to use. Claude should use this skill…
skill-development
AnthropicThis skill should be used when the user wants to "create a skill", "add a skill to plugin", "write a new skill", "improve skill description", "organize skill…