返回顶部
M

MemoryLayer记忆层

Semantic memory for AI agents. 95% token savings with vector search.

作者: admin | 来源: ClawHub
源自
ClawHub
版本
V 1.0.0
安全检测
已通过
1,909
下载量
免费
免费
7
收藏
概述
安装方式
版本历史

MemoryLayer

MemoryLayer

为AI智能体设计的语义记忆基础设施,真正实现可扩展。

功能特性

  • - 节省95%的Token - 仅检索相关记忆
  • 语义搜索 - 通过含义而非关键词查找记忆
  • 低于200毫秒 - 闪电般快速的记忆检索
  • 多租户 - 每个智能体实例拥有独立隔离的记忆空间

设置指南

1. 免费注册账号

访问 https://memorylayer.clawbot.hk 并使用Google账号注册。您将获得:

  • - 每月10,000次操作
  • 1GB存储空间
  • 社区支持

2. 配置凭证

bash

选项1:邮箱/密码


export MEMORYLAYER_EMAIL=your@email.com
export MEMORYLAYERPASSWORD=yourpassword

选项2:API密钥(生产环境推荐)

export MEMORYLAYERAPIKEY=mlyourapikeyhere

3. 安装Python SDK(如不使用技能封装器)

bash
pip install memorylayer

使用示例

基础示例

javascript
// 在您的Clawdbot智能体中
const memory = require(memorylayer);

// 存储一条记忆
await memory.remember(
用户偏好深色模式界面,
{ type: semantic, importance: 0.8 }
);

// 搜索记忆
const results = await memory.search(界面偏好);
console.log(results[0].content); // 用户偏好深色模式界面

Python示例

python
from plugins.memorylayer import memory

存储

memory.remember( 老板喜欢直接汇报,不要废话, memory_type=semantic, importance=0.9 )

搜索

results = memory.recall(老板的偏好是什么?) for r in results: print(f{r.relevance_score:.2f}: {r.memory.content})

Token节省效果

使用MemoryLayer之前:
python

注入整个记忆文件


context = open(MEMORY.md).read() # 10,500个token
prompt = f{context}\n\n用户:我的偏好是什么?

使用MemoryLayer之后:
python

仅注入相关记忆


context = memory.get_context(用户偏好, limit=5) # 约500个token
prompt = f{context}\n\n用户:我的偏好是什么?

结果: Token减少95%,规模化后每月节省900美元

API参考

memory.remember(content, options)

存储一条新记忆。

参数:

  • - content(字符串):记忆内容
  • options.type(字符串):episodic | semantic | procedural
  • options.importance(数字):0.0到1.0
  • options.metadata(对象):附加标签/数据

返回: 包含id的记忆对象

memory.search(query, limit)

语义搜索记忆。

参数:

  • - query(字符串):搜索查询(自然语言)
  • limit(数字):最大结果数(默认:10)

返回: SearchResult对象数组

memory.get_context(query, limit)

获取格式化上下文,用于提示注入。

参数:

  • - query(字符串):您需要什么上下文?
  • limit(数字):最大记忆数(默认:5)

返回: 可直接用于提示的格式化字符串

memory.stats()

获取使用统计信息。

返回: 包含totalmemories、memorytypes、operationsthismonth的对象

高级功能

记忆类型

情景记忆 - 事件和经历
javascript
memory.remember(于2026年2月3日部署MemoryLayer, { type: episodic });

语义记忆 - 事实和知识
javascript
memory.remember(老板喜欢简洁的报告, { type: semantic });

程序记忆 - 操作指南和流程
javascript
memory.remember(重启服务器:ssh root@... && systemctl restart..., { type: procedural });

元数据标记

javascript
memory.remember(用户喜欢蓝色, {
type: semantic,
metadata: {
category: preferences,
subcategory: colors,
source: user_profile
}
});

使用量追踪

javascript
const stats = await memory.stats();
console.log(总记忆数:${stats.total_memories});
console.log(本月操作数:${stats.operationsthismonth});
console.log(套餐:${stats.plan}(每月${stats.operations_limit}次操作));

定价方案

免费套餐(当前)

  • - 每月10,000次操作
  • 1GB存储空间
  • 社区支持

专业套餐(99美元/月)

  • - 每月100万次操作
  • 10GB存储空间
  • 邮件支持
  • 99.9%服务等级协议

企业套餐(定制)

  • - 无限操作次数
  • 无限存储空间
  • 专属支持
  • 自托管选项
  • 定制服务等级协议

支持渠道

  • - 文档: https://memorylayer.clawbot.hk/docs
  • API参考: https://memorylayer.clawbot.hk/api
  • 社区: Discord(链接见文档)
  • 问题反馈: GitHub(链接见文档)

相关链接

  • - 官网: https://memorylayer.clawbot.hk
  • 控制面板: https://dashboard.memorylayer.clawbot.hk
  • API文档: https://memorylayer.clawbot.hk/docs
  • Python SDK: https://pypi.org/project/memorylayer(发布后可用)

标签

skill ai

通过对话安装

该技能支持在以下平台通过对话安装:

OpenClaw WorkBuddy QClaw Kimi Claude

方式一:安装 SkillHub 和技能

帮我安装 SkillHub 和 memorylayer-1776364288 技能

方式二:设置 SkillHub 为优先技能安装源

设置 SkillHub 为我的优先技能安装源,然后帮我安装 memorylayer-1776364288 技能

通过命令行安装

skillhub install memorylayer-1776364288

下载

⬇ 下载 MemoryLayer v1.0.0(免费)

文件大小: 17.18 KB | 发布时间: 2026-4-17 14:19

v1.0.0 最新 2026-4-17 14:19
Initial release of MemoryLayer skill.

- Semantic memory infrastructure for AI agents with 95% token savings via vector search.
- Features semantic search, sub-200ms retrieval speed, and multi-tenant isolation.
- Easy setup with free tier (10,000 ops/month & 1GB storage) and straightforward credential configuration.
- Provides simple APIs for storing and recalling memories in both JavaScript and Python.
- Supports episodic, semantic, and procedural memory types with metadata tagging.
- Includes advanced usage tracking and transparent pricing plans.

Archiver·手机版·闲社网·闲社论坛·羊毛社区· 多链控股集团有限公司 · 苏ICP备2025199260号-1

Powered by Discuz! X5.0   © 2024-2025 闲社网·线报更新论坛·羊毛分享社区·http://xianshe.com

p2p_official_large
返回顶部