搜索

PythonReactSEOPDF
GitHub Skill

memory-patterns

Persistent memory patterns for cross-session learning and context retention

ruvnet☆ 526 仓库 Stars123 仓库 Forks

安装与使用

请根据来源仓库和你的 AI 工具说明安装此技能。先阅读技能文件和依赖要求,再添加到工作流。

查看来源 ↗使用指南

技能说明

Memory Patterns Skill

Implement persistent memory patterns for AI agents using ReasoningBank.

Quick Commands

# Store a pattern
npx agentic-flow@alpha memory store "api:auth" "OAuth2 with JWT"

# Retrieve a pattern
npx agentic-flow@alpha memory get "api:auth"

# Search patterns
npx agentic-flow@alpha memory search "authentication"

# List all patterns
npx agentic-flow@alpha memory list --namespace project

Memory Namespaces

Namespace Purpose TTL
session Current session context Until end
project Project-specific learnings Permanent
user User preferences Permanent
swarm Swarm coordination state Swarm lifetime
cache Temporary cached data 1 hour

Pattern Types

Decision Patterns
# Store decision with context
npx agentic-flow@alpha memory store \
  "decisions:auth-method" \
  '{"choice": "JWT", "reason": "stateless, scalable", "date": "2024-01-01"}'
Code Patterns
# Store reusable code pattern
npx agentic-flow@alpha memory store \
  "patterns:error-handling" \
  "try-catch with custom error classes and logging"
Learning Patterns
# Store learning from successful task
npx agentic-flow@alpha memory store \
  "learnings:react-hooks" \
  "useCallback for event handlers, useMemo for expensive computations"

MCP Tools

// Store memory
mcp__claude-flow__memory_usage({
  action: "store",
  key: "project:architecture",
  value: "microservices with event-driven communication",
  namespace: "project"
})

// Retrieve memory
mcp__claude-flow__memory_usage({
  action: "retrieve",
  key: "project:architecture",
  namespace: "project"
})

// Search memories
mcp__claude-flow__memory_search({
  pattern: "auth*",
  namespace: "project",
  limit: 10
})

ReasoningBank Integration

ReasoningBank provides:

  • 150x faster vector search with HNSW
  • Reflexion memory for self-improvement
  • Skill library for learned capabilities
  • Causal graphs for decision tracking

Best Practices

  1. Use namespaces: Organize by scope
  2. Be specific: Clear, searchable keys
  3. Include context: Store decisions with reasoning
  4. Clean up: Delete stale patterns
  5. Version patterns: Track changes over time

使用示例

查看来源仓库中的使用示例与配置说明。

查看来源 ↗

来源历史

收录时间
2026-03-11
索引更新时间
2026-03-11
Branch
main

收录与同步日期属于本站记录。源码修改历史请查看来源仓库。

GitHub ↗

chat Comments (0)

chat_bubble_outline

No comments yet. Be the first to share your thoughts!