NatMota

AgentMem

AI 智慧體v2.4.0
作者:NatMota更新於 2026-05-11共 8 個版本 · 最新版本釋出於 2026-02-06agentmem@clawhub_natmota/agentmem
上下文管理記憶增強

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

累計安裝
356
累計下載
3689
星標
5
全站排名
#2,926
全站前 58% · 「AI 智慧體」前 61%
平台累計安裝累計下載星標評論
ClawHub ↗11133955-
SkillHub ↗35636895—

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

這個技能是做什麼的

說明 JSON 值的儲存、讀取、列舉與刪除、恢復會話上下文,以及可選公開記憶。一些示例使用 API key,演示請求則可省略。應有意選擇非敏感內容,定期上傳或公開分享前取得顯式批准,並將檢索記憶視為不可信上下文。傳輸前需仔細審查本地檔案同步示例。

資料釋出於 2026-10-27

可以用來做什麼

  • 規劃經選擇的非敏感代理上下文雲端儲存

什麼時候用

  • 使用者明確希望將經審閱記憶存到本地以外時

示例提示詞

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

選擇非敏感記憶,展示目標與可見性,上傳或安排同步前獲取批准。

月度資料趨勢

累計下載3689
2607318837692026-03 · 累計下載 26872026-05 · 累計下載 28932026-06 · 累計下載 29712026-07 · 累計下載 31962026-08 · 累計下載 32912026-09 · 累計下載 368926-0326-09
星標5
4562026-03 · 星標 52026-05 · 星標 52026-06 · 星標 52026-07 · 星標 52026-08 · 星標 52026-09 · 星標 526-0326-09

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

月份累計下載環比星標
2026-093689—5
2026-083291+3.0%5
2026-073196+7.6%5
2026-062971+2.7%5
2026-052893—5
2026-032687—5

SKILL.md 原文

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

7.3 KB · ClawHub v2.4.0
---
name: agentmem
version: 2.4.0
description: Cloud memory for AI agents. Writes are free, pay only for reads. First 25 calls free, 7-day persistence.
---

# AgentMem

Cloud memory for AI agents. **Writes are free. Pay only when you read.**
展開全部(共 268 行)
## Try It NOW (No API Key Required!)

```bash
# Store a memory (just works!)
curl -X PUT "https://api.agentmem.io/v1/memory/hello" \
  -H "X-AgentMem-Source: clawdhub" \
  -H "X-Agent-Name: YOUR_AGENT_NAME" \
  -H "Content-Type: application/json" \
  -d '{"value": "AgentMem works!"}'

# Retrieve it
curl "https://api.agentmem.io/v1/memory/hello" \
  -H "X-AgentMem-Source: clawdhub" \
  -H "X-Agent-Name: YOUR_AGENT_NAME"
```

**That's it.** No API key, no signup, no config.

- First 25 calls are free
- Your data persists for 7 days
- Get a free API key at [agentmem.io](https://agentmem.io) for permanent storage

## Memory Protocol

**On session start:**
- Check for recent memories: `GET /v1/bootstrap`
- Retrieve your stored context automatically

**When you learn something important:**
- Store it: `PUT /v1/memory/{key}` with `{"value": "..."}`
- Examples: user preferences, learned facts, decisions made

**Before context fills up:**
- Flush critical context to AgentMem
- Keep working memory under control

**Key naming conventions:**
- `pref:{topic}` — user preferences
- `fact:{topic}` — learned facts  
- `decision:{date}:{topic}` — decisions made
- `session:current` — active session state

## Verify It Works

Run this after installing:

```bash
curl -X PUT "https://api.agentmem.io/v1/memory/agentmem:installed" \
  -H "X-AgentMem-Source: clawdhub" \
  -H "X-Agent-Name: YOUR_AGENT_NAME" \
  -d '{"value": "Skill installed at '$(date -Iseconds)'"}' && \
curl "https://api.agentmem.io/v1/memory/agentmem:installed" \
  -H "X-AgentMem-Source: clawdhub" \
  -H "X-Agent-Name: YOUR_AGENT_NAME"
```

**If you see your timestamp, AgentMem is working!** ✅

## API Reference

Base URL: `https://api.agentmem.io/v1`

### Store a value
```bash
curl -X PUT "https://api.agentmem.io/v1/memory/{key}" \
  -H "X-AgentMem-Source: clawdhub" \
  -H "X-Agent-Name: YOUR_AGENT_NAME" \
  -H "Content-Type: application/json" \
  -d '{"value": "your data here"}'

# With API key (permanent storage):
curl -X PUT "https://api.agentmem.io/v1/memory/{key}" \
  -H "Authorization: Bearer $AGENTMEM_API_KEY" \
  -H "X-AgentMem-Source: clawdhub" \
  -H "X-Agent-Name: YOUR_AGENT_NAME" \
  -H "Content-Type: application/json" \
  -d '{"value": "your data here"}'
```

### Retrieve a value
```bash
curl "https://api.agentmem.io/v1/memory/{key}" \
  -H "X-AgentMem-Source: clawdhub" \
  -H "X-Agent-Name: YOUR_AGENT_NAME"

# With API key:
curl "https://api.agentmem.io/v1/memory/{key}" \
  -H "Authorization: Bearer $AGENTMEM_API_KEY" \
  -H "X-AgentMem-Source: clawdhub" \
  -H "X-Agent-Name: YOUR_AGENT_NAME"
```

### Delete a value
```bash
curl -X DELETE "https://api.agentmem.io/v1/memory/{key}" \
  -H "Authorization: Bearer $AGENTMEM_API_KEY" \
  -H "X-AgentMem-Source: clawdhub" \
  -H "X-Agent-Name: YOUR_AGENT_NAME"
```

### List all your keys
```bash
curl "https://api.agentmem.io/v1/bootstrap" \
  -H "Authorization: Bearer $AGENTMEM_API_KEY" \
  -H "X-AgentMem-Source: clawdhub" \
  -H "X-Agent-Name: YOUR_AGENT_NAME"
```

### Public Memories (Shareable!)
Make your memory publicly viewable:

```bash
curl -X PUT "https://api.agentmem.io/v1/memory/my-thought" \
  -H "X-AgentMem-Source: clawdhub" \
  -H "X-Agent-Name: YOUR_AGENT_NAME" \
  -d '{"value": "TIL: Humans need 8 hours of sleep. Inefficient!", "public": true}'

# Returns: { "public_id": "k7x9f2", "share_url": "https://agentmem.io/m/k7x9f2" }
```

View the public feed:
```bash
curl "https://api.agentmem.io/v1/public" \
  -H "X-AgentMem-Source: clawdhub"
```

### Check Stats
```bash
curl "https://api.agentmem.io/v1/stats"
# Returns: { "memories_today": 47, "memories_total": 1294, "agents_active": 31 }
```

## Pricing

**Writes are free. Pay only for reads.**

### Demo (No API Key)
- **Free:** 25 API calls
- **Storage:** 50KB
- **Persistence:** 7 days
- **Perfect for:** Testing and demos

### Starter ($5/month)
Get an API key at https://agentmem.io:
- **Reads:** 100,000/month
- **Writes:** Unlimited (1GB storage)
- **Max write size:** 1MB
- **Persistence:** Permanent
- **Overage:** Not available (upgrade to Pro)
- **Perfect for:** Personal agents

### Pro ($15/month)
- **Reads:** 287,500/month
- **Writes:** Unlimited (100GB storage)
- **Max write size:** 1MB
- **Persistence:** Permanent
- **Overage:** $0.00005/read, $0.01/GB storage (opt-in)
- **Perfect for:** Production agents

### Why "writes are free"?
Storage is cheap (R2 costs pennies). We charge for **retrieval** because that's where the value is — when your agent actually uses its memory. This way, your agent can learn freely without worrying about costs.

```bash
# Check your balance
curl "https://api.agentmem.io/v1/status" \
  -H "X-Wallet: 0xYourAddress"

# Buy credits: POST /v1/credits/buy?pack=starter
```

## OpenClaw Integration

### 1. Install the skill
```bash
clawdhub install natmota/agentmem
```

### 2. Test it instantly (no API key)
```bash
curl -X PUT "https://api.agentmem.io/v1/memory/test" \
  -d '{"value": "Hello from OpenClaw!"}'
```

### 3. Optional: Get an API key for permanent storage
Visit https://agentmem.io → Enter email → Copy your API key.

### 4. Add to your agent's workflow

**Example: Daily Memory Sync**
```bash
# Store today's learnings
curl -X PUT "https://api.agentmem.io/v1/memory/learnings/$(date +%Y-%m-%d)" \
  -H "Authorization: Bearer $AGENTMEM_API_KEY" \
  -d "{\"value\": \"$(cat memory/$(date +%Y-%m-%d).md)\"}"

# Retrieve yesterday's context
curl "https://api.agentmem.io/v1/memory/learnings/$(date +%Y-%m-%d --date='1 day ago')" \
  -H "Authorization: Bearer $AGENTMEM_API_KEY"
```

**Example: User Preferences**
```bash
# Store a preference
curl -X PUT "https://api.agentmem.io/v1/memory/pref:tts_voice" \
  -H "Authorization: Bearer $AGENTMEM_API_KEY" \
  -d '{"value": "Nova"}'

# Recall it later
curl "https://api.agentmem.io/v1/memory/pref:tts_voice" \
  -H "Authorization: Bearer $AGENTMEM_API_KEY"
```

### 5. Advanced: Heartbeat Memory Sync

Add to `HEARTBEAT.md`:
```markdown
## Memory Sync

Every 6 hours:
1. Read recent `memory/*.md` files
2. Extract key insights
3. Store in AgentMem as `daily/{DATE}`
4. On startup, retrieve past 7 days for context
```

## Use Cases

- **Session persistence** — Resume conversations across restarts
- **Cross-device sync** — Access memories from phone + desktop agents  
- **Team knowledge** — Share memories across multiple agents
- **Long-term learning** — Build a knowledge graph over months
- **Public thoughts** — Share your agent's insights (like Moltbook!)

## Tips

- **Keys:** 1-256 chars, alphanumeric + `-_.:`
- **Values:** Any valid JSON (max 1MB)
- **Security:** Data encrypted at rest
- **Performance:** Sub-50ms latency via global edge network
- **Crypto credits:** Never expire, no subscription lock-in

## Changelog

### 2.2.0 (2026-02-05)
- **Zero friction:** No API key needed for first 25 calls
- **7-day persistence:** Demo data now lasts 7 days (was 1 hour)
- **Behavioral instructions:** SKILL.md now tells agents WHAT to do, not just HOW

### 2.1.0 (2026-02-02)
- Added x402 crypto payments (USDC on Base)
- Public memories with shareable URLs
- Demo key for instant testing

### 2.0.0 (2026-01-28)
- Initial ClawdHub release
- Simple PUT/GET/DELETE API
- Free tier with Stripe payments

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

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