khli01

MemoryLayer

AI 智能体v1.0.0
作者:khli01更新于 2026-05-11memorylayer@clawhub_khli01/memorylayer
记忆增强

据 AlphaMoat 统计,截至 2026-09,MemoryLayer 累计下载 3,562 次、获 7 个星标,在全部 5,078 个 AI 技能中排名第 3,072 位,在「AI 智能体」分类(969 个)中排名第 622 位。

累计安装
450
累计下载
3,562
星标
7
全站排名
#3,072
全站前 61% · 「AI 智能体」前 65%
平台累计安装累计下载星标评论
ClawHub ↗862,6687-
SkillHub ↗4503,5627—

各平台的计数口径不同,统计时间不一致。

这个技能是做什么的

文档展示记忆存储、按语义搜索、提示词上下文提取、类型和元数据标注及用量统计。访问使用账号或 API 密钥,并给出 SDK 风格示例。这些示例描述集成流程,服务可用性与所列 SDK 接口仍需验证。

资料发布于 2026-10-27

可以用来做什么

  • 检索相关已存上下文,代替加载整个记忆文件

什么时候用

  • 需要评估智能体上下文的语义存储与检索方式时

示例提示词

以下是根据技能文档生成的示例,不代表实际运行结果。

整理文档中的记忆存取流程、认证要求,以及接入前须验证的接口。

月度数据趋势

累计下载3,562
2,2572,9583,6592026-03 · 累计下载 2,3542026-05 · 累计下载 2,8112026-06 · 累计下载 2,9252026-07 · 累计下载 3,0862026-08 · 累计下载 3,1582026-09 · 累计下载 3,56226-0326-09
星标7
6782026-03 · 星标 72026-05 · 星标 72026-06 · 星标 72026-07 · 星标 72026-08 · 星标 72026-09 · 星标 726-0326-09

2026-09 起统计方法调整:同名技能按作者分别统计,并覆盖全部技能。图中虚线为调整前的月份,与之后的数据不直接比较,也不计算跨越调整的增长。

月份累计下载环比星标
2026-093,562—7
2026-083,158+2.3%7
2026-073,086+5.5%7
2026-062,925+4.1%7
2026-052,811—7
2026-032,354—7

SKILL.md 原文

以下是作者发布的原始文件,按纯文本显示,本站未做修改或审核;其中的链接不可点击,命令请核实后再运行。抓取于 2026-10-23。

4.7 KB · ClawHub v1.0.0
---
slug: memorylayer
name: MemoryLayer
description: Semantic memory for AI agents. 95% token savings with vector search.
homepage: https://memorylayer.clawbot.hk
metadata:
  clawdbot:
    emoji: "🧠"
---
展开全部(共 217 行)
# MemoryLayer

Semantic memory infrastructure for AI agents that actually scales.

## Features

- **95% Token Savings** - Retrieve only relevant memories
- **Semantic Search** - Find memories by meaning, not keywords
- **Sub-200ms** - Lightning-fast memory retrieval
- **Multi-tenant** - Isolated memory per agent instance

## Setup

### 1. Sign up for FREE account

Visit https://memorylayer.clawbot.hk and sign up with Google. You'll get:
- 10,000 operations/month
- 1GB storage
- Community support

### 2. Configure credentials

```bash
# Option 1: Email/Password
export [email protected]
export MEMORYLAYER_PASSWORD=your_password

# Option 2: API Key (recommended for production)
export MEMORYLAYER_API_KEY=ml_your_api_key_here
```

### 3. Install Python SDK (if not using skill wrapper)

```bash
pip install memorylayer
```

## Usage

### Basic Example

```javascript
// In your Clawdbot agent
const memory = require('memorylayer');

// Store a memory
await memory.remember(
  'User prefers dark mode UI',
  { type: 'semantic', importance: 0.8 }
);

// Search memories
const results = await memory.search('UI preferences');
console.log(results[0].content); // "User prefers dark mode UI"
```

### Python Example

```python
from plugins.memorylayer import memory

# Store
memory.remember(
    "Boss prefers direct reporting with zero bullshit",
    memory_type="semantic",
    importance=0.9
)

# Search
results = memory.recall("What are Boss's preferences?")
for r in results:
    print(f"{r.relevance_score:.2f}: {r.memory.content}")
```

### Token Savings

**Before MemoryLayer:**
```python
# Inject entire memory files
context = open('MEMORY.md').read()  # 10,500 tokens
prompt = f"{context}\n\nUser: What are my preferences?"
```

**After MemoryLayer:**
```python
# Inject only relevant memories
context = memory.get_context("user preferences", limit=5)  # ~500 tokens
prompt = f"{context}\n\nUser: What are my preferences?"
```

**Result:** 95% token reduction, $900/month savings at scale

## API Reference

### `memory.remember(content, options)`

Store a new memory.

**Parameters:**
- `content` (string): Memory content
- `options.type` (string): 'episodic' | 'semantic' | 'procedural'
- `options.importance` (number): 0.0 to 1.0
- `options.metadata` (object): Additional tags/data

**Returns:** Memory object with `id`

### `memory.search(query, limit)`

Search memories semantically.

**Parameters:**
- `query` (string): Search query (natural language)
- `limit` (number): Max results (default: 10)

**Returns:** Array of SearchResult objects

### `memory.get_context(query, limit)`

Get formatted context for prompt injection.

**Parameters:**
- `query` (string): What context do you need?
- `limit` (number): Max memories (default: 5)

**Returns:** Formatted string ready for prompt

### `memory.stats()`

Get usage statistics.

**Returns:** Object with `total_memories`, `memory_types`, `operations_this_month`

## Advanced

### Memory Types

**Episodic** - Events and experiences
```javascript
memory.remember('Deployed MemoryLayer on 2026-02-03', { type: 'episodic' });
```

**Semantic** - Facts and knowledge
```javascript
memory.remember('Boss prefers concise reports', { type: 'semantic' });
```

**Procedural** - How-to and processes
```javascript
memory.remember('To restart server: ssh root@... && systemctl restart...', { type: 'procedural' });
```

### Metadata Tagging

```javascript
memory.remember('User likes blue', {
  type: 'semantic',
  metadata: {
    category: 'preferences',
    subcategory: 'colors',
    source: 'user_profile'
  }
});
```

### Usage Tracking

```javascript
const stats = await memory.stats();
console.log(`Total memories: ${stats.total_memories}`);
console.log(`Operations this month: ${stats.operations_this_month}`);
console.log(`Plan: ${stats.plan} (${stats.operations_limit}/month)`);
```

## Pricing

**FREE Plan** (Current)
- 10,000 operations/month
- 1GB storage
- Community support

**Pro Plan** ($99/mo)
- 1M operations/month
- 10GB storage
- Email support
- 99.9% SLA

**Enterprise** (Custom)
- Unlimited operations
- Unlimited storage
- Dedicated support
- Self-hosted option
- Custom SLA

## Support

- **Documentation:** https://memorylayer.clawbot.hk/docs
- **API Reference:** https://memorylayer.clawbot.hk/api
- **Community:** Discord (link in docs)
- **Issues:** GitHub (link in docs)

## Links

- **Homepage:** https://memorylayer.clawbot.hk
- **Dashboard:** https://dashboard.memorylayer.clawbot.hk
- **API Docs:** https://memorylayer.clawbot.hk/docs
- **Python SDK:** https://pypi.org/project/memorylayer (when published)

「AI 智能体」分类下的热门技能

数据月份:2026-09 · 下载/星标/安装数聚合自公开技能注册库(ClawHub、SkillHub),按月更新。口径说明见数据方法。