AI代理语义记忆 · 省95%Token
简介
AI代理语义记忆基础设施,通过向量检索实现95%的Token节省,支持多租户隔离与亚200ms极速召回。
原始描述
Semantic memory for AI agents. 95% token savings with vector search.
通过你的 Agent 添加
安装目录:memorylayer/(目录名取自 SKILL.md 的 frontmatter name,不是 URL 里的 slug)。
点「快速安装」复制一段指令贴给你的 Agent:它会先下载到 /tmp、把文件清单和校验值给你看,你确认之后才解压安装。不会一步装完、也不改系统其它位置。
或者手动安装
包是「根级 SKILL.md + 作者附带的文件」,解压到上面的 <slug>/ 目录即可;
目录名不用换,也不要把包直接解压到 skills 根目录。
技能申请的权限由作者决定:装之前先看清单里有没有脚本、它会读写什么。
中文使用说明 来自收录源
核心用法
MemoryLayer是一款专为AI Agent设计的语义记忆基础设施,通过向量检索技术替代传统的全文记忆注入方式。用户可通过简单的JavaScript或Python SDK调用remember()方法存储三类记忆:情景记忆(Episodic,记录事件)、语义记忆(Semantic,存储事实知识)和程序记忆(Procedural,保存操作流程),并支持search()进行自然语言语义搜索,get_context()直接获取格式化后的Prompt注入文本。该技能与Clawdbot平台深度集成,同时也提供独立Python SDK,支持多租户隔离和元数据标签管理。
显著优点
极致的Token效率是该技能最突出的优势——通过语义检索仅注入相关记忆,官方宣称可实现95%的Token节省,在大规模应用场景下每月可节省约900美元成本。检索速度达到亚200毫秒级别,满足实时交互需求。支持三种记忆类型和灵活的元数据标签体系,便于构建结构化的长期记忆系统。免费套餐提供每月1万次操作和1GB存储,对中小规模应用友好。
潜在缺点与局限性
依赖安全风险是最严重的问题——安全报告显示其依赖的axios 1.6.0版本存在6个已知CVE漏洞,包括CVSS 7.2的SSRF绕过和原型污染漏洞,需立即升级至1.15.2+。作为T3级来源的个人开发者项目,长期维护稳定性存疑,用户需自行关注仓库活跃度。此外,该服务依赖MemoryLayer官方云服务(memorylayer.clawbot.hk),存在供应商锁定风险,免费套餐有明确的用量天花板,高并发场景下需付费升级(Pro版99美元/月)。
适合的目标群体
主要面向需要长期记忆能力的AI Agent开发者——特别是构建客服机器人、个人助手、企业知识库问答等需要跨会话记忆的场景。适合已使用Clawdbot平台的开发者快速集成,也适合希望降低大模型API调用成本的中小型AI应用团队。对Token成本敏感、需要语义而非关键词检索记忆的NLP应用场景尤为契合。
使用风险
安全风险方面,axios漏洞可能导致SSRF攻击和数据篡改,在升级前不建议生产环境部署。性能风险包括对外部API的依赖(网络延迟、服务可用性),以及免费配额耗尽后的服务中断。数据隐私风险方面,用户记忆内容需上传至MemoryLayer云服务端,虽使用TLS加密传输,但涉及第三方数据托管合规问题。供应商风险体现在个人开发者维护的T3级项目,存在服务终止或API变更的可能性。建议生产环境用户评估自托管企业版方案,并实施输入验证与请求超时机制。
技能正文
slug: memorylayer
name: MemoryLayer
description: Semantic memory for AI agents. 95% token savings with vector search.
homepage: https://memorylayer.clawbot.hk
metadata:
clawdbot:
emoji: "🧠"
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
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
# Option 1: Email/Password
export MEMORYLAYER_EMAIL=your@email.com
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)
pip install memorylayer
Usage
Basic Example
// 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
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
# Option 1: Email/Password
export MEMORYLAYER_EMAIL=your@email.com
export MEMORYLAYER_PASSWORD=your_password
# Option 2: API Key (recommended for production)
export MEMORYLAYER_API_KEY=ml_your_api_key_here
pip install memorylayer
Usage
Basic Example
// 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
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
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}")
Before MemoryLayer:
# Inject entire memory files
context = open('MEMORY.md').read() # 10,500 tokens
prompt = f"{context}\n\nUser: What are my preferences?"
After MemoryLayer:
# 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)
memory.remember(content, options)Store a new memory.
Parameters:
content(string): Memory contentoptions.type(string): 'episodic' | 'semantic' | 'procedural'options.importance(number): 0.0 to 1.0options.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
memory.remember('Deployed MemoryLayer on 2026-02-03', { type: 'episodic' });
Semantic - Facts and knowledge
memory.remember('Boss prefers concise reports', { type: 'semantic' });
Procedural - How-to and processes
memory.remember('To restart server: ssh root@... && systemctl restart...', { type: 'procedural' });
Metadata Tagging
memory.remember('User likes blue', {
type: 'semantic',
metadata: {
category: 'preferences',
subcategory: 'colors',
source: 'user_profile'
}
});
Usage Tracking
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
memory.remember('User likes blue', {
type: 'semantic',
metadata: {
category: 'preferences',
subcategory: 'colors',
source: 'user_profile'
}
});
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)
- 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)
正文来自原始发布页, 版权归作者所有,许可未标注。 权利人认为有不妥,可申请下架。