Memory management

From ruvnet/ruflo · View interactive version

Memory management is an AI agent skill from the GitHub repository ruvnet/ruflo. AgentDB memory system with HNSW vector search. Provides 150x-12,500x faster pattern retrieval, persistent storage, and semantic search capabilities for learning and knowledge management. Use when: need to store successful patterns, searching for similar solutions, semantic lookup of past work, learn

How to use this skill

Skill file

Memory Management Skill

Purpose

AgentDB memory system with HNSW vector search. Provides 150x-12,500x faster pattern retrieval, persistent storage, and semantic search capabilities for learning and knowledge management.

When to Trigger

When to Skip

Commands

Store Pattern

Store a pattern or knowledge item in memory

npx @claude-flow/cli memory store --key "[key]" --value "[value]" --namespace patterns

Example:

npx @claude-flow/cli memory store --key "auth-jwt-pattern" --value "JWT validation with refresh tokens" --namespace patterns

Semantic Search

Search memory using semantic similarity

npx @claude-flow/cli memory search --query "[search terms]" --limit 10

Example:

npx @claude-flow/cli memory search --query "authentication best practices" --limit 5

Retrieve Entry

Retrieve a specific memory entry by key

npx @claude-flow/cli memory get --key "[key]" --namespace [namespace]

Example:

npx @claude-flow/cli memory get --key "auth-jwt-pattern" --namespace patterns

List Entries

List all entries in a namespace

npx @claude-flow/cli memory list --namespace [namespace]

Example:

npx @claude-flow/cli memory list --namespace patterns --limit 20

Delete Entry

Delete a memory entry

npx @claude-flow/cli memory delete --key "[key]" --namespace [namespace]

Initialize HNSW Index

Initialize HNSW vector search index

npx @claude-flow/cli memory init --enable-hnsw

Memory Stats

Show memory usage statistics

npx @claude-flow/cli memory stats

Export Memory

Export memory to JSON

npx @claude-flow/cli memory export --output memory-backup.json

Scripts

| Script | Path | Description |

|--------|------|-------------|

| memory-backup | .agents/scripts/memory-backup.sh | Backup memory to external storage |

| memory-consolidate | .agents/scripts/memory-consolidate.sh | Consolidate and optimize memory |

References

| Document | Path | Description |

|----------|------|-------------|

| HNSW Guide | docs/hnsw.md | HNSW vector search configuration |

| Memory Schema | docs/memory-schema.md | Memory namespace and schema reference |

Best Practices

  1. Check memory for existing patterns before starting
  2. Use hierarchical topology for coordination
  3. Store successful patterns after completion
  4. Document any new learnings
Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.