| name | supermemory |
| version | 1.0.0 |
| description | 增强记忆引擎,基于 LanceDB 向量存储,用于非对话类知识管理 |
| triggers | ["supermemory","增强记忆","记忆引擎"] |
supermemory — 增强记忆引擎
Skill Graph: 领域 → [[_index-intelligence|情报与知识领域]] | 上游 ← [[_index-intelligence|情报领域]] | 下游 → 大规模语义搜索 → [[deep-research|深度调研]]
版本: v1.0 | 日期: 2026-03-31
实现 4层抗遗忘系统的 L1 增强层
专注文工业皮带 B2B 外贸场景,基于 LanceDB 向量存储。
概述
supermemory 是红龙获客系统的增强记忆引擎,比 L1 MemOS 更智能,用于存储市场情报、竞品分析、有效话术和客户洞察。与 ChromaDB(对话向量存储)不同,Supermemory 专注于非对话类知识。
记忆类型与 TTL
| 类型 | TTL | 示例 |
|---|
customer_fact | 永久 | "Al Rashid Industries 每月采购 2000 条皮带,交货期 30 天" |
conversation_insight | 90 天 | "客户对分层机的宽幅规格更感兴趣" |
market_signal | 30 天 | "沙特阿拉伯皮带市场需求 Q2 上涨 15%" |
effective_script | 永久 | "以当地工厂案例开场 → 3倍回复率" |
competitor_intel | 永久 | "竞品A打齿机价格低10%,但交期多15天" |
核心命令
| 命令 | 描述 |
|---|
memory:add | 添加记忆 |
memory:search | 语义搜索记忆 |
memory:list | 列出某类型记忆 |
memory:delete | 删除记忆 |
memory:stats | 查看统计 |
命令详解
memory:add — 添加记忆
参数:
| 参数 | 类型 | 必填 | 说明 |
|---|
type | enum | ✅ | 记忆类型(见上表) |
content | string | ✅ | 记忆内容 |
tags | string[] | ❌ | 标签列表 |
source | string | ❌ | 来源(linkedin/exa/email/manual) |
confidence | float | ❌ | 置信度 0-1(默认 0.8) |
示例:
memory:add \
--type "customer_fact" \
--content "Al Rashid Industries,沙特阿拉伯最大轮胎制造商,年产值约2亿美元,员工1200人。采购决策周期3-6个月。" \
--tags ["al_rashid", "saudi_arabia", "tire_manufacturer"] \
--source "linkedin" \
--confidence 0.9
memory:add \
--type "effective_script" \
--content "开场白:提及当地同规模工厂使用HOLO设备的具体案例,回复率提升显著。示例:'我们为沙特一家月产5000条皮带的工厂提供了打齿机解决方案...' " \
--tags ["opening_line", "saudi_arabia", "case_study"]
memory:add \
--type "competitor_intel" \
--content "竞品闪电牌打齿机:价格比HOLO低10-15%,功率更低(1.5kW vs 2.2kW),但精度略差。交货期25天 vs HOLO的18天。客户反馈主要是售后服务响应慢。" \
--tags ["competitor", "fingerpuncher", "price_comparison"]
memory:add \
--type "market_signal" \
--content "沙特阿拉伯 2026 年基础设施建设投资增长 20%,带动工业皮带需求。大型项目集中在东部省(Eastern Province)和利雅得。" \
--tags ["market_trend", "saudi_arabia", "infrastructure"]
memory:search — 语义搜索
参数:
| 参数 | 类型 | 必填 | 说明 |
|---|
query | string | ✅ | 自然语言查询 |
type | enum | ❌ | 限定记忆类型 |
tags | string[] | ❌ | 限定标签 |
limit | integer | ❌ | 返回数量(默认 5) |
示例:
memory:search "沙特阿拉伯客户" --limit 5
memory:search "opening line for tire manufacturer" --type "effective_script"
memory:search "打齿机竞品对比" --type "competitor_intel"
memory:search "市场机会" --tags ["market_trend", "saudi_arabia"]
AI 触发时机:
| 场景 | 示例查询 |
|---|
| 撰写开发信前 | "搜索沙特阿拉伯客户的所有记忆" |
| 竞品对比时 | "搜索竞品闪电牌相关信息" |
| 定价策略时 | "搜索客户对价格的接受区间" |
| 市场分析时 | "搜索中东市场最新信号" |
memory:list — 列表查看
参数:
| 参数 | 类型 | 必填 | 说明 |
|---|
type | enum | ❌ | 记忆类型 |
limit | integer | ❌ | 返回数量(默认 20) |
示例:
memory:list --type "effective_script"
memory:list --type "competitor_intel"
memory:list --limit 20
memory:delete — 删除记忆
参数:
示例:
memory:delete --id "mem_abc123"
memory:stats — 存储统计
memory:stats
输出示例:
=== Supermemory 统计 ===
总记忆条数: 234
按类型分布:
customer_fact: 45 (19.2%)
conversation_insight: 67 (28.6%)
market_signal: 38 (16.2%)
effective_script: 52 (22.2%)
competitor_intel: 32 (13.7%)
TTL 统计:
永久有效: 129 (55.1%)
90天内有效: 67 (28.6%)
30天内有效: 38 (16.2%)
过期待清理: 12 条
存储引擎: LanceDB
向量维度: 1536
LanceDB 配置
supermemory:
provider: "lancedb"
persist_directory: "{{DATA_DIR}}/lancedb/honglong"
collection_name: "honglong_memory"
embedding_model: "text-embedding-3-small"
auto_capture: true
capture_strategy: "last_turn"
recall_top_k: 5
ttl_days:
customer_fact: null
conversation_insight: 90
market_signal: 30
effective_script: null
competitor_intel: null
auto_cleanup:
enabled: true
schedule: "0 3 * * *"
grace_period_days: 7
备选 Provider
Supermemory Cloud(托管服务)
provider: "supermemory_cloud"
api_key: "{{SUPERMEMORY_API_KEY}}"
Memos(自托管笔记)
provider: "memos"
memos_url: "{{MEMOS_URL}}"
memos_token: "{{MEMOS_TOKEN}}"
与 L1 MemOS 集成
对话生成后
↓
MemOS L1: 结构化客户状态(自动提取)
↓
Supermemory: 非结构化洞察(AI 主动判断)
↓
两者协同注入上下文
↓
对话结束 → chroma:store L3(对话历史向量)
↓
每天 12:00 → chroma:snapshot L4(CRM 快照)
集成规则:
- MemOS 存储"事实状态"(客户名称、阶段、产品、承诺)
- Supermemory 存储"洞察和知识"(市场信号、话术、竞品)
- 两者共同构成 L1 的完整记忆
AI 调用约定
当 AI 在对话中发现值得记录的信息时,应主动调用 memory:add:
| 发现内容 | 记忆类型 |
|---|
| 客户透露的采购规模/周期/决策人 | customer_fact |
| 客户的偏好/异议/关注点 | conversation_insight |
| 有效的开场白/话术/策略 | effective_script |
| 竞品动态/对比信息 | competitor_intel |
| 市场趋势/行业动态 | market_signal |