Abhay Bhat

Mem0

AI 智慧體v1.0.0
作者:Abhay Bhat更新於 2026-05-11mem0@clawhub_abhayjb/mem0
上下文管理記憶增強#Learning

據 AlphaMoat 統計,截至 2026-09,Mem0 累計下載 4,027 次、獲 4 個星標,在全部 5,078 個 AI 技能中排名第 2,534 位,在「AI 智慧體」分類(969 個)中排名第 496 位。

累計安裝
124
累計下載
4027
星標
4
全站排名
#2,534
全站前 50% · 「AI 智慧體」前 52%
平台累計安裝累計下載星標評論
ClawHub ↗12439373-
SkillHub ↗12240274—

各平台的計數口徑不同,統計時間不一致。

這個技能是做什麼的

文件介紹如何搜尋已存記憶、在使用者明確要求時新增內容、從對話提取記憶、列出記憶和刪除指定記錄。記憶文字與搜尋查詢可能由 OpenAI 處理並在本地保留;儲存前應確認使用者意圖,不儲存秘密或敏感個人資訊,並限制列出或刪除全部記憶的許可權。

資料釋出於 2026-10-29

可以用來做什麼

  • 搜尋過去儲存的偏好和上下文
  • 在使用者明確要求後儲存一條記憶
  • 審查記憶清單和刪除流程

什麼時候用

  • 在可信的單使用者環境中,且使用者同意儲存非敏感資訊時

示例提示詞

以下是根據技能文件生成的示例,不代表實際執行結果。

搜尋已儲存的非敏感偏好,不要新增記憶。
在儲存這條偏好前詢問使用者是否同意,並說明儲存與刪除範圍。

月度資料趨勢

累計下載4027
1978307941792026-03 · 累計下載 21302026-05 · 累計下載 30852026-06 · 累計下載 32402026-07 · 累計下載 36222026-08 · 累計下載 38242026-09 · 累計下載 402726-0326-09
星標4
3442026-03 · 星標 32026-05 · 星標 32026-06 · 星標 32026-07 · 星標 42026-08 · 星標 42026-09 · 星標 426-0326-09

2026-09 起統計方法調整:同名技能按作者分別統計,並覆蓋全部技能。圖中虛線為調整前的月份,與之後的資料不直接比較,也不計算跨越調整的增長。

月份累計下載環比星標
2026-094027—4
2026-083824+5.6%4
2026-073622+11.8%4
2026-063240+5.0%3
2026-053085—3
2026-032130—3

SKILL.md 原文

以下是作者釋出的原始檔案,按純文字顯示,本站未做修改或稽核;其中的連結不可點選,命令請核實後再執行。抓取於 2026-10-23。

4.6 KB · ClawHub v1.0.0
---
name: mem0
description: >-
  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) Searching for past context about user's choices/preferences, (4) Building adaptive responses based on learned user behavior. Complements MEMORY.md (structured facts) with dynamic, conversational memory (learned preferences, patterns, adaptive context).
---

# 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.
展開全部(共 155 行)
## 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

「AI 智慧體」分類下的熱門技能

資料月份:2026-09 · 下載/星標/安裝數聚合自公開技能註冊庫(ClawHub、SkillHub),按月更新。口徑說明見資料方法。