-
Notifications
You must be signed in to change notification settings - Fork 709
feat: 希望新增全局 跨项目访问的 API key #1410
Description
Pre-submission checklist | 提交前检查
- I have searched existing issues and this hasn't been mentioned before | 我已搜索现有问题,确认此问题尚未被提及
- I have read the project documentation and confirmed this issue doesn't already exist | 我已阅读项目文档并确认此问题尚未存在
- This issue is specific to MemOS and not a general software issue | 该问题是针对 MemOS 的,而不是一般软件问题
Problem Statement | 问题陈述
我想实现:跨项目访问核心架构定论 (The Final Architecture)
- 身份钥匙:用全局 cm_xxx
结论:mpg-xxx(项目专用密钥)是给“外人”准备的隔离钥匙。
操作:作为资产主人,在 MacBook、公司 Win10 和 110 服务器上,统一只使用那一根全局主密钥(Master Key)。
- 逻辑隔离:靠 Namespace 而非靠 Key
结论:为了实现“不切窗口”的懒人需求,权限控制必须在 环境变量 层面完成。
配置:
Mac (大总管):MEMOS_RECALL_NAMESPACES="*"(看全量)。
110 服务器 (Runner):MEMOS_RECALL_NAMESPACES="Business,Web_Research"(看局部)。
- 自动路由:规则生效
结论:用 RULE_MEMORY_ROUTING.md,AI 在后台写入记忆时,会带着这根“主钥匙”去寻找对应的项目 ID。
效果:在一个窗口说“回测”,它由于拿着主钥匙,有权进入 任意 抽屉并自动把话存进去。
现在用折中方案,先改 openclaw.json 实现。
{
"memorySearch": {
"provider": "memos",
"autoRecall": true,
"semanticFilter": true,
"crossNamespaceSearch": true,
"configs": [
{
"namespace": "iTrade",
"apiKey": "iTrade的mpg-xxx密钥",
"recall": true
},
{
"namespace": "Business",
"apiKey": "Business的mpg-xxx密钥",
"recall": true
},
{
"namespace": "Private_Skills",
"apiKey": "Private_Skills的mpg-xxx密钥",
"recall": true
},
{
"namespace": "Personal_Lab",
"apiKey": "Personal_Lab的mpg-xxx密钥",
"recall": true
},
{
"namespace": "Web_Research",
"apiKey": "Web_Research的mpg-xxx密钥",
"recall": true
}
]
}
}
Willingness to Implement | 实现意愿
- I'm willing to implement this myself | 我愿意自己解决
- I would like someone else to implement this | 我希望其他人来解决