agent-memory

agent-memory is a skill for Claude Code, Codex from LeoYeAI/openclaw-master-skills. It costs 23 tokens per session (358 once invoked), scanned A, original, MIT.

A persistent memory system for AI agents that stores facts, lessons from past work, and information about people or projects. It lets an agent recall relevant information in later sessions.

In plain words
What is it for?
Use it to save important facts, record successes and failures, recall related information, and track entities such as people or projects.
Why use it?
It prevents useful context from being lost when a conversation ends or an agent encounters the same situation again.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: mentions AGENTS.md.

Good fit Use it to save important facts, record successes and failures, recall related information, and track entities such as people or projects.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/leoyeai/openclaw-master-skills/agent-memory
About the project

OpenClaw Master Skills is a curated, regularly updated collection of skills that extends an AI personal assistant platform with capabilities such as research, browser automation, presentation creation, and prompt work. It is intended for people using OpenClaw or MyClaw.ai to give their agents additional tasks and workflows. The catalogue contains many skills and agents from this collection.

LeoYeAI/openclaw-master-skills · 2,168 stars · on GitHub · myclaw.ai

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.

Any agent
npx skills add LeoYeAI/openclaw-master-skills --skill agent-memory
Clone the repo
git clone --depth 1 https://github.com/LeoYeAI/openclaw-master-skills

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for agent-memory

README.md
[![agentmods](https://agentmods.dev/badge/skills/leoyeai/openclaw-master-skills/agent-memory/github.svg)](https://agentmods.dev/skills/leoyeai/openclaw-master-skills/agent-memory)
Your own site
<a href="https://agentmods.dev/skills/leoyeai/openclaw-master-skills/agent-memory"><img src="https://agentmods.dev/badge/skills/leoyeai/openclaw-master-skills/agent-memory/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for agent-memory

Your own site · 80×15
<a href="https://agentmods.dev/skills/leoyeai/openclaw-master-skills/agent-memory"><img src="https://agentmods.dev/badge/skills/leoyeai/openclaw-master-skills/agent-memory.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 23 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 358 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
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.1 $0.00023 $0.00358
Opus 5.5 $0.00009 $0.00143
Sonnet 5.5 $0.00005 $0.00072
Haiku 4.5 $0.00002 $0.00036

Measured 7d ago against content hash 124935b44c39, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

agent-memory 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 7d ago.

The scan reads SKILL.md. This mod also ships 7 executable files (cli/entity.py, cli/fact.py, cli/learn.py, …), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

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.

skills/agent-memory/SKILL.md · 72 lines

What it actually says

AgentMemory Skill

Persistent memory system for AI agents. Remember facts, learn from experience, and track entities across sessions.

Installation

clawdhub install agent-memory

Usage

from src.memory import AgentMemory

mem = AgentMemory()

# Remember facts
mem.remember("Important information", tags=["category"])

# Learn from experience
mem.learn(
    action="What was done",
    context="situation",
    outcome="positive",  # or "negative"
    insight="What was learned"
)

# Recall memories
facts = mem.recall("search query")
lessons = mem.get_lessons(context="topic")

# Track entities
mem.track_entity("Name", "person", {"role": "engineer"})

When to Use

  • Starting a session: Load relevant context from memory
  • After conversations: Store important facts
  • After failures: Record lessons learned
  • Meeting new people/projects: Track as entities

Integration with Clawdbot

Add to your AGENTS.md or HEARTBEAT.md:

## Memory Protocol

On session start:
1. Load recent lessons: `mem.get_lessons(limit=5)`
2. Check entity context for current task
3. Recall relevant facts

On session end:
1. Extract durable facts from conversation
2. Record any lessons learned
3. Update entity information

Database Location

Default: ~/.agent-memory/memory.db

Custom: AgentMemory(db_path="/path/to/memory.db")

Files

What ships with it

9 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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. 7d ago Changed · +5 lines · +23 tokens per session 124935b44c39
  2. 2mo ago First seen · 67 lines · 0 tokens per session scan A 7de6c27f611b

Subscribe to this mod's changes

agent-memory is a skill published in the GitHub repository LeoYeAI/openclaw-master-skills (2,168 stars, last pushed 6d ago), licensed MIT. It adds 23 tokens to every session and 358 once invoked, about $0.0001 per session on Opus 5.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-09-03.

Related

agent-memory compared with skills from other repositories

agent-memory next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
agent-memoryLeoYeAI/openclaw-master-skillsSkill2.2k6d agoMITA23Claude Code, Codex
context-degradationagent-skills-hub/agent-skills-hubSkill1281mo agoMITA21Claude Code, Codex
context-compressionagent-skills-hub/agent-skills-hubSkill1281mo agoMITA13Claude Code, Codex
context-optimizationagent-skills-hub/agent-skills-hubSkill1281mo agoMITA13Claude Code, Codex
gossipcatgossipcat-ai/gossipcat-aiSkill4124d agoMITA50Claude Code, Codex
cortex-mem-mcpsopaco/cortex-memSkill3173mo agoMITA72Claude Code
openclaw-memory-docsdavidtoby/agent-skillsSkill11yesterdayMITA27Claude Code, Codex