返回顶部
m

mem0

>-

作者: admin | 来源: ClawHub
源自
ClawHub
版本
V 1.0.0
安全检测
已通过
2,070
下载量
3
收藏
概述
安装方式
版本历史

mem0

# 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: ```bash 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"): ```bash node scripts/mem0-add.js "Abhay prefers concise updates" ``` **Conversation Storage** (for context learning): ```bash # 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 ```bash node scripts/mem0-search.js "query text" [--limit=3] [--user=abhay] ``` Searches semantically across stored memories. Returns relevant memories ranked by relevance. ### Add Memory ```bash # 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 ```bash node scripts/mem0-list.js [--user=abhay] ``` Shows all stored memories for the user with IDs and creation dates. ### Delete Memories ```bash # 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`: ```javascript { 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: ```bash 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 initialization - `mem0-search.js` - Search memories semantically - `mem0-add.js` - Add new memories - `mem0-list.js` - List all memories - `mem0-delete.js` - Delete memories ### references/ - `integration-patterns.md` - Detailed best practices and patterns

标签

skill ai

通过对话安装

该技能支持在以下平台通过对话安装:

OpenClaw WorkBuddy QClaw Kimi Claude

方式一:安装 SkillHub 和技能

帮我安装 SkillHub 和 mem0-1776291823 技能

方式二:设置 SkillHub 为优先技能安装源

设置 SkillHub 为我的优先技能安装源,然后帮我安装 mem0-1776291823 技能

通过命令行安装

skillhub install mem0-1776291823

下载 Zip 包

⬇ 下载 mem0 v1.0.0

文件大小: 53.59 KB | 发布时间: 2026-4-16 17:56

v1.0.0 最新 2026-4-16 17:56
Initial release of mem0: an adaptive conversational memory layer for Clawdbot.

- Adds semantic search and automatic memory storage of user preferences, patterns, and conversational context.
- Supports explicit memory commands (e.g. "remember this"), adaptive learning from conversations, and semantic recall for personalized responses.
- Provides CLI tools for searching, adding, listing, and deleting memories.
- Complements Clawdbot's structured MEMORY.md with dynamic, learned context.
- Achieves improved accuracy and efficiency over basic context retrieval methods.

Archiver·手机版·闲社网·闲社论坛·羊毛社区· 多链控股集团有限公司 · 苏ICP备2025199260号-1

Powered by Discuz! X5.0   © 2024-2025 闲社网·线报更新论坛·羊毛分享社区·http://xianshe.com

p2p_official_large
返回顶部