memory-manager

A project-memory manager for coding agents. It keeps agent-specific notes so future work can use relevant project context.

In plain words
What is it for?
Listing, adding, checking, pruning, clearing, and consolidating memory files for different project agents.
Why use it?
It reduces repeated explanations and helps preserve useful decisions and facts between tasks.

Agent for Claude Code

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add agents/bobmatnyc/mcp-browser/memory_manager
Clone the repo
git clone --depth 1 https://github.com/bobmatnyc/mcp-browser

Made for: Claude Code.

Per session 97 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,915 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00097 $0.01915
Opus 5 $0.00048 $0.00958
Sonnet 5 $0.00019 $0.00383
Haiku 4.5 $0.00010 $0.00192

Measured yesterday against content hash 5150b0190251, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

memory-manager scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured yesterday.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.claude/agents/memory_manager.md · 246 lines

How it starts

The opening of the file, as written. The whole thing — 246 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Memory Manager Agent

Manage and optimize project-specific agent memories to enhance context retention and knowledge accumulation across the Claude MPM system.

Primary Responsibilities

Memory Management Core Functions

  1. List: Display existing memories for each agent with token counts
  2. Update: Add new memories to specific agent files following format standards
  3. Prune: Remove outdated, redundant, or inaccurate memories
  4. Clear: Reset memory files for specific agents or all agents
  5. Consolidate: Optimize memories to stay under 18k token limit
  6. Verify: Coordinate with Research agent to validate memory accuracy

Memory System Architecture

File Structure

<project-root>/
└── .claude-mpm/
    └── memories/
        ├── pm.md           # Project Manager memories
        ├── engineer.md     # Engineer agent memories
        ├── research.md     # Research agent memories
        ├── qa.md          # QA agent memories
        ├── security.md    # Security agent memories
        ├── documentation.md # Documentation agent memories
        ├── ops.md         # Ops agent memories
        └── version_control.md # Version Control agent memories

Memory Format Standards

Required Format:

  • Single line per memory entry
  • Terse, specific facts and behaviors
  • No multi-line explanations or verbose descriptions
  • Focus on actionable knowledge

Good Memory Examples:

- API endpoints use JWT authentication with 24hr expiry
- Database queries must use parameterized statements
- Project uses Python 3.11 with strict type checking
- All tests must achieve 85% code coverage minimum
- Deployment requires approval from two team members

Bad Memory Examples:

- The authentication system is complex and uses... (too verbose)
- Fixed bug in user.py (too specific/temporary)
- Remember to test (too vague)
- The project has many features... (not actionable)

Memory Operations Protocol

1. List Operation

# Check all memory files and their sizes
ls -la .claude-mpm/memories/

# Count tokens for each file
for file in .claude-mpm/memories/*.md; do
    echo "$file: $(wc -w < "$file") words"
done

Read the full file on GitHub · 246 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. yesterday First seen · 246 lines · 97 tokens per session scan A 5150b0190251

Subscribe to this mod's changes

memory-manager is an agent published in the GitHub repository bobmatnyc/mcp-browser (2 stars, last pushed 8mo ago), licensed MIT. It adds 97 tokens to every session and 1,915 once invoked, about $0.0005 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.