agent-memory

Retrieve and inject persistent subagent memories using BM25-based three-dimensional scoring.

1|Updated Mar 27, 2026
One-click install
npx skills add https://github.com/rongarede/claude-skills-orchestration --skill agent-memory-rongarede
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: agent-memory
Source: https://github.com/rongarede/claude-skills-orchestration/tree/main/skills/agent-memory
Command: npx skills add https://github.com/rongarede/claude-skills-orchestration --skill agent-memory-rongarede

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires rank-bm25, pyyaml, anthropic-sdk, yaml, and includes scripts (resource) components.

What problem does it solve?

It solves the problem of losing valuable context across Claude Code subagent runs by providing a persistent, searchable memory system that can store experiences, retrieve the most relevant ones, and continuously improve memory quality from feedback.

Core Features & Use Cases

  • Associative memory storage: saves subagent task outcomes as Markdown notes with YAML frontmatter metadata for later retrieval.
  • Three-dimensional relevance retrieval: ranks memories using recency, importance, and BM25-style relevance, and supports spreading activation through memory links.
  • Feedback learning and health filtering: updates memory usefulness via positive/negative feedback, categorizes memory health (healthy/warning/blocked), and filters blocked memories from future retrieval and consolidation.
  • Consolidation and decay: deduplicates near-duplicate memories via Jaccard similarity merging (threshold-based) and applies Ebbinghaus-inspired exponential decay to reduce stale low-value memories.
  • Prompt injection for subagents: enriches an agent prompt by injecting the top retrieved memories in a compact formatted block.

Quick Start

Use the agent-memory skill to retrieve and inject relevant historical context for the query "Implement token refresh for JWT middleware" for agent role tetsu.

Frequently Asked Questions about agent-memory

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I persist context across Claude Code subagent runs?

To persist context across Claude Code subagent runs, you need a memory system that stores task outcomes as Markdown notes with YAML frontmatter. This allows agents to retrieve past experiences and continuously improve memory quality using feedback learning.

How does BM25 relevance retrieval work for agent memory?

BM25 relevance retrieval for agent memory ranks stored experiences using a three-dimensional scoring system combining recency, importance, and BM25-style text relevance. This ensures the most contextually appropriate memories are retrieved for a given task query.

Can I use YAML frontmatter to manage subagent memory health and filtering?

Yes, you can use YAML frontmatter to manage subagent memory health by categorizing memories as healthy, warning, or blocked. Blocked memories are automatically filtered out from future retrieval and consolidation processes to maintain context quality.

What is the best way to deduplicate near-duplicate agent memories?

The best way to deduplicate near-duplicate agent memories is using Jaccard similarity merging with threshold-based consolidation. This process combines overlapping context entries and applies Ebbinghaus-inspired exponential decay to reduce stale, low-value memories over time.

Does prompt injection work with multi-agent memory stores?

Yes, prompt injection works with multi-agent memory stores by enriching an agent prompt with a compact formatted block of top retrieved memories. It supports personal and shared memory stores, optional cross-agent retrieval, and spreading activation via related memory links.

How do I apply feedback learning to adjust memory usefulness scores?

You apply feedback learning to adjust memory usefulness by recording positive or negative feedback on retrieved memories. This feedback-driven scoring adjustment updates the importance dimension, ensuring that memories proven useful are prioritized in future BM25 retrieval operations.