agent-memory

agent-memory is a skill for Claude Code, Codex from LeoYeAI/openclaw-master-skills. It costs 0 tokens per session (328 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,134 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 0 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 328 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.00000 $0.00328
Opus 5 $0.00000 $0.00164
Sonnet 5 $0.00000 $0.00066
Haiku 4.5 $0.00000 $0.00033

Measured 5d ago against content hash 7de6c27f611b, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-09, 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 5d 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 · 67 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. 5d 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,134 stars, last pushed 1mo ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 328 tokens. 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

Other skills, from other repositories

openclaw-auto-dream

Cognitive memory architecture for OpenClaw agents — periodic dream cycles that consolidate daily logs into structured long-term memory with importance scoring, insights, and push notifications. Use when: user asks for 'auto memory', 'dream', 'auto-dream', 'memory consolidation', 'memory dashboard'. Powered by…

LeoYeAI/openclaw-auto-dream · 79 tokens

myclaw-backup

Backup and restore all OpenClaw configuration, agent memory, skills, and workspace data. Part of the MyClaw.ai (https://myclaw.ai) open skills ecosystem — the AI personal assistant platform that gives every user a full server with complete code control. Use when the user wants to create a snapshot of their OpenClaw…

LeoYeAI/openclaw-backup · 179 tokens

memory

Search conversation history and understand Dream-managed profile and memory files.

HKUDS/nanobot · 14 tokens

data-sync

Sync and archive data from messaging platforms (WhatsApp, Discord, Slack, Twitter/X, Google) into Moltis memory as daily digest summaries. Orchestrates crawl tools and writes structured markdown to the memory system.

moltis-org/moltis · 46 tokens

cocoscout

Relevance-ranked context loading — Tier 2 async subagent (Haiku, <5s) that fires after Tier 1 deterministic checks in UserPromptSubmit. Injects ranked context from CocoGrove, CocoContext, Environment Inspector, Prompt Studio, and CocoDream.

Snowflake-Labs/cocoplus · 59 tokens

cocohealth

Context utilization monitor — background monitor that samples context window utilization via PostToolUse hook, surfaces advisory at 60% and critical warning with recovery decision matrix at 70%.

Snowflake-Labs/cocoplus · 38 tokens