使用说明
AI代理的语义记忆。储存模式,按意义搜索,永远记住。
📖 对于LLMs:参见 建筑.md 详细实施& 测试.md 用于工具参考
这有什么作用
给你的人工智能代理一个学习和记忆的大脑:
- 🧠 语义搜索:按含义而非关键字查找模式
- 💾 三种内存类型:语义(永远),情节(90天),程序(永远)
- 📈 智力化合物从每一项任务中学习,行动前回想
- 🔄 自动整合:自动推广已验证的模式
快速开始
安装
claude mcp add memory -- npx -y github:Sceat/semantic-memory-mcp
然后在中配置环境变量 ~/.claude.json:
{
"mcpServers": {
"memory": {
"env": {
"REDIS_URL": "redis://localhost:6379/0",
"OPENAI_API_KEY": "your-openai-key-here"
}
}
}
}
使用
立即可用的六种工具:
store_pattern-保存你学到的东西search_patterns-寻找相似的模式set_reminder-永远不要忘记重要的细节check_reminders-在任务之前获取上下文consolidate_memories-推广经过验证的模式health_check-验证系统状态
运作原理
┌─────────────────────────────────────────────────────┐
│ │
│ Before Task: Query memory for similar patterns │
│ Check reminders for this task type │
│ │
│ During Task: Execute with learned context │
│ │
│ After Task: Store what you learned │
│ Set reminders for next time │
│ │
│ Result: Intelligence compounds over time │
│ │
└─────────────────────────────────────────────────────┘
地方发展
如果要开发或修改服务器:
git clone https://github.com/Sceat/semantic-memory-mcp.git
cd semantic-memory-mcp
npm install
然后添加到您的Claude Code配置中:
{
"mcpServers": {
"memory": {
"command": "node",
"args": ["/path/to/semantic-memory-mcp/src/index.js"],
"env": {
"REDIS_URL": "redis://localhost:6379/0",
"OPENAI_API_KEY": "your-openai-key-here"
}
}
}
}
需求
- Node.js≥18
- 带有RediSearch模块的Redis 7.2+
- OpenAI API密钥
- 克劳德代码
许可证
麻省理工学院