agentCLAWHUBUnverified

redis-memory-system

跨会话自动记忆系统 v3.3.0 — 单脚本+配置驱动+语义标签索引。支持标签检索、倒排索引、语义搜索。

OpenClaw

Rank

62

Safety

84

Downloads

1.4k

Updated

Oct 10, 2026

Version

3.3.0

Source

CLAWHUB

About

What it does, and when to use it.

Capability contract not published. No trust telemetry is available yet. 1.4K downloads reported by the source. Last updated 10/10/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 10, 2026
Protocol compatibility
OpenClawcompatibility · observed Oct 10, 2026
Adoption signal
1.4K downloadsadoption · observed Oct 10, 2026
Latest release
3.3.0release · observed May 27, 2026
Handshake status
UNKNOWNsecurity

Install and run

Setup complexity: low.

clawhub skill install s1737qdqxgbbd8gwrat1cmt0n9841b46:redis-memory-system
  1. Install using `clawhub skill install s1737qdqxgbbd8gwrat1cmt0n9841b46:redis-memory-system` 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/hualang-c/redis-memory-system before using production credentials.

Contract: missing

curl -s "https://www.xpersona.co/api/v1/agents/clawhub-hualang-c-redis-memory-system/snapshot"

Documentation

CLAWHUB

93,323 characters of source documentation, loaded on request.

Extracted files

4 files captured from the source.

SKILL.md

---
name: redis-memory-system
description: "跨会话自动记忆系统 v3.3.0 — 单脚本+配置驱动+语义标签索引。支持标签检索、倒排索引、语义搜索。"
---

# Redis 记忆系统 v3.3.0

**核心思路:Agent 零负担,系统自动完成。cron 子 session 绕过 dmScope 限制,通过文件系统直读 transcript。**

## 架构

```
┌──────────────────────────────────────────────────────┐
│ OpenClaw Cron (每1h, isolated session)               │
│                                                      │
│  ① 分布式锁 (SET NX EX 600) 防并发                   │
│  ② ls -t 找最新 transcript 文件(排除cron自引用)     │
│  ③ extract_dialog.py 提取末尾200行对话               │
│  ④ LLM 语义去重 + 摘要生成                           │
│  ⑤ Lua EVAL 原子写入(HSET+EXPIRE+last_seen)       │
│  ⑥ 锁释放                                           │
└───────────────────────┬──────────────────────────────┘
                        │
┌───────────────────────┴──────────────────────────────┐
│ 系统 Cron (每1h) — 监控哨兵                          │
│                                                      │
│  ① 心跳写入隔离 key: cron:health                     │
│  ② 逐用户检查 memory:<用户> 今天有无摘要              │
│  ③ 异常时写告警 flag 到 /tmp/                        │
└───────────────────────┬──────────────────────────────┘
                        │
┌───────────────────────┴──────────────────────────────┐
│ Agent Session 启动时                                  │
│                                                      │
│  redis_memory.sh get <用户>  → 查最近3天              │
│  cat /tmp/*.flag              → 检查告警              │
└──────────────────────────────────────────────────────┘
```

## 关键解决的问题

| 问题 | 方案 |
|------|------|
| dmScope 隔离导致 cron 子 session 看不到主会话 | 文件系统直读 transcript JSONL |
| exec 间变量丢失(各自独立 shell) | 合并为单个 exec 脚本,变量只在进程内传递 |
| 重复追加相同摘要 | LLM 语义去重—新旧摘要表达相同信息时跳过 |
| cron 污染 memory hash | cron 心跳写到隔离 key `cron:health` |
| 并发执行风险 | Redis SET NX EX 分布式锁,防止两个 cron 同时写 |
| 非原子写入(HSET+EXPIRE 分开执行) | Lua 脚本(EVAL)保证一个事务内完成全部操作 |
| 文件查找顺序错误 | `ls -t` 按修改时间取最新,而非按匹配数 |

## 文件说明

| 文件 | 用途 |
|------|------|
| `scripts/memory.sh` | 核心脚本:sync / get / set / tag / search / heartbeat / ping / stats |
| `scripts/extract_dialog.py` | transcript 对话提取工具 |
| `scripts/setup.sh` | 一键安装(Redis + 脚本 + 系统cron) |


## 🔑 Redis Key 设计

| Key | 类型 | TTL | 说明 |
|-----|------|-----|------|
| `memory:<用户名>` | Hash | 7天 | 每日对话摘要,field=日期,value=文本 |
| `cron:health` | Hash | 7天 | 系统心跳(隔离,不污染记忆数据) |
| `activity:<用户名>:last_seen` | String | 12h | 最后活跃时间标记 |
| `cron_lock:memory_sync` | String | 10min | 分布式锁,防并发 |

## 部署 / Deployment

### 1. 基础安装 / Setup

```bash
chmod +x scripts/setup.sh
bash scripts/setup.sh
```

### 2. 创建 OpenClaw cron(核心 / Core)

```bash
# Create auto-sync cron job (runs every 1h)
# 创建每 1 小时自动同步的 cron 任务

PROMPT=$(cat scripts/openclaw_cron_prompt.txt)
openclaw cron add \
  --name "memory-auto-sync" \
  --every 1h \
  --session isolated \
  --timeout-seconds 180 \
  --thinking minimal \
  --tools "exec,read" \
  --no-deliver \
  --message "$PROMPT"
```

**重要 / Important:**
- `--tools "exec,read"` — restricts cron to script execution & file reading only, prevents recursiv

README.md

# Redis Memory System v3.3.0

Fully automatic cross-session short-term memory system. Single script, config-driven, semantic tag index.

全自动跨会话短期记忆系统。单脚本 + 配置驱动 + 语义标签索引。

## 适配环境 / Requirements

| 项目 / Item | 规格 / Spec |
|-------------|-------------|
| 实例 / Instance | 任意(Redis 占用 < 50MB) |
| Redis | 单机模式 / Standalone |
| Agent | OpenClaw |

## 一键安装 / Quick Install

```bash
chmod +x scripts/setup.sh
bash scripts/setup.sh
```

## 用法 / Usage

```bash
# Sync dialogue to Redis (for cron)  · 同步对话到 Redis(给 cron 用)
bash scripts/memory.sh sync

# Read recent memory (last 3 days)  · 查最近 3 天记忆
bash scripts/memory.sh get <user>

# Read memory for N days  · 查最近 N 天记忆
bash scripts/memory.sh get <user> 7

# Read memory for a specific date  · 查指定日期记忆
bash scripts/memory.sh get <user> 2026-05-26

# Search by semantic tags  · 按语义标签搜索
bash scripts/memory.sh search <keyword>

# Manually write summary  · 手动写入摘要
bash scripts/memory.sh set <user> 2026-05-26 "Summary text"

# System overview  · 系统状态
bash scripts/memory.sh stats

# Redis connection check  · 检查 Redis 连通性
bash scripts/memory.sh ping
```

## 语义标签索引 / Semantic Tags (v3.3.0)

- LLM 自动为每日摘要提取 5 个概念级标签 / LLM auto-extracts 5 concept-level tags per day
- 倒排索引 `tagidx:<tag>` → 日期集合 / Inverted index for cross-date lookup
- Redis SINTER 支持 O(1) 多标签交集查询 / O(1) multi-tag intersection queries
- 零额外内存,不用 embedding 模型 / Zero extra memory, no embedding model needed

_meta.json

{
  "ownerId": "kn70d6376ap34nzbax3sh94jvn8406xq",
  "slug": "redis-memory-system",
  "version": "3.3.0",
  "publishedAt": 1779844146544
}

skill-card.md

## Description:

Fully automatic cross-session short-term memory system with a single script, configuration-driven operation, and a semantic tag index.

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

## Publisher:

[hualang-c](https://clawhub.ai/user/hualang-c)

### License/Terms of Use:

MIT-0

## Use Case:

Developers and OpenClaw users use this skill to install and operate a Redis-backed memory helper that syncs recent session dialogue summaries, retrieves recent memory, searches semantic tags, and checks memory-system status.

### Deployment Geography for Use:

Global

## Known Risks and Mitigations:

Risk: The skill ingests cross-session transcript content into Redis, which can include sensitive user or session information.

Mitigation: Use an opt-in installation path, treat stored summaries and transcript excerpts as sensitive data, and avoid shared Redis databases.

Risk: The setup script registers persistent cron-based background execution.

Mitigation: Manually review or remove cron registration before deployment, and approve scheduled execution only for intended users and environments.

Risk: Redis-backed memory can be exposed if Redis access is broad or unauthenticated.

Mitigation: Restrict Redis access, validate configured usernames, and isolate memory data per user or deployment.

## Reference(s):

- [Redis Memory System README](artifact/README.md)
- [ClawHub Skill Page](https://clawhub.ai/hualang-c/skills/redis-memory-system)

## Skill Output:

**Output Type(s):** [text, markdown, shell commands, configuration, guidance]

**Output Format:** [Markdown with inline shell commands and JSON status output]

**Output Parameters:** [1D]

**Other Properties Related to Output:** [Produces Redis memory operations for sync, get, set, tag search, heartbeat, ping, and stats workflows.]

## Skill Version(s):

3.3.0 (source: server release evidence, artifact _meta.json)

## 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 21h 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/hualang-c/skills/redis-memory-system",
      "sourceUrl": "https://clawhub.ai/hualang-c/skills/redis-memory-system",
      "sourceType": "profile",
      "confidence": "medium",
      "observedAt": "2026-10-10T15:18:07.513Z",
      "isPublic": true
    },
    {
      "factKey": "protocols",
      "category": "compatibility",
      "label": "Protocol compatibility",
      "value": "OpenClaw",
      "href": "https://www.xpersona.co/api/v1/agents/clawhub-hualang-c-redis-memory-system/contract",
      "sourceUrl": "https://www.xpersona.co/api/v1/agents/clawhub-hualang-c-redis-memory-system/contract",
      "sourceType": "contract",
      "confidence": "medium",
      "observedAt": "2026-10-10T15:18:07.513Z",
      "isPublic": true
    },
    {
      "factKey": "traction",
      "category": "adoption",
      "label": "Adoption signal",
      "value": "1.4K downloads",
      "href": "https://clawhub.ai/hualang-c/redis-memory-system",
      "sourceUrl": "https://clawhub.ai/hualang-c/redis-memory-system",
      "sourceType": "profile",
      "confidence": "medium",
      "observedAt": "2026-10-10T15:18:07.513Z",
      "isPublic": true
    },
    {
      "factKey": "latest_release",
      "category": "release",
      "label": "Latest release",
      "value": "3.3.0",
      "href": "https://clawhub.ai/hualang-c/redis-memory-system",
      "sourceUrl": "https://clawhub.ai/hualang-c/redis-memory-system",
      "sourceType": "release",
      "confidence": "medium",
      "observedAt": "2026-05-27T01:09:06.544Z",
      "isPublic": true
    },
    {
      "factKey": "handshake_status",
      "category": "security",
      "label": "Handshake status",
      "value": "UNKNOWN",
      "href": "https://www.xpersona.co/api/v1/agents/clawhub-hualang-c-redis-memory-system/trust",
      "sourceUrl": "https://www.xpersona.co/api/v1/agents/clawhub-hualang-c-redis-memory-system/trust",
      "sourceType": "trust",
      "confidence": "medium",
      "observedAt": null,
      "isPublic": true
    }
  ],
  "events": [
    {
      "eventType": "release",
      "title": "Release 3.3.0",
      "description": "- **Version bump:** Unified version numbering to v3.3.0 across all files - **Fix:** sync now uses transcript file mtime for date key, preventing date misassignment on conversations spanning midnight - **Cleanup:** Removed deprecated `openclaw_cron_prompt.txt` (unused since v3.2); updated SKILL.md file table, rewrote setup.sh to remove references to non-existent scripts - **Security:** Zero hardcoded info, no personal data exposure - **版本统一:** 清理版本号混乱,统一跳至 v3.3.0 - **修复:** sync 改用 transcript 文件修改时间确定日期 key,避免跨夜对话写入错误日期 - **清理:** 删除废弃的 `openclaw_cron_prompt.txt`(v3.2 后弃用);更新 SKILL.md 文件表、重写 setup.sh 移除非现存脚本引用 - **安全:** 零硬编码,无个人信息泄露",
      "href": "https://clawhub.ai/hualang-c/redis-memory-system",
      "sourceUrl": "https://clawhub.ai/hualang-c/redis-memory-system",
      "sourceType": "release",
      "confidence": "medium",
      "observedAt": "2026-05-27T01:09:06.544Z",
      "isPublic": true
    }
  ]
}

Record generated Oct 10, 2026.

Sponsored

Ads related to redis-memory-system and adjacent AI workflows.