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 从公开仓库中收录这些内容。

举报或申请下架