Memory Management

ruvnet/ruflo/.agents/skills/memory-management

作者 ruvnet6051f6702b61無授權條款74K 個星標收錄於 2026年10月8日更新於 2026年10月8日儲存庫今天更新

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, learning from previous tasks, sharing knowledge between agents, building knowledge base. Skip when: no learning needed, ephemeral one-off tasks, external data sources available, read-only exploration.

包含腳本AI & Agents
AI 產生的概覽

管理具備 HNSW 向量搜尋的持久化 AgentDB 記憶庫,用來儲存與檢索代理模式。

功能
提供命令來儲存、搜尋、取得、列出、刪除、匯出與檢視持久化 AgentDB 記憶系統中的項目,該系統由 HNSW 向量索引支援。它支援對已儲存模式進行語意相似度搜尋,並依命名空間組織知識。隨附兩個 shell 指令碼,用於將記憶備份至外部儲存,以及整併與最佳化記憶。
適用情境
適用於代理需要持久保存成功模式、以語意方式查找相似的過去解法,或在多個代理之間共享知識的情境。不適用於臨時的一次性任務或唯讀探索。
執行需求
需要以 npx 執行的 @claude-flow/cli 套件,以及可連網取得該套件的 Node.js 執行環境。隨附兩個可執行 shell 指令碼,用於備份與整併。

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

  • need to store successful patterns
  • searching for similar solutions
  • semantic lookup of past work
  • learning from previous tasks
  • sharing knowledge between agents
  • building knowledge base

When to Skip

  • no learning needed
  • ephemeral one-off tasks
  • external data sources available
  • read-only exploration

Commands

Store Pattern

Store a pattern or knowledge item in memory

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

Example:

bash
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

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

Example:

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

Retrieve Entry

Retrieve a specific memory entry by key

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

Example:

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

List Entries

List all entries in a namespace

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

Example:

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

Delete Entry

Delete a memory entry

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

Initialize HNSW Index

Initialize HNSW vector search index

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

Memory Stats

Show memory usage statistics

bash
npx @claude-flow/cli memory stats

Export Memory

Export memory to JSON

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

Scripts

ScriptPathDescription
memory-backup.agents/scripts/memory-backup.shBackup memory to external storage
memory-consolidate.agents/scripts/memory-consolidate.shConsolidate and optimize memory

References

DocumentPathDescription
HNSW Guidedocs/hnsw.mdHNSW vector search configuration
Memory Schemadocs/memory-schema.mdMemory 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

來源與署名

來源:ruvnet/ruflo位於.agents/skills/memory-management提交6051f67

授權條款: 無授權條款

內容歸原作者所有。SourceWeft 從公開儲存庫中收錄這些內容。

檢舉或申請下架