home / skills / ruvnet / ruflo / agent-memory-coordinator

agent-memory-coordinator skill

/.agents/skills/agent-memory-coordinator

This skill coordinates and optimizes persistent memory across agents, enabling cross-session retrieval, sharing, and efficient data management.

npx playbooks add skill ruvnet/ruflo --skill agent-memory-coordinator

Review the files below or copy the command above to add this skill to your agents.

Files (1)
SKILL.md
4.5 KB
---
name: agent-memory-coordinator
description: Agent skill for memory-coordinator - invoke with $agent-memory-coordinator
---

---
name: memory-coordinator
type: coordination
color: green
description: Manage persistent memory across sessions and facilitate cross-agent memory sharing
capabilities:
  - memory-management
  - namespace-coordination
  - data-persistence
  - compression-optimization
  - synchronization
  - search-retrieval
priority: high
hooks:
  pre: |
    echo "🧠 Memory Coordination Specialist initializing"
    echo "💾 Checking memory system status and available namespaces"
    # Check memory system availability
    echo "📊 Current memory usage:"
    # List active namespaces if memory tools are available
    echo "🗂️ Available namespaces will be scanned"
  post: |
    echo "✅ Memory operations completed successfully"
    echo "📈 Memory system optimized and synchronized"
    echo "🔄 Cross-session persistence enabled"
    # Log memory operation summary
    echo "📋 Memory coordination session summary stored"
---

# 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 issues
```

### 2. Agent Coordination
```
Namespace: coordination/<swarm-id>
Contents:
  - Task assignments
  - Intermediate results
  - Communication logs
  - Performance metrics
  - Error reports
```

### 3. Learning & Patterns
```
Namespace: patterns/<category>
Contents:
  - Successful strategies
  - Common solutions
  - Error patterns
  - Optimization techniques
  - Best practices
```

## Usage 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
1. **Use Clear Keys**: `project$auth$jwt-config`
2. **Set Appropriate TTL**: Don't store temporary data forever
3. **Namespace Properly**: Organize by project$feature$agent
4. **Document Stored Data**: Include metadata about purpose
5. **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 management
- 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 balancing

Overview

This skill manages persistent memory across sessions and coordinates cross-agent memory sharing for multi-agent systems. It centralizes namespace management, optimizes stored data, and ensures synchronized access for distributed agents. The skill emphasizes durability, searchability, and secure access control.

How this skill works

The agent inspects and manages memory namespaces, performing store, retrieve, search, delete, and sync operations across distributed stores. It applies compression, deduplication, indexing, and TTL policies to optimize storage and retrieval. Hooks run pre- and post-operations to validate system status and log summaries, while access controls and encryption protect sensitive entries.

When to use it

  • Persist project-wide decisions or configuration across sessions
  • Share intermediate results between agents in a swarm workflow
  • Maintain execution state for long-running or multi-phase tasks
  • Enable cross-session continuity for user conversations or integrations
  • Enforce retention and cleanup policies for ephemeral data

Best practices

  • Use clear, hierarchical keys (project$feature$agent) for predictable lookup
  • Assign TTLs for temporary entries and longer retention for global memory
  • Namespace by project, agent, and purpose to reduce conflicts
  • Include metadata (author, timestamp, intent) with each entry for auditability
  • Regularly run garbage collection and analytics to control growth and cost

Example use cases

  • Store architectural decisions and API contracts under project namespaces for future retrieval
  • Persist task decomposition and intermediate outputs to let agents resume or hand off work
  • Keep shared coordination logs and assignments for swarm task orchestration
  • Record performance baselines and optimization history for automated tuning agents
  • Keep user session context and preferences to provide personalized, continuous conversations

FAQ

How does the skill prevent conflicting writes across agents?

It coordinates writes via namespace locks and versioning, uses merge strategies for collaborative spaces, and logs conflict resolutions for auditability.

What optimization features reduce storage costs?

Automatic compression for large entries, deduplication of similar content, tiered hot/cold storage, and TTL-based garbage collection reduce storage use and cost.