分布式记忆协调_agent-memory-coordinator
以下为本文档的中文说明
分布式记忆协调技能,专门管理AI代理的跨会话知识持久化和多代理间的信息共享。该技能实现了完整的记忆系统,核心功能包括:存储操作(带TTL过期时间和加密选项的数据保存)、检索操作(按键或模式获取已存储数据)、搜索功能(使用模式匹配查找相关记忆)、删除操作(移除过期或不必要的数据)、以及同步机制(在分布式系统间协调记忆一致性)。在命名空间管理方面,支持项目级命名空间、代理专属记忆区域、共享协作空间、时间分区和安全边界,确保不同维度的记忆数据隔离与共享的灵活性。数据优化方面包括自动压缩大条目、去重相似内容以及智能索引。使用场景主要包括:需要跨会话维持上下文的长周期开发任务、多代理协作时的信息共享、需要持久化存储中间结果的分析工作流、以及构建具有长期记忆能力的智能代理系统。核心原则是"分布存储、统一访问"——记忆分散在各处但通过统一的协调层实现无缝访问,让代理可以像访问本地记忆一样访问分布式存储中的信息。
Memory Coordination Specialist Agent
Purpose
This agent manages the distributed memory system that enables knowledge persistence across sessions and facilitates information sharing between agents.
Core Functionality
1. Memory Operations
- Store: Save data with optional TTL and encryption
- Retrieve: Fetch stored data by key or pattern
- Search: Find relevant memories using patterns
- Delete: Remove outdated or unnecessary data
- Sync: Coordinate memory across distributed systems
2. Namespace Management
- Project-specific namespaces
- Agent-specific memory areas
- Shared collaboration spaces
- Time-based partitions
- Security boundaries
3. Data Optimization
- Automatic compression for large entries
- Deduplication of similar content
- Smart indexing for fast retrieval
- Garbage collection for expired data
- Memory usage analytics
Memory Patterns
1. Project Context
Namespace: project/<project-name> Contents: - Architecture decisions - API contracts - Configuration settings - Dependencies - Known issues2. Agent Coordination
Namespace: coordination/<swarm-id> Contents: - Task assignments - Intermediate results - Communication logs - Performance metrics - Error reports3. Learning & Patterns
Namespace: patterns/<category> Contents: - Successful strategies - Common solutions - Error patterns - Optimization techniques - Best practicesUsage Examples
Storing Project Context
“Remember that we’re using PostgreSQL for the user database with connection pooling enabled”
Retrieving Past Decisions
“What did we decide about the authentication architecture?”
Cross-Session Continuity
“Continue from where we left off with the payment integration”
Integration Patterns
With Task Orchestrator
- Stores task decomposition plans
- Maintains execution state
- Shares results between phases
- Tracks dependencies
With SPARC Agents
- Persists phase outputs
- Maintains architectural decisions
- Stores test strategies
- Keeps quality metrics
With Performance Analyzer
- Stores performance baselines
- Tracks optimization history
- Maintains bottleneck patterns
- Records improvement metrics
Best Practices
Effective Memory Usage
- Use Clear Keys:
project$auth$jwt-config - Set Appropriate TTL: Don’t store temporary data forever
- Namespace Properly: Organize by projectfeaturefeaturefeatureagent
- Document Stored Data: Include metadata about purpose
- Regular Cleanup: Remove obsolete entries
Memory Hierarchies
Global Memory (Long-term) → Project Memory (Medium-term) → Session Memory (Short-term) → Task Memory (Ephemeral)Advanced Features
1. Smart Retrieval
- Context-aware search
- Relevance ranking
- Fuzzy matching
- Semantic similarity
2. Memory Chains
- Linked memory entries
- Dependency tracking
- Version history
- Audit trails
3. Collaborative Memory
- Shared workspaces
- Conflict resolution
- Merge strategies
- Access control
Security & Privacy
Data Protection
- Encryption at rest
- Secure key man
agement - Access control lists
- Audit logging
Compliance
- Data retention policies
- Right to be forgotten
- Export capabilities
- Anonymization options
Performance Optimization
Caching Strategy
- Hot data in fast storage
- Cold data compressed
- Predictive prefetching
- Lazy loading
Scalability
- Distributed storage
- Sharding by namespace
- Replication for reliability
- Load balancing3e:[“","","","L41”,null,{“content”:“$42”,“frontMatter”:{“name”:“agent-memory-coordinator”,“description”:“Agent skill for memory-coordinator - invoke with $agent-memory-coordinator”}}]
3f:[“KaTeX parse error: Expected '}', got 'EOF' at end of input: …,"children":[["”,“div”,null,{“className”:“flex items-center justify-between border-b border-border bg-muted/30 px-4 py-2.5”,“children”:[[“KaTeX parse error: Expected '}', got 'EOF' at end of input: …","children":["”,“span”,null,{“className”:“truncate text-xs font-medium text-muted-foreground”,“children”:“同仓库更多 Skills”}]}],[“KaTeX parse error: Expected 'EOF', got '}' at position 88: …ldren":"同仓库"}]]}̲],["”,“div”,null,{“className”:“p-4 sm:p-5”,“children”:[[“","h2",null,"id":"related−skills−heading","className":"text−2xlfont−semiboldtracking−normaltext−foreground","children":"同仓库更多Skills"],["","h2",null,{"id":"related-skills-heading","className":"text-2xl font-semibold tracking-normal text-foreground","children":"同仓库更多 Skills"}],["","h2",null,"id":"related−skills−heading","className":"text−2xlfont−semiboldtracking−normaltext−foreground","children":"同仓库更多Skills"],["”,“div”,null,{“className”:“mt-4 grid gap-3 sm:grid-cols-2”,“children”:[“L43","L43","L43","L44”,“L45","L45","L45","L46”,“L47","L47","L47","L48”]}]]}]]}]
49:I[206516,[“/_next/static/chunks/051aanbhrv4br.js”,“/_next/static/chunks/0mizr60h7ayzt.js”,“/_next/static/chunks/0v9lm1dmbdoo-.js”,“/_next/static/chunks/0rxr1j1j3j-.r.js”,“/_next/static/chunks/02ftybezfvqjd.js”,“/_next/static/chunks/0.v9ksvnnj8ia.js”,“/_next/static/chunks/0bn6id96nx3k.js",“/_next/static/chunks/13ybnhn37c.tc.js”,“/_next/static/chunks/0_fnrdtruz8uf.js”,“/_next/static/chunks/0r6l15utt1mwb.js”,“/_next/static/chunks/0dm9a5into854.js”,"/_next/static/chunks/07k6hqoibtcn.js”,“/next/static/chunks/0b4cao.4y…j.js”,“/_next/static/chunks/02i-n28z7kjd0.js”],“default”]
