Sync: add integration and agent file notes

This commit is contained in:
2026-04-25 18:43:06 +08:00
parent 7cb331a532
commit 2613a74c73
18 changed files with 2366 additions and 40 deletions

View File

@@ -0,0 +1,53 @@
---
title: "MCP Memory Integration"
type: source
tags: []
date: 2026-05-02
---
## Source File
- [[Agent/agency-agents/integrations/mcp-memory/README.md]]
## Summary用中文描述
- 核心主题:通过 MCPModel Context Protocol为 The Agency 中的任意 AI Agent 添加跨会话持久记忆能力
- 问题域Agent 默认每次会话从零开始,缺乏记忆;多 Agent 间交接依赖手动 copy-paste无法自动延续上下文
- 方法/机制:在 Agent 提示词中加入 Memory Integration 指令段Agent 自动调用 MCP 内存工具remember/recall/rollback/searchMCP Server 由外部提供,配置在 Claude Code/Cursor 等 MCP Client 中
- 结论/价值:无需修改 Agent 代码,只需在 prompt 中加入标准化的 Memory Integration 段落即可实现跨会话记忆、交接延续和失败回滚Rollback 是核心杀手级功能
## Key Claims用中文描述
- Agent 默认每次会话从零开始,缺乏上下文延续能力
- MCP Memory Server 提供 remember、recall、rollback、search 四个核心工具
- 只需在 Agent prompt 中加入 Memory Integration 段落,即可为任意 Agent 赋予持久记忆
- Rollback 是 MCP Memory 的杀手级功能:当 QA 检查失败或架构决策出错时,回滚到上一个已知良好状态,而非从头重建
- 标签一致性是关键:每次记忆都使用 Agent 名称和项目名称作为标签,确保 recall 可靠
- 无需修改 Agent 代码,无需编写 API 调用MCP 工具处理所有持久化逻辑
## Key Quotes
> "Give any agent persistent memory across sessions using the Model Context Protocol (MCP)." — MCP Memory Integration 的设计目标
> "Rollback is the killer feature: When a Reality Checker fails a deliverable, the original agent can roll back to its last checkpoint instead of trying to manually undo changes." — Rollback 作为关键恢复机制的定位
> "No code changes to the agent files. No API calls to write. The MCP tools handle everything." — 零侵入性的集成方式
## Key Concepts
- [[Cross-Session-Memory]]跨会话记忆能力Agent 在新会话中能自动检索并恢复上一次的决策和上下文
- [[Handoff-Continuity]]:多 Agent 交接延续性,一个 Agent 完成任务后交接给下一个 Agent后者能通过 MCP Memory 自动获取前者的交付物和待办,无需手动 copy-paste
- [[Rollback]]:失败回滚机制,当 QA 检查失败或架构决策出错时,恢复到上一个已知良好状态
- [[Memory-Integration-Pattern]]Memory Integration 段落——在 Agent prompt 中加入标准化指令,指导 Agent 在关键时机调用 MCP 内存工具remember/recall/rollback/search
- [[MCP-Memory-Tools]]MCP Memory Server 提供的四个核心工具——remember存储记忆、recall检索记忆、rollback回滚状态、search跨 Agent 搜索记忆)
- [[Checkpoint]]检查点Agent 在完成关键决策或交付物时存储的快照状态,供后续 rollback 使用
## Key Entities
- [[The-Agency]]The Agency 多智能体编码框架MCP Memory Integration 的应用目标
- [[MCP]]Model Context ProtocolMCP Memory Integration 的底层协议,定义了 remember/recall/rollback/search 等内存工具的接口规范
- [[Backend-Architect]]:后端架构师 AgentMCP Memory Integration 的具体应用示例(见 backend-architect-with-memory.md
- [[Startup-MVP-Workflow]]:创业 MVP 工作流MCP Memory Integration 的完整工作流示例(见 workflow-with-memory.md
## Connections
- [[The-Agency]] ← enables ← [[Memory-Integration-Pattern]]
- [[MCP]] ← provides_tools_for ← [[Cross-Session-Memory]]
- [[MCP]] ← provides_tools_for ← [[Rollback]]
- [[Backend-Architect]] ← enhanced_by ← [[MCP-Memory-Integration]]
- [[Startup-MVP-Workflow]] ← enhanced_by ← [[MCP-Memory-Integration]]
- [[Memory-Integration-Pattern]] ← uses ← [[MCP-Memory-Tools]]
## Contradictions
- 无已知内容冲突