Claude Agent Memory banner
itskrishna21 itskrishna21

Claude Agent Memory

Development community

Description

Passively accumulates long-term knowledge from Claude Code sessions into ~/.claude/agents/*.md

Installation

This entry records only its repository, not the path inside it, so there is no exact command to give. Open the source below and copy the folder into ~/.claude/skills/, or the file into ~/.claude/agents/.

README

claude-agent-memory

[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](LICENSE) [![GitHub](https://img.shields.io/badge/GitHub-itskrishna21%2Fclaude--agent--memory-blue)](https://github.com/itskrishna21/claude-agent-memory)

Open-source Claude Code plugin that passively accumulates long-term knowledge from every session into your `~/.claude/agents/*.md` files. Agents get smarter over time — no manual edits.

How it works

  1. After every turn, Claude Code fires the Stop hook.
  2. agent_updater.py reads the session transcript and your agent .md files.
  3. It asks Claude Haiku (via claude -p) what durable facts belong in each agent's knowledge base.
  4. New bullet points are appended to the agent body. Frontmatter is never touched.

Requirements

  • Claude Code CLI installed and authenticated
  • Python 3.8+
  • At least one agent file in ~/.claude/agents/
  • No pip packages needed

Install

**Shell (clone or curl):**

git clone https://github.com/itskrishna21/claude-agent-memory
bash claude-agent-memory/install.sh

Or:

curl -fsSL https://raw.githubusercontent.com/itskrishna21/claude-agent-memory/main/install.sh | bash

`install.sh` copies the script to `~/.claude/scripts/agent_updater.py` and registers a Stop hook in `~/.claude/settings.json`.

**Plugin marketplace** (preferred):

/plugin marketplace add itskrishna21/claude-agent-memory
/plugin install claude-agent-memory@claude-agent-memory

Use either the shell installer **or** the marketplace plugin — not both — or you'll register the Stop hook twice.

Uninstall

bash uninstall.sh

Or: `/plugin uninstall claude-agent-memory@claude-agent-memory`

Agent `.md` files are never deleted.

Optional config

Create `~/.claude/agent-memory.json`:

{
  "last_n_messages": 15,
  "dry_run": false,
  "debug": false
}
Key Default Meaning
last_n_messages 15 How many recent transcript messa