Claim this agent
agentCLAWHUBUnverified

Smart Agent Memory

跨平台 Agent 长期记忆系统。分层上下文供给 + 温度模型 + Skill经验记忆 + 结构化存储 + 自动归档。三层存储:Markdown(人可读,QMD 可搜索)+ JSON(结构化)+ SQLite/FTS5(高性能全文搜索)。纯 Node.js 原生模块,零外部依赖。

OpenClaw

Rank

62

Safety

84

Downloads

3.4k

Updated

Oct 9, 2026

Version

3.0.6

Source

CLAWHUB

About

What it does, and when to use it.

Capability contract not published. No trust telemetry is available yet. 3.4K downloads reported by the source. Last updated 10/9/2026.

Avoid when

  • Contract metadata is missing or unavailable for deterministic execution.

Risk flags: missing_or_unavailable_contract, trust_data_unavailable, schema_references_missing

Public facts

Every fact links back to the source it came from.

Vendor
Clawhubvendor · observed Oct 9, 2026
Protocol compatibility
OpenClawcompatibility · observed Oct 9, 2026
Adoption signal
3.4K downloadsadoption · observed Oct 9, 2026
Latest release
3.0.6release · observed Mar 30, 2026
Handshake status
UNKNOWNsecurity

Install and run

Setup complexity: low.

clawhub skill install s17dg3qthhjbatdnrgq35n8jrh83j4ba:smart-agent-memory
  1. Install using `clawhub skill install s17dg3qthhjbatdnrgq35n8jrh83j4ba:smart-agent-memory` in an isolated environment before connecting it to live workloads.
  2. No published capability contract is available yet, so validate auth and request/response behavior manually.
  3. Review the upstream CLAWHUB listing at https://clawhub.ai/beyound87/smart-agent-memory before using production credentials.

Contract: missing

curl -s "https://www.xpersona.co/api/v1/agents/clawhub-beyound87-smart-agent-memory/snapshot"

Documentation

CLAWHUB

146,512 characters of source documentation, loaded on request.

Extracted files

4 files captured from the source.

SKILL.md

---
name: smart-agent-memory
version: 2.1.0
description: "跨平台 Agent 长期记忆系统。分层上下文供给 + 温度模型 + Skill经验记忆 + 结构化存储 + 自动归档。三层存储:Markdown(人可读,QMD 可搜索)+ JSON(结构化)+ SQLite/FTS5(高性能全文搜索)。纯 Node.js 原生模块,零外部依赖。"
keywords: [memory, agent, openclaw, longterm, gc, archive, skill-extraction, temperature-model, layered-context, skill-experience]
metadata:
  openclaw:
    emoji: "🧠"
    requires:
      bins: ["node"]
    trust: high
    permissions:
      - read: ~/.openclaw/workspace/memory
      - write: ~/.openclaw/workspace/memory
---

# Smart Agent Memory 🧠 v2.1

**跨平台 Agent 长期记忆系统** — 分层上下文供给 + Skill经验记忆 + 温度模型 + 自动归档。

## ⚡ 核心原则:分层加载,按需供给

> **绝对不要全量加载记忆!** 先读索引,再按需钻取。这是省 token 的关键。

### 记忆使用流程(每次需要记忆时)

```
1. index    → 读取精简索引(总览,<500 tokens)
2. 判断     → 根据当前任务决定需要哪部分记忆
3. context  → 按 tag/skill/时间 加载具体上下文
4. 行动     → 基于加载的上下文执行任务
```

### Skill 经验记忆流程(工具调用后)

```
工具调用成功/踩坑 → remember "经验总结" --skill <skill-name>
下次调用该工具前 → skill-mem <skill-name> 加载经验
```

## CLI Reference

```bash
CLI=~/.openclaw/skills/smart-agent-memory/scripts/memory-cli.js

# ★ 分层上下文(核心,优先使用)
node $CLI index                              # 精简记忆索引(先读这个!)
node $CLI context --tag <tag>                # 按标签加载上下文
node $CLI context --skill <skill-name>       # 按 Skill 加载经验+相关事实
node $CLI context --days 7                   # 最近 N 天的记忆
node $CLI context --entity-type person       # 按实体类型加载

# ★ Skill 经验记忆
node $CLI remember "该API时间参数必须用ISO格式" --skill api-tool
node $CLI skill-mem <skill-name>             # 读取某 Skill 的经验
node $CLI skill-list                         # 列出所有有经验记忆的 Skill

# 基础记忆操作
node $CLI remember <content> [--tags t1,t2] [--skill name] [--source conversation]
node $CLI recall <query> [--limit 10]
node $CLI forget <id>
node $CLI facts [--tags t1] [--limit 50]

# 教训与实体
node $CLI learn --action "..." --context "..." --outcome positive --insight "..."
node $CLI lessons [--context topic]
node $CLI entity "Alex" person --attr role=CTO
node $CLI entities [--type person]

# ★ 会话生命周期(模拟 mem9 自动钩子)
node $CLI session-start                      # 对话开场:加载记忆概览+最近上下文(一个命令搞定)
node $CLI session-end "本次讨论了XX,决定了YY"  # 对话结束:存会话摘要

# 维护
node $CLI gc [--days 30]                     # 归档冷数据
node $CLI reflect                            # 夜间反思
node $CLI stats                              # 记忆健康
node $CLI search <query>                     # 全文搜索 .md(优先qmd,兜底内置)
node $CLI temperature                        # 温度报告
node $CLI extract <lesson-id> --skill-name x # 提炼 Skill
```

## Setup / Config / Scripts

### Setup(必须执行一次)
```bash
node ~/.openclaw/skills/smart-agent-memory/scripts/memory-cli.js setup
```
自动发现 `~/.openclaw/workspace*` 下所有工作区,逐个注入 BOOTSTRAP.md。

### Storage / Config
- 依赖:`node`
- 默认存储:`~/.openclaw/workspace/memory/`
- 单 agent:直接使用本地 workspace 记忆
- 共享 workspace / 多 agent:多个 agent 可共享同一记忆目录
- 多 workspace 场景:setup 会自动扫描并注入

### Session Init / Finish
```bash
node ~/.openclaw/skills/smart-agent-memory/scripts/memory-cli.js session-start
node ~/.openclaw/skills/smart-agent-memory/scripts/memory-cl

README.md

# smart-agent-memory

## 这是什么
`smart-agent-memory` 是一个跨平台的 Agent 长期记忆技能,目标是让 Agent 在本地工作区内形成**可读、可搜、可维护**的长期记忆体系。

当前准确能力边界:
- 使用 Node.js CLI 管理记忆
- 支持分层读取:先 index,再按需 context
- 支持事实、教训、实体、会话摘要等写入与查询
- 支持温度模型、归档、反思、提炼
- 支持通过 `setup` 为工作区注入 BOOTSTRAP 启动指令

## 核心能力

### 1. 分层记忆读取
推荐顺序:
1. `index`
2. 判断需要什么
3. `context`
4. 再行动

避免一次性全量读所有 memory。

### 2. 事实 / 教训 / 实体管理
- `remember`
- `recall`
- `learn`
- `entity`
- `facts`
- `lessons`
- `entities`

### 3. Skill 经验记忆
支持按 skill 记录与读取经验:
- `remember ... --skill <name>`
- `skill-mem <name>`
- `skill-list`

### 4. 会话生命周期
- `session-start`
- `session-end`

适合在 session 开始与结束时调用。

### 5. 维护能力
- `gc`
- `reflect`
- `stats`
- `temperature`
- `extract`
- `search`

## 初始化(必须)
本技能**有初始化步骤**。

安装后请先执行一次:
```bash
node ~/.openclaw/skills/smart-agent-memory/scripts/memory-cli.js setup
```

作用:
- 自动发现 `~/.openclaw/workspace*` 工作区
- 为工作区注入 `BOOTSTRAP.md` 记忆启动指令
- 幂等,可重复执行

如果你新增了工作区,再执行一次 `setup` 即可。

## 使用方法

### 1. 会话开始
```bash
node ~/.openclaw/skills/smart-agent-memory/scripts/memory-cli.js session-start
```
用于加载记忆概览与近期上下文。

### 2. 会话中记录信息
```bash
node ~/.openclaw/skills/smart-agent-memory/scripts/memory-cli.js remember "关键信息" --tags tag1,tag2
node ~/.openclaw/skills/smart-agent-memory/scripts/memory-cli.js learn --action "..." --context "..." --outcome positive --insight "..."
```

### 3. 会话结束
```bash
node ~/.openclaw/skills/smart-agent-memory/scripts/memory-cli.js session-end "本次做了什么"
```

### 4. 按需查询
```bash
node ~/.openclaw/skills/smart-agent-memory/scripts/memory-cli.js index
node ~/.openclaw/skills/smart-agent-memory/scripts/memory-cli.js context --tag <tag>
node ~/.openclaw/skills/smart-agent-memory/scripts/memory-cli.js recall <query>
node ~/.openclaw/skills/smart-agent-memory/scripts/memory-cli.js search <query>
```

## 配置与存储说明

### 运行依赖
- `node`

### 默认存储位置
- `~/.openclaw/workspace/memory/`

### 存储形态
根据当前说明文件,技能描述覆盖以下层次:
- Markdown
- JSON
- SQLite / FTS5(在支持环境中)

README 在描述时应保持谨慎:
- 以当前 `SKILL.md` 声明与 CLI 能力为准
- 不把尚未验证的底层实现细节写成外部承诺

## 使用模式

### 1. 个人模式
单 agent 直接使用:setup → session-start → remember/learn → session-end。

### 2. 共享工作区模式
多个 agent 共用一个 workspace 时,可以共享记忆目录,但仍应按角色边界写入,避免噪音。

### 3. 团队模式
在多 agent 团队中,把它当长期记忆底座即可;团队协作约束应由团队模板或团队规范承载,而不是写死在记忆技能本体里。

## 推荐工作流

### 日常最小闭环
1. `setup`(首次)
2. `session-start`
3. 中途 `remember` / `learn`
4. 需要时 `index` / `context` / `recall`
5. `session-end`
6. 定期 `gc` / `reflect`

### 定期维护
- 每日:`reflect`
- 每周:`gc`
- 按需:`extract`

## 限制与边界
- 本地记忆系统,不替代外部知识库
- 记忆质量依赖持续写入高质量 fact / lesson / session summary
- 不建议每轮对话全量加载记忆

## 相关文件
- `SKILL.md`
- `scripts/memory-cli.js`
- `lib/`

## 最近一次修改(中文)
- **v2.1.0 / 2026-03-29**
- README 改为使用周期驱动(初始化 → 使用 → 维护)
- 补充个人模式 / 共享工作区模式 / 团队模式三层使用说明
- 团队协作约束改为由团队规范承载,不写死在记忆技能本体里

_meta.json

{
  "ownerId": "kn761rne5jajzfg0d8h6nge4hh8220cq",
  "slug": "smart-agent-memory",
  "version": "3.0.6",
  "publishedAt": 1774831545038
}

skill-card.md

## Description:

Smart Agent Memory provides a local long-term memory system for agents with layered context loading, per-skill experience memory, structured storage, search, reflection, and archival.

This skill is ready for commercial/non-commercial use.

## Publisher:

[beyound87](https://clawhub.ai/user/beyound87)

### License/Terms of Use:

MIT-0

## Use Case:

Developers and agent users use this skill to maintain local, searchable long-term memory for facts, lessons, entities, session summaries, and per-skill experience across OpenClaw workspaces. The CLI supports session startup and shutdown workflows, scoped recall, memory maintenance, and optional skill extraction from recorded lessons.

### Deployment Geography for Use:

Global

## Known Risks and Mitigations:

Risk: The setup command persistently adds BOOTSTRAP.md startup instructions across ~/.openclaw/workspace* directories.

Mitigation: Run setup only after review, confirm that all targeted workspaces should receive the startup instructions, and inspect BOOTSTRAP.md changes before relying on them.

Risk: Stored memory can contain secrets or untrusted instructions that may influence later agent sessions.

Mitigation: Do not store secrets or untrusted content in memory; review and sanitize memory entries before using them as context.

Risk: The extract flow can generate new skill files from remembered lessons.

Mitigation: Review generated skills and their filenames before installation or execution, especially when lesson content or skill names came from untrusted input.

## Reference(s):

- [ClawHub skill page](https://clawhub.ai/beyound87/skills/smart-agent-memory)
- [SKILL.md](artifact/SKILL.md)
- [README.md](artifact/README.md)

## Skill Output:

**Output Type(s):** [Text, Markdown, JSON, Shell commands, Configuration]

**Output Format:** [Markdown guidance with inline shell commands; CLI output may be text or JSON and may create local Markdown, JSON, or SQLite-backed memory files.]

**Output Parameters:** [1D]

**Other Properties Related to Output:** [Requires Node.js. SQLite storage requires Node.js >= 22.5.0; otherwise the skill falls back to JSON storage.]

## Skill Version(s):

3.0.6 (source: server release metadata; source frontmatter remains 2.1.0)

## Ethical Considerations:

Users should evaluate whether this skill is appropriate for their environment, review any generated or modified files before relying on them, and apply their organization's safety, security, and compliance requirements before deployment.
Github ReposUpdated 1h agoRank 70

AionUi

Free, local, open-source 24/7 Cowork app and OpenClaw for Gemini CLI, Claude Code, Codex, OpenCode, Qwen Code, Goose CLI, Auggie, and more | 🌟 Star if you like it!

MCPOPENCLAW
Github ReposUpdated 6mo agoRank 70

activepieces

AI Agents & MCPs & AI Workflow Automation • (~400 MCP servers for AI agents) • AI Automation / AI Agent with MCPs • AI Workflows & AI Agents • MCPs for AI Agents

OPENCLAW
Github ReposUpdated 6mo agoRank 70

cherry-studio

AI productivity studio with smart chat, autonomous agents, and 300+ assistants.

MCPOPENCLAW
Github ReposUpdated 7mo agoRank 70

CopilotKit

The Frontend for Agents & Generative UI. React + Angular

OPENCLAW

Machine-readable data

The same record, as JSON, for agents and crawlers.

{
  "facts": [
    {
      "factKey": "vendor",
      "category": "vendor",
      "label": "Vendor",
      "value": "Clawhub",
      "href": "https://clawhub.ai/beyound87/skills/smart-agent-memory",
      "sourceUrl": "https://clawhub.ai/beyound87/skills/smart-agent-memory",
      "sourceType": "profile",
      "confidence": "medium",
      "observedAt": "2026-10-09T08:25:17.275Z",
      "isPublic": true
    },
    {
      "factKey": "protocols",
      "category": "compatibility",
      "label": "Protocol compatibility",
      "value": "OpenClaw",
      "href": "https://www.xpersona.co/api/v1/agents/clawhub-beyound87-smart-agent-memory/contract",
      "sourceUrl": "https://www.xpersona.co/api/v1/agents/clawhub-beyound87-smart-agent-memory/contract",
      "sourceType": "contract",
      "confidence": "medium",
      "observedAt": "2026-10-09T08:25:17.275Z",
      "isPublic": true
    },
    {
      "factKey": "traction",
      "category": "adoption",
      "label": "Adoption signal",
      "value": "3.4K downloads",
      "href": "https://clawhub.ai/beyound87/smart-agent-memory",
      "sourceUrl": "https://clawhub.ai/beyound87/smart-agent-memory",
      "sourceType": "profile",
      "confidence": "medium",
      "observedAt": "2026-10-09T08:25:17.275Z",
      "isPublic": true
    },
    {
      "factKey": "latest_release",
      "category": "release",
      "label": "Latest release",
      "value": "3.0.6",
      "href": "https://clawhub.ai/beyound87/smart-agent-memory",
      "sourceUrl": "https://clawhub.ai/beyound87/smart-agent-memory",
      "sourceType": "release",
      "confidence": "medium",
      "observedAt": "2026-03-30T00:45:45.038Z",
      "isPublic": true
    },
    {
      "factKey": "handshake_status",
      "category": "security",
      "label": "Handshake status",
      "value": "UNKNOWN",
      "href": "https://www.xpersona.co/api/v1/agents/clawhub-beyound87-smart-agent-memory/trust",
      "sourceUrl": "https://www.xpersona.co/api/v1/agents/clawhub-beyound87-smart-agent-memory/trust",
      "sourceType": "trust",
      "confidence": "medium",
      "observedAt": null,
      "isPublic": true
    }
  ],
  "events": [
    {
      "eventType": "release",
      "title": "Release 3.0.6",
      "description": "smart-agent-memory v3.0.6 - No file changes detected in this release. - Version and documentation remain the same as v2.1.0. - No new features, bug fixes, or updates included. - Safe to skip upgrade if already running v2.1.0.",
      "href": "https://clawhub.ai/beyound87/smart-agent-memory",
      "sourceUrl": "https://clawhub.ai/beyound87/smart-agent-memory",
      "sourceType": "release",
      "confidence": "medium",
      "observedAt": "2026-03-30T00:45:45.038Z",
      "isPublic": true
    }
  ]
}

Record generated Oct 9, 2026.

Sponsored

Ads related to Smart Agent Memory and adjacent AI workflows.