agent-memory-mcp
为 AI 智能体启用持久化内存
此技能为 AI 智能体提供持久化、可搜索的内存,以便跨会话保留架构决策、模式和知识,无需手动跟踪。
下载技能 ZIP
在 Claude 中上传
前往 设置 → 功能 → 技能 → 上传技能
开启并开始使用
测试它
正在使用“agent-memory-mcp”。 搜索所有与认证相关的存储模式
预期结果:
找到 3 个内存:
- auth-oauth2: OAuth2 实现模式
- auth-jwt: JWT 令牌处理模式
- auth-sessions: 会话管理模式
正在使用“agent-memory-mcp”。 写入关于数据库选择的新架构决策
预期结果:
内存保存成功:
Key: db-choice-postgres
Type: decision
Content: 选择 PostgreSQL 因其关系完整性和 JSON 支持
Tags: database, architecture, production
正在使用“agent-memory-mcp”。 显示内存统计
预期结果:
内存统计:
- Total memories: 24
- Types: decisions(8), patterns(12), knowledge(4)
- Top tags: authentication(5), database(4), api(3)
安全审计
安全All static findings are false positives. The skill contains only documentation with setup instructions (git clone, npm commands). The flagged 'external_commands' are legitimate bash commands in documentation, not executable code. The flagged 'network' URLs are documentation references (GitHub repo URL, localhost dashboard). The flagged 'cryptographic' terms ('key', 'risk') are common English words used in their normal sense, not cryptographic algorithms.
质量评分
你能构建什么
保留架构决策
存储和检索项目设置期间做出的架构选择,以便未来的会话理解为何选择某些模式。
构建模式库
收集和搜索开发过程中发现的可重用代码模式、片段和最佳实践。
跟踪项目上下文
在智能体会话之间维护关于项目目标、约束和约定的持久化上下文。
试试这些提示
使用 memory_write 存储此架构决策:key: '{decision_key}', type: 'decision', content: '{decision_content}', tags: ['{tag1}', '{tag2}']使用 memory_search 搜索内存中的认证模式,query: 'authentication', type: 'pattern'
使用 memory_read 检索关于'{topic}'的设计讨论,key: '{memory_key}'使用 memory_stats 显示内存统计以了解已存储的知识
最佳实践
- 对内存键使用一致的命名约定,使检索可预测
- 写入内存时添加相关标签以提高可搜索性
- 定期审查 memory_stats 以确保知识库保持有序
避免
- 在内存中存储敏感信息如 API 密钥或密码
- 创建具有略微不同键的重复内存,而不是更新现有内存
- 使用过于通用的搜索查询,返回太多不相关的结果