跳到正文
Skillpedia
智能体81k · #1533

memory-management

它能做什么

这项技能引导智能体把模式和知识保存在持久记忆中,并按含义进行搜索。适合希望智能体从早先任务中学习、并复用有效做法的人。

适用场景

  • ✓当你希望保存一个成功的解决方案,以便日后复用的时候。
  • ✓当你需要找到与新任务相似的过去工作的时候。
  • ✓当多个智能体需要共享它们所学到的东西的时候。

技能链接

https://github.com/ruvnet/ruflo/blob/main/.agents/skills/memory-management/SKILL.md

复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。

使用方法

最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。

可直接粘贴的消息

请用这个技能帮我:https://github.com/ruvnet/ruflo/blob/main/.agents/skills/memory-management/SKILL.md 阅读该链接中的 SKILL.md 文件,并在我的任务中按照它的说明来做。
想让你的 AI 自己找到这样的技能吗?安装免费的 Skillpedia MCP:只需一行,每次任务前它都会在 15,000+ 个技能中搜索。1 分钟完成安装 →

可以这样问 AI

“请把我们用于 JWT 登录的方法保存为可复用的模式,然后在我询问身份验证时找出相似的模式。”

每周 5 个新技能,1 分钟读完。

工作原理

智能体会把每个模式存放在一个键和命名空间下,在你提问时按含义搜索记忆,并取回匹配的条目。

技术内容(原始 SKILL.md)

作者在 GitHub 上的英文原文。

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

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
常见问题

什么是命名空间?

命名空间是一个命名分组,用来把相关的记忆条目放在一起。

我能按含义搜索吗?

能。这项技能包括一个语义搜索命令,可以查找相似的条目。

什么时候应该跳过它?

这项技能说明,对于不需要学习任何内容的一次性任务,应跳过它。

详情

作者的原始描述

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.

repo: ruvnet/ruflo

热度

GitHub 星标
81k
排名
#1533
许可证
MIT
更新时间
2026/11/2

这个技能有用吗?

0

登录 后即可投票。

评论

  • …

同一仓库的更多技能

相似技能