Token导航 LogoToken导航TokenDH.com
研究检索需要联网clawhub未标认证来源可访问clear审计提醒

claw-mem爪存储器

Agent Skill

claw-mem 用于查找、检索和筛选相关信息,适合在 OpenClaw 中需要根据关键词、任务场景或来源线索快速定位候选结果时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

9,585

周安装

384

GitHub Stars

公开资料未说明

下载量

3,103
OpenClaw

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

MIT-0

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:claw-mem(爪存储器)
来源仓库:https://github.com/leohuang8688/claw-mem
安装命令:
openclaw skills install claw-mem
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 OpenClaw 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

ClawHubOpenClaw
openclaw skills install claw-mem

简介

claw-mem 为 OpenClaw 提供轻量级三层内存管理系统。

  • 具备自动生命周期监控和高级搜索节省 60-80% 代币消耗。
  • 通过 clawhub 安装,需配置缓存层级和存储后端。
  • 使用前应根据任务复杂度调整 L0/L1/L2 容量比例。
  • 显著提升长对话上下文管理能力。claw-mem 属于研究检索类 Skill,可作为该场景下的辅助能力补充。

SKILL.md

name
clawmem
description
Lightweight memory management system for OpenClaw with 3-tier retrieval (L0/L1/L2), automatic lifecycle monitoring, and advanced search. Saves 60-80% on token costs while providing efficient memory storage and retrieval.

ClawMem Skill - OpenClaw Memory Management

Overview

ClawMem is a lightweight memory management system designed for OpenClaw agents. It provides efficient memory storage and retrieval with significant token cost optimization.

Features

  • 🎯 3-Tier Retrieval - L0 Index → L1 Timeline → L2 Details
  • 👁️ Automatic Lifecycle Monitoring - Intercepts 5 key OpenClaw events
  • 💰 Token Optimization - Save 60-80% on token costs
  • 🔍 Advanced Search - Keyword/Time/Tag/Session search
  • 🗄️ SQLite Storage - High performance, easy deployment

Quick Start

1. Install Dependencies

cd /root/.openclaw/workspace/projects/clawmem
npm install

2. Configure Environment

cp .env.example .env
# Edit .env with your configuration

3. Initialize Database

npm run db:init

4. Use in OpenClaw

import clawMem from './projects/clawmem/src/index.js';

// Store memory
const recordId = clawMem.storeL0({
  category: 'session',
  summary: 'User queried TSLA stock',
  timestamp: Math.floor(Date.now() / 1000)
});

// Retrieve memory
const result = await clawMem.retrieve({
  category: 'session',
  includeTimeline: true,
  limit: 10
});

Usage Examples

Store Memory

// L0 Index (minimal)
clawMem.storeL0({
  category: 'session',
  summary: 'Short summary (< 100 chars)',
  timestamp: Date.now()
});

// L1 Timeline (semantic)
clawMem.storeL1({
  record_id: recordId,
  session_id: 'session_001',
  event_type: 'query',
  semantic_summary: 'Detailed summary (< 500 chars)',
  tags: ['tag1', 'tag2']
});

// L2 Details (full content, on-demand)
clawMem.storeL2({
  record_id: recordId,
  full_content: 'Full content',
  metadata: { key: 'value' }
});

Search Memory

import { memorySearch } from './projects/clawmem/src/index.js';

// Keyword search
const results = memorySearch.searchByKeyword('keyword', {
  category: 'session',
  limit: 10
});

// Time range search
const results = memorySearch.searchByTimeRange({
  start: oneHourAgo,
  end: Date.now() / 1000
});

// Session search
const session = memorySearch.searchBySession('session_001', {
  includeDetails: true
});

// Advanced search
const result = await memorySearch.advancedSearch({
  keyword: 'stock',
  timeRange: { start, end },
  includeDetails: true,
  limit: 10
});

Lifecycle Monitoring

import { lifecycleMonitor } from './projects/clawmem/src/index.js';

// Start monitoring
lifecycleMonitor.start();

// Intercept events
lifecycleMonitor.intercept('tool.call', {
  tool_name: 'yahoo_finance',
  args: { symbol: 'AAPL' }
});

Configuration

Edit .env file:

# Database
DATABASE_PATH=./clawmem.db
DATABASE_WAL_MODE=true

# L0/L1/L2 Limits
L0_MAX_SUMMARY_LENGTH=100
L1_MAX_SUMMARY_LENGTH=500

# Worker Interval
WORKER_INTERVAL_MS=1000

# LLM Configuration
LLM_PROVIDER=openai
LLM_MODEL=gpt-3.5-turbo

API Reference

ClawMemCore

  • storeL0(record) - Store minimal index
  • storeL1(record) - Store timeline index
  • storeL2(record) - Store full details
  • retrieve(query) - 3-tier retrieval workflow

MemorySearch

  • searchByKeyword(keyword, options) - Keyword search
  • searchByTimeRange(timeRange, options) - Time-based search
  • searchByTags(tags, options) - Tag-based search
  • searchBySession(sessionId, options) - Session search
  • advancedSearch(query) - Combined search
  • getStats() - Get statistics

LifecycleMonitor

  • start() - Start monitoring
  • intercept(eventName, payload) - Intercept event

Performance

MetricValue
L0 Search< 10ms
L1 Search< 50ms
L2 Search< 100ms
Token Savings60-80%

Token Optimization

Traditional: 100 records × 500 tokens = 50,000 tokens

ClawMem:

  • L0: 100 × 25 = 2,500 tokens
  • L1: 50 × 125 = 6,250 tokens
  • L2: 10 × 500 = 5,000 tokens
  • Total: 13,750 tokens (72.5% savings!)

Project Structure

clawmem/
├── src/
│   ├── core/
│   │   ├── retrieval.js
│   │   ├── lifecycle-monitor.js
│   │   └── search.js
│   └── index.js
├── database/
│   └── init.js
├── config/
│   └── loader.js
├── docs/
├── .env.example
├── package.json
└── README.md

License

MIT License

Author

PocketAI for Leo - OpenClaw Community

Repository

https://github.com/leohuang8688/clawmem

适合场景

01

OpenClaw 用户查找和安装 Skill 时

02

用户想查找某类 Agent Skill 时

03

需要根据任务场景推荐可安装能力包时

04

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

补充不同宿主或平台的使用分布数据

能力 5

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

OpenClaw

71.48%
按下载量换算2,218

安全审计

VirusTotal

通过

ClawScan

可疑

Static analysis

通过

权限和风险

需要联网

该 Skill 可能需要联网访问来源站点、仓库或外部 API;具体网络访问范围需要结合源码和 README 复核。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。来源安全扫描存在 warning/failed 结果,不能写成本站确认安全。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills